Page 1 of 1

[2.0.28] UI buttons missing in a vertical flow

Posted: Sun Dec 29, 2024 11:49 pm
by Narc
This happened in a modded save transferred from Factorio 1.1 and was reported as a bug in YARM, but debugging with FMTK suggests everything should be fine. Details follow:

What did you do:
As far as I know, the player only loaded an earlier version of the attached save in Factorio 2.0 (without Space Age)

What happened:
The player reports, and my testing confirms, that some of the UI buttons created by YARM are unavailable. The GUI structure lives inside

Code: Select all

require("mod-gui").get_frame_flow(game.player)
and contains one frame named `YARM_root`containing two elements:
  • one flow named `buttons` containing 6 button elements, and
  • one table named `sites` containing a dynamic number of cells (expected to be 0 in the given save)
The 6 button elements are confirmed to exist by using the debugger to inspect the `buttons` flow's children, but only 3 buttons are visible. The buttons are:
  • YARM_filter_none: not visible
  • YARM_filter_warnings: not visible
  • YARM_filter_all: not visible
  • YARM_toggle_bg: visible
  • YARM_toggle_surfacesplit: visible
  • YARM_toggle_lite: visible
Destroying and recreating the UI from scratch (by destroying YARM_root, which can be done with `remote.call("YARM", "reset_ui", game.player.index)`) brings back the hidden buttons.

What did you expect to happen:
The buttons flow is just a vertical flow and it has 6 children, all 6 children should be visible.

Does it happen always?
The issue seems to reproduce every time the given save is loaded, unless and until the aforementioned remote call is used to reset the UI.

Re: [2.0.28] UI buttons missing in a vertical flow

Posted: Mon Dec 30, 2024 12:25 am
by Narc
Further information: it seems the invisible buttons have `visible: false`, but I never had any code to set button visibility in YARM, so this must be a migration artifact

Re: [2.0.28] UI buttons missing in a vertical flow

Posted: Thu Jan 02, 2025 9:00 pm
by Rseding91
Can you provide the save file from 1.1 that breaks when loaded in 2.0? I suspect one of the mod(s) being used has set the widget(s) to visible=false But without being able to run it with the debugger attached I can only guess.

Re: [2.0.28] UI buttons missing in a vertical flow

Posted: Thu Jan 02, 2025 9:22 pm
by Narc
The original reporter gave me this drive link and said to look at the `Pyanodon` save; I would imagine one of the other saves would be relevant as well, maybe this other one I attached here, but I can't say for sure. Maybe the reporter will provide further information, I've left them a note to check in.

Re: [2.0.28] UI buttons missing in a vertical flow

Posted: Sun Jan 05, 2025 8:32 pm
by Narc
Ah, the mystery is solved.

Original reporter came back and said "well, I also got a copy of Factorio 1.1 and it turns out removing all the mods except Pyanodon and YARM the same thing happens", so I was able to discover that GUI_Unifyer hides the YARM GUI to replace it with its own -- and when the mod is removed (e.g., because there is no Factorio 2.0 version), the YARM buttons remain hidden.

Not a bug, file this away under operator error. Thanks for your time ❤️