Add a zombie archetype¶
An archetype is one kind of zombie: its health, its attacks, its senses, its bodies and its sounds. Spawn plans, population volumes and zombies placed by hand all name one. The tutorial Add a zombie follows these steps on an example.
Steps¶
- In
Content/ZombieSurvival/DataAssets/Zombies/Childs/, duplicate one of the eight archetypes, or create a Data Asset of the classPDA_ZombieDef. - Fill its fields (table below). On a duplicate, change
ZombieDefIdfirst: two archetypes with the same id cannot be told apart when a world is loaded. - Add it to
ZombieDefsinDA_ZombieRegistry_Default, in the same folder. - Use it in one of three ways:
- add it with a weight to the
Archetypesof a point of a spawn plan; - on a partitioned map, add it to the
Archetypesof a population volume; - drop a
BP_Zombiein the map by hand and set itsDefin the Details panel.
- add it with a weight to the
Five of the eight are archetypes proper: DA_Zombie_Resident, _Worker, _Guard, _Medic and
_Hiker. The other three, DA_Zombie_Slow, _Brisk and _Runner, are residents that differ only
by their speed, so their ArchetypeTag is Zombie.Archetype.Resident as well.
Four zombie skins ship in Materials/Characters/, shared between archetypes: MI_Zombie_Skin,
_Slow, _Brisk and _Runner.
| Field | What it does |
|---|---|
DisplayName, ArchetypeTag |
A label, used in debug and in your own tooling, and a Zombie.Archetype.* tag. |
ZombieDefId |
The key the save stores for each zombie of this archetype, to find the archetype again on load. It must be unique. The shipped ones use the archetype's short name, for example Guard. |
SpeedClass |
A Zombie.Speed.* tag of DA_ZombieSettings_Default.SpeedClasses. Empty: each zombie draws one by weight. WalkSpeed is only the fallback. |
Health, Damage |
Hit points, and health removed from the survivor per attack. |
AttackRange, AttackCooldown |
Reach in uu, and seconds between two attacks. |
ObstacleDamage |
Damage of one hit on a door, a window or a barricade, multiplied by the Strength game option. |
GrabChance, LacerationChance |
Chance that a hit grabs, and chance that a hit is a laceration. |
SightRange, SightHalfAngle |
The perception cone, half-angle in degrees. SightRange is an average (see SenseVariation). |
HearingRange |
A radius, also an average. Each noise multiplies it by its loudness, a row of the noise table. |
SenseVariation |
How far each zombie's sight and hearing may stray from the two values above, as a fraction: 0.30 is ±30 %, and 0 makes the senses exact. Rolled once per zombie at spawn, separately for each sense. |
PackAlertRadius |
How far an alerted zombie drags the others along. |
InfectionChanceOnHit |
Chance, from 0 to 1, that a successful attack is a bite. A bite infects. |
ScratchInfectionChance |
Infection chance of any other successful attack. |
StaggerDuration |
Seconds the zombie stays interrupted. |
LootList |
What it may carry: item, chance, minimum and maximum count per row. |
BodyVariants |
The bodies it may wear. Each has a skeletal mesh, its materials slot by slot, and follower outfit meshes. The host draws one per zombie, and every machine sees the same one. The shipped archetypes list Manny and Quinn in MI_Zombie_Skin. |
BodyMesh, BodyMaterial |
The fallback mesh and material, used when BodyVariants is empty. |
LocomotionSlot |
Its gait, an Anim.Zombie.Locomotion.* slot of DA_AnimSet_Zombie_Base: .Slow, .Brisk or .Runner. A gait plays at the zombie's speed divided by the slot's ReferenceSpeed, which is 100, 210 and 380 uu/s on the shipped gaits. |
AttackSound, MoanSounds, AlertSound, DeathSound, BiteSound, ObstacleHitSound |
Its sounds. MoanSounds is a list: one is drawn at random. |
BloodHitEffect |
The Niagara system of a hit, for example Niagara/Blood/NS_Zombie_BloodHit. |
How long a body stays on the ground is CorpseSeconds (180 s), a
Class Default of BP_Zombie.
Test it¶
- Open
Content/ZombieSurvival/Maps/L_Worldand select a population volume in the Outliner:PV_NorthQuartercovers the North quarter. Add your archetype to itsArchetypeswith a weight and save the map. - Open
Maps/L_Boot, press Play and choose NEW GAME. A volume is read once per new world. - Walk away from the start point until you meet one. Walk into its sight or make noise, then fight it to check its health, damage and sounds.
On a small map of your own, add it to a ZombieSpawns entry of the map's spawn plan instead.