Enhancing NPC Spells/Abilities

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Enhancing NPC Spells/Abilities

Post by John Adams » Sat Jan 30, 2010 7:15 pm

I set up my server's NPCs with all their classes spells, skills and sat down to watch them interact. For those spawns in Queen's Colony that hate each other, battle ensues. Watching the melee, it becomes clear that there is no real sensibility being used as to when to apply a spell or not.

Guardian NPCs (the Defenders) spend nearly every recast timer casting Armored, with an occasional taunt. The NPCs spend nearly the entire combat casting spells on each other, rather than fighting. There is enough physical contact where the enemy eventually dies, but I feel these spawns are casting far too much. I would propose maybe adding a column to the spawn_npc_spells table where an admin can set a percentage of chance the NPC will use the given spell when it comes up to cast.

Example, Gut Kick is rolled as the next spell the NPC might try to invoke. But the Admin set the Gut Kick NPC spell to only fire off on a 25% chance. So a second random is generated to see if now Gut Kick will invoke. If so, the NPC Gut Kicks their foe. Otherwise, no action is taken and the next cast timer starts again.


Second problem we have here is that NPCs should not be allowed to cast certain spells in (or out of) combat, just like players. I saw Goblin's casting Pathfinding while getting their asses beat on by Defenders. I doubt that spell would be of benefit to the scout ;) I can almost imagine if I assigned Beta Mount to these NPC's, they'd be getting on horseback mid-fight as well. Logic needs to be put into place to see if the spell in question is something that should be cast(ed) while in-combat.


Another issue is the "ai_strategy". I think it's a little loose when in Balanced mode. Spawns that are doing combat (tanking) should probably spend less time trying to buff themselves and more time being offensive... but these are settings I will attempt to evaluate closer.


Lastly, NPCs not in combat can cast spells, right? Don't we ever see a group of spawns standing around, casting pets, buffing each other, anything like that? (if not, it sure would be cool!) I mean, shouldn't NPCs that are scouts be able to cast pathfinding on themselves before being murdered by the guards? I am not sure if this is an EQ2 Live feature or not, but I believe I recall seeing out-of-combat spawns casting spells before.



Scatman and I talked about a current BUG too, where spawns try to increase their stats, but cannot due to restrictions on spells that only land on Players. Scat said he can fix that, so we'll wait to see what he does before calling it an official bug ;)


Any thoughts?
John Adams
EQ2Emulator - Project Ghost
"Everything should work now, except the stuff that doesn't" ~Xinux

User avatar
Arremis
Retired
Posts: 388
Joined: Sun Sep 02, 2007 10:11 am
Location: Memphis, TN

Re: Enhancing NPC Spells/Abilities

Post by Arremis » Sun Jan 31, 2010 9:07 am

NPC's such as quest givers, tradesmen, and generally non-combat NPC's should not be attackable, and have no spells at all.

I would divide the spells into 3 categories: Combat, Buff, and No-use. No-use spells would be those you don't want the NPC to cast (such as Evac) and those that would be completely useless to an NPC (using your example, Pathfinding, and SoW). Combat spells would be the ones that you want them to use in combat-only situations (such as Taunt, Kick, Heal, Ward, Nuke, Sneak and Backstab). Buff spells of course are those that are used pre-combat (Thorns, HP buffs, Cast-Timer reducing buffs, etc.).

I like your idea of using percentages, but it would need to be tweaked a bit depending the situation (i.e. you wouldn't want the cleric to nuke the PC when the tank is at 10% health, but throw a heal instead).

For buffs, I would have a Buff Range, similar to Aggro Range. Say for example, a mob's Aggro Range is 30 feet. The Buff Range should be way bigger, say 300 feet (after all a PC can cover 300 feet fairly quickly). When the PC's step inside the Buff Range, imagine the mobs saying, "Hey, enemies are coming, let's buff up for combat," and then start buffing each other.

I know I say basically Aggro Range x 10 = Buff Range, but it should be a distance large enough for them to get off a few buffs. Mobs shouldn't need to have the whole range of buffs available to them, just the important ones, because chances are they won't be standing long enough to need a rebuff.

Also, before buffing each other, the NPC's should make a faction check. After all, why would a mob buff itself for combat, if it thinks it's friends are coming. Friendly, Neutral, and non-intelligent mobs (such as wolves, rats, and snakes) shouldn't need to buff, but use their combat-only skills (poison, ravaging bite, swipe, etc.).

This should only apply to trash mobs. Named mobs, Quest mobs, Raid mobs, etc., should have their own AI scripts.
I am the UI Master...there is no charge for my awesomeness.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests