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) A simple hook into any spawning system which enables tracking of creature data across spawns. Purpose is to associate a data object with a creature, and thereby have persistency of the creature\'s data across respawns. Spawning or despawning using this system requires the user to call respectively either the SpawnCreature or the De

Permissions and credits
Simple Spawn (NWN1)
by Henesua


A simple means to create and access creature data via script. This includes two script functions that replace Create and Destroy object functions for creatures. I have inserted this into NESS in my module so that I can generate and track data related to a creature. (I renamed this entry to help clarify this fact.)

Purpose is to associate a data object with a creature, and thereby have persistency of the creature's data across respawns. Spawning or despawning using this system requires the user to call respectively either the SpawnCreature or the DespawnCreature functions within user scripts.

There is much room for expansion of this. I am using it in a module in which a creature is spawned and despawned a number of times, but I wanted to track its hitpoints across spawns, and not allow it to be spawned if it was killed.

More Reading: Bioware Social Thread

Version Notes:
1.1
- This version changed the SpawnCreature function to return the creature object so that it operates in the same manner as CreateObject.
- This version also corrected the bad files that were included in the previous version.

1.0
-A future version may have an array object so that a dynamic set of data for the creature can be stored and retrieved.

Instructions:

#include "_inc_simplespawn" in a script in which you create or destroy a creature. As long as the creatures spawned with this system use the default death script (which this system overrides), their death should be tracked.

The functions to use are SpawnCreature and DespawnCreature. They do as their names suggest. Whenever creating or destroying a creature, these functions should be used if you wish to track their data and spawn state. See the scripts for more information.

Advanced Scripters:
To integrate this system with another spawning system replace the CreateObject functions of that system with SpawnCreature from this one.