A mission that attempts to reproduce the observed addItem behavior is
included. The code in init.sqf attempts to handle the addition of
arbitrary items to a character, with item names obtained from
'configFile >> "CfgWeapons"'. For each item, the code attempts to add
the item and then verifies that it has been added. After removing any
added item, these steps are repeated for the next item, etc.
The code first goes through the items once, then repeats the
sequence with the unit being dead. A summary of the failed commands
are copied the clipboard at the end.
Running the mission on dev build 0.75.108541 produced the output
below. Some of these possibly use the wrong command (unsure if
addItem or addGoggles should be used for "Binoculars" as neither
appears to work) and some items are not attempted handled at all
("Laserdesignator_mounted"), but there are still several unexpected failures and
a clear difference depending on whether the unit is alive or not, even
if the same code is used to add the same item names.
alive failures:
Binocular(addItem)
Rangefinder(addItem)
Medikit(addItem)
ToolKit(addItem)
Laserdesignator_mounted()
Laserdesignator(addItem)
Zasleh2(addItem)
dead failures:
ItemWatch(addItem)
ItemCompass(addItem)
ItemGPS(addItem)
ItemRadio(addItem)
ItemMap(addItem)
MineDetector(addItem)
Binocular(addItem)
Rangefinder(addItem)
NVGoggles(addItem)
FirstAidKit(addItem)
Medikit(addItem)
ToolKit(addItem)
Laserdesignator_mounted()
Laserdesignator(addItem)
Zasleh2(addItem)
muzzle_snds_H(addItem)
muzzle_snds_L(addItem)
muzzle_snds_M(addItem)
muzzle_snds_B(addItem)
muzzle_snds_H_MG(addItem)
optic_Arco(addItem)
optic_Hamr(addItem)
optic_Aco(addItem)
optic_ACO_grn(addItem)
optic_Aco_smg(addItem)
optic_ACO_grn_smg(addItem)
optic_Holosight(addItem)
optic_Holosight_smg(addItem)
optic_SOS(addItem)
acc_flashlight(addItem)
acc_pointer_IR(addItem)
optic_MRCO(addItem)
muzzle_snds_acp(addItem)