ORBAT Viewer – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
m (→‎Config: Fixed indentation)
 
(25 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{SideTOC}}
{{TOC|side}}
[[File:A3_ORBATViewer.jpg|800px]]
[[File:A3_ORBATViewer.jpg|800px]]


=== Config ===
The ORBAT Viewer can be used to displayed the hiearchy of troops present in a scenario. Inside the ORBAT Viewer pressing {{Controls|H}} will toggle the visibility of the UI.
class CfgORBAT
{
class 7thInfantry
{
id = 7; {{codecomment|// Unit ID}}
idType = 0; {{codecomment|// Unit ID type}}
{{codecomment| // 0 - show as ordinal number, e.g. "7th" (default)}}
{{codecomment| // 1 - show as roman numeral, e.g. "VII"}}
{{codecomment| // 2 - show as NATO phonetical alphabet word, e.g. "Golf"}}
                {{codecomment| // 3 - show as color, e.g. "Red"}}
           
side = "West"; {{codecomment|// Unit side from CfgChainOfCommand >> Sides}}
size = "Division"; {{codecomment|// Unit size from CfgChainOfCommand >> Sizes. Displays relevant icon above the Type icon}}
type = "HQ"; {{codecomment|// Unit type from CfgChainOfCommand >> Types}}
insignia = "\ca\missions_f\data\orbat\7thInfantry_ca.paa"; {{codecomment|// Unit insignia, displayed in ORBAT background and in tooltip}}
colorInsignia[] = {0,0,1,1}; {{codecomment|// Insignia image color (white default), can be either RGBA array, or class from CfgMarkerColors}}
commander = "Armstrong"; {{codecomment|// Name of unit commander. Can be either direct name, or class from CfgWorlds >> GenericNames (random name from the list is then selected)}}
commanderRank = "GENERAL"; {{codecomment|// Rank of unit commander (by default selected based on unit size)}}
tags[] = {BIS,USArmy,Kerry,Hutchison,Larkin}; {{codecomment|// Group tags. When opening ORBAT viewer, user can define what tags will be accepted.}}
text = "%1 Combat Technology Research %3"; {{codecomment|// Custom text and short text, can still use some arguments when defined:}}
{{codecomment|// %1 - ID (e.g. "7th")}}
{{codecomment|// %2 - Type (e.g. "Infantry")}}
{{codecomment|// %3 - Size (e.g. "Division")}}
textShort = "%1 CTR %3";
texture = "\ca\missions_f\data\orbat\customTexture_ca.paa"; {{codecomment|// Custom texture, will replace icon set by 'type' param.}}
color[] = {0,0,1,1}; {{codecomment|// Custom color, will replace color set by 'side' param. Can be either RGBA array, or class from CfgMarkerColors}}
                description= "All of your text would go here."; {{codecomment|// A brief description of the group or unit.}}
assets[] = {{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}; {{codecomment|// Will display pictures of all available assets to the unit commander}}
subordinates[] = {2ndBCT}; {{codecomment|// Subordinates, searched on the same level as this class.}}
 
                {{codecomment|// 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;
type = "Armored";
size = "BCT";
side = "West";
commander = "NATOMen";
tags[] = {"BLUFOR", "USArmy","Kerry"};
  };
};
class 2ndBCT
{
};
};




=== Valid Attributes ===
== Config ==
'''ID Type'''
*0 - Ordinal number, e.g. "7th" (default)
*1 - Roman numeral, e.g. "VII"
*2 - NATO phonetical alphabet word, e.g. "Golf"
*3 - Color, e.g. "Red"


'''Side''':
CfgORBAT can be defined in [[configFile]] or [[missionConfigFile]].
 
<syntaxhighlight lang="cpp">
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 }
};
};
};
};
</syntaxhighlight>
 
== Attributes ==
 
=== ID Type ===
 
* 0 - Ordinal number, e.g. "7th" (default)
* 1 - Roman numeral, e.g. "VII"
* 2 - NATO phonetical alphabet word, e.g. "Golf"
* 3 - Color, e.g. "Red"
 
=== Side ===


<spoiler>
* West
* West
* East
* East
Line 65: Line 91:
* Civilian
* Civilian
* Unknown
* Unknown
</spoiler>


'''Size''':
=== Size ===


<spoiler>
{{Columns|4|
* Army
* Army
* ArmyGroup
* ArmyGroup
Line 87: Line 112:
* Squadron
* Squadron
* Troop
* Troop
* Size1->11 (Ex, Size1 [Will not display an size-icon indicator, such as Ø])
* Size1..11
</spoiler>
}}
{{Feature|informative|{{hl|Size1}}..{{hl|Size11}} will not display a size-icon indicator, such as Ø.}}


'''Type''':
=== Type ===


<spoiler>
{{Columns|4|
* Airborne
* Airborne
* Armored
* Armored
Line 117: Line 143:
* UAV
* UAV
* Unknown
* Unknown
</spoiler>
}}
 
'''Rank''':


''Note: Arma 3 units cannot be a "General" rank; however, it is a valid ORBAT attribute. Uses a Star as the rank-icon ⋆''
=== Rank ===


<spoiler>
{{Columns|2|
* Private
* Private
* Corporal
* Corporal
Line 132: Line 156:
* Colonel
* Colonel
* General
* General
</spoiler>
}}
 
=== Tags ===


=== Module Parameters ===
Tags are used by [[BIS_fnc_ORBATOpen]]. The function will search and classes with given tags.
==== CfgORBAT Path ====
 
The group you want this module to display.
 
[[File:A3 ORBATGroup Module.jpg|thumb|400px|The ORBAT Group module]]
== ORBAT Group Module ==
 
=== CfgORBAT Path ===
 
The group you want to be display on the map.


'''Example:'''
'''Example:'''
<pre>missionconfigfile >> "CfgORBAT" >> "unitClassName" >> "subordinateUnitClassName"</pre>
<sqf>missionConfigFile >> "CfgORBAT" >> "unitClassName" >> "subordinateUnitClassName"</sqf>
 
=== CfgORBAT Ceiling ===


==== 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.
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:'''
'''Example:'''
<pre>missionconfigfile >> "CfgORBAT" >> "unitClassName"</pre>
<sqf>missionConfigFile >> "CfgORBAT" >> "unitClassName"</sqf>
 
=== Tags ===


==== Tags ====
Groups containing at least on of these tags will be added
Tags are used by [[BIS_fnc_ORBATOpen]]. The function will search and classes with given tags.
 
{{Important|Not yet confirmed!}}
=== Max. Tiers ===
 
Defines how many tiers are are shown.
 
=== Working Example ===
 
* Place a fire team in [[:Category:Eden Editor|Eden Editor]]
* Place the '''ORBAT Group''' module
* Synchronise the module with the group leader
* Open the module and fill in the following:
** CfgORBAT Path: <sqf inline>configFile >> "CfgORBAT" >> "BIS" >> "B_1_A_1_2"</sqf>
** CfgORBATCeiling: <sqf inline>configFile >> "CfgORBAT" >> "BIS" >> "B_1"</sqf>
* Leave '''Max. Tiers''' and '''Tags''' empty
* Enter the preview mode and open the map
 
 
== Create ORBAT Group during Runtime ==
 
<sqf>
//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
}
];
};
</sqf>
 
 
== Texture in missionConfigFile ==


==== Texture ====
As '''texture''' is treated as a ''new'' texture (rather than an image, as icon is), the game needs a direct path to it. Example:
As '''texture''' is treated as a ''new'' texture (rather than an image, as icon is), Arma needs a direct path to it. Example,
"C:\Users\Kerry\Documents\Arma 3\Kerry\missions\MyMission.Stratis\someDirectory\SomeImage.paa"
<code>C:\Users\Kerry\Documents\Arma 3\Kerry\missions\MyMission.Stratis</code>
"\ca\missions_f\data\orbat\customTexture_ca.paa"
Writing the direct path is not possible in a {{hl|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:
<syntaxhighlight lang="cpp">
texture = __EVAL(getMissionPath "someDirectory\SomeImage.paa"); // converts to "C:\Users\Kerry\Documents\Arma 3\Kerry\missions\MyMission.Stratis\someDirectory\SomeImage.paa"
</syntaxhighlight>


However, as {{Inline code|CfgORBAT}} is defined in {{Inline code|description.ext}}, we cannot use SQF scripting like [[missionConfigFile]].
{{Feature|informative|See [[getMissionPath]].}}
But we can define a global variable in description.ext using [[PreProcessor Commands]] to our mission's folder. In this case, {{Inline code|MISSIONLOCATION}}.


<code>__EXEC (MISSIONLOCATION = __FILE__ select [0, count __FILE__ - 15])</code>


In our CfgORBAT, be it in a separate {{Inline code|.hpp}} file or your description.ext, we can now define the path to our texture with the following:
== Functions ==


<code>texture = __EVAL(MISSIONLOCATION + "someFolder\SomeImage.paa");</code>
Listed in {{Link|Category:Function Group: Strategic|"Strategic" function group}}:
{{Columns|2|
* [[BIS_fnc_ORBATAddGroupOverlay]]
* [[BIS_fnc_ORBATAnimate]]
* [[BIS_fnc_ORBATConfigPreview]]
* [[BIS_fnc_ORBATGetGroupParams]]
* [[BIS_fnc_ORBATOpen]]
* [[BIS_fnc_ORBATRemoveGroupOverlay]]
* [[BIS_fnc_ORBATSetGroupFade]]
* [[BIS_fnc_ORBATSetGroupParams]]
* [[BIS_fnc_ORBATTooltip]]
}}


Thanks to [http://killzonekid.com/arma-scripting-tutorials-mission-root/| KK's blog] for solving the above issue.


==== Functions ====
== See Also ==
*[[BIS_fnc_ORBATAddGroupOverlay]]
*[[BIS_fnc_ORBATAnimate]]
*[[BIS_fnc_ORBATConfigPreview]]
*[[BIS_fnc_ORBATGetGroupParams]]
*[[BIS_fnc_ORBATOpen]]
*[[BIS_fnc_ORBATRemoveGroupOverlay]]
*[[BIS_fnc_ORBATSetGroupFade]]
*[[BIS_fnc_ORBATSetGroupParams]]
*[[BIS_fnc_ORBATTooltip]]


=== Other ===
* {{Link|https://forums.bohemia.net/forums/topic/159943-request-orbat-tutorial/?page{{=}}3|Various information about ORBAT Viewer}}
* To make the ORBAT icon follow a unit during a mission, simply Synchronise (F5) the module to the group leader.
* See more on Preprocessor Commands: http://killzonekid.com/arma-scripting-tutorials-mission-root/




[[Category:Arma 3: Editing]]
{{GameCategory|arma3|Editing}}

Latest revision as of 16:54, 3 November 2024

A3 ORBATViewer.jpg

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

  • 0 - Ordinal number, e.g. "7th" (default)
  • 1 - Roman numeral, e.g. "VII"
  • 2 - NATO phonetical alphabet word, e.g. "Golf"
  • 3 - Color, e.g. "Red"

Side

  • West
  • East
  • Resistance
  • Civilian
  • Unknown

Size

  • Army
  • ArmyGroup
  • Battalion
  • BCT
  • Brigade
  • Company
  • Corps
  • Division
  • FireTeam
  • HBCT
  • IBCT
  • Platoon
  • Regiment
  • Section
  • Squad
  • Squadron
  • Troop
  • Size1..11
Size1..Size11 will not display a size-icon indicator, such as Ø.

Type

  • Airborne
  • Armored
  • Artillery
  • Assault
  • AttackRecon
  • AviationSupport
  • Cavalry
  • CombatAviation
  • Fighter
  • GeneralSupport
  • Helicopter
  • HQ
  • Infantry
  • Maintenance
  • Maritime
  • MechanizedInfantry
  • Medical
  • Mortar
  • MotorizedInfantry
  • Recon
  • Service
  • Support
  • UAV
  • Unknown

Rank

  • Private
  • Corporal
  • Sergeant
  • Lieutenant
  • Captain
  • Major
  • Colonel
  • General

Tags

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


The ORBAT Group module

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

  • Place a fire team in Eden Editor
  • Place the ORBAT Group module
  • Synchronise the module with the group leader
  • Open the module and fill in the following:
  • Leave Max. Tiers and Tags empty
  • Enter the preview mode and open the map


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:

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


Functions

Listed in "Strategic" function group:


See Also