This section contains all things related to NPCs and how to place them in the world using Object Spawner
NPCs in the game world are spawned via two different ways:
Crowd NPCs
Community NPCs
Crowd NPCs are as the name suggests spawned as part of the regular crowd that walks the street, they are not fully understood yet
Community NPCs are all the other NPCs, that includes everyone from the shopkeepers, quest NPCs, enemy NPCs to NPCs hanging out in specific spots
Communities allow to define a wide combination of things, allowing for very dynamic setups (E.g. NPC type, amount and spot depending on the time of day):
What NPCs
When should they spawn
How many
Where should they spawn
Setups such as making them patrol along a spline
Communities can not only be used for spawning an placing NPCs, but anything that has a TweakDB record, e.g. Vehicles
Placing AISpot nodes: These serve as markers for NPCs, defining a workspot to be used
Creating Communities: Explains how to create a community, and make it's NPCs use AISpot's
This page briefly explains how to place and preview AISpot Nodes, using Object Spawner
This guide only explains how to place AISpot Nodes, for them to be actually be used by NPCs, you will need to setup a community
AISpot Nodes define workspots that NPCs created via communities can use
A workspot is simply a location at which a NPC will play a set of animations
Object Spawner (v.0.91 or newer)
Codeware (1.15.0 or newer)
WolvenKit (With latest version of Object Spawner import script)
You need to have a basic understanding of:
Working with WolvenKit
Using Object Spawner (Spawning things and importing into WolvenKit)
You must assign a unique NodeRef to each AISpot, in order for it to be usable
In order to spawn a new AISpot, select the corresponding spawn category in Object Spawner:
AI -> AI Spot
When you spawn an AISpot, it will by default use Judy to preview the animation
This may not always work (Judy will just stand there), since not all workspots support all body rigs
For more information on this, see below
To know what rigs a workspot supports, take a look at the AI Spot -> Previewing Options -> Supported Rigs
header
Here you can also change whether you want a NPC to preview the spot, and also which NPC should do so
A list of all NPC records can be found in Object Spawner Entity -> Record
(Search for Character.
)
Additionally, you can change the speed of the animation during the preview
This is helpful since each time you move the spot, the animation will restart
Is Infinite
: If set to false, the NPC will try and go to the next AISpot defined in its community entry, once it is done with the current one
Markings: For information on markings, check the community guide
As mentioned above, you must assign a unique NodeRef to your AISpot, in order for it to be useable
This guide describes what communities are, what they are used for, and how to set them up using Object Spawner
Communities are used to spawn almost all NPCs that aren't crowd NPCs
As the name suggests, communities can be used to add large amounts of NPCs to the world while retaining a lot of control over:
What NPCs to spawn
Where those NPCs should be, what workspots they should use
What they should do during what time of day
Object Spawner (v.0.91 or newer)
Codeware (1.15.0 or newer)
WolvenKit (With latest version of Object Spawner import script)
You need to have a basic understanding of:
Working with WolvenKit
Using Object Spawner (Spawning things and importing into WolvenKit)
Know how to place AISpot
's, see the corresponding page
Each community can serve a large area
How many NPCs and how much of an area you serve with a single community is up to you, but it is generally recommended to have one community per location
Start by spawning a community, found under AI -> Community
The community should be placed in the rough area of where the AISpots that you want to use are
Make sure to assign a unique NodeRef to the community (Is the same as the Community ID
)
In general, a community consists of the following hierarchical data:
Entries:
Each entry corresponds to one NPC template, e.g. Judy or some generic NPC
Phases:
Phases are used by quests, to switch between different setups
They are not of interest if you just want to place some NPCs without quests involved
Periods:
Periods define how many NPCs should be placed where, per time period
To delete an entry, phase or period, simply right click its header
Let's start by making our community spawn a NPC, do this by adding a new entry under the Entries
header
Here you can define a name for the entry, make sure it is unique
Here you can also define what NPC template should be used
Initial Phase Name and Active On Start are only of interest for quest modding, so ignore those for now
For our example, we will only need one phase, named default
As before, use the + [Phase]
button to create a new phase for our entry
Here you can also define what appearances the NPCs of that entry should use
Do this by adding more names under the appearances header
This is totally optional, and the default will do
This defines how many of the specified NPC should be spawned, where they should be spawned, and when they should be spawned
As before, use the + [Period]
button to create a new period for our phase
For this example, let's create two periods
Each period has the following options:
Hour: This controls when the period is active
E.g. If you have two periods, 8:00 PM
and Day
, then from 8:00 PM until 9:00 AM (That's the start of Day
), the 8:00 PM
period will be active, from 9:00 AM until 8:00 PM, the Day
period will be active
Is Sequence: Only relevant if the AISpots are not set to be infinite. If checked, the NPCs will cycle through the specified spots in the same order as they are listed
Quantity: How many of the specified NPC should be spawned
Markings and Spot NodeRefs: This is where you actually define what AISpot's should be used, will be explained in the following section
This list defines what AISpot's the NPCs from that time period can use
Make sure that you have enough spots for the amount of NPCs
Simply add the NodeRefs of the AISpots that you want to be used during this time period
Markings allow you to simply tell the NPCs "Use any of the AISpots that have this marking"
You can think of a marking as a Tag that you assign to AISpots
This makes it very easy to assign many NPCs to a large amount of AISpots, randomly
This is a full example of having either one or two Judy's spawn in specified spots, depending on the time
Using markings is especially worth it for larger amounts of NPCs and spots
In order for the community to be functional, export your group from Object Spawner, and import into WKit using the Object Spawner import feature