Some help with data.raw

Place to get help with not working mods / modding interface.
Post Reply
User avatar
dtoxic
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Fri Apr 01, 2016 8:40 pm
Contact:

Some help with data.raw

Post by dtoxic »

Hi all can some one help me with this
I am trying to change emission [pollution] on stone furnace

right now i am using this

data.raw["furnace"]["stone-furnace"].crafting_speed = 0.6
data.raw["furnace"]["stone-furnace"].energy_usage = "110kW"
data.raw["furnace"]["stone-furnace"].emissions_per_minute = 3.5

while the speed and energy usage works, the emission_per_minute wont work.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Some help with data.raw

Post by DaveMcW »

https://wiki.factorio.com/Prototype/Ent ... per_second

You can't change furnace emissions directly, they are based on power consumption.

Bilka
Factorio Staff
Factorio Staff
Posts: 3129
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Some help with data.raw

Post by Bilka »

DaveMcW wrote:
Thu Sep 12, 2019 4:49 pm
https://wiki.factorio.com/Prototype/Ent ... per_second

You can't change furnace emissions directly, they are based on power consumption.
Yes you can, change it on the energy source: https://wiki.factorio.com/Types/EnergyS ... per_minute

data.raw["furnace"]["stone-furnace"].energy_source.emissions_per_minute = 3.5
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
dtoxic
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Fri Apr 01, 2016 8:40 pm
Contact:

Re: Some help with data.raw

Post by dtoxic »

Bilka wrote:
Thu Sep 12, 2019 5:00 pm
DaveMcW wrote:
Thu Sep 12, 2019 4:49 pm
https://wiki.factorio.com/Prototype/Ent ... per_second

You can't change furnace emissions directly, they are based on power consumption.
Yes you can, change it on the energy source: https://wiki.factorio.com/Types/EnergyS ... per_minute

data.raw["furnace"]["stone-furnace"].energy_source.emissions_per_minute = 3.5
sooo i should use....? now i am confused

User avatar
mat1k
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sat Dec 22, 2018 8:48 am
Contact:

Re: Some help with data.raw

Post by mat1k »

dtoxic wrote:
Thu Sep 12, 2019 5:07 pm
Bilka wrote:
Thu Sep 12, 2019 5:00 pm
DaveMcW wrote:
Thu Sep 12, 2019 4:49 pm
https://wiki.factorio.com/Prototype/Ent ... per_second

You can't change furnace emissions directly, they are based on power consumption.

Yes you can, change it on the energy source: https://wiki.factorio.com/Types/EnergyS ... per_minute

data.raw["furnace"]["stone-furnace"].energy_source.emissions_per_minute = 3.5
sooo i should use....? now i am confused
What bilka put i correct. You need to change it inside the energy source table, not the furnace directly.

User avatar
dtoxic
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Fri Apr 01, 2016 8:40 pm
Contact:

Re: Some help with data.raw

Post by dtoxic »

mat1k wrote:
Thu Sep 12, 2019 6:18 pm
dtoxic wrote:
Thu Sep 12, 2019 5:07 pm
Bilka wrote:
Thu Sep 12, 2019 5:00 pm
DaveMcW wrote:
Thu Sep 12, 2019 4:49 pm
https://wiki.factorio.com/Prototype/Ent ... per_second

You can't change furnace emissions directly, they are based on power consumption.

Yes you can, change it on the energy source: https://wiki.factorio.com/Types/EnergyS ... per_minute

data.raw["furnace"]["stone-furnace"].energy_source.emissions_per_minute = 3.5
sooo i should use....? now i am confused
What bilka put i correct. You need to change it inside the energy source table, not the furnace directly.
so instead using Emission per minute i should use "energy_source" correct? if so...if it put say 3.5 would that increase pollution by that much per minute or would it add to the already defined "2" in the demo-entities.lua

like i said in the op the first two entries work and are displayed in the tool tip, i just cant figure out what to do on the third one

P.S i forgot to mention i am doing this thru a mod not editing files directly

User avatar
mat1k
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Sat Dec 22, 2018 8:48 am
Contact:

Re: Some help with data.raw

Post by mat1k »

This line: data.raw["furnace"]["stone-furnace"].energy_source.emissions_per_minute = 3.5

Put in the mod will change the emission rate to 3.5 per second. It overrides the Original setting.

User avatar
dtoxic
Long Handed Inserter
Long Handed Inserter
Posts: 82
Joined: Fri Apr 01, 2016 8:40 pm
Contact:

Re: Some help with data.raw

Post by dtoxic »

mat1k wrote:
Thu Sep 12, 2019 8:37 pm
This line: data.raw["furnace"]["stone-furnace"].energy_source.emissions_per_minute = 3.5

Put in the mod will change the emission rate to 3.5 per second. It overrides the Original setting.
Thx man appreciate it!

Post Reply

Return to “Modding help”