Arma 3 Scripting

Mission.sqm

  • Also known as SQM, mission.sqm

Topic · Markdown · JSON · original wiki page

Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.

This page contains unofficial information.

Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.
Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products.

Mission.sqm is the file generated by the Mission Editor; it contains mission information (date, time, weather), object placement information (position, direction and other parameters) as well as every other setting that can be set from the editor (respawn type and duration, etc).

Versions

SQM version can be found by opening the file with a basic text editor: it is the very first line of the file, to format version=version; - correspondence below:

Version Game Format
11 - Operation Flashpoint
- Operation Flashpoint: Resistance
- Armed Assault
- Arma 2
- Arma 2: Operation Arrowhead
- Take On Helicopters
2D
12 - Arma 3 (2D Editor) 2D
53 - Arma 3 (Eden Editor) 3D

Eden Editor format

As seen above, the first line is version, then come:

A bare minimum mission.sqm looks like this, the other attributes are added when the mission is saved in the editor:

version=53;
class EditorData
{
    class Camera
    {
    };
};
randomSeed=123456;

class EditorData

class EditorData
{
    moveGridStep=1;
    angleGridStep=0.2617994;
    scaleGridStep=1;
    autoGroupingDist=10;
    toggles=1;
    mods[]=
    {
        "3denEnhanced"
    };
    class ItemIDProvider
    {
        nextID=13;
    };
    class MarkerIDProvider
    {
        nextID=1;
    };
    class Camera
    {
        // simplified example for the sake of readability
        // ...
    };
};

moveGridStep

Translation Widget's step size in meters.

angleGridStep

Angle Widget's step size in radians.

scaleGridStep

Area Scaling Widget's step size in meters.

autoGroupingDist

Defines the distance in meter to auto-group units. This value can only be changed in the mission.sqm file and not from within Eden Editor.
The change is not overwritten if the mission is saved and is persistent across different mission.sqm files.

toggles

Is a number created out of different flags.

Flag Details

Value Description Icon
0 Nothing selected N/A
1 Terrain Mode ATL
2 Terrain Mode ASL / Don't adjust up vector
4 Move in grid
8 Don't snap to surface
16 Not implemented on purpose N/A
32 Rotate in grid
64 Scale in grid
128 Force show bounding boxes
Can not be toggled from the editor
N/A
256 Disable mouseOver model highlight
Can not be toggled from the editor
N/A
512 Insert empty vehicle as default N/A
1024 Allow resize/rotate widget

Mods

Arma 3 v2.04 Mods listed here have is3DENMod = 1; set in CfgPatches.

class ItemIDProvider

contains a single entry: nextID that is the next item id value (auto incremented on every item addition);

class MarkerIDProvider

contains a single entry: nextID that is the next marker id value (auto incremented on every marker addition);

class Camera

Defines the editor's camera position/orientation.

class Camera
{
    // positions are to format X, Z, Y
    pos[]={2325.9604,24.771292,5133.4385};                // camera position
    dir[]={0.361072,-0.27934057,0.88971913};            // camera vectorDir
    up[]={0.10504395,0.96019292,0.25883871};            // camera vectorUp
    aside[]={0.92660606,2.7686474e-007,-0.37604135};    //
};

binarizationWanted

A number (0 or 1) representing a Boolean, to tell the editor to save the mission.sqm to binary format or not.

binarizationWanted=0;

addons

A config array of CfgPatches entries, determining which addons are needed.

addons[]=
{
    "A3_Characters_F",
    "A3_Modules_F_Sites",
    "A3_Ui_F"
};

AddonsMetaData

A "list" of required addons' user-friendly details, with author's name, friendly name, URL.

class AddonsMetaData
{
    class List
    {
        items=3;
        class Item0
        {
            className="A3_Characters_F";
            name="Arma 3 Alpha - Characters and Clothing";
            author="Bohemia Interactive";
            url="https://www.arma3.com";
        };
        class Item1
        {
            className="A3_Modules_F";
            name="Arma 3 Alpha - Scripted Modules";
            author="Bohemia Interactive";
            url="https://www.arma3.com";
        };
        class Item2
        {
            className="A3_Ui_F";
            name="Arma 3 - User Interface";
            author="Bohemia Interactive";
            url="https://www.arma3.com";
        };
    };
};

