This tutorial demonstrates the use of the ChangeLocationEvent in Story Manger to run a quest that spawn NPCs at locations of your choice when a player enters either an interior or exterior cell. I use this method a lot and the example in this tutorial involves spawning NPC's when a player enters a Tavern and then deletes them after the player leaves. I also use it to start all sorts of other quests including all my Side quests, main quests and misc quests.
For the purposes of this tutorial I assume NPC's have been created in the CK.
Set up[]
First there are some things to set up:
- Create a Location for your cell
- Create a number of Location Ref Types
- A number XMarkerHeading's in the cell for the NPCs to spawn at.
- Assign each XMarkerHeading a Location Ref Type.
Create a Location and Location Ref Types[]First Create a location object in the CK: |
Then assign it to your cell: |
Create a number of LocRefTypes, you will need one for each XMarker in your cell: |
Place Xmarkers in your Cell[]Place as many XMarkerHeading's in the cell as you want NPC in this particular example there are four. |
Double click on each XMarkerHeading to open its reference window and set the Location Ref Type of each to a different LocRefType (in the CK the XMarkerHeading will have a coloured block over it when this is set). |
Create a Quest[]Now we have created the objects needed to make our quest. Create a new quest and fill the first tab in below, then click OK and open the Quest again. |
Open the Quest again and go to the Stage Tab and create 2 stages, the first ticked as the start up and the second as the shut down stage: |
In this example I want the NPC's to disappear after the player leaves the cell because I run the Quest everytime the player enters. So the shut down stage deletes the NPC's, if you only want to run the quest once you don't need to do this. |
Now go to the Alias Tab, and we need to create Alias's for the Location, the Positions (of the XmarkerHeadings) and the NPC's: |
Here's what each of those Alias's look like: Note how the NPC Alias is set to one of the Position Alias's; you can set more than one NPC Alias to a single Position but in this example they are each allocated to a different one. |
Running the Quest in Story Manager[]Now we need to get the quest to run when the Player enters the cell, so we first need to go into the change location event in Story Manager: |
Double click on ChangeLocationEvent to open up the SM Event Node: You can see from the screenshot that I have created a Stacked Branch node because I have lots of these events and it puts them under their own group (right click on the top line and select 'new branch node'). Then you right click on the Branch node you have created and select 'new quest node'. Then right click on the Stacked quest Node and select 'Add Quest' in this example I have four quests each are identical except they use different NPCs so the player sees more variety; but it could be just one quest. |
The screen shot shows the Stacked Quest Node and you can see what boxes have been selected and the Node Condition I have added: You can add other Conditions here such as a GetQuestCompleted or GetLevel, note the Target is the player. |