Changing mod values on an existing save

Post all other topics which do not belong to any other category.
Post Reply
SteelSlayer
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Mar 20, 2015 12:58 am
Contact:

Changing mod values on an existing save

Post by SteelSlayer »

EDIT: found solution.

So I have an existing save that I'm playing through at the moment. The mod I'm trying to tweak here is Angel's Refining (for my own personal use). Basically I'm trying to change values for some of the recipes in the .lua config files of the mod to put it in line with the marathon mod, which does not have Angel mod support. However I've noticed that I cannot get the values to update on the existing save. When I generated a new world, the recipes changed how I wanted them to.

Is there some way that you can get these changes to show up on existing saves? I might want to make adjustments as I continue through the game.
Last edited by SteelSlayer on Mon Oct 31, 2016 6:29 am, edited 1 time in total.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1194
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: Changing mod values on an existing save

Post by Mooncat »

Try

Code: Select all

/c game.player.force.reset_recipes()
If you don't like using command, try adding this inside the on_configuration_changed function of any mod:

Code: Select all

for _, force in pairs(game.forces) do
{
    force.reset_recipes()
}
Once it is done, remove it.

SteelSlayer
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Mar 20, 2015 12:58 am
Contact:

Re: Changing mod values on an existing save

Post by SteelSlayer »

Thanks, that works perfectly.

User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1194
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: Changing mod values on an existing save

Post by Mooncat »

You're welcome ;)

Post Reply

Return to “General discussion”