Page 1 of 1

[18.0] Sync mods to save fails when Mods folder not present

Posted: Sat Nov 07, 2020 12:22 pm
by garath
Running this on [18.0] on Windows 10, try the following:

1. Remove the Mods Folder
2. Load a save
3. Click 'Sync mods to Save' with the option to start the game after sync is complete
4. The game then appears to download all the mods one-by-one
5. Afterward, the game loads the save but only with the 'base' mod.

It appears the game does the sequence like this:

1. Download all mods
2. Then, create the mod folder with only the 'base' mod
3. Load the game with only the 'base' mod

I would expect the game to invert steps (1) and (2) so that the downloaded mods are correctly stored in the mods folder.

This is definitely a very minor issue as most people probably will create a new 'empty' mods folder each time. But I think the intended behavior of the game is to create the mod folder if it isn't present. In this case, it appears you have a situation where players on slower downloads links may spend several minutes downloading mods that ultimately aren't stored in the mods folder. So, it might be worthwhile to investigate. Thanks!

Re: [18.0] Sync mods to save fails when Mods folder not present

Posted: Sat Nov 07, 2020 7:34 pm
by Rseding91
Thanks for the report however I don't understand why you would ever manually delete the mods folder while the game is running.

It has no benefit and as you can see potentially breaks stuff.

There are probably a decent amount of places where stuff breaks if you delete folders that are supposed to exist for the runtime of the game while the game is running.

I don't consider it worth going over every one of those places and checking that folders exist before the logic continues - since they should always exist unless something is being malicious about it.

Maybe that will change one day - but for now i'm going to say won't fix.

Just don't delete the folder. There's no reason to.

Re: [18.0] Sync mods to save fails when Mods folder not present

Posted: Sun Nov 08, 2020 5:12 am
by garath
Hmm... I don't think the game was running when I deleted the mods folder. Sorry, I wasn't more clear. I was fairly certain the exact sequence was:

1. Rename or delete the mods folder
2. Start the game
3. Load a game and Sync Mods to Save
4. Game appears to be downloading the mods
5. Game loads with just the 'Base' mod.

Trying to reproduce that now, I cannot. So, maybe I did have the game running. Though, if I try to delete the mods folder while the game is running, I see a message:

"The action can't be completed because the folder or a file in it is open in another program...."

I really thought I'd found a reproducible bug or I wouldn't have hassled with resetting my forum password to make the bug report. I can't reproduce it now.

I apologize for wasting your time!!

Re: [18.0] Sync mods to save fails when Mods folder not present

Posted: Mon Nov 09, 2020 10:03 pm
by Rseding91
The mods folder should always be re-created on startup if it doesn't exist. If it isn't; that's a bug in the game logic. But from what you describe and what I test; it always is.