Jump to content

Photo

AI and the Calm Spell Dilemma

magic scripting npc illusion

  • Please log in to reply
No replies to this topic

#1
PastChristmas

PastChristmas

    Fan

  • Supporter
  • PipPipPip
  • 291 posts

I'm the mod author for Heritage - Reflexive Enemies and I've successfully been able to use the game's default combat AI to have NPC wizards cast buffs, debuffs and illusion spells that they otherwise wouldn't. There's just one or should I say two effects I haven't been able to properly implement, the vanilla calm spell and Mysticism's dominate.

 

Calm is supposed to reduce their NPC's aggression value to 0, to stop them from starting a fight. In the hands of the player it works as intended, as the effect is flagged as non-hostile. My workaround requires me to create a new version of the spell otherwise identical, but it has to include an effect that the AI thinks will hurt the recipient. This additional effect damages health, but the conditions I place on it render it totally harmless to all actors and the player. Trouble is, the receiving AI is still aggrieved by the spell and the calm effect is broken as soon as it takes effect. I've since taken to try and come up with a script to achieve the same effect, but I've had no success. Adding affected NPCs to a faction friendly to everybody won't work for companions, furthermore stopping NPC combat only works temporarily. My current workaround is for disable NPC AI for the duration of the effect, but that has it's own issues. They freeze like statues, so it looks pretty terrifying, but it isn't the calm spell the player knows and uses.

 

Dominate uses the script from the animal allegiance shout to enable the player to force NPCs to fight for them for a set period of time. Unfortunately, this doesn't work the other way around. Simply adding a follower to a faction friendly to the enemy spellcaster won't be enough to have them turn on the player. It seems to me I need to temporarily remove them from the current follower faction, which I think may have disastrous side effects. 

 

Is there something I'm missing to engineer them to work for the use of NPCs?


Edited by PastChristmas, 25 February 2020 - 11:03 PM.






Also tagged with one or more of these keywords: magic, scripting, npc, illusion

Page loaded in: 1.120 seconds