Stopping the ACM Module From Spawning In An Area.

How to limit the Spawn Area of the Arma2 ACM Editor Module.

Last week I added the Ambient Combat Manager Module to my A10 practice mission. Now I need to limit the ACM module so it doesn’t spawn AI right on the airfield. The quickest way to do this is by using markers to blacklist the area around the airport.

Inserting a Blacklist Marker

To blacklist an area with markers I have to insert two specially named markers into my existing mission. The markers will define the top left and bottom right of my blacklisted area and will need to be named BIS_ACM_1 and BIS_ACM_2.

ACM Blacklist Markers

ACM Blacklist Markers

To insert the first marker I pressed Markers (F6) and double clicked to the North East of the airport. In the Name: field I typed BIS_ACM_1.
Note that the type of marker doesn’t matter as the ACM module will delete these specially named markers when it builds the blacklist.

I next inserted a marker to the South West of the airfield and named it BIS_ACM_2. These two markers should be enough to cover the airport and stop the ACM module from spawning AI in the middle of the runway. Note that this wont stop the ACM generated AI from moving through the airport or even stopping in the blacklisted area.


ACM Blacklist Area

To create multiple blacklist areas you would need to  insert multiple markers numbered sequentially to define the area. i.e. my next area would be defined by markers named BIS_ACM_3 and BIS_ACM_4.

One blacklist area should do me for my practice mission, but next time I think I’ll add some supporting units.


Biki Ambient Combat Manager

Changing The Settings For The Arma2 ACM Module.

arma2OA ACM Editor Module

ACM Editor Module

Changing The Settings For The Ambient Combat Manager Module.

The Arma 2 Ambient Combat Manager (ACM) editor module spawns random patrols in the area around the player to simulate a larger conflict. The ACM module handles the random generation, waypoints and cleanup of the AI squads without having to insert the units manually into the mission editor.

While the default values of the ACM are well suited for infantry missions, I wanted to change them for the A-10 mission I’ve been working on. Like the SOM module, I wanted to increase the default settings for spawn distance and increase the combat intensity generated by the ACM.  To do this required a bit of scripting in addition to placing the ACM module in the editor.

arma2OA inserting ACM module

Inserting ACM module

Inserting the ACM Module Into The Editor

In opened up my existing A-10 mission in the mission editor and pressed on Modules (F7) . I then clicked on the map to insert a module and chose Unit: Ambiant Combat from the drop down list of available editor modules. I named the module myACM so I could refference the module in my scripts later. See Figure to the right.

Once the ACM is inserted into the mission you have to synchronize the module to the Player so the ACM knows where to generate the random AI. To do this I selected Synchronize (F5) then clicked on the ACM module, and dragged the synchronize line to the Player (A-10 in my example).

Changing The ACM Settings

Now that the ACM module is inserted into the mission and synchronized to the Player, scripts are needed to change the ACM‘s default settings. I could insert the code into the ACM‘s Initialization field, but the number of lines of code would make that cumbersome. A better way is to insert the required code into the mission’s Init.sqf file.

Creating An Init.sqf

Whenever a mission is started Arma will check to see if init.sqf exists in your mission folder and run this script file first.  Now the mission editor doesn’t automatically create an init.sqf, so you have to fire up Notepad and create one yourself. To do this open up Notepad and copy paste the following script into the blank document:

waitUntil {!isNil {myACM getVariable "initDone"}};
waitUntil {myACM getVariable "initDone"};

[1, myACM] call BIS_ACM_setIntensityFunc;
[myACM, 1500, 3000] call BIS_ACM_setSpawnDistanceFunc;
[["USMC","RU","INS"], myACM] call BIS_ACM_setFactionsFunc;
["ground_patrol", 1, myACM] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, myACM] call BIS_ACM_setTypeChanceFunc;

Then save the file in your mission folder (Documents\ Arma2\ Missions\ Your Mission name) with the File Name: Init.sqf and Save As Type: All Files (*.*)

What The Script Does

The first two lines of my sample script

waitUntil {!isNil {myACM getVariable "initDone"}};
waitUntil {myACM getVariable "initDone"};

cause Arma to pause executing the Init.sqf script until the ACM module I inserted in the editor (called myACM) is done initializing.

The next line:

[1, myACM] call BIS_ACM_setIntensityFunc;

sets the intensity of the ambient combat to 1. Valid values for intensity are from 0 (no ambiant combat) to 1 (max).

The Next line:

[myACM, 1500, 3000] call BIS_ACM_setSpawnDistanceFunc;

sets the distance that the ACM module spawns AI from the synchronized unit. myACM will now spawn AI 1500m to 3000m away from my A-10.

The line:

[["USMC","RU","INS"], myACM] call BIS_ACM_setFactionsFunc;

sets which factions myACM module will spawn. My mission didn’t really require this as the defaults would have been fine, but I wanted to try it anyway.

The Next lines:

