Move debug CSVs to debug/ dir, use INI mod name for PBO prefixes

- Debug CSVs now write to debug/<mod>/ instead of output/<mod>/,
  so they don't get packed into PBOs and bloat size
- PBO filenames use mod name from package_mod.ini (a3rebalancer_*.pbo)
- Cleaned old debug CSVs from output folders
This commit is contained in:
Samuele Lorefice
2026-07-20 20:05:37 +02:00
parent c7d925da7d
commit 019d5e2d72
3 changed files with 11 additions and 6 deletions
+3
View File
@@ -4,5 +4,8 @@
# Generated output
output/
# Debug before/after tables
debug/
# Per-mod split data
data/
+5 -3
View File
@@ -24,6 +24,7 @@ from typing import Optional
REPO_ROOT = Path(__file__).resolve().parent.parent
DATA_DIR = REPO_ROOT / "data"
OUTPUT_DIR = REPO_ROOT / "output"
DEBUG_DIR = REPO_ROOT / "debug"
# ============================================================================
# Caliber tier classification
@@ -700,10 +701,11 @@ def write_debug_csvs(
armor_overrides: list[ArmorOverride],
):
"""Write per-mod debug CSVs showing old -> new values for each override."""
mod_dir = OUTPUT_DIR / mod
mod_dir = DEBUG_DIR / mod
mod_dir.mkdir(parents=True, exist_ok=True)
if ammo_overrides:
path = mod_dir / "debug_ammo.csv"
path = mod_dir / "ammo.csv"
with open(path, "w", encoding="utf-8", newline="") as f:
writer = csv.writer(f, delimiter=";")
writer.writerow(["classname", "source_mod", "field",
@@ -716,7 +718,7 @@ def write_debug_csvs(
field_name, old_val, new_val])
if armor_overrides:
path = mod_dir / "debug_armor.csv"
path = mod_dir / "armor.csv"
with open(path, "w", encoding="utf-8", newline="") as f:
writer = csv.writer(f, delimiter=";")
writer.writerow(["classname", "source_mod", "item_type",
+3 -3
View File
@@ -166,6 +166,7 @@ def main():
sys.exit(1)
print(f" Found {len(mod_dirs)} addon folders")
prefix_base = mod_name.lower()
# Find armake2
if not args.dry_run:
@@ -181,7 +182,7 @@ def main():
print(f" [DRY RUN] Would create:")
print(f" {target_dir / 'mod.cpp'}")
for d in sorted(mod_dirs):
pbo_name = f"armadump_{d.name}.pbo"
pbo_name = f"{prefix_base}_{d.name}.pbo"
print(f" {addons_dir / pbo_name}")
print(f"\n Total: {len(mod_dirs)} PBOs")
return
@@ -198,7 +199,6 @@ def main():
print()
# Pack each addon into a PBO (all to temp first, then copy to final location)
prefix_base = mod_name.lower()
packed = 0
failed = 0
temp_dir = OUTPUT_DIR / "_pack_temp"
@@ -206,7 +206,7 @@ def main():
addons_temp.mkdir(parents=True, exist_ok=True)
for d in sorted(mod_dirs):
pbo_name = f"armadump_{d.name}.pbo"
pbo_name = f"{prefix_base}_{d.name}.pbo"
temp_pbo = addons_temp / pbo_name
prefix = f"{prefix_base}\\{d.name}"