Military Symbols: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (and of course, a typo)
m (Text replacement - "[[Image:" to "[[File:")
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{SideTOC}}
{{TOC|side}}
[[Military Symbols]] allow to display units' military symbol in real time either in-game (above units), on map or both.
[[Military Symbols]] allow to display units' military symbol in real time either in-game (above units), on map or both.


Line 7: Line 7:


* {{arma2}}: Modules (F7)
* {{arma2}}: Modules (F7)
* {{arma3}} [[Eden Editor]]: Systems (F5) > Modules > Other > Military Symbols
* {{arma3}} [[:Category:Eden Editor|Eden Editor]]: Systems (F5) > Modules > Other > Military Symbols


=== Enable Icons ===
=== Enable Icons ===


Place the "Military Symbols" module and include the code following in the init line: <code>[[setGroupIconsVisible]] [param1, param2];</code>
Place the "Military Symbols" module and include the following code in the init line: <sqf>setGroupIconsVisible [true /* markers on map */, true /* 3D markers */];</sqf>


=== Set up Module ===
=== Set up Module ===


==== Set variables to BIS_marta_mainscope with desired values ====
==== 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.
* '''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 is applied to sides. Otherwise it is applied to factions.
:: Example: <code>BIS_marta_mainscope [[setVariable]] ["rules", [["o_", "colorred"], ["b_", "colorgreen"], ["n_", "colorgreen"], ["n_", "coloryellow"]]];</code>
:: Example: <sqf>BIS_marta_mainscope setVariable ["rules", [["o_", "colorred"], ["b_", "colorgreen"], ["n_", "colorgreen"], ["n_", "coloryellow"]]];</sqf>
:: Default value: [["o_", "colorred"], ["b_", "colorgreen"], ["n_", "colorgreen"], ["n_", "coloryellow"]]
:: 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: <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>
:: Example: <sqf>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]</sqf>
Where array after prefix has format : [Red, Green, Blue, Alpha (transparency)]
Where array after prefix has format : [Red, Green, Blue, Alpha (transparency)]


* '''delay = <number>;''' - Refresh delay in seconds
* '''delay = <number>;''' - Refresh delay in seconds
:: Example: <code>BIS_marta_mainscope [[setVariable]] ["delay", 0.1];</code>
:: Example: <sqf>BIS_marta_mainscope setVariable ["delay", 0.1];</sqf>
:: 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: <code>BIS_marta_mainscope [[setVariable]] ["step", 1];</code>
:: Example: <sqf>BIS_marta_mainscope setVariable ["step", 1];</sqf>
:: 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: <code>BIS_marta_mainscope [[setVariable]] ["duration", 600];</code>
:: Example: <sqf>BIS_marta_mainscope setVariable ["duration", 600];</sqf>
:: Default value: 300 (5 minutes)
:: 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: <code>BIS_marta_mainscope [[setVariable]] ["minSize", 3];</code>
:: Example: <sqf>BIS_marta_mainscope setVariable ["minSize", 3];</sqf>
:: 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: <code>BIS_marta_mainscope [[setVariable]] ["offset", 100];</code>
:: Example: <sqf>BIS_marta_mainscope setVariable ["offset", 100];</sqf>
:: Default:  50
:: Default:  50
-->
-->
* '''WPgroups = <array>;''' - Set which groups will have displayed waypoints.
* '''WPgroups = <array>;''' - Set which groups will have displayed waypoints.
:: Example: <code>BIS_marta_mainscope [[setVariable]] ["WPgroups", [<nowiki/>[[group]] soldier1, [[group]] [[player]]]];</code>
:: Example: <sqf>BIS_marta_mainscope setVariable ["WPgroups", [group soldier1, group player]];</sqf>
:: Default value:  empty array
:: Default value:  empty array


Line 51: Line 51:


* '''MARTA_customIcon = <string>;''' - Define custom marker class for given group
* '''MARTA_customIcon = <string>;''' - Define custom marker class for given group
:: Example: <code>([[group]] [[player]]) [[setVariable]] ["MARTA_customIcon", "b_recon"];</code>
:: Example: <sqf>(group player) setVariable ["MARTA_customIcon", "b_recon"];</sqf>


* '''MARTA_WP_isText = <boolean>;''' - true if waypoints numbers are to be displayed
* '''MARTA_WP_isText = <boolean>;''' - true if waypoints numbers are to be displayed
:: Example: <code>([[group]] ruOfficer) [[setVariable]] ["MARTA_WP_isText", [[true]]];</code>
:: Example: <sqf>(group ruOfficer) setVariable ["MARTA_WP_isText", true];</sqf>


=== Set up units ===
=== 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).
* '''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: <code>[[player]] [[setVariable]] ["MARTA_showRules", ["USMC", 1, "CDF", 0]];</code>
:: Example: <sqf>player setVariable ["MARTA_showRules", ["USMC", 1, "CDF", 0]];</sqf>
:: (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.
:: (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]]
:: A complete list of factions can be found here: [[faction]]
Line 65: Line 65:


