Neverwinter Nights > NwN Building
High Level NPC Caster Fix!
420:
I've been working on a set of quests that scale to the level of the PC. However, I ran into a problem with the "boss" NPC which is a wizard. At lower levels he works just fine but once he gets up into the higher levels he stops attacking.
The reason for this is the Invisibility spell. Apparently the default AI won't attack if it has the Indivisibility effect on it because that would make the Invisibility wear off. Unfortunately this means that you can pound on him all day and he will never attack, especially at level 40 where Invisibility lasts for 40 minutes.
The fix for this is to simply put this bit of code in the NPC's heartbeat.
--- Code: ---void main()
{
effect eEffect = GetFirstEffect(OBJECT_SELF);
while(GetIsEffectValid(eEffect))
{
if(GetEffectType(eEffect) == 56)
{
RemoveEffect(OBJECT_SELF, eEffect);
}
eEffect=GetNextEffect(OBJECT_SELF);
}
}
--- End code ---
After banging my head on this for a week and I can finally get back to finishing up the quests.
-420
Mo:
haha I'll just have to spam cast invisibility on him. That should screw him up but good.
420:
--- Quote from: Mo on February 04, 2009, 02:38:53 PM ---haha I'll just have to spam cast invisibility on him. That should screw him up but good.
--- End quote ---
It's a legitimate strategy. In fact, that may work on any enemy in NWN. Sort of like casting an Otiluke's Resilient Sphere, only you can still injure the target.
I could use the spellhook script to make sure you can only cast invisibility on non-hostile targets but I don't think it will be a problem.
-420
Soul Sojourner:
The only people who are likely to know are the people here anyway...
Although, we are also most likely to be the ones to actually play it...
lol.
We should all get together in Smith Hold sometime... that might be a challenge. =P
420:
--- Quote from: Soul Sojourner on February 04, 2009, 08:13:27 PM ---
We should all get together in Smith Hold sometime... that might be a challenge.
--- End quote ---
Once this new three part quest is ready I'll let everyone know and set aside a weekend for everyone to come and team up to take on the quest.
I can deal with any bugs and balance issues that way. We can all make brand new level 1 characters and test the quests at a bunch of different levels.
-420
Navigation
[0] Message Index
[#] Next page
Go to full version