BIS fnc strategicMapOpen: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - "\[ +" to "[")
 
(82 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Strategic


|1.00|= Game version
|descr= Creates a strategic map.
____________________________________________________________________________________________
[[File:A3 strategicMap.jpg|center|600px]]


| <pre>/*
|s1= [display, pos, missions, ORBATs, markers, images, weather, night, scale, simulation, label, missionName, missionIcon] call [[BIS_fnc_strategicMapOpen]]


Description:
|p1= display: [[Display]] - parent display. When empty, mission display is used.
Open strategic map.


Parameter(s):
|p2= pos: [[Array]] format [[Position]] - default view position in format [x,y,y] or [x,y]
0: DISPLAY - parent display. When empty, mission display is used.
1: ARRAY - default view position in format [x,y,y] or [x,y]
2: ARRAY - list of missions in format:
0: ARRAY - mission position in format [x,y,y] or [x,y]
1: CODE - expression executed when user clicks on mission icon
2: STRING - mission name
3: STRING - short description
4: STRING - name of mission's player
5: STRING - path to overview image
6: NUMBER - size multiplier, 1 means default size
7: ARRAY - parameters for the -on click- code; referenced from the script as (_this select 9)
3: ARRAY - list of ORBAT groups in format:
0: ARRAY - group position in format [x,y,y] or [x,y]
1: CONFIG - preview CfgORBAT group
2: CONFIG - topmost displayed CfgORBAT group
3: ARRAY - list of allowed tags
4: NUMBER - maximum number of displayed tiers
4: ARRAY - list of markers revealed in strategic map (will be hidden when map is closed)
5: ARRAY - list of custom images in format:
0: STRING - texture path
1: ARRAY - color in format [R,G,B,A]
2: ARRAY - image position
3: NUMBER - image width (in metres)
4: NUMBER - image height (in metres)
5: NUMBER - image angle (in degrees)
6: STRING - text displayed next to the image
7: BOOL - true to display shadow
6: NUMBER - value in range <0-1> defining weather on strategic map (i.e. density of clouds)
7: BOOL - true for night version of strategic map (darker with blue tone)
8: NUMBER - default map scale coeficient (1 is automatic scale)
9: BOOL - true to enable simulation while the map is opened (default: false)
      10: STRING - bottom bar action label text (default: "Select a mission")
      11: BOOL - true to show icon label as a mission name (default: true)
      12: STRING - path to mission icon texture (default: "\A3\Ui_f\data\Map\GroupIcons\badge_rotate_%1_gs.paa")
      %1 - animation frame from 0-6 (optional)
      %2 - index from 1-9 (optional)


Returns:
|p3= missions: [[Array]] - list of missions, each [[Array]] in format:
DISPLAY - RscDisplayStrategicMap
* 0: [[Position]] - 2D or 3D position of mission
*/
* 1: [[Code]] - Expression executed when user clicks on mission icon
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
* 2: [[String]] - Mission name
____________________________________________________________________________________________
* 3: [[String]] - Short description
* 4: [[String]] - Name of mission's player
* 5: [[String]] - Path to overview image
* 6: [[Number]] - size multiplier for overview image
* 7: [[Array]] - parameters for on-click action. Can be accessed in code with <sqf inline>_this # 9</sqf>


| <!-- [] call [[BIS_fnc_StrategicMapOpen]]; --> |= Syntax
|p4= ORBATs: [[Array]] - list of ORBAT, each [[Array]] in format:
* 0: [[Array]] format [[Position]] - 2D or 3D position
* 1: [[Config]] - preview CfgORBAT group
* 2: [[Config]] - topmost displayed CfgORBAT group
* 3: [[Array]] of [[String]]s - list of allowed tags
* 4: [[String]] - name of mission's player
* 5: [[Number]] - maximum number of displayed tiers


|p1= |= Parameter 1
|p5= markers: [[Array]] of [[String]]s - list of markers revealed in strategic map (will be hidden when map is closed)


| |= Return value
|p6= images: [[Array]] - list of custom images, each [[Array]] in format:
____________________________________________________________________________________________
* 0: [[String]] - texture path
* 1: [[Array]] format [[Color|Color (RGBA)]]
* 2: [[Array]] format [[Position]] - image position
* 3: [[Number]] - image width in meters
* 4: [[Number]] - image height in meters
* 5: [[Number]] - image angle in degrees
* 6: [[String]] - text displayed next to the image
* 7: [[Boolean]] - [[true]] to show shadow


|x1= <code></code> |=
|p7= weather: [[Number]] - overcast, from 0 - 1, where 1 means cloudy weather
____________________________________________________________________________________________


| |= See also
|p8= night: [[Boolean]] - [[true]] for night version of strategic map (darker with blue tone)


|p9= scale: [[Number]] - default map scale coeficient (1 is automatic scale)
|p10= simulation: [[Boolean]]] - (Optional, default [[false]] [[true]] to enable simulation while the map is opened
|p11= label: [[String]] - (Optional, default "Select a mission") bottom bar action label text
|p12= missionName: [[Boolean]] - (Optional, default [[true]]) [[true]] to show icon label as a mission name
|p13= missionIcon: [[String]] - (Optional, default "\A3\Ui_f\data\Map\GroupIcons\badge_rotate_%1_gs.paa") path to mission icon texture
* %1 - Animation frame from 0-6 (optional)
* %2 - Index from 1-9 (optional)
|r1= [[Display]] - rscDisplayStrategicMap
|x1= <sqf>
[
findDisplay 46,
[2000,2000,0],
[
[
[2000,2000,0],
{systemChat format ["%1",name ((_this # 9) # 0)]},
"1st Mission",
"This is mission one",
"Name of mission's player",
"\A3\Data_F_Exp\Logos\arma3_exp_icon_ca.paa",
1.5,
[player]
],
[
[1000,1000,0],
{systemChat format ["%1",name ((_this # 9) # 0)]},
"2nd Mission",
"This is mission two",
"Name of mission's player",
"\A3\Data_F_Argo\Logos\arma3_argo_logoTitle_ca.paa",
1.5,
[player]
]
],
[
[
[3000,3000,0],
configFile >> "CfgORBAT" >> "BIS" >> "B_1_A_1_2",
configFile >> "CfgORBAT" >> "BIS" >> "B_1",
[],
10
]
],
[
"marker_1",
"marker_2"
],
[
[
"\A3\Ui_f\data\Logos\arma3_white_ca.paa",
[0,0,0,1],
[4000,4000,0],
8,
8,
0,
"Arma 3 Logo",
true
]
],
0,
false,
1,
true,
"Strategic Map Example",
false,
"\A3\Ui_f\data\Logos\arma3_white_ca.paa"
] call BIS_fnc_strategicMapOpen;
</sqf>
|seealso= [[ORBAT Viewer]] [[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]] [[BIS_fnc_strategicMapMouseButtonClick]] [[BIS_fnc_strategicMapAnimate]]
}}
}}


<h3 style="display:none">Notes</h3>
{{Note
<dl class="command_description">
|user= ansin11
<!-- Note Section BEGIN -->
|timestamp= 20210331152900
|text= In order to use an image from the mission folder, the full path to the image has to be provided:
<sqf>
"images\MyImage.jpg" // Does not work
([str missionConfigFile, 0, -15] call BIS_fnc_trimString) + "images\MyImage.jpg" // works


<!-- Note Section END -->
// edit: since Arma 3 v1.96 getMissionPath is available
</dl>
getMissionPath "images\MyImage.jpg" // works
 
</sqf>
<h3 style="display:none">Bottom Section</h3>
}}
[[Category:Function Group: Strategic|{{uc:StrategicMapOpen}}]]
[[Category:Functions|{{uc:StrategicMapOpen}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:StrategicMapOpen}}]]

Latest revision as of 19:16, 8 November 2023

Hover & click on the images for description

Description

Description:
Creates a strategic map.
A3 strategicMap.jpg
Execution:
call
Groups:
Strategic

Syntax

Syntax:
[display, pos, missions, ORBATs, markers, images, weather, night, scale, simulation, label, missionName, missionIcon] call BIS_fnc_strategicMapOpen
Parameters:
display: Display - parent display. When empty, mission display is used.
pos: Array format Position - default view position in format [x,y,y] or [x,y]
missions: Array - list of missions, each Array in format:
  • 0: Position - 2D or 3D position of mission
  • 1: Code - Expression executed when user clicks on mission icon
  • 2: String - Mission name
  • 3: String - Short description
  • 4: String - Name of mission's player
  • 5: String - Path to overview image
  • 6: Number - size multiplier for overview image
  • 7: Array - parameters for on-click action. Can be accessed in code with _this # 9
ORBATs: Array - list of ORBAT, each Array in format:
  • 0: Array format Position - 2D or 3D position
  • 1: Config - preview CfgORBAT group
  • 2: Config - topmost displayed CfgORBAT group
  • 3: Array of Strings - list of allowed tags
  • 4: String - name of mission's player
  • 5: Number - maximum number of displayed tiers
markers: Array of Strings - list of markers revealed in strategic map (will be hidden when map is closed)
images: Array - list of custom images, each Array in format:
weather: Number - overcast, from 0 - 1, where 1 means cloudy weather
night: Boolean - true for night version of strategic map (darker with blue tone)
scale: Number - default map scale coeficient (1 is automatic scale)
simulation: Boolean] - (Optional, default false true to enable simulation while the map is opened
label: String - (Optional, default "Select a mission") bottom bar action label text
missionName: Boolean - (Optional, default true) true to show icon label as a mission name
missionIcon: String - (Optional, default "\A3\Ui_f\data\Map\GroupIcons\badge_rotate_%1_gs.paa") path to mission icon texture
  • %1 - Animation frame from 0-6 (optional)
  • %2 - Index from 1-9 (optional)
Return Value:
Display - rscDisplayStrategicMap

Examples

Example 1:
[ findDisplay 46, [2000,2000,0], [ [ [2000,2000,0], {systemChat format ["%1",name ((_this # 9) # 0)]}, "1st Mission", "This is mission one", "Name of mission's player", "\A3\Data_F_Exp\Logos\arma3_exp_icon_ca.paa", 1.5, [player] ], [ [1000,1000,0], {systemChat format ["%1",name ((_this # 9) # 0)]}, "2nd Mission", "This is mission two", "Name of mission's player", "\A3\Data_F_Argo\Logos\arma3_argo_logoTitle_ca.paa", 1.5, [player] ] ], [ [ [3000,3000,0], configFile >> "CfgORBAT" >> "BIS" >> "B_1_A_1_2", configFile >> "CfgORBAT" >> "BIS" >> "B_1", [], 10 ] ], [ "marker_1", "marker_2" ], [ [ "\A3\Ui_f\data\Logos\arma3_white_ca.paa", [0,0,0,1], [4000,4000,0], 8, 8, 0, "Arma 3 Logo", true ] ], 0, false, 1, true, "Strategic Map Example", false, "\A3\Ui_f\data\Logos\arma3_white_ca.paa" ] call BIS_fnc_strategicMapOpen;

Additional Information

See also:
ORBAT Viewer 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 BIS_fnc_strategicMapMouseButtonClick BIS_fnc_strategicMapAnimate

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
ansin11 - c
Posted on Mar 31, 2021 - 15:29 (UTC)
In order to use an image from the mission folder, the full path to the image has to be provided:
"images\MyImage.jpg" // Does not work ([str missionConfigFile, 0, -15] call BIS_fnc_trimString) + "images\MyImage.jpg" // works // edit: since Arma 3 v1.96 getMissionPath is available getMissionPath "images\MyImage.jpg" // works