IWD and BGR help


How to change death system in IWD or BGR mods to knockout like in NWN OC? What files do i need to edit and how? I don’t have any experience with modding NWN


just posting to say your request isn’t ignored but … changing death systems can be intricate even for experienced modders.

I don’t have either Campaign installed atm. Basically i believe it involves modifying the module-level OnPlayerDeathScript in all modules of a Campaign

the very (utmost) basics: open the toolset, and go to Options. Turn off “Autosave” (very important – the default setting is On but you don’t want the toolset haphazardly overwriting files)

Then open, say, a BGR module. Go to View|Module Properties and look at its properties. Under subsection Scripts you’ll find the name of the OnPlayerDeath script …

If the module is a .MOD file the toolset will create a temp folder and that might be where the script is. Or it could be in the module’s Campaign folder. Or in a .hak file …

or if the module is not a .MOD file but a directory then the script could be there instead of a temp folder

( i bet u’r starting to see why this is complicated )

In any case it can be (probably) opened in the toolset with File|Open Conversation/Script

- take the necessary precautions when modifying stock or 3rd party material : make backups of the originals, label new stuff carefully, etc.

Compare the existing OnPlayerDeath script to one of the OC’s OnPlayerDeath scripts … (aka learn a bit of nwn script) … make changes and debug it till it works ok …


1 Like

If you PM Shallina she MAY be able to tell you what needs to be changed for BGR as she is part of that development team. It could still be just as complicated as kevL_s says.

For IWD you might ask on the IWD NEXUS page and see if a user there has any tricks.

1 Like

All right i got some script from Shallina but have no idea how to compile it or make it work. Maybe you can guys help me. Tried using toolset but i’m having trouble opening any scripts.

script : player_death_script_bg

       object oFM =  GetFirstFactionMember(GetFirstPC(TRUE), FALSE);
        while( GetIsObjectValid(oFM) )
		//	SendMessageToPC(GetFirstPC(TRUE),GetTag(oFM)+"_isDead");		 
				if (GetIsOwnedByPlayer(oFM)){
				//set this value so when you load a new area if the NPC is still dead, he remain dead
		//		SendMessageToPC(GetFirstPC(TRUE),GetTag(oFM)+"_isDead");

            oFM = GetNextFactionMember(oDead, FALSE);

supress thos and don 't forget to compil behind.


What do i do with it?

the BGR playerdeath script appears to be located at

[docs]/Neverwinter Nights 2/Campaigns/BGR/player_death_script_bg.NSS

To open such a campaign script in the toolset, open a module of that campaign first.

Please reread the instructions i posted earlier – if you don’t at least vaguely understand stuff yer askin for trouble.


The .NSS file is merely a textfile with code; if/when changes are made to it, it needs to be recompiled (in the toolset) to a .NCS file (bytecode).

if you want the OC’s playerdeath behavior, I suggest renaming that file to

[docs]/Neverwinter Nights 2/Campaigns/BGR/player_death_script_bg_ORG.NSS

_org for original

Then copy the file k_mod_player_death.nss from

[install]/Neverwinter Nights 2/Campaigns/Neverwinter Nights 2 Campaign

to the BGR Campaign folder.

Rename the copied file to player_death_script_bg.NSS

then, after opening a BGR module in the toolset, open the new file and compile it (this will overwrite its corresponding .NCS file)

ps. There might be further details that BGR expects but that’s a start …

g Luck, Cap’n


Ok, i did what you told me and it is half success. What should i do next so my party will not die as well?

what is killing them?

Hm i think that they just die because of damage. I went to Ogre in 2nd Area (where you meet Elminster for the first time) and made a save before encountering him so i can quickly test how the script works out.

1 Like

i think you can click on a Companion’s portrait to continue the fight but i forget how it all works …

yeh play around a bit,

I am no scripter but do know that companions have their own scripts and don’t use the on player death one, you import them to their properties when you make them.

This includes the gb_comp_death which finishes up on their on death event in their properties when you import the script set to the companion…

So if you find this script and rename it to whatever’s on a baldur’s gate companion that should knock them out instead of killing them. In other words do what kevL_s suggested but for a different script.

I can’t stand permanent death stuff being forced on me, we have a hit escape and reload option if we want to go into “hardcore death is death mode and now you need a resurection or some over priced healing from the holy man that also sells rip off potions and gems that do the same thing”… It’s just a game !

Sorry Shalina I know you scripted Baldur’s Gate and no offence as I realise you wanted to make it authentic and some hardcore players would have moaned if you hadn’t done it so you’re stuck in between a rock and a hard place.

1 Like

oh yeah, i forgot about those guys … will look as time permits …

1 Like