Files
benilla-octo/Optional/sky-and-grading/tools/check_bands.py
T
pkuzicandGPT-5.6 Sol (Codex) 67388625ec MONKEY (optional): add local sky and grading patch builder
Build Blizzard-derived sky assets only from the user's own CASC install, merge lighting DBCs from mounted winners, and pack a preserved patch-Z candidate. Include bilingual install and recovery guidance plus project-owned grading data.

Verified all 46 default stage payloads byte-identical to the reviewed stage; moderated WoW Forever LightIntBand byte-identical; band and mounted-chain checks pass on a hard-linked client copy. No Cargo command run.

Co-Authored-By: GPT-5.6 Sol (Codex)
2026-09-26 15:19:25 +01:00

37 lines
1.3 KiB
Python

#!/usr/bin/env python3
"""Check corrected Light band clone row IDs in loose files or an MPQ chain."""
import argparse
from pathlib import Path
from dbc_build import check_bands
from mpq_tools import Storm, copies_for, find_stormlib
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("path", type=Path, help="stage directory or client Data directory")
parser.add_argument("--stormlib", type=Path)
parser.add_argument("--stage", action="store_true", help="path is a loose stage tree")
args = parser.parse_args()
if args.stage:
root = args.path / "DBFilesClient"
integer = (root / "LightIntBand.dbc").read_bytes()
floating = (root / "LightFloatBand.dbc").read_bytes()
else:
storm = Storm(find_stormlib(args.stormlib))
payloads = []
for name in ("LightIntBand.dbc", "LightFloatBand.dbc"):
copies = copies_for(storm, args.path, "DBFilesClient\\" + name)
if not copies:
raise FileNotFoundError(name)
payloads.append(copies[-1][1])
integer, floating = payloads
check_bands(integer, floating)
print("PASS: clone rows use (P-1)*count + band + 1 and match params 23/21")
return 0
if __name__ == "__main__":
raise SystemExit(main())