Last in mod load order
Posted: Thu Jun 10, 2021 11:13 pm
Alright, I'll probably get the answer I expect, but going to give it a try regardless.
So putting it simply: I need to have my mod run at the very end of the mod loading process, after everybody else.
Obviously, I already know about the data lifecycle (put my functionality in data-final-fixes.lua), mod dependencies, and I also found out about Instrument mode (which is exactly what I want, but not very user-friendly from my perspective).
Now for some context on why I'm 100% sure my mod should always load last:
My mod is simply a JSON exporter of some data.raw prototypes (called "JsonCalculatorExporter"). Hence it needs to make sure it gets the data the game will actually use (and dependencies won't work here since every mod is essentially a dependency).
I ran into this issue once I added AngelsMods in combination with BobsMods. Angels creates some additional fluid subcategories during the final fixes that my exporter didn't catch.
The reason I'm doing this during the data stage, instead of when you're already in-game, is because information such as the icons is only available during that stage.
In case you're still curious and want even more context:
I'm using this export as input into a standalone calculator (much like the old Foreman app).
However, unlike Foreman, I'm working in Javascript/Typescript and I just couldn't figure out how to actually run the LUA scripts themselves (aka, simulate what data.raw would be) in that language, so I opted for this as a decent alternative method.
So putting it simply: I need to have my mod run at the very end of the mod loading process, after everybody else.
Obviously, I already know about the data lifecycle (put my functionality in data-final-fixes.lua), mod dependencies, and I also found out about Instrument mode (which is exactly what I want, but not very user-friendly from my perspective).
Now for some context on why I'm 100% sure my mod should always load last:
My mod is simply a JSON exporter of some data.raw prototypes (called "JsonCalculatorExporter"). Hence it needs to make sure it gets the data the game will actually use (and dependencies won't work here since every mod is essentially a dependency).
I ran into this issue once I added AngelsMods in combination with BobsMods. Angels creates some additional fluid subcategories during the final fixes that my exporter didn't catch.
The reason I'm doing this during the data stage, instead of when you're already in-game, is because information such as the icons is only available during that stage.
In case you're still curious and want even more context:
I'm using this export as input into a standalone calculator (much like the old Foreman app).
However, unlike Foreman, I'm working in Javascript/Typescript and I just couldn't figure out how to actually run the LUA scripts themselves (aka, simulate what data.raw would be) in that language, so I opted for this as a decent alternative method.