NPC making howto

All development conversation and discussion takes place here

Moderator: Moderator

Message
Author
Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: NPC making howto

#46 Post by Shoob »

so what does physspeed do?
Oliphant am I, and I never lie.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: NPC making howto

#47 Post by darkgod »

Ah yes sorry :)

It's the physical attack speed, base is 1, 2 is twice as slow, 0.5 is twice as fast.

There is combat_spellspeed which works the same for spells
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: NPC making howto

#48 Post by Shoob »

ok... I put this in (making a poison ivy plant)

Code: Select all

newTalent{
	short_name = "POISON_SHIELD",
	name = "Poison Shield",
	type = {"physical/other", 1},
	mode = "sustained",
	require = { stat = { str=1 }, },
	points = 5,
	sustain_mana = 0,
	cooldown = 1,
	action = function(self, t)
		return {
			onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.Poison]=5+2*t}),
		}
	end,
	deactivate = function(self, t, p)
		self:removeTemporaryValue("on_melee_hit", p.onhit)
		return true
	end,
	info = function(self)
		return ([[This is poisonous, dont melee me.]])
	end,
}
is it possible for you to add sheaths (poison, fire, cold, lightning, etc)? this one doesnt work very well as they dont always activate it :/
Oliphant am I, and I never lie.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: NPC making howto

#49 Post by darkgod »

Code: Select all

         onhit = self:addTemporaryValue("on_melee_hit", {[DamageType.Poison]=5+2*self:getTalentLevel(t)}),
Sounds better

As for a permanent one, just do:

on_melee_hit = {[DamageType.Poison]=X}

in the NPC definition
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: NPC making howto

#50 Post by Shoob »

on_melee_hit = {[DamageType.Poison]=X}
does that work in the current RFT? I tried that and it made it so the screen went black when I entered the trollshaws...


[EDIT] nevermind... saw my mistake :/ Poison => POISON
Oliphant am I, and I never lie.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: NPC making howto

#51 Post by darkgod »

:) and a comma at the end
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: NPC making howto

#52 Post by Shoob »

I cant really tell if it is working... didnt add the comma yet though...

did notice wolves are deadlier than trolls, so they will be toned down some...

also noticed insects are not doing much damage in the trollshaws so I am fixing that... (they should be able to ignore armor pretty well (at least the swarms)
Oliphant am I, and I never lie.

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: NPC making howto

#53 Post by Shoob »

so it doesn't look like it works (I think it would make sense for it to affect the one attacking even if the defender dies)
Oliphant am I, and I never lie.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: NPC making howto

#54 Post by darkgod »

Hummm it should ..
Can you paste what you do exactly ?
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: NPC making howto

#55 Post by Shoob »

what I do is find a poison ivy, attack it... and my hp stays the same (unless they hit me) maybe I should raise the hp of it so I can do a prolonged battle... basically they are one hit kills atm :/

here is the ivy:

Code: Select all

newEntity{ base = "BASE_NPC_PLANT",
	name = "poison ivy", color=colors.GREEN,
	desc = "This harmless little plant makes you all itchy.",
	level_range = {3, 25}, exp_worth = 1,
	rarity = 7,
	max_life = resolvers.rngavg(1,1),
	combat = { dam=3, atk=15, apr=3 },
	can_multiply = 2,

	on_melee_hit = {[DamageType.POISON]=5},
}
Oliphant am I, and I never lie.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: NPC making howto

#56 Post by darkgod »

Ah silly me, it should work but there is a bug :)
Around line 60 in game/engine/modules/tome/class/Actor.lua there is:

Code: Select all

	t.on_melee_hit = {}
replace it with

Code: Select all

	t.on_melee_hit = t.on_melee_hit or {}
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: NPC making howto

#57 Post by Shoob »

ok... questions or comments: (comment first)

- I am going to include/edit the npc lists up here so they have creatures that work with both the current rft and the one being developed (if necessary)... that way people can put my monsters in and try them... (I will get around to this later, I dont have much time atm)

- (from our prior discussion) if I wanted the damage returned to vary on creature level, could I do that? if so how? if it already does... ignore this.

- monster egos: how soon? I am fine with whatever time frame

- could you make an always_ego option for monsters (or is there already... staffs have something similar) (a boolean variable) so setting it to one would mean that they will always be ego type monsters. (for my ants for the most part)

- monster packs... some monsters always hunt in packs (like wolves)... they should always be at least 3 of them in a group... (I will probably end up lowering wolves hp). probably do this like the above (make a pack_monster variable, however, it is an int, and setting it will determine how many are in the pack) (eg pack_monster = resolvers.rng(2,5) means that it will generate 2-5 of that monster type together if possible). a pack_monster = 0 is the same as a pack_monster=1. for consistencies sake. they are the same type, but each one has a chance to get an ego, and if a ego pack monster is the original, the others are not always egos (ie generate the monster over again, don't clone it).
Oliphant am I, and I never lie.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: NPC making howto

#58 Post by darkgod »

Refelctive damage baased on level .. hum
you could do =resolvers.mbonus(10, 5)
which means at max level (50) it will do 5+10, on average but it can vary.

Forced ego can be done the same way staves are done, and egos already work for monsters :)

Monster packs .. yes i'll make up something.
But for now I have a nasty crash with traps that I must fix :< Driving me nuts since yesterday !
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Shoob
Reaper
Posts: 1535
Joined: Mon Jan 22, 2007 6:31 pm
Location: East of the sun, west of the moon

Re: NPC making howto

#59 Post by Shoob »

hmmm... ok.

is there a specific way to do egos... for monsters? do you want egos put in a new folder? (ie data/general/npc/egos or whatever?)

in adjusting how is it done?

do I do dam+=? (or stat+= or apr +=, etc, etc...)

if you could, could you provide an example ego in the next rft if not here?
Oliphant am I, and I never lie.

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: NPC making howto

#60 Post by darkgod »

Yes make a directory for it just like objects.
Additions will be automatic for numbers (they do not work in yoru RFT though)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply