[1.1.12] Mod changes or game updates reset new recipe notifications
[1.1.12] Mod changes or game updates reset new recipe notifications
I've had this issue since I think 1.1.8, but that's when I started playing in the first place. Now, I'm not entirely sure if it's a mod, so if others don't have this issue, I'll go into a deep dive into which mod it could be.
What happens, is any kind of update, whether it's the games update, or a mod update. Also happens when you get a new mod for your game. Pretty much what seems to be 80% of any items in the build interface will become undiscovered. So you have to do the usual to get rid of it - hover mouse over. This only happens once when logging back into my save. After, it will not happen once I start the game again. But, once an update happens, the process occurs again. Has anyone else run into this issue?
What happens, is any kind of update, whether it's the games update, or a mod update. Also happens when you get a new mod for your game. Pretty much what seems to be 80% of any items in the build interface will become undiscovered. So you have to do the usual to get rid of it - hover mouse over. This only happens once when logging back into my save. After, it will not happen once I start the game again. But, once an update happens, the process occurs again. Has anyone else run into this issue?
Last edited by Snowfious on Sun Jan 17, 2021 7:57 pm, edited 2 times in total.
Re: [1.1.12] Every update causes map items to be undiscovered
Sounds similar to 94015
Re: [1.1.12] Every update causes map items to be undiscovered
Ah yeah, pretty similar thing. Like I said, any kind of updates to mods or the game, or adding a new mod causes this issue. It could very be a mod, I'll investigate.
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
Post your log file, see 3638.
Re: [1.1.12] Every update causes map items to be undiscovered
If it makes it easier in your investigations, the other thread I linked above has a savegame attached. Might be helpful to cross-reference mods. Should help narrow down the list of what might be causing this.
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
Bio Idustries does this in on_configuration_changed:
Code: Select all
-- enable researched recipes
for i, force in pairs(game.forces) do
for _, tech in pairs(force.technologies) do
if tech.researched then
for _, effect in pairs(tech.effects) do
if effect.type == "unlock-recipe" then
force.recipes[effect.recipe].enabled = false
force.recipes[effect.recipe].enabled = true
end
end
end
end
end
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
Great, looks like Snowfious already reported this to the mod author(s).
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
Ok, since it is the fault of the mod, I'm moving this to not a bug.
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
Thanks, removed this for the next release. I think it didn't matter for 0.18/1.0, but with newly available recipes being marked in 1.1, I agree this code doesn't do much good. There was some reason why I put this into on_configuration_changed instead of using a migration script (can't recall what exactly), but obviously it has some unexpected side effects.posila wrote: ↑Mon Jan 18, 2021 3:21 pm Bio Idustries does this in on_configuration_changed:Code: Select all
-- enable researched recipes for i, force in pairs(game.forces) do for _, tech in pairs(force.technologies) do if tech.researched then for _, effect in pairs(tech.effects) do if effect.type == "unlock-recipe" then force.recipes[effect.recipe].enabled = false force.recipes[effect.recipe].enabled = true end end end end end
Just for clarification:
There's work on a major overhaul of the mod going on, which involves a complete rework of the tech tree (in many cases the unlocks for the existing recipes will be moved to a new tech). What is the preferred way to handle this? Should we just ignore that recipes unlocked with an old version of the mod could still be available although their new unlock tech hasn't been researched yet?https://lua-api.factorio.com/latest/Migrations.html wrote: Lua migrations allow altering the loaded game state. Typically this is done when recipes or technologies have changed. The game resets recipes/ technologies any time mods, prototypes, or startup settings change, so this does not need to be done in migration scripts.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
You can use force.reset_technology_effects()
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
Thanks, I'll use that!
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
Yea, the main advantage is, that it is basically doing the same, but the internal game code makes sure that the notifications are not created for everything.
Re: [1.1.12] Mod changes or game updates reset new recipe notifications
Thanks for the info! This really wasn't obvious to me -- wouldn't it be a good idea to add this to the LuaAPI description?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!