During my latest playthough I've added and subsequently removed due to conflicts a mod which as part of its setup diables a number of techs and changes the prerequisites of subsequent techs in the tree.
Following removal of the mod I ran into the issue of techs completely locked out as the prequsites had been changed then deleted.
The author confirmed that "removing a mod doesn't reset the changes it does to recipes, researched and entities" and that as far as they are aware, "there is no native way for a mod to undo its changes upon its removal." and that the only way to undo the changes would be via console commands.
This would be less than ideal given that using such commands disables achievements and the suggested commands don't appear to work anyway.
Questions then, is there in fact a way to "reset" the tech tree without console commands short of starting a new game and if not what console commands should I be using to reenable techs and set the correct pre-requisites?
Thank you for any assistance you can provide.
Repairing tech tree after mod removal?
Re: Repairing tech tree after mod removal?
You can reset all technology effects with https://lua-api.factorio.com/latest/cla ... gy_effects. Marking all prerequisites of all researched technologies as also researched is also possible.
Also, if achievements are a concern, every console command is basically the same as runnng the same command inside a mod, which can be easily created.
Here's a command to research all prerequisites of researched techs, and then reapply all effects. Haven't tried it in game, but it should work
Also, if achievements are a concern, every console command is basically the same as runnng the same command inside a mod, which can be easily created.
Here's a command to research all prerequisites of researched techs, and then reapply all effects. Haven't tried it in game, but it should work
Code: Select all
/c for _, force in pairs(game.forces) do
for _, tech in pairs(force.technologies) do
if tech.enabled then
tech.research_recursive()
end
end
force.reset_technology_effects()
end