Adding Units & Equipment To A Custom Warfare Mission.

How to add playable units, AI and equipment to a Custom Warfare Mission.

AI_Manning_base_defenses

AI Manning Warfare Base Defenses

It is possible to add additional multi-player units and equipment and AI units to a custom built Warfare mission. For a simple mission usually all you have to do is insert the units into the mission editor and synchronize them to the Warfare Editor Module.

For this example I’m building on an existing mission and I’m assuming you already have a Warfare Editor Module inserted in your mission. (see How to Setup the Arma II Warfare Module. first)

Adding Multi-Player Units

To add playable units for Multi-player, in the Mission Editor select Units (F1) and double click to insert a unit. In my example I set the settings as follows:

Insert a Playable Unit for a Custom Arma2 Warfare Mission

Insert a Playable Unit for Multi-Player

Side: Blufor

Faction: USMC

Class: Men

Control: Playable

Unit: Rifleman

You can insert as many Playable units as the game engine will allow or your server can handle; I chose to insert 4 Blufor infantry units in my example.

Once you have the Blufor units inserted make sure that they are not grouped together (A light blue between the two). Arma has a feature that groups together units inserted near each other in the editor – you don’t want them grouped. If your units are grouped, first select Groups (F2), then click and hold your mouse button on one of the grouped units. Drag your mouse to an empty area of the map and release your mouse button. This will ungroup your Units.

To make the Warfare Module aware of your units in the mission, you will have to be synchronize them with the Warfare Module. Select Synchronize (F5), then click and hold your mouse button on your newly inserted unit. Drag your mouse to the Warfare Editor Module and let go of your mouse.

Warfare_unit_synchronized

Unit Synchronized to Warfare Module

Once you have inserted and synchronized all of your units you should have something that looks like the figure below. Note the top unit in the figure below is an unplayable AI unit, which will be used to patrol the Blufor base (see AI section below)

West Units Synchronized with Warfare Module

West Units Synchronized with Warfare Module

For my opposition I inserted Russian Infantry with the following settings:

Side: Opfor

Faction: Russia

Class: Men

Control: Playable

Unit: Rifleman

Once I had inserted a balanced set of Opfor units, I synchronized the Opfor Units to the Warfare Modual as I did with the Blufor units above.

Starting Equipment

It is possible to have additional starting equipment for your Warfare Mission. The Warfare module will handle the random placement of the unit at your base on mission start and respawn any equipment abandoned or destroyed on the battlefield.  Any empty equipment with a Side/faction associated with it (in my example the HMMWV [USMC]) can be used by the Warfare Module. To make the Warfare Module aware of the unit you will have to insert and synchronize the unit to the Warfare Module as I did with the Blufor Units above.

Equipment_warfare

Inserting Empty Equipment

Side: Empty

Class: Car

Unit: HMMWV [USMC]

Note that Empty will not be a valid option if there is no playable unit on the map.

For the Opfor in my example I inserted a couple of empty UAZ [Russia], and synchronized them to the Warfare Module as well.

Making The AI Defend The Base

By default any AI inserted and synchronized to the Warfare Module will go off and try to capture cities. If you would like to designate a group to defend the base (something players wont want to do) it requires a bit of code in the AI units Initialization field. There are two types of defense options available; “DefendBase” and “PatrolBase”

DefendBase

The AI group will defend the base, buy units, and man any static defenses. To use this option place the following bit of script in the AI Unit’s Initialization field

Group this SetVariable["dedicatedMission","DefendBase"];

Or

PatrolBase

The AI group will patrol the base and buy units. It will not man static defenses. To use this option place the following bit of script in the AI Unit’s Initialization field

Group this SetVariable["dedicatedMission","PatrolBase"];

In my example I set the AI to DefendBase:

Warfare_AI_defend_base

AI Set to Defend The Base

Note that to use the defense script the AI must be set to Control: Non Playable.

Once all the Units are inserted and synchronized my Warfare Mission looks like this:

warfare_example

Warfare Units Example

Reference

Helmand Valley Custom Warfare Example v1.3.1