Page 1 of 1

Handling mods that won't load.

Posted: Wed Sep 07, 2016 7:57 am
by bobingabout
I know this isn't a new topic, but due to the recent 0.14.4 update that broke my logistics mod due to requiring an additional tag on train entities, the subject came up again in my sub forum.

What to do when a mod cannot be loaded.

Currently, when a mod fails to load, the game displays an error, and the only option is to quit to desktop. At which point, further attempts to load the game results in the same issue. This leaves the player in the awkward position of having to do something manually... either downgrade the game back to the previous version (As some people mentioned they did to get my mods to work), manually install an updated mod, or remove/disable the offending mod.

Now, Disabling the mod automatically could get quite frustrating for modders, every tiny mistake would require them to re-enable the mod, so this isn't the solution either.


In my opinion, the solution would be that when the dialogue box displaying the error appears, rather than the only option being an "OK" button, that closes the game, there should be 2 options to click. Add in a question along the following line "Would you like to disable the mod and try again?", with the options "Yes" and "No", clicking Yes would do as it says, disable the mod, close the game, and automatically attempt to launch the game again. Selecting No would just close the game as happens now when you press OK.

And that is my suggestion.

Re: Handling mods that won't load.

Posted: Wed Sep 07, 2016 8:34 am
by Nexela
I still wonder why it doesn't do it this way.

Re: Handling mods that won't load.

Posted: Wed Sep 07, 2016 2:24 pm
by ssilk
I'm sure, that was the plan. ;)

Which looked like
- quit on mod-loading failure
- disable mods, that failed on load

And after some prioritizing it was more like this:
...
258. quit on mod-loading failure
...
37402. disable mods, that failed on load

:mrgreen:

Re: Handling mods that won't load.

Posted: Wed Sep 07, 2016 4:43 pm
by steinio
At some time in the past the developers mentioned the plans to add mod loading on map loading instead of game start.
This should also enable update and installation of mods without restart.

Don't know what happens with this idea.

Greetings steinio

Re: Handling mods that won't load.

Posted: Wed Sep 07, 2016 4:56 pm
by ssilk
Well, the code (control.lua etc.) is indeed loaded when a map is loaded/started. But the data initialization (graphics, entities, items...) is on game-startup.

Re: Handling mods that won't load.

Posted: Wed Sep 07, 2016 6:38 pm
by aubergine18
The biggest task on startup is building the sprite atlas; the rest is just basically merging lua tables. IMO even if the tables need recreating when a mod is disabled, the sprite atlas could be left as is until next game restart. There shouldn't be any need to restart the game when a mod is disabled, just rebuild the data tables.

Hrm... that being said the positions of sprites in the atlas would need remembering somehow. Uhm...

Re: Handling mods that won't load.

Posted: Thu Sep 08, 2016 9:24 am
by ssilk
Hehe, you see the problem: Graphics must be separated from other metadata of entities.

Re: Handling mods that won't load.

Posted: Thu Sep 08, 2016 1:43 pm
by bobingabout
Well, all It really needs to do is remove the mod from the mod list file on launch if it failed previously, so that the game can still actually load.

I mean, modders know what they're doing, and can fix these things, your average player probably doesn't, so removing incompatable mods can be very frustrating.

At the same time, I don't think it should be automatic, because then you'd annoy modders, who would have to constantly be re-enabling mods that they're trying to debug.

Re: Handling mods that won't load.

Posted: Thu Sep 08, 2016 4:14 pm
by aubergine18
bobingabout wrote:At the same time, I don't think it should be automatic, because then you'd annoy modders, who would have to constantly be re-enabling mods that they're trying to debug.
What if it worked differently depending on whether the mod is installed as a zip (end-user friendly mode) or folder (modder friendly mode)?

Re: Handling mods that won't load.

Posted: Wed Sep 28, 2016 11:44 am
by ssilk
Added to viewtopic.php?f=80&t=27805 Suggestion around Game-Internal Mods-Handling/Mods-Management