Persistent Inn system
A framework for Neverwinter Nights 1 persistent world servers.
Placeholder for the inn system documentation.
Adding the system to your module
Adding the system is as easy as adding the .hak to ~/Neverwinter Nights/hak, adding that hak to your module’s hak list, and import the .nss scripts.
Creating an inn with the system
To effectively create a new inn, or other rental space, with this script, you need three things: a placeable put outside of the play area which can contain the local variables for the inn, an innkeeper or placeable conversation which interfaces with the script, and at least one appropriately tagged door to denote at least one space to be rented.
Creating the abstract object for the inn itself
The abstract object can be any object. It should be marked as Plot so it is not destructable, as if it is destroyed, all inn variables will be lost. I usually place it outside of the play area, but this is not actually a requirement.
It should be tagged like wmi_XXXXX
where XXXXX is a five digit number arbitrarialy assigned to the inn. All similarly numbered things will be considered part of the same inn. This allows an inn to, for example, have rentals across several areas representing different floors, or a particularly-sprawling apartment complex.
Creating the innkeeper
The primary interface for the inn, as it were, is speaking with its innkeeper to rent rooms, extend your stay, or leave the room.
The innkeeper can be any NPC, which is tagged like IPI_Innkeep_XXXXX
where XXXXX is the five digit number representing the inn. Importantly, note that while you can have multiple NPCs with the actual conversation, only one innkeeper should be tagged as the actual innkeeper, tagged in this way. Consider them the owner. Undefined behaviour occurs when there are multiple NPCs with that tag.
The innkeeper needs to have a conversation which is structured to interface with the scripts. A sample is available here.