If you have questions about anything on this page, or if something is not working, contact me (Bear).
Supply crates are in the framework by default; they are placed next to every squad leader. The crate object type (and thus appearance) does not matter, and can be picked freely. The existing crates can also be sling-loaded by helicopter pilots.
The crate contents are controlled by the assign gear scripts. Each crate will have a line of code in it's init box, more or less identical to this:
["crate_med",this,"blu_f"] call f_fnc_assignGear
The first parameter (“crate_med”) passes the desired gear configuration to the script, the second (this) references the crate object for the script and the third (“blu_f”) tells the gear script which factions gear should be added to the box. In this case, the crate receives a “crate_med” loadout from the “blu_f” (NATO) faction.
The actual contents to be added is adjusted in the gear script file of the respective faction, e.g. f_assignGear_nato.sqf (CTRL+F crate_med).
Image 1: Example crate from the framework template
Image 2: The crate's init code
Image 3: Changing crate object type
Let's say you want to use a BMP-2 in a mission, but you think its ATGM might be too much.
copyToClipboard str (vehicle player magazinesTurret [0])
["aa", "bb", "cc", "dd", and so on]
if (isServer) then {this removeMagazinesTurret ["classname", [0]];};
Example code:
if (isServer) then {this removeMagazinesTurret ["rhs_mag_9m113_4", [0]];};
It's possible to swap the ammunition in a tank to much older variants, thus decreasing it's lethality.
if (isServer) then {this addMagazineTurret ["classname", [0]];};
if (isServer) then {...};
Example code #1:
if (isServer) then {this addMagazineTurret ["rhs_mag_3bm22_10", [0]];};
Example code #2:
if (isServer) then {this addMagazineTurret ["rhs_mag_3bm22_10", [0]]; this addMagazineTurret ["rhs_mag_3bm22_10", [0]]; this addMagazineTurret ["rhs_mag_3bk18_8", [0]];};