Page MenuHomeFeedback Tracker

Revive system doesn't recognize Global Mobilization / other modded medical items
Feedback, NormalPublic


The official Revive system, when set to require First Aid Kits and Medikits, does not recognize valid medical items that have been added by optional addons, including Global Mobilization. If you try to revive a downed player with these items, the action does not show up, so you cannot revive them. This effectively makes Revive incompatible with Global Mobilization.

This is because the condition for the action checks CAN_USE_MEDIKIT2 and CAN_USE_FAK2 in \a3\functions_f_mp_mark\Revive\, which explicitly check for the "FirstAidKit" and "Medikit" vanilla medical items. This should be changed to a generic check for any valid medical items (ItemInfo >> type is 401 or 619, I believe?). should also be updated to remove the correct item.

Behavior was observed in 1.98.146373 and the GM 1.2 update. No mods (besides GM) were loaded.


Operating System
Windows 10 x64
Steps To Reproduce
  1. Set up a mission using the official revive system and an optional addon that includes medical items, such as Global Mobilization.
  2. Set "Required Items" to require a Medikit or First Aid Kit.
  3. Spawn as a unit that has modded medical items. *IMPORTANT* MAKE SURE THAT YOU DON'T HAVE VANILLA FIRST AID KITS OR MEDIKITS
  4. (Optional) Verify that the modded medical item functions as a first aid kit or medikit for healing wounds.
  5. Down a player, and attempt to revive them. The action should not show up.

Event Timeline

Pi added a subscriber: Pi.Jun 7 2021, 12:00 PM




#define CAN_USE_MEDIKIT(unit)            (unit getUnitTrait "Medic" && {'Medikit' in items unit})
#define CAN_USE_MEDIKIT2(unit,target)    (unit getUnitTrait "Medic" && {('Medikit' in items unit || {(!isNull target && {'Medikit' in items target})})})
#define CAN_USE_FAK(unit)                ('FirstAidKit' in items unit)
#define CAN_USE_FAK2(unit,target)        ('FirstAidKit' in items unit || {(!isNull target && {'FirstAidKit' in items target})})

To replace with something like this:

_fnc_hasFAK =
    params ["_unit"];

    private _hasFAK = false;

        private _item = _x;

        private _type = getNumber (configFile >> "cfgWeapons" >> _item >> "ItemInfo" >> "type");

        if (_type == 401) exitWith
            _hasFAK = true;
    forEach ((assignedItems _unit) + (items _unit));

_fnc_hasMedikit =
    params ["_unit"];

    private _hasMedikit = false;

        private _item = _x;

        private _type = getNumber (configFile >> "cfgWeapons" >> _item >> "ItemInfo" >> "type");

        if (_type == 619) exitWith
            _hasMedikit = true;
    forEach ((assignedItems _unit) + (items _unit));

_hasFAK = ((((assignedItems _unit) + (items _unit)) findIf {getNumber (configFile >> "cfgWeapons" >> _x >> "ItemInfo" >> "type") == 401}) != 1);
_hasMedikit = ((((assignedItems _unit) + (items _unit)) findIf {getNumber (configFile >> "cfgWeapons" >> _x >> "ItemInfo" >> "type") == 619}) != 1);
NikkoJT added a subscriber: NikkoJT.Jul 1 2023, 7:17 PM
BIS_fnc_KK set Ref Ticket to AIII-55751.Jul 5 2023, 11:51 AM

should be fixed from 150675

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Jul 19 2023, 11:11 AM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.