Make shortcut bar more resilient to mod loading and unloading

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Xorimuth
Filter Inserter
Filter Inserter
Posts: 699
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Make shortcut bar more resilient to mod loading and unloading

Post by Xorimuth »

EDIT: Tips & Tricks are fixed in 1.1.62. Shortcuts are not.

Consider this common scenario:

You start playing a modded save with a mod that adds tips (such as Rate Calculator), and a variety of mods that add shortcuts.

The Rate Calculator tips pop up and you go through them, marking them as read (or you just type `/unlock-tips` to dismiss them all).

You look through the list of shortcuts, enabling some, disabling others, and reordering them to your liking.

You happily play several more hours and finish your play session.

Next time you open the game, you switch to a different set of mods (maybe to join a friend on a multiplayer server, or for some mod development).

Then you go back to your original modded save, sync mods, and now all the tip notifications have reappeared, and your carefully curated shortcut bar is messed up!

---------

This is because all tips and shortcut data is stored in player-data.json. When you load the game, it goes through and deletes all entries that reference a tip or shortcut not found in the currently loaded data, removing all stored information about that tip/shortcut.

I'd like to suggest that this behaviour be changed. This problem was solved for the blueprint library because it used to behave similarly. It was changed so that unknown entities were not deleted, and when that mod was reloaded the unknown entities in the blueprint would reappear.

Tips:
I think these should just not be deleted, leave them in player-data.json.

Shortcuts:
The above solution would work, although personally I'd prefer these to be stored in each save, the same as the quickbar. For me the shortcut ordering and visibility depends on all of the mods in use, as with lots of mods I'd hide shortcuts that I'd otherwise have visible with fewer mods.
Last edited by Xorimuth on Mon Dec 12, 2022 12:37 pm, edited 3 times in total.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
User avatar
Wiwiweb
Long Handed Inserter
Long Handed Inserter
Posts: 77
Joined: Sat May 08, 2021 2:36 am
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by Wiwiweb »

I second this request.
Xorimuth
Filter Inserter
Filter Inserter
Posts: 699
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by Xorimuth »

A different approach that mostly removes this annoyance would be to save the state of `/unlock-tips` within a save, so that as long as I've typed it once in a save no more tips will appear.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Xorimuth
Filter Inserter
Filter Inserter
Posts: 699
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by Xorimuth »

Just discovered that this is already solved for mod achievements! How many mods add achievements vs shortcuts or tips...? 64884
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
robot256
Filter Inserter
Filter Inserter
Posts: 938
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by robot256 »

I totally agree with this for shortcuts. It's so annoying having to constantly disable the ones that show up by default but I never use.
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by Qon »

Well now that Oxyd is gone we might get this bug fixed. I reported it a long time ago. I still want it. It still makes no sense to not save which buttons are enabled in the savefile, it's just a handful of bits!!! :evil: :cry:
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
curiosity
Filter Inserter
Filter Inserter
Posts: 478
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by curiosity »

The importance of fixing this can not be overstated.
FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2768
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by FuryoftheStars »

I would agree with this as well. +1
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 417
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by Stringweasel »

+1
Alt-F4 Author | Factorio Modder
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby
Official Contributor to Space Exploration
guardog
Burner Inserter
Burner Inserter
Posts: 8
Joined: Tue Aug 02, 2022 7:49 pm
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by guardog »

I concur with this suggestion. Just found out the inconvenience of having shortcut bars reset on changing mod sets.
User avatar
EvilPLa
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Nov 14, 2020 7:26 am
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by EvilPLa »

I hope it shows the special importance, when I leave a +1 here.
robot256
Filter Inserter
Filter Inserter
Posts: 938
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by robot256 »

+1 as well. We already have a game setting to "use different mod settings per save", why not allow the use to choose to "use different hotbar and shortcut per save"?
pinecoffin
Burner Inserter
Burner Inserter
Posts: 19
Joined: Sat Jul 02, 2016 7:37 am
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by pinecoffin »

+1

Could we not just have the ability to directly drag the icons around in the shortcut panel, like you can in the quick bars, and use the current dragable list as just a way of enabling/disabling whatshows in the panel?

At least then you could very quickly sort out the order you prefer.

Cheers,
pine
xfret
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Apr 11, 2021 10:40 am
Contact:

