Display Combinator: Add rich-text tag for displaying Signal (item+count, and not just a static image of item) possible?

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

User avatar
Fabriken AGI
Inserter
Inserter
Posts: 32
Joined: Tue Nov 12, 2024 8:39 pm
Contact:

Display Combinator: Add rich-text tag for displaying Signal (item+count, and not just a static image of item) possible?

Post by Fabriken AGI »

Hi!
Not a mod developer here (yet). Although, im a professional developer by day.

I did some digging this afternoon in the API docs, and im trying to figure out if I can modify the general "rich text renderer" in some way, or if that one is statically compiled from .cpp into binary form?

Seen some mod implementations of counting stuff, but they seem to do some custom rendering and not take advantage of the existing "Signal renderer" that is used almost everywhere else that Signals are used https://lua-api.factorio.com/latest/con ... ignal.html

I have 2.5 wishes that would make debugging advanced circuit abominations easier, and make circuit networks more accessible to beginners
- Display panel: be able to show an actual Signal https://lua-api.factorio.com/latest/con ... ignal.html, and not just a static item-image.
(Both for a specific item, and maybe also in the "dynamic" case with Anything)
- Rich text rendering in general: Would be awesome to add a general "signal tag" like for example [signal=iron-plate] that displays a Signal (item+count) of iron plates, if the rich text field belongs to an entity with circuit network (like every LuaCombinatorControlBehavior-thing). Should be possible for logistic networks too, since they both use array[Signal] internally?

I get that it is probably not possible right now as this requires re-rendering of the rich text as a whole.
If implemented: Maybe for performance reasons it should only trigger re-rendering when the Signal's "human readable text", like "12k" has changed? then it should be less renderers the "higher" the network signal values, in practice. => good scalability when the factory grows (as it must)

Please correct me if my observations are totally wrong. :)
Last edited by Fabriken AGI on Tue Feb 04, 2025 11:34 am, edited 1 time in total.
Omnipotent Intergalactic Entity :: Fabriken AGI <> consume :: adapt :: evolve :: expand
🏭🚀✨🎵 } Factorio inspired music videos :: 🎵 Endless Hunger Machine 🤖 :: 🎵 Colors in Zero-G 🦊 :: 🎵 Fuel the Stars ✨
--
TikTok: @fabriken.agi
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: Display Combinator: Add rich-text tag for displaying Signal (and not just a static image) possible?

Post by Muche »

Fabriken AGI wrote: Fri Jan 31, 2025 4:06 pm - Display panel: be able to show an actual Signal https://lua-api.factorio.com/latest/con ... ignal.html, and not just a static item-image.
(Both for a specific item, and maybe also in the "dynamic" case with Anything)
I believe you're talking about showing the value of an signal, not the signal itself, right?
As showing the icon of an signal is possible even now with "icon:Anything, condition:Anything comparator value".

In which case this would fall under Rich text rendering as well.
User avatar
Fabriken AGI
Inserter
Inserter
Posts: 32
Joined: Tue Nov 12, 2024 8:39 pm
Contact:

Re: Display Combinator: Add rich-text tag for displaying Signal (and not just a static image) possible?

Post by Fabriken AGI »

Muche wrote: Fri Jan 31, 2025 4:51 pm
Fabriken AGI wrote: Fri Jan 31, 2025 4:06 pm - Display panel: be able to show an actual Signal https://lua-api.factorio.com/latest/con ... ignal.html, and not just a static item-image.
(Both for a specific item, and maybe also in the "dynamic" case with Anything)
I believe you're talking about showing the value of an signal, not the signal itself, right?
As showing the icon of an signal is possible even now with "icon:Anything, condition:Anything comparator value".

In which case this would fall under Rich text rendering as well.
yes exactly, not just the icon. These are the rich text tags that are in the game right now: https://wiki.factorio.com/rich_text
i suspect it will require some, but not too annoying, rewrites of rich text rendering.
On the other hand, the "armor=player" tag seems to work in MP, so some kind of dynamic updates seems to be possible

But since I dont work at wube, nor have access to the source, its just guessing from my side! :)
Omnipotent Intergalactic Entity :: Fabriken AGI <> consume :: adapt :: evolve :: expand
🏭🚀✨🎵 } Factorio inspired music videos :: 🎵 Endless Hunger Machine 🤖 :: 🎵 Colors in Zero-G 🦊 :: 🎵 Fuel the Stars ✨
--
TikTok: @fabriken.agi
Post Reply

Return to “Ideas and Suggestions”