Skip to content

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

  1. In Content/ZombieSurvival/DataAssets/Zombies/Childs/, duplicate one of the eight archetypes, or create a Data Asset of the class PDA_ZombieDef.
  2. Fill its fields (table below). On a duplicate, change ZombieDefId first: two archetypes with the same id cannot be told apart when a world is loaded.
  3. Add it to ZombieDefs in DA_ZombieRegistry_Default, in the same folder.
  4. Use it in one of three ways:
    • add it with a weight to the Archetypes of a point of a spawn plan;
    • on a partitioned map, add it to the Archetypes of a population volume;
    • drop a BP_Zombie in the map by hand and set its Def in the Details panel.

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

  1. Open Content/ZombieSurvival/Maps/L_World and select a population volume in the Outliner: PV_NorthQuarter covers the North quarter. Add your archetype to its Archetypes with a weight and save the map.
  2. Open Maps/L_Boot, press Play and choose NEW GAME. A volume is read once per new world.
  3. 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.