Page 1 of 1

[Oxyd] [0.17.28] Factorio forgets what shortcut slots I have enabled/disabled

Posted: Fri Apr 12, 2019 9:25 am
by Qon
Anything below "import blueprint string" was disabled. I changed my mod setting for "AlmostInvisibleElectricWires" for "Copper Wire Color" to "Default" compared to the 30% the file was saved with. But changing it back to 30% and reloading the save doesn't help though. I did enable/disable some mods in this bug report but before I did that I saved my mod-list.json and then restored it. I never altered my save files while having a mod selection different to the savefile.

My shortcut bar gets scrambled occasionally, this is not the first time.

*Edit* hotbar to shortcut bar.

Re: [0.17.28] Factorio forgets what hotbar slots I have enabled/disabled

Posted: Fri Apr 12, 2019 2:57 pm
by TruePikachu
To clarify, this should actually be shortcut bar (IIRC).

I can confirm this; when I start a new game in my current (testing) configuration, everything is enabled except for the alt mode toggle -- I always hide everything except for the four planner items.

Re: [0.17.28] Factorio forgets what shortcut slots I have enabled/disabled

Posted: Thu Jun 20, 2019 2:01 pm
by Oxyd
Does this happen every time you start the game? Your shortcut selection is saved in the player-data.json file, so if you move or delete that file, it would reset to the default configuration.

There was also this bug, where shortcuts would get reenabled when a technology is researched.

Re: [0.17.28] Factorio forgets what shortcut slots I have enabled/disabled

Posted: Thu Jun 20, 2019 10:22 pm
by Qon
It doesn't happen every time I load a savefile. My settings just occasionally disappear. I think it's related to using different saves and/or mod setups. I have different mods for different savefiles and I make new mods and install new mods and sync mods to saves and bugtest all the time. And then when I sync back to a world where I had my shortcuts setup the settings for it are just lost :/
I'm not exactly sure what the steps to reproduce are.

And I don't touch player-data.json so that is not the issue.

Re: [Oxyd] [0.17.28] Factorio forgets what shortcut slots I have enabled/disabled

Posted: Fri Jun 21, 2019 3:03 pm
by Oxyd
Ah, I see. I think what's happening is that you remove the mods that define the additional shortcuts, which then removes those shortcuts from the configuration. When you then re-add the mods, there is no configuration for their shortcuts in player-config.json, so they get the default configuration.

Unfortunately, I don't think it makes too much sense to keep around configuration data for shortcuts that don't exist, and losing configuration for things you uninstall is not that outrageous.

If you need to switch out mods often, you could also switch out player-data.json as well. Or maybe just shortcut-bar section of it.

Re: [Oxyd] [0.17.28] Factorio forgets what shortcut slots I have enabled/disabled

Posted: Fri Jun 21, 2019 5:22 pm
by eradicator
Oxyd wrote:
Fri Jun 21, 2019 3:03 pm
Unfortunately, I don't think it makes too much sense to keep around configuration data for shortcuts that don't exist, and losing configuration for things you uninstall is not that outrageous.
Hotkey configurations *are* saved though even if a mod is removed. And conceptually shortcuts don't seem much different...

Re: [Oxyd] [0.17.28] Factorio forgets what shortcut slots I have enabled/disabled

Posted: Sat Jun 22, 2019 10:14 am
by Qon
Oxyd wrote:
Fri Jun 21, 2019 3:03 pm
Ah, I see. I think what's happening is that you remove the mods that define the additional shortcuts, which then removes those shortcuts from the configuration. When you then re-add the mods, there is no configuration for their shortcuts in player-config.json, so they get the default configuration.
No, I think you misunderstood me. I never save a file with mods and shortcuts for those mods without those mods.
I do something like this:
  1. I play my Creative World where I have my cheat mods and all my own mods. I save.
  2. Now I get a bug report on one of my mods. I disable almost all mods except for the one I want to debug and start a new world. I fix the bug and I'm done.
  3. Now I make a new world to test and develop another new mod. I save that world for when I want to continue developing that mod.
  4. Now I want to play in my regular playthrough. I have a savefile and a set of mods for that save. Some of my own mods, some QoL mods that I use everywhere (maybe they have shortcuts, same as in my Creative World) and some other mods specific to that play world. I save when I'm done. I find some new mods to play with and install those. Save again.
  5. Now I want to develop my blueprints again, so I sync my mods to my Creative World. When I load in my shortcuts are completely reset to default. I haven't touched this savefile at all for a while.
Why are shortcuts saved in player-data.json? Makes no sense to me that it isn't saved in the savefile it belongs to. I think that's the bug. The shortcuts data is probably overwritten when I save in ANOTHER savefile without those mods, in effect altering the save state of another world that has those mods.

Edit: I think you moved this to "Won't fix" because you misunderstood me. Please move it back to the correct place so it doesn't get lost :)

Re: [Oxyd] [0.17.28] Factorio forgets what shortcut slots I have enabled/disabled

Posted: Mon Jul 01, 2019 1:05 pm
by Oxyd
Qon wrote:
Sat Jun 22, 2019 10:14 am
Oxyd wrote:
Fri Jun 21, 2019 3:03 pm
Ah, I see. I think what's happening is that you remove the mods that define the additional shortcuts, which then removes those shortcuts from the configuration. When you then re-add the mods, there is no configuration for their shortcuts in player-config.json, so they get the default configuration.
No, I think you misunderstood me. I never save a file with mods and shortcuts for those mods without those mods.
I do something like this:
  1. I play my Creative World where I have my cheat mods and all my own mods. I save.
  2. Now I get a bug report on one of my mods. I disable almost all mods except for the one I want to debug and start a new world. I fix the bug and I'm done.
  3. Now I make a new world to test and develop another new mod. I save that world for when I want to continue developing that mod.
  4. Now I want to play in my regular playthrough. I have a savefile and a set of mods for that save. Some of my own mods, some QoL mods that I use everywhere (maybe they have shortcuts, same as in my Creative World) and some other mods specific to that play world. I save when I'm done. I find some new mods to play with and install those. Save again.
  5. Now I want to develop my blueprints again, so I sync my mods to my Creative World. When I load in my shortcuts are completely reset to default. I haven't touched this savefile at all for a while.
Why are shortcuts saved in player-data.json? Makes no sense to me that it isn't saved in the savefile it belongs to. I think that's the bug. The shortcuts data is probably overwritten when I save in ANOTHER savefile without those mods, in effect altering the save state of another world that has those mods.
No, I understood you right: When you remove a mod, you lose the configuration for that mod's shortcuts. The shortcut config isn't saved in the save file, so whether or not you save a save file doesn't matter. It's saved outside save files so that it persists between saves. It cannot affect the save state of another world because it isn't a part of the save state.
eradicator wrote:
Fri Jun 21, 2019 5:22 pm
Oxyd wrote:
Fri Jun 21, 2019 3:03 pm
Unfortunately, I don't think it makes too much sense to keep around configuration data for shortcuts that don't exist, and losing configuration for things you uninstall is not that outrageous.
Hotkey configurations *are* saved though even if a mod is removed. And conceptually shortcuts don't seem much different...
There actually isn't a separate configuration saved for each individual shortcut, but only the config for the shortcut bar as a whole. You can keep around a disabled mod's config with no problems, but the shortcut bar itself is always there, and it always saves its configuration to a file.

I'm sure it would be possible to make it at least partially work somehow, I'm simply not convinced it'd be worth the extra complexity it would involve.