randomSeed

A random seed most likely used by weather settings and/or other random values.

randomSeed=4125053;

ScenarioData

author

The mission's author name.

author="Bohemia Interactive";

class Mission

class Intro

class OutroWin

class OutroLoose

Constituted of two sub-entries class Intel and class Entities, This structure applies to class Intro, class OutroWin and class OutroLoose as well.

class Intel

Mission setup information.

class Intel
{
    timeOfChanges=1800.0002;
    startWeather=0;
    startWind=0.1;
    startWaves=0.1;
    forecastWeather=0;
    forecastWind=0.1;
    forecastWaves=0.1;
    forecastLightnings=0.1;
    year=2035;
    day=28;
    hour=13;
    minute=37;
    startFogDecay=0.014;
    forecastFogDecay=0.014;
};

class Entities

class Entities is a data bag that can contain items, and items can contain instances of class Entities. In the example below, the "main" class Entities contains an item (the group), item which contains another class Entities with items (group units).

class Entities
{
    items=1;
    class Item0
    {
        dataType="Group";
        side="West";
        class Entities
        {
            items=1;
            class Item0
            {
                // simplified example for the sake of readability
                // ...
            };
        };
    };
};

class ItemX

Where X is from 0 to items number -1.

A class ItemX can be of the following dataTypes:

class Item0
{
    dataType="Object";
    class PositionInfo
    {
        position[]={256,1029.0015,512.0498}; // X, Z, Y in world position
    };
    side="West";
    flags=3;
    class Attributes
    {
        health=0.89999998;
        skill=0.60000002;
        ammo=0.89999998;
        rank="CORPORAL";
        presence=0.68964958;
        isPlayable=1;
        disableSimulation=1;
        ignoreByDynSimulGrid=1;
        reportRemoteTargets=1;
        receiveRemoteTargets=1;
        reportOwnPosition=1;
        stance="Down";
    };
    id=1;
    type="B_Soldier_F";    // CfgVehicles class
    atlOffset=1024;        // altitude offset
    class CustomAttributes
    {
        class Attribute0
        {
            // simplified example for the sake of readability
            // ...
        };
        nAttributes=1; // attributes count; similar to "items=x" in class Entities
    };
};
Flags

Flag value is a combination of the following values:

For example, a flag of 7 means 1 + 2 + 4: KeepHorizontal, IsGroupLeader, IsSnappedToSurface and not ContainsArea.

class AttributeX

Attributes are children classes of items and are listed in the class CustomAttributes sub-class.

class Attribute0
{
    property="allowDamage";
    expression="_this allowdamage _value;";    // SQF code to be executed (_this = the object, _value = 'value' field below)
    class Value
    {
        class data
        {
            class type
            {
                type[]=
                {
                    "BOOL"
                };
            };
            value=0; // for a boolean, 1 = true, 0 = false
        };
    };
};

2D Editor format

First line is version, then four classes of data, all of the same structure - they are:

class Mission

It is filled as such:

// addons required to run the mission
// Once you are done creating/updating your mission, it is always good practice
// to check the mission.sqm for presence of unwanted addons in "addOns" and "addOnsAuto"" arrays.
// They contain "CfgPatches" classes of used addons.
// Apart from "class Mission", list of addons is also present in "Intro", "OutroWin" and "OutroLoose" classes.
addOns[]=
{
    "cacharacters",
    "desert"
};
addOnsAuto[]=
{
    "cacharacters",
    "desert"
};
randomSeed=9361411; // the random seed, most probably used to generate random numbers
class Intel // pretty self-explanatory
{
    startWeather=0.100000;
    forecastWeather=0.300000;
    year=2007;
    month=6;
    day=7;
    hour=8;
};

class Groups

class Groups
{
    items=1;
    class Item0
    {
        side="WEST";
        class Vehicles
        {
            items=1;
            class Item0
            {
                position[]={2606.808838,14.685581,2408.266602}; // X, Z, Y
                id=0;
                side="WEST";
                vehicle="SoldierWB";            // CfgVehicles class
                player="PLAYER COMMANDER";
                leader=1;                        // group leader
                skill=0.600000;
            };
        };
    };
};