Immobile NPC won't use spells

Howdy all,
Just come across an issue I’ve never seen before…
I have the CEP floating skull creature (c_skully.mdl) placed as a guardian and armed with Magic Missile spells and the X2_L_BEH_MAGIC int variable set to 100. Since Mr Skull is of the Hostile faction, he happily blows up any PCs who get within his perception range, then glides into melee when he runs out of spells.

However, when I set his movement rate to Immobile, he stays put but refuses to use his spells. Since I don’t want him moving about, this is quite annoying!

Does anyone know why this happens, and if anything can be done about it?
Any insights would be greatly appreciated.

BTW, I am using NWN 1.69 and Mr Skull has the basic X2 scripts.

This is absolutely normal in NWN and for most players/builders even intented behavior (often players are abusing this fact with bigby spells to make NPCs do nothing and reduce the threat significantly).

Which is why Community Patch did not attempt to solve this issue (not that I would be able to fix it as it is engine issue).

So you have three options:

  1. report it Issues · Beamdog/nwn-issues · GitHub and if/when it gets fixed in NWN-EE which I wouldn’t count for, then upgrade to NWN-EE
  2. use custom AI that is not based on GetCreatureTalent functions, Jasperre’s will work, I think that TonyK AI will work as well with immobile NPCs.
  3. create a special AI for that monster only using the vanilla custom AI file feature. Read this tutorial for more details: Tutorial - Vanilla / Community Patch AI in depth | The Neverwinter Vault it is an option that I choose myself - if this is some boss then it is always better to code his spell sequence manually, if just for the fact so he don’t go melee after he casts all prepared spells (which is imo the biggest problem of spellcasters in nwn).

If you want him to stay ranged, you could always try the XP1 ranged AI. Set x0_c2_spwn_rang as the OnSpawn script. Unless he gets cornered, the creature will keep at ranged distance from the PC. Not sure what happens with it when it runs out of ranged attacks as the creature usually gets killed before that.

If you really need something immobile, maybe try using a 99% EffectMovementSpeedDecrease on skully. He’ll still move a bit, but it’ll be so slow you probably won’t notice.

Works pretty well. Will melee if out of ranged attacks, but an unlimited low-grade wand (or whatever) ensures that never happens. Will also melee if cornered, but maybe that’s no big deal.

1 Like

Unlimited spell wand is a nice no-scripting workaround to keep the npc from getting “casted-out” and going melee. Good idea.

1 Like

Once again, many thanks Pstemarie, Proleric & Shadooow for your helpful replies.

In the end I remembered that I had a DEADSLOW entry in creaturespeed.2da that I’d never before used.
With this in place, Skully took 34 minutes to travel 2.5 metres, and given that his life-expectancy at the hands of a p****d-off party would probably be a minute at most, it all came good!

I thank you all, and Skully thanks Proleric for his shiny new wand!