Change what a map is populated with¶
A spawn plan is one Data Asset that says which zombies stand where, which containers hold what, and what a survivor starts with. You edit it without opening the map or a graph.
Steps¶
- Open the plan of the map. For
Content/ZombieSurvival/Maps/L_Worldit isDataAssets/Spawns/Childs/DA_SpawnPlan_WorldStart, which holds the starting kit only. For a map of your own, duplicate it in the same folder: every plan is an instance of the classPDA_SpawnPlan. - Edit its three arrays (table below).
- Give every container a unique
SaveId. It is the key behind "this one has already been looted". - Set the plan on the
BP_Spawnerplaced in the map (on Pine Hollow,WT_Spawner_Start, in the outliner folderL_World/AlwaysLoaded), in its Details panel, not in the Class Defaults. A secondBP_Spawnerdropped elsewhere does nothing until you give it a plan. On a partitioned map, the plan of the spawner gives the starting kit only.
| Array | Entry fields | What it does |
|---|---|---|
ZombieSpawns |
Location, Yaw, Def (a PDA_ZombieDef) |
One zombie per entry. An entry with Archetypes draws its archetype on their weights. |
LootSpawns |
Location, Yaw, SaveId, CabinetMesh, Contents (items and counts) |
One container per entry, with what it holds. |
StartItems |
items and counts | Put straight into the survivor's bag at the start of a run. |
The starting kit¶
StartItems is the starting kit. Pine Hollow opens with a baseball bat and two bandages. The bat is
in hand, because anything in StartItems that carries a WeaponDef is equipped. Empty the array for
a survivor who starts with nothing, or add a pistol and a box of rounds for a gentler opening.
Zombies that wait for the player¶
The plan also carries ZombieWakeRadius, a distance in uu. Above 0, the plan's zombies fall asleep
as soon as they are spawned, and each one wakes when a living survivor comes within that distance,
when it is hit, or when it hears a noise. Set 800 uu, for instance, and the zombies of a small map
wait until the player comes within 8 m. 0, the default, keeps the zombies awake from the start.
A small map and a partitioned map¶
On a small map that stays loaded as a whole, the single BP_Spawner spawns everything from the plan:
the zombies, the containers and the starting kit. No zombie and no lootable container needs to be
placed by hand.
A partitioned map works the other way round, because its cells load and unload:
- its containers are placed in the map and filled from loot tables the first time they load;
- its zombies come from population volumes;
- its starting kit comes from a
BP_Spawnerwhose plan holds onlyStartItems, one of the things a large map needs.
A partitioned map may also list plans in SpawnPlans on the placed BP_ZoneManager. Only their
ZombieSpawns are read. Each entry becomes, once per new world, a saved zombie in the zone of its
place. Pine Hollow lists none. DA_SpawnPlan_WorldNorth, _WorldSouth, _WorldCentre and
_WorldForest stay in DataAssets/Spawns/Childs/ as examples.
Test it¶
- Add an item to
StartItemsinDA_SpawnPlan_WorldStart, and save. - Open
L_Worldand press Play. - Press Tab right after the start: the bag holds your
StartItems.
On a map of your own, add an item to the Contents of one container of its plan, walk to that
container and press E to search it. The item is in the loot window.
If it does not work¶
- A zombie or a container does not appear: it is not in the plan.
- Two containers empty together: they share a
SaveId.