#!/usr/bin/env python3 """Build the 3-strata composed Core.Liminal.Field v2 fixture.""" from __future__ import annotations import argparse import json import os from pathlib import Path ROOT = Path(__file__).resolve().parents[4] OWNER = Path(os.environ.get("VOXELFORGE_OWNER_DATA", ROOT / "Standalone/data/owner_world.json")) OUT_DEFAULT = Path(os.environ.get("VOXELFORGE_VERIFY_OUT", ROOT / "Saved/Linux/l145")) def main() -> None: parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--out", type=Path, default=OUT_DEFAULT / "fixtures") args = parser.parse_args() args.out.mkdir(parents=True, exist_ok=True) world = json.loads(OWNER.read_text(encoding="utf-8")) if len(world.get("strates", [])) < 3: raise SystemExit("owner fixture needs at least three authored strate slots") world["strates"] = world["strates"][:3] world["total_strates"] = 3 world["settings_asset"]["TotalStrates"] = 3 world["settings_asset"]["FixedStrates"] = world["settings_asset"]["FixedStrates"][:3] # Keep the resolved arrival near the departure depth. The owner's 5000-unit # reach clamps to liminal bedrock on most seeds and leaves no field floor. world["strates"][0]["passage_config"]["ReachMin"] = 1536 world["strates"][0]["passage_config"]["ReachMax"] = 1792 world["surface_profile_override"] = { "version": 1, "kind": "flatField", "minimum_arena_clearance_m": 0.0, } middle = world["strates"][1] middle["asset"]["GeneratorType"] = 4 # ECaveGeneratorType::SurfaceWorld middle["asset"]["StrateName"] = "Liminal Field" # Keep the departure mouth 24–32 m above liminal bedrock so every variant # has room for its floor, road landing and support footings. middle["passage_config"]["ReachMin"] = 192 middle["passage_config"]["ReachMax"] = 256 world["core_liminal_field"] = { "version": 2, "strate_index": int(middle["index"]), "variant_policy": "seed_modulo_4", } output = args.out / "core-liminal-field-3-strata.json" output.write_text(json.dumps(world, separators=(",", ":")) + "\n", encoding="utf-8") print(f"[L145Fixture] path={output} strates=SurfaceWorld,Core.Liminal.Field,TunnelNetwork status=PASS") if __name__ == "__main__": main()