Re: Make tips&tricks and shortcut bar more resilient to mod loading and unloading

Post by xfret »

+1 this. Seems perfectly reasonable and seems like logic that should already be in the game.
User avatar
Mithaldu
Long Handed Inserter
Long Handed Inserter
Posts: 86
Joined: Sun Mar 13, 2016 5:39 pm
Contact:

Re: Make shortcut bar more resilient to mod loading and unloading

Post by Mithaldu »

I must switch back and forth between mod groups a lot because i work on YARM and it is extremely frustrating that everytime i do, my shortcut bar is just trashd and randomized.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1622
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Re: Make shortcut bar more resilient to mod loading and unloading

Post by jodokus31 »

I use a separate standalone installation for each modpack and don't have this problem.

But, it's merely a workaround
User avatar
KvaNTy
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Jun 28, 2018 7:27 am
Contact:

Re: Make shortcut bar more resilient to mod loading and unloading

Post by KvaNTy »

+1

I was about to post same suggestion myself, because I can hardly express how frustrating this is.
When shortcut count passes certain point it becomes impossible to find button you are looking for without introducing some degree of organization in how they are ordered. And as someone who periodically has to switch between heavily modded and pure vanilla playthroughs, I had to create some sort of reference for myself, and then painstakingly rearrange everything each time game decides to show buttons in whichever order mods a getting loaded.
And to be honest every time I get an urge to go implement some new idea in my vanilla megabase, I have to consider if it's really worth it.

---

Thoughts on how to potentially solve this problem and give shortcut bar some kind of memory:
Not sure if shortcut buttons, as UI element, have some sort of unique ID or any way to distinguish them besides icon/text and origin(mod name). If they do, then following algorithm should work:
  1. Game keeps a list of every shortcut button ever encountered by player, including their enabled/disabled state, mod_ID they are created by and order player arranged them in.
    Let's say we initially have a list of three buttons:
    • A(vanilla)
    • B(mod-B)
    • C(mod-C)
  2. When game loads it compares this list to whatever buttons it has to work with currently, and if list includes buttons from mods not currently present, they are ignored but stay where they were in the list. So if we remove mod-B from our example above, game would still remember A-B-C order.
    • A(vanilla)
    • C(mod-C)
  3. Adding new buttons would work as usual and they get added to the end of this list. If we install mod-D it should result in A-B-C-D list, while user sees the following:
    • A(vanilla)
    • C(mod-C)
    • D(mod-D)
  4. But what if player decides to rearrange them in A-D-C order? At this point we have to decide what to do about button from mod-B, that player can't see but game still keeps track of. And any option should probably be valid as long as it's consistently followed. If we choose Bottom-To-Top principle, game picks C as "anchor point" and moves D to first position above C in the list. So what game thinks: A-B-D-C. What player sees:
    • A(vanilla)
    • D(mod-D)
    • C(mod-C)
  5. This way if we install mod-B back, internal list and shortcut bar presented to user should come to full agreement on what goes where:
    • A(vanilla)
    • B(mod-B)
    • D(mod-D)
    • C(mod-C)
Top-To-Bottom principle may cause issues due to fact that new buttons are added to the bottom by default. Consider such scenario: (* means mod is not currently installed)
We have A-B-C-D-E.
We remove C, D and E. Then install F, G and H, which are related to each other(buttons from a single mod for example).
At first everything would be fine and list will looks like A-B-C*-D*-E*-F-G-H.
But if player decides to put G right above F, then since game would pick B as "anchor point" (top-to-bottom), list will turn into A-B-G-C*-D*-E*-F-H.
So when we introduce C,D,E back, thematically related G and F will get separated.
There is no such thing as unarmed spaceship © Isaac Arthur
User avatar
Shakrii
Burner Inserter
Burner Inserter
Posts: 11
Joined: Wed Nov 08, 2017 12:43 am
Contact:

Re: Make shortcut bar more resilient to mod loading and unloading

Post by Shakrii »

+1
1WheelDude
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Mon Oct 24, 2022 8:01 pm
Contact:

Re: Make shortcut bar more resilient to mod loading and unloading

Post by 1WheelDude »

god please fix this. i can't stand having to pick and choose my shortcut bar buttons over and over
Post Reply

Return to “Ideas and Suggestions”