A suite of four X4: Foundations extensions focused on making the player-run economy faster, bigger, and less noisy at scale. Written by and for a solo player/modder — pragmatic, vanilla-friendly, and biased toward letting vanilla systems do the work whenever possible.
-
Copy each folder under dist/ into your X4 Foundations
extensionsdirectory:dist/peo_economy/ → <X4 install>/extensions/peo_economy/ dist/peo_fleet_ai/ → <X4 install>/extensions/peo_fleet_ai/ dist/peo_resources/ → <X4 install>/extensions/peo_resources/On a default Steam install that's
C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\. -
Disable Protected UI Mode in X4: Settings → Game Settings → turn off Protected UI Mode. This is required because peo_fleet_ai ships Lua UI modifications, and X4 silently refuses to load them with protected UI on.
-
Enable the extensions in the in-game extension manager, then start or load a save.
(peo_alerts isn't in dist/ yet; see the extensions table below.)
| Extension | What it does | Status |
|---|---|---|
| peo_fleet_ai | Five custom trade/mine/export orders (Hauler, Haul for Station, Station Miner, Export Goods, Exporter) with manager-range routing, multi-drop deliveries, and proper warebasket handling. Added alongside vanilla orders, not replacing them. | Production |
| peo_economy | Data-only rebalance: 10× station storage, 2×/3×/4×/6× ship storage by size class, per-faction god quotas, per-station module limits. Fully DLC-aware (Boron, Split, Terran, Pirate, Timelines, mini 01/02). | Production |
| peo_resources | MD script that seeds high-yield resource fields near player stations when the station's required minables aren't already available in the cluster. Capped at 3/sector and 50 galaxy-wide. | Production |
| peo_alerts | Economy notifications: critical stock warnings (< 5%), station-under-attack alerts. | Work in progress — not yet built into dist/ |
See each extension's own README for details, parameters, and compatibility notes.
tools/build.py packages each extension into the format X4 actually loads: content.xml (unpacked) plus ext_01.cat/ext_01.dat for extension data, and subst_01.cat/subst_01.dat for UI file substitutions (Lua files are renamed to .xpl on the way in, matching the UIX convention).
python tools/build.pyThe script clears and recreates dist/ on every run and packages the three production extensions (peo_economy, peo_fleet_ai, peo_resources). peo_alerts is currently excluded until it's ready.
The dist/ folder in this repository is the latest build — you don't need to run build.py yourself unless you've changed source files under extensions/. Install directly from dist/ and it will match what the build script would produce.
tools/install.ps1 (Windows/PowerShell) runs the build, then copies each built extension from dist/<ext>/ into the X4 Foundations extensions directory, overwriting any previous install.
pwsh tools/install.ps1The script assumes the default Steam install path (C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions). Edit $GameExtDir at the top of the script if your install is elsewhere.
Manual install (any OS): copy each folder under dist/ into your X4 extensions/ directory. Then enable the extensions in the in-game extension manager and start or load a save.
x4ai/
├── extensions/ # Mod sources (the real code)
│ ├── peo_alerts/ # MD notifications (WIP)
│ ├── peo_economy/ # Data patches: storage, god, modules
│ ├── peo_fleet_ai/ # Custom trade/mine/export AI orders
│ └── peo_resources/ # Dynamic resource seeding
├── dist/ # Packaged builds ready to drop into X4 (latest)
│ ├── peo_economy/ # content.xml + ext_01.cat/dat
│ ├── peo_fleet_ai/ # + subst_01.cat/dat for UI
│ └── peo_resources/
├── tools/ # Build, install, and maintenance scripts
│ ├── build.py # Package extensions/ into dist/
│ ├── install.ps1 # Build + copy to X4 extensions folder
│ ├── update_cargo.py # Retune ship storage multipliers
│ ├── update_storage.py# Retune station storage multiplier
│ ├── fix_cargo_bases.py
│ ├── apply_patches.py
│ ├── extract_cat.py
│ └── pack_cat.py
├── vanilla*/ # Extracted vanilla + DLC game data, used as
│ # reference by fix_cargo_bases.py and other tools
└── docs/ # Reference notes
Beyond the build/install pipeline, tools/ also contains helpers for mass-editing the repetitive storage values in peo_economy:
- tools/update_cargo.py — rewrites ship storage multipliers in
extensions/peo_economy/assets/units/size_*/macros/. Class-based:S=2×, M=3×, L=4×, XL=6×by default. Edit theNEW_MULTIPLIERSdict at the top and rerun. - tools/update_storage.py — rewrites station storage multipliers in
extensions/peo_economy/assets/structures/storage/macros/and DLC equivalents. Single flatMULTIPLIER = 10constant. Edit and rerun.
Both scripts are idempotent — they only touch files where the computed value differs from what's on disk. See extensions/peo_economy/README.md for details, scope, and the known coverage gap around assets/props/StorageModules/macros/.
- Edit source under
extensions/<mod>/. python tools/build.pyto repackagedist/.pwsh tools/install.ps1to deploy to X4 (or copy manually).- Restart X4 and reload the save.