LuaGuiElement Inventory filter slots

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 188
Joined: Wed Jan 18, 2023 3:49 am
Contact:

LuaGuiElement Inventory filter slots

Post by PennyJim »

Standard filter slots work fine, but when pointing at an inventory that's filtered in an alternative way (eg crafter input) it does not appear. I request there be some mechanism to support these filters, which I understand might be difficult depending on current code structure. Alongside this feature, I think a "filter_style" argument would be nice so we could disable or customize the blue tinge that filter slots have.

Ignore the extra input slots, that was me trying something out with negative margins and padding which did not work out.
Attempted recreation of crafter gui
Attempted recreation of crafter gui
08-11-2026, 14-15-31.png (109.03 KiB) Viewed 253 times
User avatar
Shemp
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Mon Jan 19, 2026 6:51 pm
Contact:

Re: LuaGuiElement Inventory filter slots

Post by Shemp »

+1. The fact that slots don't inherit their appearance from the target inventory (by default) almost seems like a misfeature, especially because a filtered slot will prevent users from placing non-matching items into it, and it's up to the modder to take care of marking it.
Rseding91
Factorio Staff
Factorio Staff
Posts: 17396
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaGuiElement Inventory filter slots

Post by Rseding91 »

Inventory filters are fully supported. Things like crafting machines *do not use filters*, instead they use secondary logic to restrict what can go into a slot based on the active recipe. The custom gui logic does not have special case logic to account for displaying those restrictions.

It does have special case logic to handle generic inventory with filters (such as cargo wagons).
If you want to get ahold of me I'm almost always on Discord.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 539
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: LuaGuiElement Inventory filter slots

Post by protocol_1903 »

Rseding91 wrote: Wed Aug 12, 2026 1:32 am Inventory filters are fully supported. Things like crafting machines *do not use filters*, instead they use secondary logic to restrict what can go into a slot based on the active recipe. The custom gui logic does not have special case logic to account for displaying those restrictions.
Would it be possible to add some way to render these psuedo-filters manually, like EmptySlotInfo per slot? Or would that be something that needs to be hacked together with sprites layered on top of the inventory elements?
pY and pYblock developer, wielder of fluid networks and subtick events in arbitrary ways. I make mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903

Buy me a coffee
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 188
Joined: Wed Jan 18, 2023 3:49 am
Contact:

Re: LuaGuiElement Inventory filter slots

Post by PennyJim »

protocol_1903 wrote: Wed Aug 12, 2026 1:54 am Would it be possible to add some way to render these psuedo-filters manually, like EmptySlotInfo per slot?
Ditto. A solution to be able to recreate this logic manually would be sufficient, and might in fact be a better resolution.

I can imagine it being used alongside someone's manual handling of cursor actions
Rseding91
Factorio Staff
Factorio Staff
Posts: 17396
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaGuiElement Inventory filter slots

Post by Rseding91 »

I've added some special-case handling for the next release so it will include the info for assembling machine inputs and outputs.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding interface requests”