Easy Signal Display


Make the display panel display signal values in real time, useful for debugging or monitoring circuits Show ALL the signals at once! Good performance even at hundreds of displays thanks to multiple optimizations Supports fixed point display via /1000f2 in text box

Utilities
a day ago
2.0 - 2.1
109
Circuit network
Owner:
Hexcoder
Source:
https://github.com/rbnelr/hexcoder-si...
Homepage:
N/A
License:
MIT
Created:
2 months ago
Latest Version:
0.1.1 (a day ago)
Factorio version:
2.0 - 2.1
Downloaded by:
109 users

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 signals in the hovered GUI (vanilla circuit controlled entities also react 1 tick later)
  • Optimized via hidden change detection combinator (check for change every tick, only update text on change)
  • WIP: Total rewrite of the updating logic, optimized to only update displays near players, unreleased due to possible bugs (Let me know if you need better performance)

How to use

Simply connect a display panel to a circuit, then put a {} in the message and it should update the text with the signal count depending on 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 integer values by default
I currently choose not to display large number as 1.0k or 5M like the game does, as I find they round too aggressively, but this could be implemented

Supports format strings for decimals (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

  • If you have suggestions, issues or concerns with performance, let me know in Discussion!

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.
That is also why the format string is outside the {}, as anything outside the {} is persisted and anything inside is constantly overridden by the mod.
Sadly, in some edge cases, a display could still get stuck not updating, but this is always fixed by opening the GUI once.

Sadly in alt mode we are limited in how much text will be displayed, so with too many signals it might get cut off.
On top of that there is a 500 character limit for the message text for display and for edits by the player, but not by script
which visually can cause a rich text icon to be cut off and be revealed like { [iron] 1000 [copper] 900 <many more> [item=ex
It's possible to prevent by cutting off the whole icon, but should rarely be visible if you mainly use it for alt mode

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