[MOD 0.15+] Quickbar Switcher

Topics and discussion about specific mods
Post Reply
ibeatbabybiters
Inserter
Inserter
Posts: 30
Joined: Sun Apr 30, 2017 7:14 pm
Contact:

[MOD 0.15+] Quickbar Switcher

Post by ibeatbabybiters »

Allows you to easily manage up to 5 individual quickbar layouts with the press of a hotkey.

Useful if you want to have different quickbar layouts for different tasks. For example: one for base building, one for train building, one for combat, and so on.

Please note that the ALT hotkey of this mod will also trigger the default "Info view" keybinding. I suggest to change the info view keybinding to another key, for example "I".

Highlights
  • Can switch between full quickbar layouts even if inventory is full. This works by using the players cursor stack (if available and empty) in the same way as a player would manually re-arrange his quickbar.
    If players cursor stack is currently holding something then 1 empty slot from the inventory will be used to perform the switch. If neither the cursor stack nor an empty inventory slot is available then a switch canno be performed and a message will be printed to the player.
  • Works with any inventory/quickbar size (vanilla or modded)
  • Should work just fine in multiplayer (haven't really tested, please report if you experience any issues)
  • No cheating involved: does not destroy any items or create items out of thin air.
Usage

1. Press ALT + [2-5] to create a new quickbar layout
2. Setup your new quickbar.
3. Switch between layouts with ALT + [1-5]
4. ...
5. Profit! :)

Demo

Portal download: https://mods.factorio.com/mods/ibeatbab ... arSwitcher
Latest version: 1.1.0
Tested with Factorio version: 0.15.19
Last edited by ibeatbabybiters on Sun Jun 11, 2017 5:30 pm, edited 1 time in total.
Usually I don't beat babies, but when I do I beat baby biters.

User avatar
5thHorseman
Smart Inserter
Smart Inserter
Posts: 1193
Joined: Fri Jun 10, 2016 11:21 pm
Contact:

Re: [MOD 0.15+] Quickbar Switcher

Post by 5thHorseman »

I approve of this mod. I can't wait to try it out!

ibeatbabybiters
Inserter
Inserter
Posts: 30
Joined: Sun Apr 30, 2017 7:14 pm
Contact:

Re: [MOD 0.15+] Quickbar Switcher

Post by ibeatbabybiters »

I have just released 1.1.0 which brings some great improvements, see first post for details and a small demo I have created.

Have fun and feedback welcome! Let me know if you experience any issues.
Usually I don't beat babies, but when I do I beat baby biters.

judos
Filter Inserter
Filter Inserter
Posts: 266
Joined: Mon Dec 08, 2014 11:17 am
Contact:

Re: [MOD 0.15+] Quickbar Switcher

Post by judos »

