Sometimes whenever I create a new NPC or a Monster, they are unkillable. Like whenever they get attacked all that happens is a yellow “0” above their heads and a “Weapon Ineffective” message. But I know good and well they should be damaged by my weapons and spells don’t work on them either. This happens occasionally but not all the time so i’m just wondering why? Sometimes if I recreate the NPC or Monster it will take damage just fine but other times not. Idk what to do lol.
They’re not set as Plot creatures, right?
Yes they’re set as plot creatures, but they have to be to make the plot work right? And why would being a plot creature make it undamageable? You’re supposed to be able to damage quest bosses right?
https://nwnlexicon.com/index.php/SetPlotFlag
Plot flagging is for ensuring that an object cannot be killed or destroyed, so it’ll definitely-for-sure keep existing.
Try the Immortal flag instead, if you want them to be able to take damage, but not die.
The plot flag is only used on bosses when you want to prevent combat - for example, to run a conversation in which the boss gloats or negotiates. For this to happen successfully, they mustn’t be hostile, either. The plot flag prevents the boss from going hostile, even if the player attacks.
When conversation turns to combat, you have to switch the plot flag off, make the boss hostile by changing faction or reputation, and DetermineCombatRound. Making them immortal is typically done only if you want something to happen when they’re down to 1 hp, such as a surrender conversation or escape to fight another day.