Page 1 of 1

Console command for changing pollution dissipation

Posted: Sun May 07, 2017 7:47 pm
by DiegoKomrade
I mistakenly set parameter of pollution dissipation to maximum. I already played 10+ hours and don't want start new game. Is there a console command to change this?

Re: Console command for changing pollution dissipation

Posted: Sun May 07, 2017 7:48 pm
by Smarty
moved to gameplay help

Re: Console command for changing pollution dissipation

Posted: Mon May 08, 2017 6:39 pm
by SpeedDaemon
Look in your Factorio folder in data/base/prototypes/map-settings.lua. Almost any value in here can be changed via the console in-game.

The command will follow the hierarchy of the file. There's a "pollution" section, which a bunch of values in it, but I'm not sure what exactly you'd need to change. Maybe someone else can chime in.

I can't remember the exact syntax, but it's something like
"/c game.map_settings.pollution.<name from file> = <new value>

You should be able to test that you have the right variable by running
/c game.player.print(game.map_settings.pollution.<name from file>)

Re: Console command for changing pollution dissipation

Posted: Thu May 11, 2017 12:02 am
by DiegoKomrade
SpeedDaemon, thank you for the detailed answer!

Re: Console command for changing pollution dissipation

Posted: Wed Apr 04, 2018 12:43 pm
by Bizobinator
Is there a way to change these parameters without using the console?

Re: Console command for changing pollution dissipation

Posted: Wed Apr 04, 2018 5:30 pm
by Jap2.0
Bizobinator wrote:Is there a way to change these parameters without using the console?
I don't know, would directly editing map-settings.lua work?

Re: Console command for changing pollution dissipation

Posted: Sat Oct 29, 2022 1:07 pm
by Vladivarius
/c game.map_settings.pollution.diffusion_ratio = 0.02

Also, you can reduce this:
/c game.map_settings.pollution.min_to_diffuse=15
(explanation from game files for this setting is -- this much PUs must be on the chunk to start diffusing)


Enjoy :*

Re: Console command for changing pollution dissipation

Posted: Sat Oct 29, 2022 1:09 pm
by Vladivarius
Here's all the settings for polution:
pollution=
{
enabled=true,
-- these are values for 60 ticks (1 simulated second)
--
-- amount that is diffused to neighboring chunk
-- (possibly repeated for other directions as well)
diffusion_ratio=0.02,
-- this much PUs must be on the chunk to start diffusing
min_to_diffuse=15,
-- constant modifier a percentage of 1 - the pollution eaten by a chunks tiles
ageing=1,
-- anything bigger than this is visualised as this value
expected_max_per_chunk=150,
-- anything lower than this (but > 0) is visualised as this value
min_to_show_per_chunk=50,
min_pollution_to_damage_trees = 60,
pollution_with_max_forest_damage = 150,
pollution_per_tree_damage = 50,
pollution_restored_per_tree_damage = 10,
max_pollution_to_restore_trees = 20,
enemy_attack_pollution_consumption_modifier = 1
},