Map population and timed actions¶
A spawn plan decides what is in a map and what a survivor starts with. The action queue runs every gesture as a timed action decided by the host.
In the game¶
What a map holds¶
No zombie is placed by hand on Pine Hollow. Population volumes seed the zombies district by district, and loot tables fill the cupboards placed in the map.
A small map of your own has one BP_Spawner. It reads a spawn plan and builds the population when
the map starts, cupboards included. The plan is read once, so nothing repopulates the map.
The starting kit¶
The survivor begins with the starting kit of the plan: a baseball bat and two bandages on Pine Hollow. The bat is already in hand, because a weapon in the kit is equipped. The clothes a survivor starts in come with the occupation.
The action queue¶
You can line up to four actions. The waiting ones are listed on screen, each with its icon and a close button that removes it alone. The one in progress shows a bar above your survivor and on the icon of the item it concerns. The bar loops for an action with no fixed end.
Walking cancels the action in progress and clears the queue, if that action is set to be cancelled by movement. The close button of the action in progress does the same.
How long an action takes¶
Each action has a base time. The survivor's level in the skill of the action shortens it, and their stat modifiers apply on top. The result is never less than a quarter nor more than four times the base.
The exact formula
An action lasts its BaseDuration, times the factor of its skill at the survivor's level
(SkillDurationFactors, one value per level), then the survivor's stat modifiers apply.
Reinforcing a barricade takes 3 s, placing a built piece 4 s and dismantling one 3 s, all three on the Carpentry skill, twice as fast at level 10 as at level 0. Tune the systems lists the times of the other actions. An action with a base time of 0 takes effect at once.
An action that finishes grants experience to its skill, once. The same gesture on the same target grants nothing more for a time set per action, which is 0 on the three building actions.
The assets¶
Spawn plans are PDA_SpawnPlan assets in Content/ZombieSurvival/DataAssets/Spawns/Childs/. The
BP_Spawner of Pine Hollow reads DA_SpawnPlan_WorldStart, which holds the starting kit and
nothing else. A plan has three arrays:
| Array | Entry fields |
|---|---|
ZombieSpawns |
Location, Yaw, Def (a PDA_ZombieDef) |
LootSpawns |
Location, Yaw, SaveId, CabinetMesh, Contents |
StartItems |
S_ItemStack entries put straight into the survivor's bag at the start of a run; an entry carrying a WeaponDef is equipped |
Every container needs a unique SaveId
It is the key behind "this one has already been looted". Two containers sharing an id empty together.
A plan also has 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. At 800 uu, the zombies of a small map wait until the player
comes within 8 m. At 0, the default, they are awake from the start.
An action is a PDA_ActionDef in DataAssets/Actions/Childs/, run by AC_ActionQueue on the
survivor. That folder has one for every gesture, from searching and crafting to reloading and
sleeping. DA_ActionRegistry_Default lists the actions a host accepts. An action of yours that
moves the body itself sets AC_ActionQueue.bHoldMoveCancel while the move lasts, as sleeping on a
bed does.
| Asset | Property | Default | What it does |
|---|---|---|---|
DA_SpawnPlan_WorldStart |
StartItems |
a baseball bat, two bandages | the starting kit |
a spawn plan (PDA_SpawnPlan) |
ZombieSpawns, LootSpawns |
empty | the zombies and containers of a small map |
a spawn plan (PDA_SpawnPlan) |
ZombieWakeRadius |
0 | the distance at which a sleeping zombie of the plan wakes; 0 keeps them awake |
DA_Action_* |
BaseDuration |
per action | the time before skill and traits |
DA_Action_* |
Skill, SkillDurationFactors |
per action | the skill that speeds it up, one factor per level |
DA_Action_* |
DurationStat |
per action | the stat its modifiers act on |
DA_Action_* |
XPAmount, XPGuardSeconds |
per action; guard 0 on building | experience and its guard per target |
DA_Action_* |
bCancelOnMove |
per action | walking cancels it |
DA_Action_BarricadeReinforce, DA_Action_BuildPlace, DA_Action_BuildDismantle |
BaseDuration |
3 s, 4 s, 3 s | on Carpentry |
Blueprints/ActorComponents/AC_ActionQueue |
MinDurationRatio, MaxDurationRatio |
a quarter, four times | bounds of an action's duration |
Change it¶
- To change the starting kit, edit
StartItems. Empty it for a survivor who starts with nothing. - To change what a map holds, edit the arrays of its spawn plan, or give the placed
BP_Spawneranother plan, as Change map population shows. The plan is set on the instance placed in the map, not on the class default. A secondBP_Spawnerdropped in a map does nothing until you give it a plan. - To make an action take time, give its
DA_Action_*aBaseDurationabove 0. It then shows a progress bar and becomes interruptible. - To change the skill, factors, experience and cancel rules of an action, edit its
DA_Action_*.