Zombies

Zombies are a major part of Ravage - it's a post zombie apocalypse mod after all. This information was written for 0.1.561 of Ravage and was (hopefully) correct at that time.

## Factions

Every unit in ArmA 3 is part of a faction. Effectively this identifies them as being part of a particular side and determines how they behave towards other factions. There are several different factions:

```
West: "BLU_F" (NATO), "BLU_G_F" (FIA)
East: "OPF_F" (CSAT), "OPF_G_F" (FIA)
Guerillas: "IND_F" (AAF), "IND_G_F" (FIA)
Civilians: "CIV_F" (Civilians)

APEX
West: "BLU_T_F" (Pacific NATO), "BLU_CTRG_F" (Pacific CTRG), "BLU_GEN_F" (Gendarmerie)
East: "OPF_T_F"
Guerillas: "IND_C_F" (Syndikat)

Laws of War DLC
"CIV_IDAP_F"

```

Zombies have their own faction (creatively named "ZOMBIE\_Faction") which belongs to the Civilian Side (That's why they can be found under 'civilian' in Eden).

But technically, all zombies are set to become renegades as soon as they spawn (making sure no one mistakes them for glitched friends), so inquiring on a zed's side while playing will probably return "sideEnemy", which is neither civilian, opfor or anything. It's just "bad guys".

## Pathfinding

Zombie pathfinding is determined by a navigation mesh. ArmA 3 uses meshes to determine routes between objects and buildings for AI unit to take. When zombies detect a player, they will move towards them according to the navigation mesh. When they reach a building, they will find the entrance using BuildingPos and use the internal navigation mesh of the building to find their way around. This mesh does not include furniture (especially the dynamic loot furniture created by Ravage) so zombies will tend to bump into things (and they could glitch a bit).

When a zombie loses sight of a player, they will continue to the last location where they saw them. If they can detect the player again at this point, they will continue in pursuit. If they cannot detect the player, they will break off pursuit and return to their default behaviour.

## Zombie types

There are three types of zombie:

**Walkers** are slow, uh, walking zombies. They will walk towards the player with an unsteady gait. They can easily be outpaced. Whilst they don't appear to pose much of a threat, large groups of them can and in a confined space, all zombies are deadly.

**Runners** are fast-moving zombies that will run towards the player at top speed. The player can run faster than them, but not by much. Note that the more weight a player carries, the slower they move (and the quicker they fatigue).

**Bolters/crawlers** initially appear kneeling on one knee. They will move from time to time in a crouched run. When they spot a player, they will run toward them, the same as runners. They are just as fast as runners and pose as much of a threat

## Ambient zombie module

When creating a Ravage mission, the main module pertaining to zombies is the Ambient Zombies module. It contains the settings for the behaviour of all zombies in the environment, apart from those spawned by the Zombie Horde module.

In the editor, drag the Ambient Zombies module onto the map (it doesn't matter where) and right click and select *Attributes*.

The first item listed is the *Type of zombies* and that does what you'd expect - it lets you choose between *Walkers*, *Runners* or a mixture of both. As has been explained before, *Walkers* are slow and offer less of a challenge to players. Note that the next box is *Bolters ratio* and that affects how many *Bolters* are present. If you just want *Walkers*, you have to select that in the drop down **and** set the *Bolters ratio* to zero.

The *Population limit* specifies how many zombies are in a player's area at any one time.

The *Global population limit* is the same, but for the whole map.

*Sun factor* controls whether there more zombies during daylight than night. Leave it on *Yes* to ensure there are more during daylight hours.

*Voice pitch* sets the pitch for the, uh, voices. If you want squeaky or deep-voiced zombies, you can fiddle with this number.

*Damage output* controls how much damage the zombies do when they hit a player. There is some variation in this so, if you want to change this, you'll need to experiment to find the right value. It's also worth noting that zombies can hit players in the head for more damage than a hit to the body. Zombies can also cause players to drop their backpack.

*Zombie uniforms override* allows you to use outfits from a different mod to clothe your undead. You will need to know the classnames of the uniforms in order to be able to paste them into this box. Refer to the article on Custom uniforms for zombies to see how to do this.

Note: Ambient zombies spawn all over the map, but they mostly spawn near to buildings. If there aren't any buildings (or objects that ArmA classes as buildings), then there aren't going to be any zombies about. To force zombies to spawn in a barren area where they wouldn't normally appear, consider using the *zombie horde* module.

## Zombie functions

There are several Ravage functions that affect how zombies behave and what they do. If you're using another mod with Ravage, you may need to whitelist these functions so they don't get disabled by the other mod. You can also use them to enact more complex control of zombie behaviour, but that's beyond the scope of this article (and my abilities).

```
rvg_fnc_zed_attack {};
rvg_fnc_zed_speak {};
rvg_fnc_zed_spawner {};
rvg_fnc_zed_spawn {};
rvg_fnc_zed_LoS {};
rvg_fnc_zed_init {};
rvg_fnc_zed_behaviour {};
rvg_fnc_zed_fired_near {};
rvg_fnc_zed_ambiant {};
rvg_fnc_zed_animDone {};
rvg_fnc_zed_spawnDamage {};
rvg_fnc_zed_inRange {};
rvg_fnc_zed_damageEH {};
rvg_fnc_zed_updateAgentPath {};

```

## Zombie horde module

The horde module is the other main zombie control in Ravage. You can use this to create swarms of zombies (hordes, even) that the player can encounter. Place the *Zombie Horde* module on the map. Unlike the *Ambient zombies* module, it does matter where this is placed.

The settings in the horde module are similar to that of the *Ambient zombies* module, but there are some differences. The setting for *Type of zombies* is the same, but note that the box underneath lists *Crawlers ratio.* Crawlers are *Bolters*. It's just another name for the same thing.

*Horde size* is the number of zombies in the horde. Realise that spawning a lot of zombies in a horde can be taxing on lower-end computers and don't go too nuts with this. A swarm of thirty zombies is pretty daunting - you don't need it to be a hundred (unless you're really sure).

*Spawn distance* is the radius of the circle in which the zombies will spawn. Where you place the horde module is a point at the centre of a circle. The zombies will spawn around that point, up to the *spawn distance.*

*Spawn trigger radius* is how close the player is before the zombies appear. Continuing out from the point where you place the horde module, is an invisible circle. When the player steps into this circle, the horde spawns. In the image above, the zombies will spawn in a 50m radius area around the point where the module is placed and they will spawn when the player is within 500m of that point. That's a good default.

*Zombie uniforms override* allows you to use outfits from a different mod to clothe your undead. You will need to know the classnames of the uniforms in order to be able to paste them into this box. Refer to the article on Custom uniforms for zombies to see how to do this.

Note: Ambient zombies are dealt with by the cleanup routine. When a player moves out of range of some zombies, they will despawn to prevent the player's computer getting clogged up tracking a bunch of zombies who are miles away. But this **does not apply** to the horde modules. Whilst hordes do not spawn until the player crosses the trigger threshold, they **do not despawn** when they move away. So if you chuck down a whole lot of horde modules, the game will run just fine to begin with, but will get slower and slower as more hordes are triggered. So don't chuck horde modules all over the place and wonder why things start to get bogged down.