Data first¶
Every system reads its numbers from a Data Asset: damage, speeds, ranges, chances, recipes, loot, the spawn plan of a map, the colours of the interface. To add an item, a recipe, a weapon, a zombie or a buildable piece, you create Data Assets and fill their fields. The How-to guides list what each system lets you change without opening a graph.
A few Blueprints hold settings in their Class Defaults
instead, for example the camera and the movement of BP_Survivor. They need no graph either.
Classes and instances¶
A Data Asset has two parts. The class, prefixed PDA_ and derived from PrimaryDataAsset, declares
the fields and holds the default value of each one. The instances, prefixed DA_, are one per thing:
one item, one recipe, one zombie archetype.
Each system has its folder under Content/ZombieSurvival/DataAssets/, with the class at the root and
the instances in a Childs/ subfolder:
DataAssets/Items/
├── PDA_ItemDef the class of an item
├── PDA_ItemRegistry the class of the item registry
└── Childs/ the instances
├── DA_Item_Bandage
├── DA_Item_Crowbar
├── DA_ItemRegistry_Default
└── ...
A few assets sit next to their class and not in Childs/, for example DataAssets/UI/DA_UIStyle and
the animation sets in DataAssets/Animation/.
Instances are named DA_<System>_<Role>: DA_Item_Crowbar is the crowbar as an item,
DA_Weapon_Crowbar the crowbar as a weapon.
When an instance sets a field, its value wins over the class default. Most new instances must also be listed in a registry before the game finds them.
Settings and No Edit¶
Every member variable of a shipped Blueprint is in one of two categories, which tells you whether you may touch it.
| Category | What it holds | In the Details panel |
|---|---|---|
| Settings | References to Data Assets, meshes, materials, levels and classes, and tuning values such as speeds and ranges. | Instance Editable: you can change it on the class and on a placed actor. |
| No Edit | State the game writes while it runs, such as current health, timers, cached component references and saved data. | Not Instance Editable: hidden from the Details panel of placed actors. |
A variable is Settings only if you can tune it without reading the graph. Every field of a Data
Asset is Settings. "A Settings variable on BP_Survivor", in this manual, is a value you change in
that Blueprint's Class Defaults.
Tags, options and difficulty¶
Identifiers are Gameplay Tags, such as recipe categories (Recipe.Category.*), skills (Skill.*),
noises (Noise.*), game options (Sandbox.*) and quick commands (Command.*). You declare a new
one in Edit > Project Settings > Gameplay Tags.
The options of the running game are one copy, the same for the host and every player. Systems read
it through BFL_ZSSandbox.GetActiveOption, never from the preset asset.
On a small map of your own, how many zombies there are, where they stand, what the containers hold and what you start with are arrays in one spawn plan. Pine Hollow reads only its starting kit from a plan: its zombies come from population volumes and its loot from loot tables.
No hard-coded asset paths¶
No graph loads an asset from a path written as text or names a map by a string. Maps and classes are
typed references, often soft references, that you fill in the Details panel, such as
BP_BootLoader.LevelToOpen and the Maps list of BP_ZSGameInstance. You can therefore rename an
asset or reimport over it without touching anything else. Keep the rule in your own graphs: a path in
a string breaks at the first rename and raises no compile error.
Create a Data Asset¶
- In the Content Browser, right-click a
DA_*close to what you want. - Pick Duplicate, then rename the copy.
- Open it and change its fields.
- Register the new asset where its kind is listed, and test it in play.
You can also start from a blank asset: right-click in DataAssets/<System>/Childs/, pick
Miscellaneous > Data Asset, then pick the PDA_ class. A field you leave blank then falls back
to the class default without telling you, where a duplicate starts from values that already work.