OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Cheetah on 17 Nov 2007, 14:36:12
-
I'd like to be able to use:
configFile >> "CfgWeapons" >> weapon >> ammo
to retrieve the ammo for a specific weapon. I know where this info is, don't know which class / name I have to use to retrieve the ammo for a 'weapon', because the config.bin is binarized. Could anyone point me to a tool to debinarize?
-
Attached is the excellent prog PboView by...um...someone. MrFlea maybe :D It allows you to open Pbos, view .pac files, open binarized configs etc etc...all without actually extracting the pbo (like cpbo does, for instance). You can also extract the files you want or need, or the whole pbo as well. It's great! :good:
Wolfrug out.
PBOView OFPEC Resource (http://www.ofpec.com/ed_depot/index.php?action=details&id=505&game=ArmA)
-
Is it the ammo you actually want or is it the magazine?
The ammo information is held in the cfgMagazines definition for the magazine.
The cfgWeapon definition for the weapon defines the magazine.
So you have:
cfgAmmo
Definition of some ammo
cfgMagazines
Definition of the magazine using above ammo
cfgWeapons
Definition of weapon using the above magazine.
Planck
-
Alright I managed to open the config with PBOview. I can't return the ammo used by a specific weapon with the code:
_ammo = configFile >> "CfgWeapons" >> _weapon >> "magazines[]";
hint format ["%1",_ammo];
What is wrong with this code?
-
Whenever you delve into the config with >> you always end up with a "config entry", not the ArmA data type that it contains, thus you need to extract the array data from the config type:
_magazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines");
_description = getText (configFile >> "CfgWeapons" >> _weapon >> "displayName");