Page 1 of 2

Make shortcut bar more resilient to mod loading and unloading

Posted: Fri Jan 28, 2022 5:36 pm
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.

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

Posted: Thu Feb 17, 2022 11:20 pm
by Wiwiweb
I second this request.

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

Posted: Thu Feb 17, 2022 11:21 pm
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.

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

Posted: Thu Jun 09, 2022 2:31 am
by Xorimuth
Just discovered that this is already solved for mod achievements! How many mods add achievements vs shortcuts or tips...? 64884

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

Posted: Thu Jun 09, 2022 2:25 pm
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.

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

Posted: Thu Jun 09, 2022 5:53 pm
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:

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

Posted: Sun Jun 12, 2022 3:08 pm
by curiosity
The importance of fixing this can not be overstated.

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

Posted: Sun Jun 12, 2022 3:51 pm
by FuryoftheStars
I would agree with this as well. +1

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

Posted: Sun Jun 12, 2022 7:44 pm
by Stringweasel
+1

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

Posted: Fri Aug 12, 2022 6:03 pm
by guardog
I concur with this suggestion. Just found out the inconvenience of having shortcut bars reset on changing mod sets.

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

Posted: Sun Aug 14, 2022 4:58 am
by EvilPLa
I hope it shows the special importance, when I leave a +1 here.

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

Posted: Sun Aug 14, 2022 11:28 am
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"?

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

Posted: Mon Dec 12, 2022 12:33 pm
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

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

Posted: Mon Dec 12, 2022 12:36 pm
by xfret
+1 this. Seems perfectly reasonable and seems like logic that should already be in the game.

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

Posted: Wed May 31, 2023 11:02 pm
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.

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

Posted: Thu Jun 01, 2023 1:17 am
by jodokus31
I use a separate standalone installation for each modpack and don't have this problem.

But, it's merely a workaround

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

Posted: Sat Jul 22, 2023 12:35 pm
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.

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

Posted: Sat Jul 22, 2023 7:11 pm
by Dominiquini
+1

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

Posted: Mon Dec 11, 2023 10:19 pm
by Shakrii
+1

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

Posted: Mon Dec 11, 2023 11:35 pm
by 1WheelDude
god please fix this. i can't stand having to pick and choose my shortcut bar buttons over and over