Load order and conflicts
Every start, the game finds all mods, sorts them, and runs them one at a time. Within one mod, the order is fixed:
data/.jsonsorted by file name
>
strings/.json
sorted by file name>
main.luauyour script
>
next modsame again
When every mod has run, ready fires.
Who goes first
Section titled “Who goes first”Between mods, the order comes from these, strongest first:
requiresandload_afterinmod.json."load_after": ["solar_flare"]puts you after Solar Flare if it is installed.requiresdoes the same and also refuses to load you without it.- The player’s order on the MODS page.
priority, -1000 to 1000, default 0. Lower loads first.- The id, alphabetically.
A mod that reads data (mod.data.get, mod.data.list) sees the base game plus every mod before it. To build on another mod, use load_after.
When two mods change the same field
Section titled “When two mods change the same field”The later one wins, and the game says so. This log is from a real run with Solar Flare and My First Mod, which both set the Destroyer’s price:
[mods] server: 4 of 4 active (solar_flare 1.0.0, cash_meter 1.0.0, my_first_mod 1.0.0, docs_capture 1.0.0)[mods] conflict: ships.destroyer.cost: solar_flare sets 3200, then my_first_mod sets 1500 (my_first_mod wins)The MODS page lists the same lines under CONFLICTS (LATER MOD WINS). A conflict is a note, not an error: both mods still run.
Ways to avoid one:
- Change relative to what is there.
cost = d.cost * 0.5instead ofcost = 1500, as in Double all income. Still reported, but the result makes sense for both. - Declare it.
"conflicts": ["other_mod"]inmod.jsonswitches one of the two off, with the reason on the MODS page.
Statuses
Section titled “Statuses”The MODS page and the log give every mod one status:
| Status | Means |
|---|---|
active |
running |
disabled |
the player turned it off |
refused |
made for a newer API (api_version) |
broken |
mod.json or the pack is unreadable |
missing_dep |
a mod in requires is missing, too old, off, or not running |
conflict |
switched off by a conflicts entry |
cycle |
requires / load_after go in a circle |
failed |
raised an error while loading; its data changes are undone |
shadowed |
another copy with the same id and a higher version runs instead |
Troubleshooting has the message for each, with the fix.