Hi there,
I love the mod! I think it neatly fixes the issues about the quickbar which were also discussed in fff 191 (https://www.factorio.com/blog/post/fff-191).

One thing though:
After I arranged my quickbar Nr.1 nicely and I go remove some factory part using construction bots my whole quickbar is messed up again. That would be the point when I would like to press Alt+1 again to restore what I had before. However currently the way it works is: I can only switch but not explicitly save on part. So in the game I would have to think of a workaround. E.g. everytime I destroy something and my quickbar will get messed up use alt+5 before... But that's somehow inconvenient.
Could you make a shortcut to save the current quickbar?

The way I would imagine how it could it work is just to have a save key combination.
e.g.pressing ctrl+s would save the quickbar filters currently used. alt+1 would then restore again.
Maybe first time using alt+1 would also store the quickbar.
When saving the quickbar it would use the number of the active quickbar (the last number that was pressed via alt+number).

What do you think?

jcpmcdonald
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Jun 13, 2017 12:49 am
Contact:

Re: [MOD 0.15+] Quickbar Switcher

Post by jcpmcdonald »

Love it! I'm using it in combination with Voice Attack to allow me to bind hotkeys to each item I want to attach a voice command to.

ibeatbabybiters
Inserter
Inserter
Posts: 30
Joined: Sun Apr 30, 2017 7:14 pm
Contact:

Re: [MOD 0.15+] Quickbar Switcher

Post by ibeatbabybiters »

judos wrote:Hi there,
I love the mod! I think it neatly fixes the issues about the quickbar which were also discussed in fff 191 (https://www.factorio.com/blog/post/fff-191).
Thanks! I love the ideas presented in fff 191 (although I didn't see multiple quickbar layouts mentioned). I couldn't wait for them and I simply had to fix my biggest time-wasting activity: constantly having to shuffle my quickbar with the items I need, and later in the game there are a lot of items one constantly need.
One thing though:
After I arranged my quickbar Nr.1 nicely and I go remove some factory part using construction bots my whole quickbar is messed up again. That would be the point when I would like to press Alt+1 again to restore what I had before. However currently the way it works is: I can only switch but not explicitly save on part. So in the game I would have to think of a workaround. E.g. everytime I destroy something and my quickbar will get messed up use alt+5 before... But that's somehow inconvenient.
Could you make a shortcut to save the current quickbar?

The way I would imagine how it could it work is just to have a save key combination.
e.g.pressing ctrl+s would save the quickbar filters currently used. alt+1 would then restore again.
Maybe first time using alt+1 would also store the quickbar.
When saving the quickbar it would use the number of the active quickbar (the last number that was pressed via alt+number).

What do you think?
I was already thinking about how I could solve the "quickbar-gets-filled-with-random-junk" problem until the new quickbar from fff 191 is released. Initially I wanted to make this mod more sophisticated, with a UI where you could define base layouts, and then extend the base layouts with concrete layouts and so on. But then I figured the simpler and better approach would be to just use the quickbar as it is and add some hotkeys to switch layouts. I'd like to keep it as simple as possible and fool proof.

That being said, I see some potential issues with your idea: First, what would happen if I re-arrange quickbar 1, but then forget to save it and accidentally hit ALT+1 instead of 2. This would then unintentionally restore the layout to the previously stored one, and I'm not sure how such accidents could be prevented. But of course I'm open for further discussions about how this could be improved.

What I currently do to prevent my quickbar getting filled with junk by deconstructing things is to set a filter on all currently unused quickbar slots to something where I know bots won't bring to me while deconstructing stuff, for example wood (just kidding :D). This is not a solution but a workaround. The final solution to this issue will be the new quickbar from fff 191 (can't emphasize enough how desperately I am waiting for these changes, as a new player I'm just not used enough to the pain)
Love it! I'm using it in combination with Voice Attack to allow me to bind hotkeys to each item I want to attach a voice command to.
Glad you like it! :) And are you telling me that I could use voice commands in this game? That is amazing! Never heard of Voice Attack before, I'll have to check it out when I get home. Can you tell me a bit more? How good is the voice recognition and delay until execution?
Usually I don't beat babies, but when I do I beat baby biters.

beiju
Inserter
Inserter
Posts: 42
Joined: Thu Feb 02, 2017 3:52 pm
Contact:

Re: [MOD 0.15+] Quickbar Switcher

Post by beiju »

First of all, I love this mod! I thanked you on reddit when you first published it :D .

Unfortunately, I keep my inventory pretty full and I suspect that's what's giving me problems. Pretty often I get either "could not find slot to temporary hold item, please report if you read this" or "no empty slot found to put cursor item back, please report if you read this". Even more unfortunately, whenever that happens the quickbar I was trying to switch to is overwritten by the quickbar I was trying to switch away from. I have to clear and re-do the filters.

I wasn't sure what other information would help you debug. I'd be happy to help you fix the issue if there's anything I can do.

ibeatbabybiters
Inserter
Inserter
Posts: 30
Joined: Sun Apr 30, 2017 7:14 pm
Contact:

Re: [MOD 0.15+] Quickbar Switcher

Post by ibeatbabybiters »

Hi beiju, sorry for the late reply! I didn't have email notifications enabled for this thread.

I was planning to rework the whole switching logic anyways, because as of right now its a single big and kind of messy function. That's why I added these weird "please report" messages, so thanks for reporting :) Looking at the code after 3 months, I see that it really needs some refactoring. I don't know when exactly I will be able to do the big code cleanup, because right now I'm preparing for a new job and I don't even have time to play Factorio at all at the moment. And it also depends if 0.16 will bring the great new inventory/quickbar changes, so this mod may eventually become obsolete, but we will see.

But I could provide a short term fix if you can help me reproduce it. Ideal would be if you could send me a savegame where switching layouts will cause this problem, then it would be easy to debug. During my own usage of this mod I didn't encounter any problems so far.
Usually I don't beat babies, but when I do I beat baby biters.

Iccor56
Long Handed Inserter
Long Handed Inserter
Posts: 65
Joined: Mon Dec 25, 2017 12:29 am
Contact:

Re: [MOD 0.15+] Quickbar Switcher

Post by Iccor56 »

any chance this is getting updated for .16+?

Post Reply

Return to “Mods”