["ground_patrol", 1, myACM] call BIS_ACM_setTypeChanceFunc;
["air_patrol", 1, myACM] call BIS_ACM_setTypeChanceFunc;

set the percentage chance of generating ground patrols or air patrols. Values range from 0 (no chance) to 1 (100 percent)

Once I had saved my Init.sqf I went back into Arma2 and previewed my mission in the mission editor. The first time I played the mission two random Hinds generated by the ACM nailed me before I got my A-10 off the runway. More tweaking required next week.


Biki Ambiant Combat Reference

Biki Ambiant Combat Function Reference

Operation Arrowhead Factions and Units

My Sample A-10 Mission a10Practice.Chernarus

db’s Twitter Digest for 2010-12-06 to 2010-12-12

db’s Twitter Digest for 2010-11-29 to 2010-12-05

Changing The Settings For The Arma2 SOM Module.


A10 with SOM Module

Changing The Settings For The Secondary Operations Manager Module.

To help me improve my Arma II flying skills I threw together a mission using the SOM Editor Module. SOM generates random Secondary Operations (SecOps) that I complete while I fly around in an A-10. The problem I have is the SOM module’s default settings are more geared to infantry missions. The objectives are generated too close to the player and some are incompletable by an A-10 (It’s hard to link up with an infantry squad and escort them with an A-10). Also the module starts too soon and generates SecOps while I’m sitting on the runway, so I want to configure it to initialize later in the mission.

Inserting The SOM Module

In the mission editor I first inserted an A-10 on the runway at the Grishno airport in Chernarus. Then I pressed Modules (F7 ) double clicked on the map a bit away from the A-10, so that the editor wouldn’t group the units together. From the Unit: drop down box I selected SecOp Manager. To tell the SOM which unit to generate SecOps for, I chose Synchronize (F5), then clicked on the SOM module and draged the synchronize line to the A-10. See figure below.

SOM Module A-10

SOM Module Synchronized to A-10

SOM Initialization Settings

The settings that I wish to change are read from the SOM module’s Settings variable on mission start. The suggested way to change the settings of the SOM module is with a bit of script in the Module’s Initialization field. The script uses setVariable  to set the SOM’s “settings” variable with a bunch of arrays and strings. At first glance my example below looks a bit confusing, so I’ll try to break it down and explain each section and what it will accomplish for me.

this setVariable ["settings", [["attack_location","destroy"], true, ["Bravo", ["Bravo"], "H.Q.", ["HQ"]], 120, false,30,0.8,[2000, 4000]]];

Limiting the SecOp missions pool

From my example code above, the section ["attack_location","destroy"] is my SecOp Mission pool. Out of all the valid SecOp mission types, I only want this module to have the “attack_location”, “destroy” missions available to it.

The complete list of valid missions is: [“ambush”, “attack_location”, “trap”, “rescue”, “patrol”, “escort”, “defend_location”, “destroy”, “search”]

Radio Call Signs And Voices

From my example code above, the section , true, ["Bravo", ["Bravo"], "H.Q.", ["HQ"]]

true tells the SOM module that I want the Radio chatter on. If it is set to false the SOM module will build the SecOp mission and place a map marker, all silently.

"Bravo", ["Bravo"] Callsign text and built in Arma soundbite that will be inserted into the radio communications when the SOM module refers to the player. If I wanted to get fancy I could set the player’s callsign text to “Bravo 1” and then the corresponding sounds to [“Bravo”,”one”]

"H.Q.", ["HQ"] Callsign text and built in Arma soundbite that will be inserted into the radio communications when the SOM module refers to Head Quarters.

SOM Module Initial Delay

From my example code above, 120, is the initial delay (in seconds) before the SOM module will attempt to hand out the first SecOp. The default value is 30.

Automatic Reinforcements

I’ve set Automatic Reinforcements to false (off). If it was set to true, when the player looses a squad member the SOM module will Helo insert units to replace them.

Spacing Between Missions

From my example code above,30,0.8,

If there is no active SecOp mission, every 30 seconds there is an 80% chance (0.8) of the SOM module generating a new SecOp Mission. By playing with these two values you can change the time duration between a completed mission and the player being given a new SecOp. If you don’t like the randomness and wanted to have an exact spacing of 5 minutes between missions, for example, you would set  the values as 300,1 (every 300 seconds , 100% chance of a new mission)

Distance of SecOp Objectives

From my example code above, [2000, 4000]

This tells the SOM Module that I want the SecOp objectives to be generated between 2000 and 4000 meters from the player.

Once I’m finished typing the above script into the SOM’s Initialization field it looks like the figure below.

arma2OA secop manager

SecOp Manager Initialization

The SOM Editor Module with its initialization settings tweaked like I’ve done it here does a good job of generating random objectives for my A-10 training mission. Next week I’ll add the Ambient Combat Module to the mission to increase the challenge level.


Secondary Operations Module command reference