More Robust Mod Loading

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

ParadoxHeart
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Sep 15, 2016 7:58 pm
Contact:

More Robust Mod Loading

Post by ParadoxHeart »

A recent update to the Electric Vehicles mod highlighted an issue with Factorio's mod loading to me. In general it seems that Factorio is pretty fragile when it comes to mod loading. Any sort of error will cause it to quit immediately, and the user is expected to know to go and check the logs (fortunately, I'm technically savvy myself).

IMO, if you encounter a zip file or directory in the mods directory that does not meet the specifications for a Factorio mod, then you should ignore it and warn the user with an in game message once loading has finished. A similar approach should be taken in the case that there are two versions of the same mod in the mods directory. In this case, I think Factorio should load one version and warn. If one is for the current Factorio version, and the other(s) for a different version, then it would be reasonable to expect the correct version one to be loaded, and the other(s) ignored. If they are both valid mods for the current Factorio version, then two reasonable approaches would be 1. load the mod with the highest version number, 2. load the mod encountered first.

The user could then be given the option to resolve the situation via the built-in mod tools/settings.

As a further idea, it might also be cool to implement searching for mods 1 or more levels deep within a zip file / directory to allow for the possibility of distributing a single file mod pack to users, without the need for them to extract it manually.
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 716
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: More Robust Mod Loading

Post by Earendel »

Or at least if there are any errors it should take you to the mods screen so you can disable any broken modes based on the errors you got.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: More Robust Mod Loading

Post by ssilk »

Added to viewtopic.php?f=80&t=27805 Suggestion around Game-Internal Mod-Handling/Mod-Management

Telling the player for directories, not containing mods
Agreed: The current mod-installer should show that case (and eventually enable delete).

About the warning: Either a mod is valid or not. That check is currently relatively simple: It begins with the name of the ZIP or subdirectory and ends with checks of the info.json-file.

What's gained for the player, that he knows, that there are something, that is not a mod? The player wants to play. But he is forced to read a warning message. Does that bring something in that moment? I doubt.
I mean: He has created it in some way. Perhaps he is a modder? Or just someone who blindly downloads stuff and puts them into mods-folder. You don't know it and in any case he will be able to play without warning.

In General: In such cases programming things in where the use-case is not known is an anti-pattern. :)


Two equal mods (in different versions)
That is a case, that has been mentioned also as suggestion. See linked post above.

Edit:
I can also underline that what axfrog has written in viewtopic.php?f=6&t=32470#p207002 selectable mod "profiles"

Cause of that I stroke the rest:
I think there should not be such an automatic (taking the newest version). That is a conflict; both mods cannot exist at the same time.
That is indeed something, that needs to fixed in a way, that the player needs to choose. But only in the moment, when wants to play a new game.
Or play a saved game.
That is not the case if he wants to play multiplayer game. Here the player needs to have the exact same mod as the server and in that case it's clear which version needs to be choosen (or downloaded or whatever).


Mods in mods / Modpackages
Well, I don't see the need for modpackages with the mods-portal. See linked post for reason.
It makes confusion just bigger, if you allow such things, and searching within a zip file is expensive.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Post Reply

Return to “Ideas and Suggestions”