[Solved] enemy_evolution question

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

[Solved] enemy_evolution question

Post by TheSAguy »

So it seems I can't change the evolution affecting factors of an existing game, is that correct?

Changing:
data.raw["map-settings"]["map-settings"]["enemy_evolution"].time_factor = x
data.raw["map-settings"]["map-settings"]["enemy_evolution"].pollution_factor = x
data.raw["map-settings"]["map-settings"]["enemy_evolution"].destroy_factor = x

Does not have an affect on a save, but only a new game. Is that correct?
Thanks.
Last edited by TheSAguy on Thu May 26, 2016 8:16 pm, edited 1 time in total.
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: enemy_evolution question

Post by prg »

Those values can be assigned at run time via game.map_settings.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: enemy_evolution question

Post by TheSAguy »

So changing those values in a data-final-fixes.lua file:

Code: Select all

data.raw["map-settings"]["map-settings"]["enemy_evolution"].pollution_factor = 0.00003

won't have an effect, but running the below in the console command line will?

Code: Select all

/c game.map_settings.enemy_evolution.pollution_factor = 0.00003
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: enemy_evolution question

Post by prg »

I'd assume the values from the prototype would only be used for a new game. Maybe you could simply try it.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: enemy_evolution question

Post by TheSAguy »

TheSAguy wrote:So changing those values in a data-final-fixes.lua file:

Code: Select all

data.raw["map-settings"]["map-settings"]["enemy_evolution"].pollution_factor = 0.00003

won't have an effect, but running the below in the console command line will?

Code: Select all

/c game.map_settings.enemy_evolution.pollution_factor = 0.00003
I just wanted to say that the above worked.

Command that would display/print the value of pollution_factor:

Code: Select all

/c game.local_player.print(game.map_settings.enemy_evolution.pollution_factor)
Post Reply

Return to “Modding help”