How would I go about forcing a specific mod to always load last in the load order?
(IE: Mods A, B, C, X, and Z are installed loading in the order of A, C, B, Z, X - How would I force mod C to load after mod X when neither mod C nor X depend on any other mod but base?)
Edit: If anyone would like to know why or could give me a better way to do what I need, this is my goal:
All types are loaded into data.raw with the game loading
I need to get all values from a specific type programmatically and change one or more of their values
If my mod is loading before a mod that adds more data of this type to data.raw my mod doesn't edit it
That is where I need my mod to load after
If any of that is wrong please inform me, I'm not entirely certain of the loading structure of Factorio
Help with mod Load Order
Help with mod Load Order
Last edited by Zoryn on Sun May 11, 2014 11:49 pm, edited 1 time in total.
Re: Help with mod Load Order
to force X to load before C, you can add a dependency to mod C for mod X (so that x will be loaded first). If it's not a 'true' dependency (ie X does not need to exist for C to work, you can use "? X" to state that X doesn't need to exist, but that if it does then it must be loaded before C). However I do not know of any way to actually force a mod to load last (what would happen if multiple mods tried to do that?).
Dependencies are stated in the info.json file with the line: "dependencies": ["dependency1", "dependency2"...], here's an example from my blast mining mod:which states that the mod depends upon the mod named "base" existing and it's version being greater than or equal to 0.7.4, if Industrio exists then it's version must be greater than or equal to 0.3.2 and be loaded first, and if dna exists it must be loaded first. If "dependencies" is not stated at all in info.json it will default to ["base"] (just fyi)
I hope that helps you
Dependencies are stated in the info.json file with the line: "dependencies": ["dependency1", "dependency2"...], here's an example from my blast mining mod:
Code: Select all
"dependencies": ["base >= 0.7.4", "? Industrio >= 0.3.2", "? dna"]
I hope that helps you

<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me
Or drop into #factorio on irc.esper.net
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me

Or drop into #factorio on irc.esper.net
Re: Help with mod Load Order
While this works specifically for the mod that I am targeting for now (DyTech), it won't apply if any mod loads after DyTech and my own.FreeER wrote:to force X to load before C, you can add a dependency to mod C for mod X (so that x will be loaded first). If it's not a 'true' dependency (ie X does not need to exist for C to work, you can use "? X" to state that X doesn't need to exist, but that if it does then it must be loaded before C). However I do not know of any way to actually force a mod to load last (what would happen if multiple mods tried to do that?).
Dependencies are stated in the info.json file with the line: "dependencies": ["dependency1", "dependency2"...], here's an example from my blast mining mod:which states that the mod depends upon the mod named "base" existing and it's version being greater than or equal to 0.7.4, if Industrio exists then it's version must be greater than or equal to 0.3.2 and be loaded first, and if dna exists it must be loaded first. If "dependencies" is not stated at all in info.json it will default to ["base"] (just fyi)Code: Select all
"dependencies": ["base >= 0.7.4", "? Industrio >= 0.3.2", "? dna"]
I hope that helps you
Re: Help with mod Load Order
True, unfortunately there is nothing that can really be done about it other than continuing to add mods that need to be loaded first to your dependencies (there probably aren't that many right now...), sorry if it's not the easiest method for modders to work with but that's how Factorio's modding interface currently works (and has since dependencies were introduced)Zoryn wrote:While this works specifically for the mod that I am targeting for now (DyTech), it won't apply if any mod loads after DyTech and my own.

-
- Fast Inserter
- Posts: 226
- Joined: Wed Apr 30, 2014 11:17 pm
- Contact:
Re: Help with mod Load Order
How is mod load order (absent dependencies) currently handled? Alphabetic? File timestamp? Order of introduction to Factorio (if so, what is the subordering for simultaneously installed mods)?
Like my mods? Check out another! Or see older, pre-0.12.0 mods.
Re: Help with mod Load Order
Hm...I'm not certain...but I want to say it's the order added to Factorio and I believe, though I could be wrong, that the order is duplicated in the mods\mod-list.json file, so you could take a look there, and/or you could also create a few mods with print statements and see what order they print in. Of course it'd be nice if you posted the results of such checking here 

Re: Help with mod Load Order
It has been while since I checked this, but... mod listing is sorted first by rank and second by name. Rank is basicly a depency count. Zero ranks are first in list. And it might have been that rank of depended mod adds up rank of requesting mod. Absent mods do not count.
Also note that mod-list.json is updated after you quit factorio and active order is visible in Mods -window.
Edit: Alternative way of loading/editing data. Post data editing during loading.
Also note that mod-list.json is updated after you quit factorio and active order is visible in Mods -window.
Edit: Alternative way of loading/editing data. Post data editing during loading.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela