From Bohemia Interactive Community
Jump to navigation Jump to search

As of 0.76, loadUniform, loadVest, and loadBackpack seem to return a scalar corresponding to the percentage of the load, and not the mass sum of contained items. I'm not sure if it's the intended behaviour. - AgentRev 05:34, 22 August 2013 (CEST)

It appears to be so, however there are some inconsistencies to clarify. I've designed a script to get weight of uniform, vest and backpack based on their load percentage and maxload according to config. Only backpack provides maximumLoad value. vest and uniform have mass. I can only assume the mass is max mass when fully loaded.

_uniformConfigMass = getNumber (configFile >> "CfgWeapons" >> uniform player >> "ItemInfo" >> "mass"); _uniformMassKg = loadUniform player * _uniformConfigMass / 10; _vestConfigMass = getNumber (configFile >> "CfgWeapons" >> vest player >> "ItemInfo" >> "mass"); _vestMassKg = loadVest player * _vestConfigMass / 10; _backpackConfigMass = getNumber (configFile >> "CfgVehicles" >> backpack player >> "maximumLoad"); _backpackMassKg = loadBackpack player * _backpackConfigMass / 10; hint str [_uniformMassKg, _vestMassKg, _backpackMassKg];

To test add a single mag to every container it should show the same weight. The problem is with some containters it works and with some it doesn't. I assume some config values must be screwed up somewhere. No idea where loadXXXX commands get their values from, but it smells insects. -KK