![]()
tech_mega_engineering and every Galactic-Wonders-gated tech.Two pieces:
mod/common/megastructures/*.txt — overrides for the 14 vanilla files that contain build-limit gates. Generated by scripts/build.py from the locally installed vanilla files. The script rewrites every built_<name> country-flag reference to an inert sentinel flag (mmegs_unused_flag) that is never set anywhere. The existing NOT/NOR { has_country_flag = built_X } gates therefore always pass; the flag-setting effects no-op. The per-system gate has_no_non_gate_megastructure = yes is rewritten to always = yes. Structural integrity (brace balance, block shape) is preserved, and patch updates only require re-running the script.mod/common/on_actions/zz_mmegs_on_actions.txt + mod/events/mmegs_events.txt — hook on_game_start_country to fire a hidden event that calls give_technology for every megastructure tech on every regular empire.apps/mods/stellaris/multi-megastructures/Generates the megastructure overrides from your local Stellaris install:
python3 apps/mods/stellaris/multi-megastructures/scripts/build.py
Reads from ~/Library/Application Support/Steam/steamapps/common/Stellaris/common/megastructures/. Edit VANILLA_DIR in the script if your install is elsewhere.
python3 apps/mods/stellaris/multi-megastructures/scripts/preflight.py
Twelve automated checks against the locally installed vanilla files: brace balance, leaked limit-flag reads, vanilla key drift, tech-ID and on_action existence, event-ref resolution, localisation BOM, descriptor sanity, deploy symlink integrity, Workshop thumbnail validity, and read/write sentinel isolation (catches the same-flag-for-read-and-write bug class). No dotnet / CWTools required. Full test plan in apps/mods/stellaris/multi-megastructures/TESTING.md.
apps/mods/stellaris/multi-megastructures/scripts/deploy.sh
Creates a symlink ~/Documents/Paradox Interactive/Stellaris/mod/multi-megastructures → repo's mod/ folder, plus the outer multi-megastructures.mod launcher descriptor with an absolute path= line. Idempotent. Because the deployed copy is a symlink, re-running build.py is picked up by the launcher with no re-deploy.
play <ai_country_id> to confirm AI empires have them too.~/Documents/Paradox Interactive/Stellaris/logs/error.log for unresolved trigger errors after starting the game.ai_weight blocks were tuned for the one-per-empire world; tuning them is a follow-on.common/megastructures/*.txt will conflict — last-loaded wins.