Easy to use multi/single signal display, useful for debugging or monitoring circuits.
- Updates every tick with great performance (0.16ms even with 100 visible displays, if only a few signals change every tick)
- Signals are displayed with a 1 tick delay compared to the game GUIs (like a lamp with enable condition!)
- Optimized via hidden change detection combinator
- Coming soon: Now optimized to only update displays near players for alt mode
How to use
Simply connect to a circuit, put a {} in a message and it will fill with the signal count specified by the message icon
Special signals:
- Everything - Sum all signals
- Each - Show all signals as a list with icons and counts
- Anything - Shows first signal
Format strings
Shows the integer values by default
I currently choose not to display large number as 1.0k or 5M like the game does, but this could be implemented
Supports format strings for fixed point math like /1000f2 anywhere in the message, which will transform 123456 into 123.46
Pro tip: put the format string in a second line so the game automatically hides it in alt-mode like:
Rocket Weights: {}
/1000f20
Notes
For convenience, automatically sets text="{}" and condition to any!=0 if any of the 3 special signals are selected first
Stops updating while the GUI is open to make editing text easier
The reason {} are included in the visible message is to allow blueprinting, copy settings, undo/redo, add/remove wires despite them being hard or impossible to correctly detect in the API.
Sadly, in some edge cases, a display could still get stuck not updating, but this is always fixed by clicking on it.
Still, I added a slow polling that detects changes after a few seconds, this is optimized to support hundreds of displays with little overhead, and can be adjusted or disabled.
On top of the line length limit in alt mode, there is a 500 character limit for the message text for the player,
which visually can cause a rich text icon to be cut off and appear like { [iron] 1000 [copper] 900 <many more> [item=ex
It's possible to prevent, but should rarely be visible
Luckily the lua side appears to be unaffected by the 500 character limit, if it was, the } could be cut off and the display could break
If you find situations in which displays stop updating due to this, please report
Inspired by Signal-Display by AckEmma