[Rseding][0.15.22] Mods (GUI) not loading on existing saves only
Posted: Thu Jun 22, 2017 2:34 am
I started a game on 0.15.21 a couple of days ago, and now when loading the game on 0.15.22 one of my mods is mysteriously not even loading. The mod in question is TimeTools.
I can consistently reproduce this with *only* time TimeTools mod running.
1. Create a new game with only TimeTools loaded.
2. Notice that the buttons show up in the upper-left of the screen
3. Save game, exit to main menu
4. Load the game you just saved, and the mod doesn't load (nothing shows up in the upper-left).
This only happens on 0.15.22 - I tested this same set of steps on 0.15.21 and I do not see the same error. I can't find any lines in the factorio-current.log that would point to why things are failing to call initialize
I'm trying to figure out if this is a mod in the failing through debug, but I didn't see anything in the changelog of 0.15.22 that should break this individual mod from loading :/
If anything, my guess is that something related to viewtopic.php?t=50022 is interfering here, but I haven't figured it out for sure yet.
The mod is clearly still running in the background - when I added a debug print statement to the on_tick function, the game printed a line for every game tick (I quickly turned this off, of course).
Through a bunch of debug print statements, I'm noticing that it *seems* to be having trouble with this line:
(in control.lua, line 333ish in build_gui)
I have a debug print statement before and after it, and in new games the statements print fine - but when I load the game, it prints the line I have before it, and then goes silent afterwards.
I have tried moving the element from the top to center but still the same issue - loads fine on a new game, and doesn't show up in subsequent loads of the same game.
EDIT:
Further exploration has led me to running this command to turn the GUI element back on:
Still not sure what in the flow causes it to be off (I never see the interface.off() function get called) in 15.22 that's different from 15.21, but hopefully noteworthy.\
EDIT 2:
I found another interaction that causes buttons to disappear from the top flow. This seems to be a more generic problem with GUI elements getting consumed on loads...
I can consistently reproduce this with *only* time TimeTools mod running.
1. Create a new game with only TimeTools loaded.
2. Notice that the buttons show up in the upper-left of the screen
3. Save game, exit to main menu
4. Load the game you just saved, and the mod doesn't load (nothing shows up in the upper-left).
This only happens on 0.15.22 - I tested this same set of steps on 0.15.21 and I do not see the same error. I can't find any lines in the factorio-current.log that would point to why things are failing to call initialize
I'm trying to figure out if this is a mod in the failing through debug, but I didn't see anything in the changelog of 0.15.22 that should break this individual mod from loading :/
If anything, my guess is that something related to viewtopic.php?t=50022 is interfering here, but I haven't figured it out for sure yet.
The mod is clearly still running in the background - when I added a debug print statement to the on_tick function, the game printed a line for every game tick (I quickly turned this off, of course).
Through a bunch of debug print statements, I'm noticing that it *seems* to be having trouble with this line:
Code: Select all
local gui1 = player.gui.top.timetools_flow
I have a debug print statement before and after it, and in new games the statements print fine - but when I load the game, it prints the line I have before it, and then goes silent afterwards.
I have tried moving the element from the top to center but still the same issue - loads fine on a new game, and doesn't show up in subsequent loads of the same game.
EDIT:
Further exploration has led me to running this command to turn the GUI element back on:
Code: Select all
/c remote.call( "timetools", "on" )
EDIT 2:
I found another interaction that causes buttons to disappear from the top flow. This seems to be a more generic problem with GUI elements getting consumed on loads...