TMF3 / TMF

TMF is a mission making mod for Arma 3's 3D editor
http://teamonetactical.com/wiki/doku.php?id=tmf:start
41 stars 25 forks source link

Allow extra items to be allowed for vehicle gear. #438

Open Drofseh opened 2 years ago

Drofseh commented 2 years ago

Issue:

At present to add an item to TMF Vehicle Gear the item has to be assigned to a unit loadout.

In some loadouts I am working on I am randomizing weapons that have incompatible magazines, and then adding the magazines via the code entry. Example:

class rifleman : baseMan {
    displayName = "Rifleman";
    primaryWeapon[] = {
        LIST_6("CUP_arifle_AKM_Early"),
        LIST_2("CUP_arifle_AKMS_Early"),
        LIST_2("CUP_SKS")
    };
    magazines[] = {
        LIST_2("CUP_HandGrenade_RGD5"),
        LIST_2("ACE_HandFlare_White"),
        "ACE_HandFlare_Yellow",
        "ACE_HandFlare_Red",
        "ACE_HandFlare_Green"
    };
    code = "                                                                                                                              \
        private _primaryWeapon = primaryWeapon _this;                                                                                     \
        private _vest = vestContainer _this;                                                                                              \
        switch true do {                                                                                                                  \
            case (                                                                                                                        \
                _primaryWeapon isEqualTo 'CUP_arifle_AKM_Early'                                                                           \
                || {_primaryWeapon isEqualTo 'CUP_arifle_AKMS_Early'}                                                                     \
            ) : {_vest addItemCargoGlobal ['CUP_30Rnd_762x39_AK47_bakelite_M', 5]};                                                       \
            case (_primaryWeapon isEqualTo 'CUP_SKS') : {_vest addItemCargoGlobal ['CUP_10Rnd_762x39_SKS_M', 9]};                         \
            case (_primaryWeapon isEqualTo 'CUP_arifle_AKMS_Early') : {_vest addItemCargoGlobal ['CUP_30Rnd_762x39_AK47_bakelite_M', 5]}; \
        };                                                                                                                                \
    ";
};

Because the primary weapon magazines are added via the code entry, they do not show up in the TMF Vehicle Gear options for the faction.

Solution I'd like:

A way to allow a list of items per faction to allow in TMF Vehicle Gear, even if they are not assigned to a unit loadout.

Current workaround:

My current workaround is to have an item monkey loadout that is given one of each item.

Example:

class itemMonkey : baseMan {
    displayName = "Item Monkey (used to make extra items accessible in TMF Vehicle Gear)";
    magazines[] = {
        "CUP_30Rnd_762x39_AK47_bakelite_M",
        "CUP_10Rnd_762x39_SKS_M"
    };
};

This workaround could be the solution if there was a way to prevent the loadout from showing up in the eden loadout selection and the #loadout chat command menu

Example:

class itemMonkey : baseMan {
    displayLoadout = false;
    magazines[] = {
        "CUP_30Rnd_762x39_AK47_bakelite_M",
        "CUP_10Rnd_762x39_SKS_M"
    };
};
Drofseh commented 2 years ago

related issue #437