Page 1 of 1

[0.17.23] Always ask before deactivating a module

Posted: Sun Mar 31, 2019 1:32 pm
by mrvn
While modding I added a syntax error in one of the info.json files (Pedantic Json doesn't allow trailing ',' in arrays but that is another issue):

2.421 Error ModManager.cpp:793: Mod package read error. JSON parser error in package metadata: Invalid comma before ']' at /home/mrvn/factorio/factorio-0.17.23/mods/deadlock-beltboxes-loaders_2.1.4/info.json:11

The problem I have with this is that deadlock-beltboxes-loaders is listed as activated in mod-info.json. But the game silently deactivates it due to this error. All other errors I've seen so far ask the user wether to deactivate the mod, restart or plain quit. Why doesn't this?

Re: [0.17.23] Always ask before deactivating a module

Posted: Sun Mar 31, 2019 5:10 pm
by Rseding91
mrvn wrote: Sun Mar 31, 2019 1:32 pm... Why doesn't this?
Because the game can't even tell if what it's looking at is a mod at that point. It's in process of checking "is this zip a mod?" and it errors reading the json file which translates to "no, or it's so broken that I can't tell what mod it is to list it in the GUI".

Re: [0.17.23] Always ask before deactivating a module

Posted: Sun Mar 31, 2019 6:03 pm
by mrvn
Rseding91 wrote: Sun Mar 31, 2019 5:10 pm
mrvn wrote: Sun Mar 31, 2019 1:32 pm... Why doesn't this?
Because the game can't even tell if what it's looking at is a mod at that point. It's in process of checking "is this zip a mod?" and it errors reading the json file which translates to "no, or it's so broken that I can't tell what mod it is to list it in the GUI".
It could use the directory name. Since that MUST be mod-name_version.

Even if it can't decide on what that stuff is the mod-list shows deadlock-beltboxes-loaders is active. After loading all modules it no longer exist. Tell me about that change.

Re: [0.17.23] Always ask before deactivating a module

Posted: Sun Mar 31, 2019 7:47 pm
by TruePikachu
It still needs to determine for certain if that directory is a mod or not, and it also needs to know what the mod's dependencies are for the load sequence.

Re: [0.17.23] Always ask before deactivating a module

Posted: Mon Apr 01, 2019 9:08 am
by mrvn
TruePikachu wrote: Sun Mar 31, 2019 7:47 pm It still needs to determine for certain if that directory is a mod or not, and it also needs to know what the mod's dependencies are for the load sequence.
I would say that there isn't supposed to be a directory under mods that contains an info.json that is not a mod. If you put something there that isn't a mod, does have an info.json but the file is not a json file the game can load then congratulations: You broke the game, it will give you an error that it can't understand what you are trying to do.

But that's a bit besides the point. The mod is listed in mod-list.info as active. After looking at all the mods it will no longer be active. Doesn't even matter if there was a parse error in info.json or the directory simply is gone. The game should simply report the change in mods. I would say the same applies to newly added mods too.