Console command for changing pollution dissipation

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
DiegoKomrade
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun May 07, 2017 7:42 pm
Contact:

Console command for changing pollution dissipation

Post 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?

User avatar
Smarty
Global Moderator
Global Moderator
Posts: 816
Joined: Sat Oct 04, 2014 5:00 pm
Contact:

Re: Console command for changing pollution dissipation

Post by Smarty »

moved to gameplay help

SpeedDaemon
Fast Inserter
Fast Inserter
Posts: 124
Joined: Fri May 22, 2015 3:31 pm
Contact:

Re: Console command for changing pollution dissipation

Post 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>)

DiegoKomrade
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sun May 07, 2017 7:42 pm
Contact:

Re: Console command for changing pollution dissipation

Post by DiegoKomrade »

SpeedDaemon, thank you for the detailed answer!

Bizobinator
Fast Inserter
Fast Inserter
Posts: 193
Joined: Fri May 06, 2016 10:35 pm
Contact:

Re: Console command for changing pollution dissipation

Post by Bizobinator »

Is there a way to change these parameters without using the console?

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Console command for changing pollution dissipation

Post 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?
There are 10 types of people: those who get this joke and those who don't.

Vladivarius
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Oct 29, 2022 1:04 pm
Contact:

Re: Console command for changing pollution dissipation

Post 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 :*

Vladivarius
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Oct 29, 2022 1:04 pm
Contact:

Re: Console command for changing pollution dissipation

Post 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
},

Post Reply

Return to “Gameplay Help”