[2.0.28] UI buttons missing in a vertical flow

Bugs that are actually features.
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 284
Joined: Mon Feb 11, 2013 7:25 am
Contact:

[2.0.28] UI buttons missing in a vertical flow

Post 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.
Attachments
factorio-current.log
(5.32 MiB) Downloaded 16 times
Pyanodon.zip
(86.77 MiB) Downloaded 18 times
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 284
Joined: Mon Feb 11, 2013 7:25 am
Contact:

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

Post 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
Rseding91
Factorio Staff
Factorio Staff
Posts: 15232
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 284
Joined: Mon Feb 11, 2013 7:25 am
Contact:

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

Post 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.
Attachments
(Factorio 1.1) Pyanodon 4 stage 413 hrs.zip
(62.78 MiB) Downloaded 16 times
User avatar
Narc
Filter Inserter
Filter Inserter
Posts: 284
Joined: Mon Feb 11, 2013 7:25 am
Contact:

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

Post 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 ❤️
Post Reply

Return to “Not a bug”