PDA

View Full Version : Npc spell selection


Wiz
04-22-2002, 12:16 AM
Exactly how do you input in this? Being a single integer for numerous spells and all?

Something like 2500/1200/2200 etc?

Would appreciate any help.

Drawde
04-22-2002, 01:58 AM
It's a string (in quotes) with the spell numbers seperated by spaces, like this -
"13 48 453 16". I don't know if there is a limit to the number of spells you can
have in the list.

On the subject of spells, has anyone managed to get monster ability "spells" such as spider/snake poison, drake breath etc. to work? I added them to the spell lists for these monsters, but they do not use them. Is this because they're Warriors and therefore all spellcasting AI for them is disabled?

Wiz
04-22-2002, 03:03 AM
Ahh, it's a string. That makes sense. Thanks :)

Lurker_005
04-22-2002, 05:39 AM
Usedspells is a list of up to 8 spells, and the string length can only be 70 characters long. But the length is no longer a concern since 8 spells 5 digits long is only 8*5+7=47 (7 spaces)

The 8 spell limit I think is coded into the server, and has nothing to do with the string length.

Speeking of the spells, when walking thru rivervale, I got hit with harmony... So what the NPC's consider buffs needs a little more work.

*Edit: course NPC's shouldn't really be using harmony except in quest type situations

DeletedUser
04-22-2002, 09:47 AM
Reason for 8 spells:
1) You have about 60 NPC's in each zone, probably 40 cast 40x8=320 (int32's) 8 per npc.... it adds up...
2) You don't want your server to be shuffling through 40 "available" spells, that will bring some bad lag!
3) If there were a lot of "buff" spells for a NPC, it would be nonstop casting.. right now it takes a NPC about two minutes from startup to buff itself, now if we take that into consideration that its going to buff its friends, thats going to take a very very long time with more than 8 spells...

Id gladly make an option to the "limit" of spells you can use and put it in variables... Just tell me if you want that :D

Lurker_005
04-22-2002, 10:24 AM
Can you make it a default of 8 in the absense of the propper/valid variable? That might not be a bad approach for several things.

DeletedUser
04-22-2002, 10:33 AM
sure

Drawde
04-22-2002, 10:57 PM
I'll try and shorten my NPC spell lists to 8 (the best spell for the NPC's level range) but it will take a while, so this fix probably won't be in my next DB release. I've already done the shortened lists for Clerics and Paladins though.

fabtik
04-23-2002, 12:34 AM
After Iksar Hermit in cabwest casts engulfing darkness or allure of death on himself, he starts beating up himself ;) I wouldnt call this a bug becasue its too funny.

Wiz
04-23-2002, 11:07 AM
Some problems with spell selection, it would seem. Related to damage spells.

I setup a dragon to cast own made spell Dragon Fire (2961) and Ice Comet (781). He will only cast whichever of the two comes first in the order

"2961 732" - only Dragon AE Fire
"732 2961" - only Ice Comet

Figuring my specific spell might be the problem, I switched out Dragon AE Fire for Sunstrike.

"1658 732"

Same thing happened.

Wiz
04-24-2002, 11:57 AM
Looking further into this. It would appear there's an issue where the NPC ignores whatever non-buff comes last in their arrangement of spells.

So if arrangement was.


"burn fear major shielding stun"

or

"burn fear stun major shielding"

it would in both cases ignore stun.

and

"burn stun fear major shielding"

would naturally ignore fear.