[Controller] Allow reordering quickbars

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

qoalabear
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Nov 29, 2020 11:02 am
Contact:

[Controller] Allow reordering quickbars

Post by qoalabear »

TL;DR
Provide a UI for reordering Items pages in the controller input's Quick Panel.

What?
Create a panel that displays your 10 pages of the Items tab in the Quick Panel (the controller equivalent of the quickbar), and allows you to reorder them, similar to how quickbars can be moved in and out of the rotation on keyboard+mouse. For example, they could be drawn in a column like Logistic Groups in the inventory, and have a grabby handle on the right to reorder them by dragging.

As a bonus, it would be nice to be able to edit the filters from this same panel, because it can sometimes be a chore to keep the shoulder button held down for complicated reorganizations (releasing the shoulder button closes the Quick Panel, discarding any open edits). A quickbar-edit panel would presumably stay open until closed with confirm or cancel buttons.

A potential place to access this panel would be from the second page of the Panels tab. There's space over there.

For reference, the controller Quick Panel:
11-13-2024, 19-16-56.png
11-13-2024, 19-16-56.png (54.52 KiB) Viewed 174 times
Mockup of a quickbar-edit UI:
11-13-2024, 20-09-11.png
11-13-2024, 20-09-11.png (27.16 KiB) Viewed 174 times
Admittedly this is practically guaranteed to require a scrollbar on the Steam Deck's screen, given that we're stacking 10 very square sections vertically, which isn't great. But this way might behave closely enough to things like the Logistics Groups to more easily reuse UI elements.
Why?
Background on playing Factorio with a controller
When I'm transitioning between belt tiers, there's usually a period of time where I want two nearly identical quickbars, so that I can still use the lower belt tier in places with lower throughput (because I'm not yet producing enough of the higher belt tier to use it everywhere), which results in the following desired sequence: Initially I want to insert a new red belts quickbar into the rotation, next to yellow belts. Then later I want to remove the yellow belts quickbar from the rotation entirely.
  • 1. Combat 2. Yellow Belts 3. Pipes
  • 1. Combat 2. Yellow Belts 3. Red Belts 4. Pipes
  • 1. Combat 2. Red Belts 3. Pipes
Trying to do this without being able to reorder quick panel pages requires painstakingly copying over each page to the next one over, one filter entry at a time. (Inserting into the middle of a fixed array, and the array elements are large objects with expensive copy semantics in their own right)

It's even more important in Space Age, where different planets require very different tools. My housemate completely changes out a number of their available quick bars when they change planets.

Contrast with keyboard and mouse input, where quickbars can be taken in and out of the currently displayed rotation at will.
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: [Controller] Allow reordering quickbars

Post by A7x49 »

I also play with a controller and agree that this is a pain point. Both of these ideas are good:

1) Ability to reorder quickbar pages
2) A new UI (not only for reordering quickbar pages) that also allows editing the all the quickbars and easily moving items between them. Importantly, without needing the player to keep a button held down.
qoalabear
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sun Nov 29, 2020 11:02 am
Contact:

Re: [Controller] Allow reordering quickbars

Post by qoalabear »

Woo! Another controller user!

I've started looking into what would be possible via modding (I'm not sure to what extent "how could we approximate the suggestion in a mod" can get off-topic for a suggestion thread? If I get farther along and find myself stuck, presumably I'd want to start a thread in Modding Help, but I'm still in the "Read documentation and plan" phase) What follows is just my notes/rambling.
  • Based on 106661, I can add the new panel's entry point to the middle Tools tab, even though I'd prefer it to be on the right Panels tab for an official implementation. To me the Tools tab is more about putting something in your hand/cursor and the Panels tab is for opening dialog windows.
  • I can't find the draggable GUI elements used by Logistic Groups in https://lua-api.factorio.com/latest/con ... tType.html, nor can I find an "on_gui_" event that sounds right. I'm guessing those aren't exposed to mods right now. "Move up"/"Move down" buttons next to the sections ought to work fine for a proof of concept and are probably easier to use with a controller anyways. It sounds like "frame" is more like a panel with the ability to move around the screen, and not the element I'm looking for.
  • With "get_quick_bar_slot" and "set_quick_bar_slot", I think this is feasible. I just need to read through all the GUI-modding guides and figure out how to build the GUI (and given the purpose, obviously make sure it's properly controller-accessible). I don't think I can change the quickbar cycling rotation, like the keyboard+mouse equivalent does, but I can manually replace all slots in one bar with the slots in another.
  • I'm not sure whether or not "choose-elem-button" is correct for a button that lets the player select a quickbar filter. If not, I'm still hoping that functionality should be available. Even if draggable elements aren't possible, I'm hoping for the ability to pipette values from one entry and apply them to another. I see "cursor_stack"/"cursor_ghost"/"cursor_record" for reading the cursor contents, but only pipette_entity for setting it. I'm not convinced the smart-pipette function would actually work for grabbing a blueprint.
A7x49
Inserter
Inserter
Posts: 30
Joined: Tue Sep 10, 2024 1:35 pm
Contact:

Re: [Controller] Allow reordering quickbars

Post by A7x49 »

I wish you luck in this! It sounds ambitious, and from the tiny bit I know about modding I know that you can't directly modify base game GUIs, but it sounds like this might be just making a new Gui? I suppose if you can access and modify the data model for the quick bars, maybe you could actually pull this off :)

On a slightly related note, can I request your comment on my small question here? Im currently unable to work with trains :/
viewtopic.php?f=49&t=122089

Honestly I think I stumbled upon this post while looking for an answer to that.
Post Reply

Return to “Ideas and Suggestions”