Stellaris: Multi-Megastructures + Free Tech
Last verified: 2026-05-18
![]()
What the mod does
- Multiple of each megastructure. The per-empire "build once" cap is lifted, so a single empire can build, for example, two Dyson Spheres.
- Multiple megastructures per system / celestial body. The per-system uniqueness gate is removed, so one system can host more than one multi-stage megastructure.
- All empires start with megastructure tech. Every player and AI empire is granted all 16 megastructure-unlocking technologies on game start — including
tech_mega_engineeringand every Galactic-Wonders-gated tech.
How it works
Two pieces:
mod/common/megastructures/*.txt— overrides for the 14 vanilla files that contain build-limit gates. Generated byscripts/build.pyfrom the locally installed vanilla files. The script rewrites everybuilt_<name>country-flag reference to an inert sentinel flag (mmegs_unused_flag) that is never set anywhere. The existingNOT/NOR { has_country_flag = built_X }gates therefore always pass; the flag-setting effects no-op. The per-system gatehas_no_non_gate_megastructure = yesis rewritten toalways = 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— hookon_game_start_countryto fire a hidden event that callsgive_technologyfor every megastructure tech on every regular empire.
Links
- Repo:
apps/mods/stellaris/multi-megastructures/ - Steam Workshop: (not yet uploaded)
Build
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.
Pre-game verification
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.
Deploy
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.
Test in-game
- Launch Stellaris → Paradox Launcher → Mods → enable Multi-Megastructures + Free Tech → Play.
- Feature 3: Research panel shows all megastructure techs already researched.
play <ai_country_id>to confirm AI empires have them too. - Feature 1: Build a Dyson Sphere. Once finished, start a second one in a different system — the construction option remains available.
- Feature 2: Build a second megastructure in the same system as a finished one, on a different celestial body, then on the same celestial body. Both should be allowed.
- Tail
~/Documents/Paradox Interactive/Stellaris/logs/error.logfor unresolved trigger errors after starting the game.
Known caveats
- AI behavior. Removing the cap doesn't necessarily make the AI build extras. Vanilla
ai_weightblocks were tuned for the one-per-empire world; tuning them is a follow-on. - Mod conflicts. Any other mod that overrides
common/megastructures/*.txtwill conflict — last-loaded wins. - Gateways, orbital rings, hyper relays, habitats. Already multi-build in vanilla; not in the override set.
Steam Workshop upload (when ready)
- Deploy and launch Stellaris
- Enable the mod, start a game to verify
- Launcher → Mods → Mod Tools → Upload Mod
- Select "Multi-Megastructures + Free Tech", add description, upload
- Change visibility from Private to Public on the Workshop page