LuaGuielement ElemList tooltip type

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 ElemList tooltip type

Post by PennyJim »

Somewhat related to 77339 but smaller in scope, I want the ability to recreate the tooltip style used by furnace inputs, burner inputs, module slots, and maybe more.
Example tooltip on furnace input
Example tooltip on furnace input
08-11-2026, 15-08-47.png (257.38 KiB) Viewed 129 times
I can see it either being an elem_tooltip type or a sister field, but it looks like it needs 3 parameters:
  • Caption ("Ingredient" or "Module" for those tooltips) - maybe this merges with the element's regular tooltip and just uses that?
  • Description:
    • "Possible Inputs:" (furnace)
    • "Fuel" (burner)
    • "Allowed modules:" (module slots)
  • Elements - The list of elements to put in the grid. Maybe it only supports items or otherwise only one type at a time?
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 188
Joined: Wed Jan 18, 2023 3:49 am
Contact:

Re: LuaGuiElement ElemList tooltip type

Post by PennyJim »

Looks like I forgot that EmptySlotInfo already supports caption and text (2 of the 3 components)

Since my use case is empty inventory slots, It makes sense to just add it there and hard-restrict it to items.
User avatar
protocol_1903
Filter Inserter
Filter Inserter
Posts: 539
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: LuaGuielement ElemList tooltip type

Post by protocol_1903 »

+1

If possible, it would be nice to be able to describe elements as a list of ItemPrototypeName and possibly extra info. I would like to use this to reimplement certain UIs from pYanodons, particularly caravans and dig sites where food (fuel) can be inserted, and having a semi-custom or fully custom tooltips would be greatly appreciated to indicate to the player what fuels can be inserted and how effective they are.
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
Post Reply

Return to “Modding interface requests”