NWNWiki
NWNWiki
3,719
pages

How does this work ?[]

Dumb question after all of this time, but I am curious why EffectDominated()works for this spell on undead, who (generally) have immunity from mind-affecting? Presumably, dominate monster, which uses the same effect, wouldn't work on undead. I have a feeling I am missing something basic... - MrZork (talk) 23:34, July 11, 2012 (UTC)

  • Not a dumb question. I've put the same script (block-quoted below) into both nw_s0_dommon and nw_s0_conund and I got different results. The Dominate Monster spell was blocked but control undead was not. The hard-code seems to recognize the spell ID for control undead (28) and know not to factor in mind-affecting immunity in that case. (I wonder if other effects created in that spell ID also get a bypass). WhiZard (talk) 01:49, July 12, 2012 (UTC)

void main(){ApplyEffectToObject(DURATION_TYPE_PERMANENT, EffectDominated(), GetSpellTargetObject());}

  • I've gone through the mind-affecting effects, and the only ones that spell 28 can bypass mind-affecting immunity are for all forms of EffectDominated() (PC dominating NPC, PC or NPC dominating PC, NPC dominating NPC). Other mind-affecting effects are not bypassed by spell 28. WhiZard (talk) 02:43, July 12, 2012 (UTC)
  • So you are finding that the engine is hard-coded to ignore mind-affecting immunity to domination (and no other mind-affecting) specifically for Control Undead (spell 28)? That's interesting stuff. It seems a little odd for BW to have hardcoded something like that. I was initially wondering if the issue was related to spells.2da not listing Control Undead's immunity as Mind_Affecting, as it does for spells like Dominate Monster. But, your tests do seem to confirm that's not it. I guess I am wondering what that column in spells.2da really does do, if anything? - MrZork (talk) 04:18, July 12, 2012 (UTC)
  • That spells.2da column isn't used for anything as far as I know. As far as hard-coding to bypass immunity this is necessary for two branches (NPC or PC dominating PC, NPC dominating NPC) to bypass immunity. PC dominating NPC can work outside of spell scripts and outside of animal empathy even if the target has immunity to mind-affecting. I'm not sure why this route was allowed but it is possible that this route is shared with possession (familiar and DM) which would make sense why a generic call from PC to NPC will bypass immunity.WhiZard (talk) 18:01, July 12, 2012 (UTC)
  • BioWare does occasionally hardcode stuff to .2da lines, so I'd call it more "uncommon" than "odd". (The other example that springs to mind is giving extra skill points to race #6.) Someone at BioWare probably mulled this over and decided that the "best" way to implement this spell was to hardcode an exception, rather than doing something like define a new effect that would be domination that ignores immunity. Not necessarily the best decision (they were able to implement cutscene domination in patch 1.27), but not totally out of character... --The Krit (talk) 01:58, August 3, 2012 (UTC)

Spell series[]

Since we are including this with the dominate series list, I will add dominate animal to the series as well. - MrZork (talk) 16:53, August 23, 2012 (UTC)