Initial commit: ArmADump ammo/armor rebalance tool
- SQF extraction scripts (ammo, armor, weapons, magazines) with ACE3 properties - Python pipeline: extract_csvs, split_by_mod, generate_patches - Generates CfgPatches config.cpp normalizing non-RHS values to RHS baseline - Documentation: REFERENCE.md, GENERATE_PATCHES_EXPLAINED.md, AGENTS.md
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
///////// ARMA3 Config CSV EXPORT — Magazines (links ammo classes)
|
||||
///////// Usage: execVM "magazines.sqf" or paste execVM in debug console
|
||||
///////// Arguments: [name, CfgPatches name] for a mod, [name] for vanilla BIS
|
||||
///////// Outputs: CSV via diag_log to .rpt
|
||||
|
||||
private ["_CfgPatches","_configPath","_getClass","_out","_items","_count"];
|
||||
|
||||
_CfgPatches = false;
|
||||
_configPath = "";
|
||||
if(count _this > 1) then
|
||||
{
|
||||
_configPath = _configPath + (_this select 1);
|
||||
_CfgPatches = true;
|
||||
};
|
||||
|
||||
_getClass = {
|
||||
_out = "";
|
||||
if(typename _this == "STRING") then
|
||||
{
|
||||
_out = _this;
|
||||
}
|
||||
else
|
||||
{
|
||||
_out = configName _this;
|
||||
};
|
||||
_out;
|
||||
};
|
||||
|
||||
_count = 0;
|
||||
_items = [];
|
||||
|
||||
if(_CfgPatches) then
|
||||
{
|
||||
_items = _items + getArray(configfile >> "CfgPatches" >> _configPath >> "weapons");
|
||||
}
|
||||
else
|
||||
{
|
||||
_items = [configFile >> "CfgMagazines"] call BIS_fnc_returnChildren;
|
||||
};
|
||||
|
||||
diag_log "--- MAGAZINES EXPORT CSV START ---";
|
||||
diag_log text("source_mod;name;class_name;ammo;count;initSpeed;mass");
|
||||
|
||||
{
|
||||
private _configName = _x call _getClass;
|
||||
private _displayName = getText(configFile >> "CfgMagazines" >> _configName >> "displayName");
|
||||
private _picture = getText(configFile >> "CfgMagazines" >> _configName >> "picture");
|
||||
|
||||
if (_displayName != "" && _picture != "") then {
|
||||
// Source mod
|
||||
private _sources = configSourceAddonList (configFile >> "CfgMagazines" >> _configName);
|
||||
private _sourceMod = "unknown";
|
||||
if (count _sources > 0) then { _sourceMod = _sources select 0; };
|
||||
|
||||
private _ammo = getText(configFile >> "CfgMagazines" >> _configName >> "ammo");
|
||||
private _ammoCount = getNumber(configFile >> "CfgMagazines" >> _configName >> "count");
|
||||
private _initSpd = getNumber(configFile >> "CfgMagazines" >> _configName >> "initSpeed");
|
||||
private _mass = getNumber(configFile >> "CfgMagazines" >> _configName >> "mass");
|
||||
|
||||
diag_log text(format["%1;%2;%3;%4;%5;%6;%7",
|
||||
_sourceMod, _displayName, _configName, _ammo, _ammoCount, _initSpd, _mass]);
|
||||
|
||||
_count = _count + 1;
|
||||
if (_count % 200 == 0) then { sleep 0; };
|
||||
};
|
||||
} forEach _items;
|
||||
|
||||
diag_log "--- MAGAZINES EXPORT CSV END ---";
|
||||
|
||||
systemchat format["Magazines export done — %1 mags", _count];
|
||||
Reference in New Issue
Block a user