How the framework works

Valid from Framework version 4

Basic approach

Anvil Framework attempts to be an extremely light weight objective management framework which can be used either on its own or in conjunction with other scripts and BI modules placed in the official ArmA 3 Editor. The framework functions by taking a list of markers which the mission maker provides in a script and as the mission is run, generating the spawn locations, tasks and markers that make the mission come to life. The role of the Anvil Editor makes placing and configuring these markers as well as keeping the markers in mission.sqm very simple.

Two things must be provided by the mission maker to get a mission up and running:

  1. A list of markers in the mission.sqm
  2. An objective_list array (located in anvil\mission_description.sqf containing objective details)

The advantage of splitting the markers and objective details is that the mission maker can create a mission using the Anvil Editor in a very short time period and then tweak objective locations inside the ArmA editor by simply moving markers.

In later versions of the editor (v3.x +) the changes made in the ArmA editor can be imported back into the Anvil mission format using the Edit >> Update from SQM menu option or the keyboard shortcut CTRL+U.

Folder structure

The mission has the following folder structure:

MISSION FOLDER
|   briefing.sqf
|   description.ext
|   init.sqf
|   mission.sqm
|   mission_data.json
|   README.md
+---eos
+---anvil

A brief README is provided in Markdown format (you can also view it on the about page). Additionally there may be several included scripts in the top level folder if you have included them from the editor

Folder Name Function
=BTC=_logistic Used to provide lift, fast ropes and loading for vehicles
eos (required) Bangabob's Enemy Occupation System, used to spawn and cache enemy
taw_vd The TAW View Distance script for managing view distance in game
TG Some scripts TacticalGamer.com uses for managing groups (Aerson's group manager) and for displaying player name tags

The anvil folder contains all of the scripts required to operate the framework. Inside this folder the mission_description.sqf file contains a list of objectives which are used to place and populate mission objectives, tasks and rewards.

The mission_data.json file is the editor file used to generate the mission. It is present in sample mission downloads, but is not required by the framework. Opening this file allows you to modify the mission in the Anvil Editor and export any changes you make, but in practice its best to make any changes in the Anvil Editor to prevent doing something which breaks the input format.

Objective Format

The anvil\framework_init.sqf file contains a list of objectives that will be created on the map. A standard objective definition may look like this:

[ 1, "FRINI", "fw_obj_1", 50, 1, 0, 0, 0, 2, FALSE, "", "", [2, 4], 2, ""]

It will be added to the objective_list array and made into a publicVariable. An objective array contains all the information the framework requires to build up an objective at the specified marker. The array elements are described further in the table below:

Position Type Name Accessor
0 Number ID O_ID(_obj)
1 String Title / Brief description O_DESCRIBE(_obj)
2 String Marker name O_MARKER(_obj)
3 Number Occupation radius O_R(_obj)
4 Number Number of Infantry Units O_INF(_obj)
5 Number Number of Motorised Units O_VEH(_obj)
6 Number Number of Armoured Units O_ARM(_obj)
7 Number Number of Air Units O_AIR(_obj)
8 Number EOS unit size O_STR(_obj)
9 Boolean Create a spawn point on objective completion? O_SPAWN(_obj)
10 String Name of an ammobox marker to place on objective completion, or empty for none O_AMMO(_obj)
11 String Name of an special weapons marker to place on objective completion, or empty for none O_SPECIAL(_obj)
12 Array A list of prerequisite objective IDs. Completing any single objective in this list will unlock the current objective O_PREREQ(_obj)
13 Number The type of mission to create. This is an array index and refers to the objective type list in anvil\framework_init.sqf O_MISSIONTYPE(_obj)
14 String Additional text to display in the player's tasks O_REWARDS(_obj)