Page 1 of 1

[2.1.20] Combinator GUI does not show a description changed by script

Posted: Tue Sep 22, 2026 4:30 pm
by _kch
2.1.20 (build 87512, mac-arm64, steam, space-age)

What did you do?

Opened a decider, waited a second, then wrote LuaEntity::combinator_description on it while its own GUI was still open.

What happened?

The description field keeps showing the old text. Close and reopen and the new text is there, so the write worked.

What did you expect to happen instead?

The field to show what the entity holds. Writing behavior.parameters on the same entity in the same tick repaints the rows right away. Only the description is left behind.

Repro

Code: Select all

script.on_event(defines.events.on_gui_opened, function(event)
  local entity = event.entity
  if entity and entity.type == "decider-combinator" then
    storage.at, storage.entity = game.tick + 60, entity
  end
end)

script.on_event(defines.events.on_tick, function()
  if not storage.at or game.tick < storage.at then return end
  storage.at = nil

  local entity = storage.entity
  if not (entity and entity.valid) then return end

  entity.combinator_description = "set at tick " .. game.tick
  entity.get_or_create_control_behavior().parameters = {
    conditions = {
      { first_signal = { type = "virtual", name = "signal-A" },
        comparator = "<", constant = game.tick % 1000 },
    },
    outputs = { { signal = { type = "virtual", name = "signal-A" } } },
  }
end)
Open a decider and leave it open. A second later the condition row changes in front of you and the description does not. Close and reopen and the description is there.

The wait is the point. Writing from on_gui_opened proves nothing, since the window may read the entity after the handler runs.

Why

combinator_description appears twice in the runtime API: the LuaEntity property, and defines.input_action.set_combinator_description. The GUI follows the input action, which a mod cannot raise.

Same gap, closed three times already:
  • 2.0.29 arithmetic combinator circuit network selection (124115)
  • 2.1.7 loader filter mode (133514)
  • 2.1.20 platform hub settings (136163)
Reassigning player.opened is the only workaround, and it closes and reopens the window, which throws away anything a relative GUI was holding.

Re: [2.1.20] Combinator GUI does not show a description changed by script

Posted: Thu Sep 24, 2026 8:17 am
by boskid
Thanks for the report. Issue is now fixed for 2.1.21.