kianzarrin / LoadOrder

12 stars 6 forks source link

Allow modders to specify load order? #11

Open Vectorial1024 opened 2 years ago

Vectorial1024 commented 2 years ago

Hi there!

I am not sure if this is implemented yet, but does this mod allow modders to specify that some mod should be loaded after some other mod?

For example, maybe I can specify that "this mod should be loaded after IPT2", and then I do a name-based search to see whether there is a mod named "IPT2"? And then somehow load my mod after IPT2.

kianzarrin commented 2 years ago

if it is uploaded after IPT2 then it should be loaded after IPT2.

I have thought of what you are saying. using attributes to allow mods to define the default load order. But there has never been a use case for it.

kianzarrin commented 2 years ago

I might have to refine the code a little bit because currently I convert number to string and then arrange it.

Vectorial1024 commented 2 years ago

If we are sorting by upload date then it makes sense. This is assuming that existing mods are getting actively updated by the original author until forever. If the author one day decides to stop posting updates and another replacement mod comes out, then we may need to have load order hints.

Besides, there gotta be a possibility that a new, original mod wants to load before an old mod. Not that I can name such an example, but there is this possibility. It is related to Harmony: while Harmony patches are supposed to be very compatible with each other, there are side effects that really depends on load order correctness. Look at HarmonyPrefix for example:

The first prefix that returns false will skip all remaining prefixes unless [...]

If a mod is made to "return false for all cases" but gets loaded the last, it probably will not be doing what the author wants it to do.

kianzarrin commented 2 years ago

not upload data (if you update your mod it won't matter) but rather by the WS ID (so effectively creation date). also note that the mods in the local mod folder are loaded first.

Yeah I use harmony priorities myself too. for LOM it would be more complicated because my mod allows user want to change load order manually too. what should I do if your mod wants to load after some other mod but user tells it to load before some other mod. it gets really complicated.

Vectorial1024 commented 2 years ago

Perhaps mod makers simply offer hints on what mods to load before/after what mod (this can integrate with whatever auto-sort algorithm you may have), but if the user moves the load order such that some mod cannot fulfill its loading order hint, there is a warning about this. But ultimately if the user chooses that particular load order then follow the user's choice, I guess.

chameleon-tbn commented 2 years ago

This kind of information is normally added to Compatibility Report btw. If a)the Modder states it on the WS Page or b) it is reported (e.g. using the Form for it). Atm there are only a few outdated mods that might to have a tweaked Order.

Vectorial1024 commented 2 years ago

Anyway, adding to this same topic, does the Load Order mod somehow sort the mod load order for mods that are already in the game? As in, I do not use your exe tool, but only your workshop item. Will my mods be suddenly and magically "loaded" in the deterministic order?


Perhaps I did not word it well initially, but I did some tests and confirmed that even if I use eg HarmonyPriority, it seemingly does not affect the Harmony patch order.

And so, currently I have no control whether my mod gets loaded before or after some mod. What currently happens is that:

  1. I used HarmonyPriority to "specify load order"
  2. I push the update
  3. Ppl come in and ask "why it does not work"
  4. I try to explain "it must work, because I already gave a HarmonyPriority"
  5. Ppl gets disinterested
  6. I forgot about it
  7. I discovered that the "it does not work" reports happened because the mod is not loaded in the corect way
  8. I mention that "this mod must be loaded after XXX"; I provide the manual instructions of how to do this
  9. Finally forgets about it, but randomly there are always still some ppl getting stuck at step 3

Currently the manual way is as follows:

  1. Identify: mod X needs to load after mod Y
  2. Start game
  3. Disable mod X
  4. Disable mod Y
  5. Restart game
  6. Enable mod Y
  7. Restart game for certainty
  8. Enable mod X
  9. Restart game for assurance
  10. Load save

This 10-step manual process can be very time consuming, and mods like Instant Return To Desktop (https://steamcommunity.com/sharedfiles/filedetails/?id=2037888659) can only help so much.


This is getting tedious, because:

  1. Every time I specify that my mod needs to load after some other mod, I have to include the above manual steps; and
  2. Every time mod Y updates, it will be placed at the bottom of the loading order queue, and you will have to do the above manual steps again

And therefore, i was thinking whether it is possible to automate this mess:

  1. Modders specify "mod X needs to load after mod Y"
  2. End users subscribe to and enable the Steam Workshop item of Load Order Mod
  3. Magic happens at the local computer
kianzarrin commented 2 years ago

@Vectorial1024 there is a XML file which you can modify to change load order: C:\Users\kianz\AppData\Local\Colossal Order\Cities_Skylines\LoadOrder\LoadOrderConfig.xml