PDA

View Full Version : Re:Why do NPCs still cast damage spells?



Newsfiend
01-26-2010, 02:15 PM
From an implementation standpoint, we have a variety of methods at our disposal to allow an NPC to cast a spell.


Spell innate - Spell ID is specified on the NPC. The NPC will honor the cast time, recast time, mana costs, resist mods, and AI category of the spell and cast it whenever the AI thinks it's appropriate.
Contact innate - Spell ID and contact percent X are specified on the NPC. The NPC has an X% chance to fire the spell on a successful melee attack. Cast time, recast, mana cost are disregarded. Resist mods are honored.
Auto-memmed - the NPC will automatically memorize up to Y spells that its class / level could use, so long as these spells have the NPC mem level field set to a non-zero percentage. The NPC will honor the cast time, recast time, mana costs, resist mods, and AI category of the spell and cast it whenever the AI thinks it's appropriate.
Scripted - the NPC is forced to cast the spell via the npc.cast_spell() function. This is generally run on an aggro script tick, but could also be called from a variety of other locations for a variety of reasons. Most raids and complex rares cast spells in this manner.
Spell list - Spell list ID is specified on the NPC. The NPC will memorize up to Y spells on the list that they qualify for. Cast time, recast time, and resist mod can be overwritten on a per spell basis. Mana cost and AI category are honored. Generic PC-spell lists were created back in TSS, but weren't really useable until now. An effort was made to bring them up to date so caster NPCs could use their spells in a semi-intelligent manner. This is how the Kaesora council NPCs and most caster NPCs in Underfoot work.


More... (http://forums.station.sony.com/eq/posts/list.m?topic_id=160478&post_id=2385732#2385732)