Clearable Exteriors

Hello landscapers!

Morrowind uses unique NPCs in almost every location. Unique NPCs do not respawn, so this means that after the player has cleared out location, it will be empty for the rest of the game. This guide shows you how to set up these types of locations to add in creature spawners after the location has been cleared. This guide assumes you have already set up the location for what you want it to look like before & after.

You can visit the cell WETestGrazelands in the WETestWorld wordlspace for an example of this method. 

Step 1

First, you will need to create a quest for your location. Do this by finding the fbmw_Enc_ClearedLocationTemplate and duplicating it. Rename your new quest to fbmw_Enc_Cleared[LocationName].

Step 2

Open up your location in the Render Window, and place an XMarker. This XMarker will serve as the "enable parent" that lets you enable or disable things based on whether the area has been cleared. If you need a reminder on how to set Enable Parents, see the Coding Basics for Landscapers page.

If something should exist before the location is cleared and get disabled after, set that reference to have the XMarker as it's Enable Parent (left). If something should only exist after the location is cleared, set that reference to have the XMarker as it's Enable Parent and select the "Set Enable State to Opposite of Parent".

Step 3

Next, we need to set up some script properties. Again, if you need a refresher on this, reread the Coding Basics for Landscapers page.

Open the quest, navigate to the Scripts tab, select the fbmw_ClearedLocationQuestScript, and then click properties. There are 4 properties for you to fill out:

3. PlayerRef: This is just the player. Select the property, then click the "Auto-Fill" button. (This property might already be filled.)

4. waitTime: This is how much time must pass (in hours) before the location changes its state. The default is 72 hours. If that's what you want, then you don't have to do anything. If you want it to be something different, then select the property, click "Edit Value", and enter the new numbe of hours.

Step 4

Now we need to add all the NPCs as "Aliases" to the quest. This is a way for the Creation Engine to track the NPCs without needing to keep them loaded in-game.

Navigate to the "Quest Aliases" tab. You should already see some Aliases filled out with dummy NPCs. What you need to do is:

Step 5

The final step is ensuring that this quest will start once the player is close to the location. This is done through the "Story Manager". KM or another coder will take care of this fore you once your quest is merged, because multiple people working on the story manager could cause merge conflicts. So, you don't have to worry about this step.

Note: If you want to test your quest before it gets merged and added to the story manager, use the console in-game to start the quest. Use the command:

setstage fbmw_Enc_Cleared[LocationName] 0


Testing

Once your quest is set up, you can test it as follows: