Changing pollution absorption of existing terrain tiles

Place to get help with not working mods / modding interface.
yesimon
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Sep 05, 2016 8:50 pm
Contact:

Changing pollution absorption of existing terrain tiles

Post by yesimon »

I tried tweaking something basic such as:

Code: Select all

data.raw["tile"]["grass"].emissions_per_tick = -1000.0
But the debug show pollution values seems to indicate that it's still absorbing -0.008 (third value in column)
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 392
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Changing pollution absorption of existing terrain tiles

Post by LuziferSenpai »

There are more than 1 tile ^^
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
yesimon
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Sep 05, 2016 8:50 pm
Contact:

Re: Changing pollution absorption of existing terrain tiles

Post by yesimon »

I know
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Changing pollution absorption of existing terrain tiles

Post by aubergine18 »

If you can make a very small mod that illustrates the issue, upload to bug report forum so the devs can investigate.

Note: Is it possible that some other mod is changing the value after your mod?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
yesimon
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Sep 05, 2016 8:50 pm
Contact:

Re: Changing pollution absorption of existing terrain tiles

Post by yesimon »

I've attached a simple mod that changes emissions_on_tick to -1000.0 on all tiles.
Attachments
depollute_1.0.0.zip
(835 Bytes) Downloaded 127 times
Rseding91
Factorio Staff
Factorio Staff
Posts: 15642
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Changing pollution absorption of existing terrain tiles

Post by Rseding91 »

emissions_per_tick is not a valid property for tiles... Did you even look at how the base game does it? data\base\prototypes\tile\tiles.lua
If you want to get ahold of me I'm almost always on Discord.
yesimon
Burner Inserter
Burner Inserter
Posts: 9
Joined: Mon Sep 05, 2016 8:50 pm
Contact:

Re: Changing pollution absorption of existing terrain tiles

Post by yesimon »

Thanks, it looks like setting the ageing property does what I want. I only checked the Lua API reference and the page for TilePrototype is very misleading http://lua-api.factorio.com/0.14.1/LuaT ... otype.html
Rseding91
Factorio Staff
Factorio Staff
Posts: 15642
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Changing pollution absorption of existing terrain tiles

Post by Rseding91 »

The API docs page is about the runtime Lua API. The values it can provide are often more complex/processed then the raw prototype properties.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding help”