Config_pylons - 61st/missions GitHub Wiki

This article handles how you setup, change and modify loadouts for our vehicle loadout system pylon. The loadout system allows you to quickly select a predefined template and equip your vehicle with it. These actions are added when the vehicle is inside of a staging zone.

Adding and modifying loadout

Obtain and Change Loadout

In order to add or modify loadout it is easiest to export the vehicles current magazines first in order to get the turret index. Tondo this its easiest to run the following command in the debug console when looking at the vehicle:

magazinesAllTurrets cursorObject;

Sometimes you can modify the ammunition types and so on in the eden object view. When doing so you can then export different magazines without opening the config viewer.

For aircraft this is different and simpler, however. First for you can change the pylon of the given aircraft directly on the object view

Once we are happy with our loadout, we can now export it using the following command in the debug console while loading at the aircraft.

getPylonMagazines cursorObject

Loadout format

Each export returns a one liner long array. What we do is to reformat it to make it more readable and manageable. The loadout system supports 2 types of formats the vehicle magazine array with the id and owner part at the end removed. For aircraft the pylon returns a much simpler array with each item (usually) representing left to right wing position.

Below you can find example formating.

Ground vehicles

    [ "default", [
        ["rhs_mag_smokegen",[-1],999],
        ["rhs_mag_M829A3_max",[0],28],
        ["rhs_mag_M830A1_max",[0],16],
        ["rhs_mag_762x51_M240_1200",[0],1200],
        ["rhs_mag_762x51_M240_1200",[0],1200],
        ["rhs_mag_762x51_M240_1200",[0],1200],
        ["rhs_mag_762x51_M240_1200",[0],1200],
        ["rhs_mag_762x51_M240_1200",[0],1200],
        ["rhs_mag_762x51_M240_1200",[0],1200],
        ["rhs_mag_762x51_M240_1200",[0],1200],
        ["rhs_mag_762x51_M240_1200",[0],1200],
        ["rhs_LaserFCSMag",[0],99],
        ["rhs_LaserFCSMag",[0],99],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhs_mag_100rnd_127x99_mag_Tracer_Red",[0,0]],
        ["rhsusf_mag_L8A3_12",[0,0],12],
        ["rhs_mag_762x51_M240_200",[0,2]],
        ["rhs_mag_762x51_M240_200",[0,2]],
        ["rhs_mag_762x51_M240_200",[0,2]]
    ]]

Airframes

    ["default", [
        "USAF_PylonRack_2Rnd_AIM9X_LAU105",
        "USAF_PylonRack_1Rnd_ANAAQ28",
        "USAF_PylonRack_2Rnd_AGM65K",
        "USAF_PylonRack_1Rnd_GBU54",
        "USAF_PylonRack_1Rnd_GBU12",
        "",
        "USAF_PylonRack_1Rnd_GBU12",
        "USAF_PylonRack_1Rnd_GBU54",
        "USAF_PylonRack_2Rnd_AGM65D",
        "USAF_PylonRack_7Rnd_APKWS",
        "USAF_PylonRack_1Rnd_ANALQ131"
    ]]

Add Loadout

new load outs will need to be added to the code

Now when we have an array containing our pylon can now add it or edit it to fit your needs better. In the file Scripts/functions/vehicle/fn_vehicle_getPylon.sqf we define all our loadouts. The loadout file has 2 parts of the actual loadouts then the vehicle kind that references the loadout.

private _rhsusf_m1a1tank_base = createHashMapFromArray [
    ["hard",    [ /* SNIPP */ ]],
    ["default", [ /* SNIPP */ ]],
    ["hard",    [ /* SNIPP */ ]]
];

// Loadout vehicle list
private _pylons = createHashMapFromArray [
    ["rhsusf_m1a1tank_base", _rhsusf_m1a1tank_base]
];

Add loadout to selector

Scripts/functions/vehicle/fn_vehicle_setupPylonCategories.sqf

if (_vehicle iskindOf "rhsusf_m1a1tank_base") then {
    _pylonList = [
        // TypeOf,               DisplayName,   Name,           Icon
        ["rhsusf_m1a1tank_base", "Hard",        "hard",         ""],
        ["rhsusf_m1a1tank_base", "Soft",        "soft",         ""],
        ["rhsusf_m1a1tank_base", "Default",     "default",      ""]
    ];
};