Dev:Creating an Inn
From Time of Unparalleled Darkness Wiki
Initial Setup
This tutorial assumes a decorated area or areas you want to turn into an inn already exists. That highlights the first strength of the system: the inn rooms don't have to all be in the same area in the slightest, as long as they are tagged.
Begin by selecting and placing a Persistent Inn object from Special > Custom 5 in the custom placeables tablet. Set up the placeable as follows:
- This should be placed outside of the reachable area, preferably somewheres where it might not be affected by AOE affects.
- Right click on the placeable, and select properties. Change "name" to what you want the inn to be named in conversation.
- Change "tag" to an unused ID in the format wmi_XXXXX - the id must have the wmi_ prefix as so, that is what the script looks for when initializing the inn.
- Make sure Plot is checked, so the placeable cannot be destroued.
Then on the NPC you want to be the the innkeep, right click on the NPC and select properties, then:
- Set the tag to wmi_innkeep_XXXXXX with the same numeric ID as the placeable.
- Set the conversation to wmi_inn_innkeep. Do not change the base conversation! If you want to customise it, you can duplicate that conversation and use the duplicate.
- Go to Advanced > Variables, and create a STRING variable called inn_keyname. Entitle this with the name you want the key item to have, you can use @R as a room number, for example "Key to @R in my inn"
Adding Rooms
Troubleshooting
The innkeeper conversation does not launch properly in game
Ensure that the ID of the innkeeper matches the inn id, and that the inn actually has rooms defined (with the appropriate ID and room variables.
List of Inn IDs in the Module
| ID | Name | Location |
|---|---|---|
| wmi_00001 | Black Stone Inn | Barovia: Zeidenburg |
| wmi_00002 | Traveller's Hostel | Barovia: Zeidenburg |
| wmi_00003 | Craggy Peak Inn | Barovia: Krofburg |
| wmi_00004 | Resting Elk Inn | Kislova: Pirie |
| wmi_00005 | Blue Boar Inn | Barovia: Renika |
