Page 1 of 1

[2.0.73] Reading elem_tooltip for virtual signal returns invalid table

Posted: Sat Feb 07, 2026 5:46 pm
by Shemp
Sorry, this is a minor annoyance and I wasn't sure how to summarise it in the title. To reproduce:

Start any Factorio game world.

Run these commands:

Code: Select all

/c x = game.player.gui.center.add{type = "frame"}; x.style.height = 100; x.style.width = 100
/c x.elem_tooltip = {type = "signal", name = "signal-A", signal_type = "virtual"}
This creates a GUI element with an element tooltip corresponding to a virtual signal.

When you try to read the elem_tooltip, perhaps to make a copy of it elsewhere, you get this:

Code: Select all

/c game.print(serpent.block(x.elem_tooltip))
elem-tooltip-read.png
elem-tooltip-read.png (133.82 KiB) Viewed 205 times

Code: Select all

{
	name = "signal-A",
	signal_type = "virtual",
	type = "virtual-signal",
}
"virtual-signal" (NOT "signal") is not a valid ElemType for creating an elem_tooltip.

EDIT: Oh, just to be really clear, I expect this output:

Code: Select all

{
	name = "signal-A",
	signal_type = "virtual",
	type = "signal",
}

Re: [2.0.73] Reading elem_tooltip for virtual signal returns invalid table

Posted: Sat Feb 07, 2026 6:51 pm
by boskid
Thanks for the report. Issue is now fixed for 2.1.

As a workaround when reading ElemID if you get type="virtual-signal" (incorrect value), replace it with type="signal" (correct value).