Jump to content

Mod load order issues and solutions


Recommended Posts

I'm happy to see ONI supporting the steam workshop. I get the feeling of deja vu when I look at the mod system because it seems fairly similar to the mod system in Rimworld and I'm not just thinking of Harmony, which was originally developed for Rimworld. I'm happy because it gives great modding freedom but also concerned because it looks to me like ONI is heading for the same mess as Rimworld when it comes to mods affecting each other and depending on each other.

 

My background is that I wrote ModCheck for Rimworld. It's a toolkit to make mods load differently depending on which mods are loaded, load order etc and it's able to produce errors if requirements aren't fulfilled. The check for mod load order and dependencies can also be done by Mod Manager, though both mods offers something the other doesn't meaning it's not farfetched to use both. The problem is that the setup is different meaning mods would need to set up for both in order for this to be effective. Also if the player doesn't load either, then the files telling about the requirements will be ignored even if the requirements are violated and we know the game won't work as intended.

 

Proposals for Oxygen not included

Make the game support mod compatibility and requirements checks. This will make one format for such information and mods will not introduce competing formats. Furthermore if the game refuse mods not containing this information, then all mods will add it. The information should consist of a unique mod name (string) and lists of strings for the following purposes:

  • mods, which are required and has to be loaded first
  • mods, which are required and has to be loaded last
  • mods, which has to be loaded first if present
  • mods, which has to be loaded last if present
  • mods, which can't be loaded (contains conflicting data)

First and last are relative to the mod containing those lists, not the mod list in general.

 

It seems fairly simple in Rimworld to load a mod and it says have to be loaded after some other mod. However if the user loads 200 mods (realistic for Rimworld), then taking care of requirements for each mod is a pain, particularly if there is no warning if you fail to meet the requirements. It becomes very easy to make mistakes even if you are paying attention. Also a game is supposed to be fun for the player and dealing with mod load order issues is no fun at all for the player.

 

It would be good to have an official way to assign a version number to mods, preferably as ints or system.version, which will allow checking if a mod is of at least a certain version. While steam updates automatically, this feature can be very useful for non-steam users.

 

Conditional patching

Imagine I make a mod, which changes how the alge terrarium respond to light. I want to change it to 20% production boost. The problem is that there is a modded alge terrarium with piped output and naturally I want the mod to work on both for consistency.

 

Using a Rimworld approach, I would do the following. I will make one DLL file to mod the vanilla building. I will then add another DLL, which mods the modded building. The latter DLL will then have code to only apply the postfix methods if a mod of name "whatever" is loaded. This way we will end up with one mod in the most list and not two, which is a good way to avoid ending up with a bloated mod list. It's also much easier for the player to get the required mods like not forgetting the mod to mod the piped terrarium by mistake.

 

For this to work, the modder will have to have access to a list of loaded mods, including version info. It's possible that the mod will patch differently depending on the mod it has to patch. There also needs to be some easy way to make DLL files, which triggers conditionally depending on an if statement.

 

Translation mods

Rimworld has mods, which translates another mod to some different language. They are often made without having anything to do with the original mod creator. Naturally ONI should support the same. Allow mods to have translatable strings and allow people to publish a mod to translate those even if the translation isn't in the full translation mod.

 

It would make sense to add some sort of official standard for modded strings, like author.mod.stringname. This should create unique string names meaning translation mods would be able to translate multiple mods and work even if all supported mods aren't loaded. It would also open for adding modded strings in the full translations.

 

If more than one mod translates a certain string into a specific language, it should be well defined if the first or last mod should be used. I imagine each mod overwriting existing data, meaning whenever two mods mod the same thing, the last will be in effect. What's really important is that it is well defined behavior in such cases and that it doesn't break the game.

 

Final words

Implementing something like this will grant a much better user experience when setting up mods. Rather than helping mod makers, this is mostly a way to provide tools for mod makers to provide a better user experience for the players when loading the mods. A system like this has to be set centrally and made mandatory or the mods will be a mess of no system and/or competing systems. Now is also the correct time to consider something like this as it will be much more problematic to implement and make mandatory once there are (hopefully) hundreds of mods and the need for help in the mod loading menu becomes clear.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...