Unit Loadout Array: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<tt>([a-zA-Z0-9\. _"\\']+)<\/tt>" to "{{hl|$1}}")
(Add items order note (thanks to MKNavaG) and array description)
Line 1: Line 1:
{| class="wikitable" style="float: right; margin: 0 0 0.5em 1.5em"
! #
! Element
! Description
|- style="vertical-align: top"
| 1
| [[primaryWeapon|Primary Weapon]]
|
* classname
* suppressor
* pointer
* optics
* muzzle 1's magazine and ammunition
* muzzle 2's magazine and ammunition
* bipod
|- style="vertical-align: top"
| 2
| [[secondaryWeapon|Secondary Weapon]]
|
* classname
* suppressor
* pointer
* optics
* muzzle 1's magazine and ammunition
* muzzle 2's magazine and ammunition
* bipod
|- style="vertical-align: top"
| 3
| [[handgunWeapon|Handgun Weapon]]
|
* classname
* suppressor
* pointer
* optics
* muzzle 1's magazine and ammunition
* muzzle 2's magazine and ammunition
* bipod
|- style="vertical-align: top"
| 4
| [[uniform|Uniform]]
|
* classname
* items list and count
|- style="vertical-align: top"
| 5
| [[vest|Vest]]
|
* classname
* items list and count
|- style="vertical-align: top"
| 6
| [[backpack|Backpack]]
|
* classname
* items list and count
|- style="vertical-align: top"
| 7
| [[headgear|Headgear]]
| {{n/a}}
|- style="vertical-align: top"
| 8
| [[goggles|Goggles/Facewear]]
| {{n/a}}
|- style="vertical-align: top"
| 9
| '''Binoculars'''
|
* classname
* suppressor
* pointer
* optics
* muzzle 1's magazine and ammunition
* muzzle 2's magazine and ammunition
* bipod
|- style="vertical-align: top"
| 10
| [[assignedItems|Assigned Items]]<br>(without Binoculars)
|
* Map
* Compass
* Watch
* Radio
* GPS/UAV terminal
* [[hmd|NVG]]
|}
This array format is used with [[getUnitLoadout]] and [[setUnitLoadout]] commands. Its format is described in the side table.
{{Feature|informative|items listed in uniform/vest/backpack (including other containers) are listed in the reverse order - the topmost item is located at the end of the container items' array.}}
== Examples ==
These are examples of Unit Loadout Array structures (see [[getUnitLoadout]], [[setUnitLoadout]]).  
These are examples of Unit Loadout Array structures (see [[getUnitLoadout]], [[setUnitLoadout]]).  


* {{hl|"B_soldier_AT_F"}}
=== B_soldier_AT_F ===


<syntaxhighlight lang="cpp">[
<syntaxhighlight lang="cpp">
[
/* primary weapon */ ["arifle_MXC_Holo_pointer_F", "", "acc_pointer_IR", "optic_Holosight", ["30Rnd_65x39_caseless_mag", 30], [], ""],
/* primary weapon */ ["arifle_MXC_Holo_pointer_F", "", "acc_pointer_IR", "optic_Holosight", ["30Rnd_65x39_caseless_mag", 30], [], ""],
/* secondary weapon */ ["launch_B_Titan_short_F", "", "", "", ["Titan_AT", 1], [], ""],
/* secondary weapon */ ["launch_B_Titan_short_F", "", "", "", ["Titan_AT", 1], [], ""],
Line 12: Line 105:
/* items */ "H_HelmetB_light_desert", "G_Bandanna_tan",[],
/* items */ "H_HelmetB_light_desert", "G_Bandanna_tan",[],
/* items */ ["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
/* items */ ["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
]</syntaxhighlight>
]
</syntaxhighlight>


* {{hl|Misc}}
=== Misc ===


<syntaxhighlight lang="cpp">[
<syntaxhighlight lang="cpp">
[
[
[
"arifle_MX_GL_F","muzzle_snds_H", "acc_pointer_IR", "optic_Aco", // Primary weapon, (weapon items) silencer, pointer, optic
"arifle_MX_GL_F","muzzle_snds_H", "acc_pointer_IR", "optic_Aco", // Primary weapon, (weapon items) silencer, pointer, optic
Line 48: Line 143:
["Binocular", "", "", "", [], [], ""], // Weapon Binocular (follows same layout as other weapons above)
["Binocular", "", "", "", [], [], ""], // Weapon Binocular (follows same layout as other weapons above)
["ItemMap", "ItemGPS", "ItemRadio", "ItemCompass", "ItemWatch", "NVGoggles"] // AssignedItems ItemGPS can also be a UAV Terminal
["ItemMap", "ItemGPS", "ItemRadio", "ItemCompass", "ItemWatch", "NVGoggles"] // AssignedItems ItemGPS can also be a UAV Terminal
]</syntaxhighlight>
]
</syntaxhighlight>




[[Category: Arrays]]
[[Category: Arrays]]

Revision as of 12:52, 23 March 2022

# Element Description
1 Primary Weapon
  • classname
  • suppressor
  • pointer
  • optics
  • muzzle 1's magazine and ammunition
  • muzzle 2's magazine and ammunition
  • bipod
2 Secondary Weapon
  • classname
  • suppressor
  • pointer
  • optics
  • muzzle 1's magazine and ammunition
  • muzzle 2's magazine and ammunition
  • bipod
3 Handgun Weapon
  • classname
  • suppressor
  • pointer
  • optics
  • muzzle 1's magazine and ammunition
  • muzzle 2's magazine and ammunition
  • bipod
4 Uniform
  • classname
  • items list and count
5 Vest
  • classname
  • items list and count
6 Backpack
  • classname
  • items list and count
7 Headgear N/A
8 Goggles/Facewear N/A
9 Binoculars
  • classname
  • suppressor
  • pointer
  • optics
  • muzzle 1's magazine and ammunition
  • muzzle 2's magazine and ammunition
  • bipod
10 Assigned Items
(without Binoculars)
  • Map
  • Compass
  • Watch
  • Radio
  • GPS/UAV terminal
  • NVG

This array format is used with getUnitLoadout and setUnitLoadout commands. Its format is described in the side table.

items listed in uniform/vest/backpack (including other containers) are listed in the reverse order - the topmost item is located at the end of the container items' array.


Examples

These are examples of Unit Loadout Array structures (see getUnitLoadout, setUnitLoadout).

B_soldier_AT_F

[
	/* primary weapon */	["arifle_MXC_Holo_pointer_F", "", "acc_pointer_IR", "optic_Holosight", ["30Rnd_65x39_caseless_mag", 30], [], ""],
	/* secondary weapon */	["launch_B_Titan_short_F", "", "", "", ["Titan_AT", 1], [], ""],
	/* handgun weapon */	["hgun_P07_F", "", "", "", ["16Rnd_9x21_Mag", 16], [], ""],
	/* uniform */			["U_B_CombatUniform_mcam", [["FirstAidKit", 1], ["30Rnd_65x39_caseless_mag", 2, 30], ["Chemlight_green", 1, 1]]],
	/* vest */				["V_PlateCarrier1_rgr", [["30Rnd_65x39_caseless_mag", 3, 30], ["16Rnd_9x21_Mag", 2, 16], ["SmokeShell", 1 ,1], ["SmokeShellGreen", 1, 1], ["Chemlight_green", 1, 1]]],
	/* backpack */			["B_AssaultPack_mcamo_AT",[["Titan_AT", 2, 1]]],
	/* items */				"H_HelmetB_light_desert", "G_Bandanna_tan",[],
	/* items */				["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]
]

Misc

[
	[
		"arifle_MX_GL_F","muzzle_snds_H", "acc_pointer_IR", "optic_Aco",	// Primary weapon, (weapon items) silencer, pointer, optic
		["30Rnd_65x39_caseless_mag", 30],									// Loaded mag in primary muzzle, ammo count
		["1Rnd_HE_Grenade_shell", 1],										// Loaded mag in secondary muzzle, ammo count
		""	// Bipod
	],
	[],	// Secondary weapon info (see primary above)
	[	// handGun info (see primary above)
		"hgun_P07_F", "", "", "",
		["16Rnd_9x21_Mag", 16],
		[],
		""
	],
	[	// Uniform
		"U_B_CombatUniform_mcam", // Uniform Type
		[	// Uniform Items
			["FirstAidKit", 1],	// Type, count
			["30Rnd_65x39_caseless_mag", 30, 2]
		]	// Magazines are Type, ammo, count - Arma version 1.64> is Type, count, ammo
	],
	[	// Vest Info
		"V_PlateCarrierGL_rgr",	// Vest Type
		[	// Vest Items
			["30Rnd_65x39_caseless_mag", 30, 3]
		]
	],
	[],	// Backpack Info (follows same layout as above for Uniform and Vest)
	"H_HelmetSpecB_blk",					// Helmet
	"G_Tactical_Clear",						//Facewear glasses/bandanna etc
	["Binocular", "", "", "", [], [], ""],	// Weapon Binocular (follows same layout as other weapons above)
	["ItemMap", "ItemGPS", "ItemRadio", "ItemCompass", "ItemWatch", "NVGoggles"]	// AssignedItems ItemGPS can also be a UAV Terminal
]