* '''MARTA_reveal = <array>;''' - Groups which will be always visible for given unit.
* '''MARTA_reveal = <array>;''' - Groups which will be always visible for given unit.
:: Example: <code>[[player]] [[setVariable]] ["MARTA_reveal", [<nowiki/>[[group]] ruTarget]];</code>
:: Example: <sqf>player setVariable ["MARTA_reveal", [group ruTarget]];</sqf>


* '''MARTA_hide = <array>;''' - Groups which will be always hidden for given unit.
* '''MARTA_hide = <array>;''' - Groups which will be always hidden for given unit.
:: Example: <code>[[player]] [[setVariable]] ["MARTA_hide", [<nowiki/>[[group]] usmcPatrol]];</code>
:: Example: <sqf>player setVariable ["MARTA_hide", [group usmcPatrol]];</sqf>




== Functions ==
== Functions ==


{{Important | In {{arma2}} you have to use {{Inline code|[[waitUntil]] { [[not]] [[isNil]] "BIS_fnc_init" };}}.}}
{{Feature | important | In {{arma2}} you have to use <sqf inline>waitUntil { not isNil "BIS_fnc_init" };.</sqf>.}}


=== Get visible groups ===
=== Get visible groups ===


[<position, radius>] [[call]] [[BIS_Marta_getVisibleGroups]];
<sqf>[centre, radius] call BIS_Marta_getVisibleGroups;</sqf>
* <position, radius> - none (using whole map data) or both arguments
* centre, radius - none (using whole map data) or both arguments
* Returned value: list of groups that have visible NATO marker (in given circle)
* Returned value: list of groups that have visible NATO marker (in given circle)
* Returned value: Group - marker associated with group
* Returned value: Group - marker associated with group
Line 123: Line 123:


== Marker list ==
== Marker list ==
[[Image:APP-6.jpg|right|]]
[[File:APP-6.jpg|right|]]


Icon name consists of '''prefix''' and '''name'''. Prefix is used to define side and can be one of following:
Icon name consists of '''prefix''' and '''name'''. Prefix is used to define side and can be one of following:
Line 166: Line 166:
| med || Medical
| med || Medical
|-
|-
| recon || Reconnaisance team
| recon || Reconnaissance team
|-
|-
| uav || Unmanned Aerial Vehicle
| uav || Unmanned Aerial Vehicle
Line 173: Line 173:
|}
|}


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.
For example, to set icon of enemy artillery, use prefix {{hl|o_}} and type {{hl|art}} to get {{hl|o_art}} icon type.


Icons are defined in ''cfgGroupIcons'' section.
Icons are defined in ''cfgGroupIcons'' section.




[[Category:ArmA 2: Editor Modules]]
{{GameCategory|arma2|Editor Modules}}
[[Category:Arma 3: Editor Modules]]
{{GameCategory|arma3|Editor Modules}}

Latest revision as of 00:11, 21 November 2023

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 following code in the init line:

setGroupIconsVisible [true /* markers on map */, true /* 3D markers */];

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 is applied to sides. Otherwise it is 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"]]

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]

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
  • 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)
  • minSize = <number>; - Minimal size of group which is requested to draw a marker.
Example:
BIS_marta_mainscope setVariable ["minSize", 3];
Default value: 1
  • WPgroups = <array>; - Set which groups will have displayed waypoints.
Example:
BIS_marta_mainscope setVariable ["WPgroups", [group soldier1, group player]];
Default value: empty array

Set up groups

  • MARTA_customIcon = <string>; - Define custom marker class for given group
Example:
(group player) setVariable ["MARTA_customIcon", "b_recon"];
  • MARTA_WP_isText = <boolean>; - true if waypoints numbers are to be displayed
Example:
(group ruOfficer) setVariable ["MARTA_WP_isText", true];

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


  • MARTA_reveal = <array>; - Groups which will be always visible for given unit.
Example:
player setVariable ["MARTA_reveal", [group ruTarget]];
  • MARTA_hide = <array>; - Groups which will be always hidden for given unit.
Example:
player setVariable ["MARTA_hide", [group usmcPatrol]];


Functions

In Arma 2 you have to use waitUntil { not isNil "BIS_fnc_init" };..

Get visible groups

[centre, radius] call BIS_Marta_getVisibleGroups;

  • centre, 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

APP-6.jpg

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 Reconnaissance 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.