Neverwinter Nights

File information

Last updated

Original upload

Created by

Henesua

Uploaded by

henesua

Virus scan

Safe to use

Tags for this mod

About this mod

(NWN 1 Scripts) The purpose of this system is to enable custom dying/death scripts to interrupt and replace the default behavior for the PC. Custom death/dying behavior can be unique to a particular killer of the PC or to the area in which the PC dies.

Permissions and credits
DEATH - CUSTOMIZABLE SYSTEM
by Henesua


The purpose of this system is to enable custom dying/death scripts to interrupt and replace the default death behavior for the PC and control when this happens. The default death behavior is based on HCR and Tom Banjo's death system. Custom death/dying behavior can be unique to a particular killer of the PC or to the area in which the PC dies.

While working on a single player module, I found that in certain circumstances, I wanted to launch specially scripted cutscenes or otherwise highlight these dramatic moments - perhaps even spare the main character for story reasons. This system enabled me to do that. You can specify the custom death script to run, by setting a local string on a particular NPC or Area. Should that NPC kill or mortally wound the PC, then their custom death or dying script will run in place of the default behavior. See the scripts for more.

(NOTE: I have not written any custom death behaviors for you. This system is written in a bare bones fashion to keep it simple and extensible. I found that I typically rewrote other's scripts when building a module. The hope is that with a system as simple as this, you won't have to.)

Included:
This ERF includes five scripts, and six placeables. For the placeables, see the templates titled "Bleed 1" etc... in the placeables palette under Custom : Battlefield.

Additional changes to these bleeding systems include:
The bleeding system's delay has been removed in single player games (unless a henchman is available to possibly save you). These scripts have a constant that enables you to establish whether this is a MULTIPLAYER game. And the scripts include a function which looks for the presence of henchmen.

Note on custom placeables:
The bloodstain placeables "Bleed 1" "Bleed 2" etc... were created with art assets from Project Q. If you do not have Project Q, do not despair, the script system does not use these placeables right out of the box. If you do have Project Q or have added other custom bloodstain content to your module, you are encouraged use those resources. To take advantage of them, once you have the appearances of the bloodstains to your liking, search through the scripts for Project Q and follow the instructions there. Some code will need to be commented out, and one line in the death script subequently uncommented.

Credit:
This system extends ideas presented in the old HCR (as used in the old PW Vives) as well as Tom Banjo's death system. However, I have not incorporated TB's loot and pillage code. I felt that these behaviors were better specified in the AI of the killers. My scripts however are a complete rewrite of those systems.

INSTRUCTIONS:
Setting up a module and testing the system:
  • Open a module
  • Import this ERF into the module
  • Select: Edit Module Properties:
  • Click "Events"
  • Adjust the "OnPlayerDeath" field to read "_mod_death"
  • Adjust the "OnPlayerDying" field to read "_mod_dying"
  • Adjust the "OnPlayerHeartbeat" field to read "_mod_heartbeat"
  • Save


CHANGES:
V1.1 (2012 feb 11)
  • Added _mod_heartbeat to catch when a player is damaged. Players with less than 1 hitpoint will no longer remain stabilized when damaged.
  • Changed two execute scripts to call _ex_dying instead of ag_ex_dying. (Sorry! I accidentally left this in when exporting this system from a module I was working on.)