Uses aeroson's get_loadout/set_loadout script (see https://github.com/aeroson/a3-loadout)
- Allows to choose gear and create gear kit for infantry units
- Randomized infanty kit (random weapon, equipement, uniforms, etc.)
- Allows to create cargo gear kits for vehicles and ammoboxes
- Allows to use created kits to assign gear via: Synchronization with GameLogic or setVariable for unit
- Allows to assign gear by unit's name or role description
For multiplayer - set `dzn_gear_enableIdentitySync = true;` in `dzn_gear_init.sqf` to broadcast identity between clients. Assign kits by RoleDescription or unit name (100% JIP compatible). Show your loadout and loadout of your squadmates at briefing screen. Allow Zeus to assign dzn_gear kits to selected units. Use 'G' key to open selection menu. Download files to your mission folder. If you already have "init.sqf", then update it with lines from downloaded "init.sqf".
Script should be ran with options[ editMode(BOOL), startDelay(NUMBER, Optional) ] execVM "dzn_gear_init.sqf";.
- Open Editor and place GameLogic object
- Name GameLogic as dzn_gear_%KITNAME% or dzn_gear_box_%KITNAME%
- Synchronize GameLogic with units to assign kit for them
- (Optional) You can also assign kit by adding this setVariable ["dzn_gear", "%KITNAME%", true] or this setVariable ["dzn_gear_cargo", "%KITNAME%", true] to units/vehicle init
- (Optional) You can also assign kit by adding this setVariable ["dzn_gear", "%KITNAME%", true] or this setVariable ["dzn_gear_cargo", "%KITNAME%", true] to GmaeLogic's init and synchronizing units with this GameLogic
- Open mission in EDIT MODE of dzn_gear and create kits
- Save kits to dzn_gear/Kits.sqf
- Rename kits (kitname from GameLogic's name or variable should match)
https://www.youtube.com/watch?v=rlCNkTFW2W8 Google Slides (RU): https://docs.google.com/presentation/d/1TDAyE8xhFSAO9977mSDJ8B5OokprkgaBUE59KTb0fuc/present?slide=id.gfe3687196_0_0 There are several types of gear kits you can create:
- Gear Kit (for infantry)
- Simple Kits
- Randomized Kits
- Random Kits
- Cargo Kit (for vehicles and ammoboxes)
(1)Gear Kit could be assigned to any infantry (even to crew of vehicles). It has some randomization option.
(1.i)Simple Kit is simple. It has one item for each category (uniform, weapons) which will be assigned to unit as is.
(1.ii)Randomized Kit has some variations of gear for some category. E.g. if you change classname of uniform to array of classnames, then unit will get random item from this array (BIS_fnc_selectRandom is used). If you want to give unit a random weapon, then change weapon's classname to array of classnames and change magazines for weapon to array of magazines - e.g. for Primary weapon:
change weapon "arifle_MX_SW_Black_F" to ["arifle_MX_SW_Black_F","LMG_Zafir_F"] and then change primary weapon's magazines from "100Rnd_65x39_caseless_mag_Tracer" to ["100Rnd_65x39_caseless_mag_Tracer","150Rnd_762x51_Box"]
Categories allowed to randomization are: Equipment: Uniform, Vest, Backpack, Headgear, Goggles, Primary Weapon: Weapon, Optics Attachement, Muzzle Attachement, Pointer Attachement, Secondary (Launcher) Weapon: Weapon, Handgun Weapon: Weapon, Optics Attachement, Muzzle Attachement, Pointer Attachement, Items, Magazines: Primary Weapon Magazine, Secondary Weapon Magazine, Handgun Weapon Magazine
(1.iii)Random Kit is a kit of kits. It doesn't contain any classname, but it is the array of another kit's names (bounded with "). Script will choose random kit from this array and assign it to unit. You can use the name of randomized kit here.
(2)Cargo Kit could be assigned to vehicles and ammoboxes. It contain only items which will be placed in cargo of unit (there is no weight/volume limits, so check quantity of items).
- Unit's variable
- GameLogic's variable
- GameLogic's name
(2) Place object GameLogic-Objects-GameLogic on map and add a line this setVariable ["dzn_gear", "%kitName%"] or this setVariable ["dzn_gear_cargo", "%kitName%"] to it's init field. Then synchronize GameLogic with units to assign gear to them (F5 in editor, to better accuracy - link unit to GameLogic). You can also synchronize vehicles with crew to assign gear kit.
(3) Place object GameLogic-Objects-GameLogic on map and name it dzn_gear_%kitname% or dzn_gear_cargo_%kitname%. Then synchronize GameLogic with units to assign gear on them. You can also synchronize vehicles with crew to assign gear kit. After mission starts, all GameLogics will be checked. For any of them which have "dzn_gear" or "dzn_gear_cargo" in the name or as the variable all synchronized objects will be returned. For each object the chosen kitname will be checked for existence in file dzn_gear\Kits.sqf and then kit with such name will be assigned. Then all units will be checked for variable "dzn_gear" or "dzn_gear_cargo" and kits will be assigned.
After gear assigned, unit/object updates with variable "dzn_gear_assigned" which store the name of assigned kit.
Script runs at mission initialization. If you want to delay it, use second argument - e.g. 15 seconds after mission start: [ false, 15 ] execVM "dzn_gear_init.sqf";. In 'EDIT' mode open mission in Editor and click "Preview": inside the mission you'll see hint with help text and keybinding.
- [SPACE] -- Open Virtual Arsenal
- [CTRL + SPACE] -- Copy gear of player or cursorTarget and add it to action list
- [SHIFT + SPACE] -- Copy gear of player or cursorTarget without adding new action
- [1...6] -- Show item list (primary weapon, uniform, headgear, etc.) and copy to clipboard
- [SHIFT + 1...6] -- Set current item list and copy list
- [CTRL + 1...6] -- Add item to list and copy
- [ALT + 1...6] --Clear item list
- Del -- removes all items of player/cursor target
- PgUp -- cycled switch of uniform items presets
- PgDown -- cycled switch of assigned items presets
where 1..6:
1 -- Primary weapon and magazine
2 or U -- Uniform
3 or H -- Headgear
4 or G -- Goggles
5 or V -- Vest
6 or B -- Backpack
7 or P -- Backpack
When kit is created via [CTRL + SPACE] an actions will be added:
- Kit with MX at 00:01:32 -- action will assign saved gear to player or cursor target (primary weapon and timestamp are added to action name)
- Cargo Kit from ZAMAK (Covered) at 00:02:32 -- action will assign saved cargo gear to player's or cursor vehicle or box (vehicle name and timestamp are added to action name)
- Open Virtual Arsenal by pressing [SPACE] key and choose any gear you need
- Quit Arsenal and press [CTRL + SHIFT] to copy kit to clipboard
- Then open dzn_gear/Kits.sqf and paste kit. It will be something like:
kit_NewKitName = [[">", ...] ... ]; - Change kit_NewKitName to some unique kit name, e.g. kit_riflemanNATO, kit_SF_Demo_NATO, kit_OPFOR_OfficerWithMG. Use only global variable as name of kit.
- [ @Unit, @Kitname(string), (Optional)@isVehicle ] spawn dzn_fnc_gear_assignKit - assign given @kitname (as string, e.g. kit_nato_ar = [...] should be given as "kit_nato_ar") to @Unit or to vehicle, if @isVehicle argument passed as TRUE
- [ @Unit, @Kit(array) ] spawn dzn_fnc_gear_assignGear - assign given @Kit (array of gear, returned from dzn_fnc_gear_getGear function) to @Unit (infantry)
- [ @Vehicle, @CargoKit(array) ] spawn dzn_fnc_gear_assignCargoGear - assign given @CargoKit(array of gear, returned from dzn_fnc_gear_getCargoGear function) to @Vehicle (or box)
- @Kit = @Unit call dzn_fnc_gear_getGear - return gear of infantry unit in format of dzn_gear kit.
- @CargoKit = @Vehicle call dzn_fnc_gear_getCargoGear - return Cargo gear of vehicle or box in format of dzn_gear kit
- @PreciseGear = @Unit call dzn_fnc_gear_getPreciseGear - return array of @PreciseGear (gear as it exists in units inventory, ammo in magazines is counted).
- [ @Unit, @PreciseGear ] call dzn_fnc_gear_setPreciseGear - assign @PreciseGear to @Unit (infantry)