Settlements
Narrative Pro introduces the new Settlements system which allows you to manage entire towns, cities, villages, areas of your world.
It automatically takes care of unloading and loading to keep the game optimised.
Adding a new Settlement
To add a new Settlement search your actors toolbox for Settlement
. Drag this into your world where you want your area to be managed.
You can enable the Place Actors panel by going to Window -> Place Actors
In the details panel, generate a new Settlement GUID. This is the unique id that the save manager will use as a reference.
All Settlements require a Gameplay Tag in order to function. This helps connect actors back to the Settlement they belong to.
You can also set up this settlement as a point of interest that can be discoverable.
Populate the Settlement Display Name which will be visible in the world, points of interest and world map.
Spawns
The spawns property defines which NPC's spawn from this area.
An NPC can spawn in a settlement but move anywhere in the world if you want.
This is just what spawns them and who they belong to if you send them back home for instance.
Simply populate the NPC To Spawn
with the NPC data asset you want to spawn.
You can then position this transform from the Settlement root. Simply click the diamond shape icon and move it.
You can also set a fixed position using the SpawnTransform property. (world location)
Spawns Properties
Name | Type | Description |
---|---|---|
bDisabled | bool | Whether or not the spawn is disabled. Enemies that have been killed will disable their spawn if bRememberIfKilled is true. |
SpawnID | FGuid | Used internally by settlements to identify which spawn is which. |
SpawnTag | FGameplayTag | Optional tag, can be used to grab the spawn to modify it later (for example to change the spawned NPC). |
NPCToSpawn | TObjectPtr<class UNPCDefinition> | The NPC we want the spawn to spawn in. |
SpawnTransform | FTransform | Where we'll spawn the NPC. |
bRememberIfKilled | bool | Whether the spawn should deactivate itself once its enemy is killed, or whether we should respawn. |
SpawnedNPC | TWeakObjectPtr<class ANarrativeNPCCharacter> | A pointer to the NPC, provided they are currently spawned in. |
bReleased | bool | Whether the spawn has released the NPC or not. If true, the NPC has been detached from this spawn and no longer owns it. We also won't spawn it when we activate. |
Settlement Loaders
Finally, add in a Settlement Loader to load your Settlement into the world.
Discovering Settlements
You may want to have a Settlement act like a discoverable location. You can easily do this on the Settlment Loader.