Military Symbols: Difference between revisions
m (Some clean up) |
Lou Montana (talk | contribs) (Page refresh) |
||
Line 1: | Line 1: | ||
{{SideTOC}} | |||
||Military Symbols]] allow to display units' military symbol in real time either in-game (above units), on map or both. | |||
== Initialization == | |||
=== Module Location === | === Module Location === | ||
Eden Editor: | |||
* {{arma2}}: Modules (F7) | |||
* {{arma3}} [[Eden Editor]]: Systems (F5) > Modules > Other > Military Symbols | |||
=== Enable Icons === | === Enable Icons === | ||
Place "Military Symbols" module and include the code following in the init line | |||
Place the "Military Symbols" module and include the code following in the init line: <code>[[setGroupIconsVisible]] [param1, param2];</code> | |||
=== Set up Module === | === Set up Module === | ||
*'''rules = <array>;''' - custom settings which defines how will be each side/faction shown. Array contains of array in format [<prefix>,<markercolor>]. Prefix is one of NATO marker prefixes ("b_" for BLUFOR,"o_" for OPFOR or "n_" for NEUTRAL) and markercolor is color of marker from CfgMarkerColors. If number of array items is 4, it's applied to sides. Otherwise it's applied to factions. | ==== Set variables to BIS_marta_mainscope with desired values ==== | ||
::Example: < | * '''rules = <array>;''' - custom settings which defines how will be each side/faction shown. Array contains of array in format [<prefix>,<markercolor>]. Prefix is one of NATO marker prefixes ("b_" for BLUFOR,"o_" for OPFOR or "n_" for NEUTRAL) and markercolor is color of marker from CfgMarkerColors. If number of array items is 4, it's applied to sides. Otherwise it's applied to factions. | ||
::Default value: [["o_","colorred"],["b_","colorgreen"],["n_","colorgreen"],["n_","coloryellow"]] | :: Example: <code>BIS_marta_mainscope [[setVariable]] ["rules", [["o_", "colorred"], ["b_", "colorgreen"], ["n_", "colorgreen"], ["n_", "coloryellow"]]];</code> | ||
:: Default value: [["o_", "colorred"], ["b_", "colorgreen"], ["n_", "colorgreen"], ["n_", "coloryellow"]] | |||
To set up colors in RGB format put the following into module`s init line: | To set up colors in RGB format put the following into module`s init line: | ||
::Example: < | :: Example: <code>[[this]] [[setVariable]] ["rules", [<nowiki/>["o_", [0.00001, 1, 0, 1]], ["b_", [1, 0, 0, 1]], ["n_", [0, 0.7, 0, 1]], ["n_", [0.8, 0.8, 0, 0]]], [[true]]]</code> | ||
Where array after prefix has format : [Red,Green,Blue, | Where array after prefix has format : [Red, Green, Blue, Alpha (transparency)] | ||
*'''delay = <number>;''' - Refresh delay in seconds | * '''delay = <number>;''' - Refresh delay in seconds | ||
::Example: < | :: Example: <code>BIS_marta_mainscope [[setVariable]] ["delay", 0.1];</code> | ||
::Default value: 0.5 | :: Default value: 0.5 | ||
<!-- | <!-- | ||
*'''step = <number>;''' - Time in which are all markers refreshed (0 will halt program until all markers are refreshed, which can cause lag when number of groups is large). | * '''step = <number>;''' - Time in which are all markers refreshed (0 will halt program until all markers are refreshed, which can cause lag when number of groups is large). | ||
::Example: < | :: Example: <code>BIS_marta_mainscope [[setVariable]] ["step", 1];</code> | ||
::Default value: 0.5 | :: Default value: 0.5 | ||
--> | --> | ||
*'''duration = <number>;''' - duration defines how long will be markers shown after group get out from detection area (destroyed groups will have 1/10 of this duration) | * '''duration = <number>;''' - duration defines how long will be markers shown after group get out from detection area (destroyed groups will have 1/10 of this duration) | ||
::Example: < | :: Example: <code>BIS_marta_mainscope [[setVariable]] ["duration", 600];</code> | ||
::Default value: 300 ( | :: Default value: 300 (5 minutes) | ||
*'''minSize = <number>;''' - Minimal size of group which is requested to draw a marker. | * '''minSize = <number>;''' - Minimal size of group which is requested to draw a marker. | ||
::Example: < | :: Example: <code>BIS_marta_mainscope [[setVariable]] ["minSize", 3];</code> | ||
::Default value: 1 | :: Default value: 1 | ||
<!-- | <!-- | ||
*'''offset = <number>;''' - defines how inaccurate will be enemy marker position. Value is maximal possible distance in metres. | * '''offset = <number>;''' - defines how inaccurate will be enemy marker position. Value is maximal possible distance in metres. | ||
::Example: < | :: Example: <code>BIS_marta_mainscope [[setVariable]] ["offset", 100];</code> | ||
::Default: 50 | :: Default: 50 | ||
--> | --> | ||
*'''WPgroups = <array>;''' - Set which groups will have displayed waypoints. | * '''WPgroups = <array>;''' - Set which groups will have displayed waypoints. | ||
::Example: < | :: Example: <code>BIS_marta_mainscope [[setVariable]] ["WPgroups", [<nowiki/>[[group]] soldier1, [[group]] [[player]]]];</code> | ||
::Default value: empty array | :: Default value: empty array | ||
===Set up groups=== | === Set up groups === | ||
*''' | * '''MARTA_customIcon = <string>;''' - Define custom marker class for given group | ||
::Example: < | :: Example: <code>([[group]] [[player]]) [[setVariable]] ["MARTA_customIcon", "b_recon"];</code> | ||
* '''MARTA_WP_isText = <boolean>;''' - true if waypoints numbers are to be displayed | |||
*''' | :: Example: <code>([[group]] ruOfficer) [[setVariable]] ["MARTA_WP_isText", [[true]]];</code> | ||
::Example: < | |||
=== Set up units === | |||
*'''MARTA_reveal = <array>;''' - Groups which will be always visible for given unit. | * '''MARTA_showRules = <array>;''' - Custom show rules of specific unit for given faction (1 is always show, 0 means automatic detection when spotted, -1 is never show). | ||
::Example: < | :: Example: <code>[[player]] [[setVariable]] ["MARTA_showRules", ["USMC", 1, "CDF", 0]];</code> | ||
:: (GeneralCarver, 11/27/10) - As of Arma 2 v1.7 and Operation Arrowhead v1.55 this command seems to be ignored in multiplayer, but works in single player. | |||
:: A complete list of factions can be found here: [[faction]] | |||
* '''MARTA_reveal = <array>;''' - Groups which will be always visible for given unit. | |||
:: Example: <code>[[player]] [[setVariable]] ["MARTA_reveal", [<nowiki/>[[group]] ruTarget]];</code> | |||
* '''MARTA_hide = <array>;''' - Groups which will be always hidden for given unit. | |||
:: Example: <code>[[player]] [[setVariable]] ["MARTA_hide", [<nowiki/>[[group]] usmcPatrol]];</code> | |||
== Functions == | == Functions == | ||
{{Important | In {{arma2}} you have to use {{Inline code|[[waitUntil]] { [[not]] [[isNil]] "BIS_fnc_init" };}}.}} | |||
=== Get visible groups === | === Get visible groups === | ||
[<position, radius>] call BIS_Marta_getVisibleGroups | |||
*<position, radius> - none (using whole map data) or both arguments | [<position, radius>] [[call]] [[BIS_Marta_getVisibleGroups]]; | ||
*Returned value: list of groups that have visible NATO marker (in given circle) | * <position, radius> - none (using whole map data) or both arguments | ||
*Returned value: Group - marker associated with group | * Returned value: list of groups that have visible NATO marker (in given circle) | ||
* Returned value: Group - marker associated with group | |||
<!-- | <!-- | ||
=== Find group by marker === | === Find group by marker === | ||
["GROUP",<marker>] call BIS_Marta_getParams | |||
*<marker> - one of "BIS_Marta_#" markers | ["GROUP", <marker>] [[call]] [[BIS_Marta_getParams]] | ||
*Returned value: Group - marker associated with group | * <marker> - one of "BIS_Marta_#" markers | ||
* Returned value: Group - marker associated with group | |||
=== Find marker by group === | === Find marker by group === | ||
["MARKER",<group>] call BIS_Marta_getParams | |||
*<marker> - group | ["MARKER", <group>] [[call]] [[BIS_Marta_getParams]] | ||
*Returned value: String - group associated with marker | * <marker> - group | ||
* Returned value: String - group associated with marker | |||
=== Get list of all markers === | === Get list of all markers === | ||
["MARKERS"] call BIS_Marta_getParams | |||
*Returned value: Array containing all Marta markers | ["MARKERS"] [[call]] [[BIS_Marta_getParams]] | ||
* Returned value: Array containing all Marta markers | |||
=== Add zone with forced detection === | === Add zone with forced detection === | ||
["ADD",<zone>,<factions>,<types>] call BIS_Marta_zone | |||
*<zone> - Array or Object - can be array with [center,radius] or trigger | ["ADD", <zone>, <factions>, <types>] [[call]] [[BIS_Marta_zone]] | ||
*<factions> - Array - array of sides or factions which will have zone available (can contain both, e.g. [resistance,"INS"]) | * <zone> - Array or Object - can be array with [center,radius] or trigger | ||
*<types> - Array - Optional param - Filter witch defines what unit classes and subclasses will be detected in zone. | * <factions> - Array - array of sides or factions which will have zone available (can contain both, e.g. [resistance,"INS"]) | ||
*Returned value: ID used for deleting zone | * <types> - Array - Optional param - Filter witch defines what unit classes and subclasses will be detected in zone. | ||
* Returned value: ID used for deleting zone | |||
=== Remove zone with forced detection === | === Remove zone with forced detection === | ||
["REMOVE",<id>] call BIS_Marta_zone | |||
*<id> - Number - ID of zone | ["REMOVE", <id>] [[call]] [[BIS_Marta_zone]] | ||
*Returned value: True | * <id> - Number - ID of zone | ||
* Returned value: True | |||
=== Check if some unit is in zone === | === Check if some unit is in zone === | ||
["CHECK",<unit>] call BIS_Marta_zone | |||
*<unit> - Object or Group - Checked unit | ["CHECK", <unit>] [[call]] [[BIS_Marta_zone]] | ||
*Returned value: Boolean (true if unit is in one of zones) | * <unit> - Object or Group - Checked unit | ||
* Returned value: Boolean (true if unit is in one of zones) | |||
--> | --> | ||
Line 111: | Line 125: | ||
[[Image:APP-6.jpg|right|]] | [[Image:APP-6.jpg|right|]] | ||
Icon name consists of '''prefix''' and '''name'''. Prefix is used to define side and can be one of following: | |||
{| class="wikitable" | |||
! Value !! Description | |||
|- | |||
| b_ || BLUFOR | |||
|- | |||
| o_ || OPFOR | |||
|- | |||
| n_ || neutral | |||
|} | |||
Name defines purpose of the icon. See picture on the right or code below to get visual list of icons: | Name defines purpose of the icon. See picture on the right or code below to get visual list of icons: | ||
For example, to set icon of enemy artillery, use prefix | {| class="wikitable" | ||
! Value !! Description | |||
|- | |||
| inf || Infantry | |||
|- | |||
| motor_inf || Motorized infantry | |||
|- | |||
| mech_inf || Mechanized infantry | |||
|- | |||
| armor || Armored platoon | |||
|- | |||
| air || Rotary wing aircraft | |||
|- | |||
| maint || Maintanance group | |||
|- | |||
| hq || Headquarters | |||
|- | |||
| supply || Supply convoy | |||
|- | |||
| plane || Fixed wing aircraft | |||
|- | |||
| art || Artillery | |||
|- | |||
| mortar || Mortar | |||
|- | |||
| med || Medical | |||
|- | |||
| recon || Reconnaisance team | |||
|- | |||
| uav || Unmanned Aerial Vehicle | |||
|- | |||
| empty || Unknown | |||
|} | |||
For example, to set icon of enemy artillery, use prefix <tt>o_</tt> and type <tt>art</tt> to get <tt>o_art</tt> icon type. | |||
Icons are defined in ''cfgGroupIcons'' section. | Icons are defined in ''cfgGroupIcons'' section. | ||
[[Category:ArmA 2: Editor Modules]] | |||
[[Category:Arma 3: Editor Modules]] |
Revision as of 11:01, 1 April 2020
Template:SideTOC ||Military Symbols]] allow to display units' military symbol in real time either in-game (above units), on map or both.
Initialization
Module Location
- Arma 2: Modules (F7)
- Arma 3 Eden Editor: Systems (F5) > Modules > Other > Military Symbols
Enable Icons
Place the "Military Symbols" module and include the code following in the init line: setGroupIconsVisible [param1, param2];
Set up Module
Set variables to BIS_marta_mainscope with desired values
- rules = <array>; - custom settings which defines how will be each side/faction shown. Array contains of array in format [<prefix>,<markercolor>]. Prefix is one of NATO marker prefixes ("b_" for BLUFOR,"o_" for OPFOR or "n_" for NEUTRAL) and markercolor is color of marker from CfgMarkerColors. If number of array items is 4, it's applied to sides. Otherwise it's applied to factions.
- Example:
BIS_marta_mainscope setVariable ["rules", [["o_", "colorred"], ["b_", "colorgreen"], ["n_", "colorgreen"], ["n_", "coloryellow"]]];
- Default value: [["o_", "colorred"], ["b_", "colorgreen"], ["n_", "colorgreen"], ["n_", "coloryellow"]]
- Example:
To set up colors in RGB format put the following into module`s init line:
- Example:
this setVariable ["rules", [["o_", [0.00001, 1, 0, 1]], ["b_", [1, 0, 0, 1]], ["n_", [0, 0.7, 0, 1]], ["n_", [0.8, 0.8, 0, 0]]], true]
- Example:
Where array after prefix has format : [Red, Green, Blue, Alpha (transparency)]
- delay = <number>; - Refresh delay in seconds
- Example:
BIS_marta_mainscope setVariable ["delay", 0.1];
- Default value: 0.5
- Example:
- duration = <number>; - duration defines how long will be markers shown after group get out from detection area (destroyed groups will have 1/10 of this duration)
- Example:
BIS_marta_mainscope setVariable ["duration", 600];
- Default value: 300 (5 minutes)
- Example:
- minSize = <number>; - Minimal size of group which is requested to draw a marker.
- Example:
BIS_marta_mainscope setVariable ["minSize", 3];
- Default value: 1
- Example:
- WPgroups = <array>; - Set which groups will have displayed waypoints.
- Example:
BIS_marta_mainscope setVariable ["WPgroups", [group soldier1, group player]];
- Default value: empty array
- Example:
Set up groups
- MARTA_customIcon = <string>; - Define custom marker class for given group
- Example:
(group player) setVariable ["MARTA_customIcon", "b_recon"];
- Example:
- MARTA_WP_isText = <boolean>; - true if waypoints numbers are to be displayed
- Example:
(group ruOfficer) setVariable ["MARTA_WP_isText", true];
- Example:
Set up units
- MARTA_showRules = <array>; - Custom show rules of specific unit for given faction (1 is always show, 0 means automatic detection when spotted, -1 is never show).
- Example:
player setVariable ["MARTA_showRules", ["USMC", 1, "CDF", 0]];
- (GeneralCarver, 11/27/10) - As of Arma 2 v1.7 and Operation Arrowhead v1.55 this command seems to be ignored in multiplayer, but works in single player.
- A complete list of factions can be found here: faction
- Example:
- MARTA_reveal = <array>; - Groups which will be always visible for given unit.
- Example:
player setVariable ["MARTA_reveal", [group ruTarget]];
- Example:
- MARTA_hide = <array>; - Groups which will be always hidden for given unit.
- Example:
player setVariable ["MARTA_hide", [group usmcPatrol]];
- Example:
Functions
Get visible groups
[<position, radius>] call BIS_Marta_getVisibleGroups;
- <position, radius> - none (using whole map data) or both arguments
- Returned value: list of groups that have visible NATO marker (in given circle)
- Returned value: Group - marker associated with group
Marker list
Icon name consists of prefix and name. Prefix is used to define side and can be one of following:
Value | Description |
---|---|
b_ | BLUFOR |
o_ | OPFOR |
n_ | neutral |
Name defines purpose of the icon. See picture on the right or code below to get visual list of icons:
Value | Description |
---|---|
inf | Infantry |
motor_inf | Motorized infantry |
mech_inf | Mechanized infantry |
armor | Armored platoon |
air | Rotary wing aircraft |
maint | Maintanance group |
hq | Headquarters |
supply | Supply convoy |
plane | Fixed wing aircraft |
art | Artillery |
mortar | Mortar |
med | Medical |
recon | Reconnaisance team |
uav | Unmanned Aerial Vehicle |
empty | Unknown |
For example, to set icon of enemy artillery, use prefix o_ and type art to get o_art icon type.
Icons are defined in cfgGroupIcons section.