Use forge load order.#746
Conversation
|
In theory, wouldn't sorting by hash code return a similar sort, or am I wrong on this? |
|
I did try that at first, and in the case of Deep Aether + Lost Aether Content it actually worked better. So basically, sorting by hash keys directly might work in general, but there will probably be edge cases where it won't work. That's technically true with this implementation as well, but it also gives users the ability to add or remove unrelated mods to get around the issue, which is what they would have to do on Forge if this issue were to appear there. |
|
Personally slightly unsure with this approach, especially considering potential drawbacks. Should probably find a way to directly replicate Forge's load order without directly copying the way they load mods, especially considering the edge case you mentioned of loading mods in isolation, which some users very well could be doing. |
|
Thing is, I'm not sure how else to do it. Ultimately the main reason the order isn't the same when the mods are loaded in isolation comes from the fact that Kilt has fewer builtin mods. Without this patch the order will be different every time the game starts, which is not ideal for modpacks. Using hash keys to sort the list isn't ideal either because it might get the order wrong in some edge cases and then users won't be able to change it the order. I guess using hash keys to sort it could be fine if we just add some config that users can use to manually override the load order? Ignore my previous message btw, I misunderstood your message (sorry about that). |
|
Honestly considering Kilt now actually has a config people can use, it could be viable to have config-based mod load order, but then comes the problem of "how do we trust that users aren't going to screw this up?" |
|
Thinking about it, Kilt could probably benefit from something like Dependency Overrides. I'm thinking a configurable load order would fit into that quite nicely. |
Some Forge mods unfortunately rely on the default load order without explicitly declaring their dependencies.
On Forge, this order depends on the order of keys in a hash map, but at the very least it's always the same for a given modpack. On Kilt, the order is effectively random and changes every startup, which means it sometimes works and sometimes doesn't.
This patch changes that to make Kilt consistent with how Forge sorts the mods. Note that this won't mean that mods will be placed in the exact same order as they will on Forge every time. In fact, the main mod combination which motivated this change (Deep Aether + Lost Aether Content) doesn't work when only those mods are loaded in isolation because the hash map is a lot smaller with only those mods compared to how big it is without any other mods on Forge. However, it does work if you add more forge mods.