Arma 3 Scripting

Arma 3: ORBAT Viewer

  • Also known as Arma 3 ORBAT Viewer, ORBAT Viewer

Topic · Markdown · JSON · original wiki page

The ORBAT Viewer can be used to displayed the hiearchy of troops present in a scenario. Inside the ORBAT Viewer pressing H will toggle the visibility of the UI.

Config

CfgORBAT can be defined in configFile or missionConfigFile.

class CfgORBAT
{
    class 7thInfantry
    {
        id = 7;                                                // Unit ID
        idType = 2;                                            // Unit ID type
        side = "West";                                        // Unit side from CfgChainOfCommand >> Sides
        size = "Division";                                    // Unit size from CfgChainOfCommand >> Sizes; displays relevant icon above the Type icon
        type = "HQ";                                        // Unit type from CfgChainOfCommand >> Types
        insignia = "a3\missions_f_epa\data\img\orbat\b_aegis_ca.paa";    // Unit insignia, displayed in ORBAT background and in tooltip
        colorInsignia[] = { 0, 0, 0, 1 };                    // Insignia image color (white default), can be either RGBA array, or class from CfgMarkerColors
        commander = "Armstrong";                            // Name of unit commander - can be either direct name or
                                                            // class from CfgWorlds >> GenericNames (random name from the list is then selected)
        commanderRank = "GENERAL";                            // Rank of unit commander (by default selected based on unit size)
        tags[] = { "BIS", "USArmy", "Kerry", "Hutchison", "Larkin" };    // Group tags. When opening ORBAT viewer, user can define what tags will be accepted
        text = "%1 Combat Technology Research %3";            // Custom text and short text, can still use some arguments when defined:
        // %1 - ID (e.g. "7th")
        // %2 - Type (e.g. "Infantry")
        // %3 - Size (e.g. "Division")
        textShort = "%1 CTR %3";
        texture = "a3\ui_f_orange\data\displays\rscdisplayorangechoice\faction_nato_ca.paa";    // Custom texture, will replace icon set by 'type' param.
        color = "ColorWest";                                // Custom texture color for texture displayed on the map and in the ORBAT viewer,
                                                            // will replace color set by 'side' param
                                                            // Can be either RGBA array, or class from CfgMarkerColors (e.g. color = "ColorWEST";)
        description = "All of your text would go here.";    // A brief description of the group or unit
        assets[] = {                                        // Will display pictures of all available assets to the unit commander:
            { "B_Heli_Transport_03_F", 5 },
            { "B_Heli_Light_01_F", 3 },
            { "B_Heli_Light_01_armed_F", 4 },
            "B_Heli_Transport_01_camo_F"
        };

        // Can be an array with format {classname, [int active icons], [int greyed out icons]}, or simply a classname
        //subordinates[] = { "1stBCT", "2ndBCT" };            // Subordinates, searched on the same level as this class.

        // When 'subordinates' are missing, child classes will be used. They can have their own subs - number of tiers is not limited.
        class 1stBCT
        {
            id = 1;
            idType = 2;
            type = "Helicopter";
            size = "Squadron";
            side = "West";
            commander = "R3vo";
            commanderRank = "Lieutenant";
            description = "All of your text would go here.";
            texture = "a3\ui_f_orange\data\displays\rscdisplayorangechoice\faction_nato_ca.paa";
            insignia = "a3\missions_f_epa\data\img\orbat\b_aegis_ca.paa";
            assets[] =
            {
                { "B_Heli_Transport_03_F", 5 }
            };
        };

        class 2ndBCT: 1stBCT
        {
            id = 2;
            size = "Division";
            commander = "NATOMen";
            assets[] =
            {
                { "B_Heli_Transport_03_F", 2 }
            };
        };
    };
};

Attributes

ID Type

Side

Size

Note

Size1..Size11 will not display a size-icon indicator, such as Ø.

Type

Rank

Tags

Tags are used by BIS_fnc_ORBATOpen. The function will search and classes with given tags.

ORBAT Group Module

CfgORBAT Path

The group you want to be display on the map.

Example:

missionConfigFile >> "CfgORBAT" >> "unitClassName" >> "subordinateUnitClassName"

CfgORBAT Ceiling

The highest superior unit to display in the ORBAT Viewer while this group is selected. If blank, the CfgORBAT Path unit is displayed as the ceiling.

Example:

missionConfigFile >> "CfgORBAT" >> "unitClassName"

Tags

Groups containing at least on of these tags will be added

Max. Tiers

Defines how many tiers are are shown.

Working Example

Create ORBAT Group during Runtime

//Create ORBAT icon
if isServer then
{
    "ModuleStrategicMapORBAT_F" createUnit
    [
        getPosWorld player,
        createGroup sideLogic,
        toString {
            this setVariable ["BIS_fnc_initModules_disableAutoActivation", false, true];
            this setVariable [""Path"", ""missionConfigFile >> 'CfgORBAT' >> 'Support'"", true]; // ORBAT class that should be displayed
        }
    ];
};

Texture in missionConfigFile

As texture is treated as a new texture (rather than an image, as icon is), the game needs a direct path to it. Example:

"C:\Users\Kerry\Documents\Arma 3\Kerry\missions\MyMission.Stratis\someDirectory\SomeImage.paa"
"\ca\missions_f\data\orbat\customTexture_ca.paa"

Writing the direct path is not possible in a CfgORBAT defined in Description.ext (as the mission changes path on different computers); in that case the path to the texture can be defined with the following:

// converts to e.g "C:\Users\Kerry\Documents\Arma 3\Kerry\missions\MyMission.Stratis\someDirectory\SomeImage.paa"
texture = __EVAL(getMissionPath "someDirectory\SomeImage.paa");

Note

See getMissionPath.

Functions

Listed in "Strategic" function group:

See Also