How does 'emission' (pollution) and speed are calculated?

Place to get help with not working mods / modding interface.
Post Reply
Murlocking
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Thu Mar 10, 2016 11:41 pm
Contact:

How does 'emission' (pollution) and speed are calculated?

Post by Murlocking »

I've been working on reviving a mod and I added a pollution emission to the entity but I don't seem to understand fully how some of the values are calculated.

How do you calculate the emission value?

I'm currently have these values in the .lua file.

Code: Select all

effectivity = 0.70,
      emissions = 0.0265,
      fuel_inventory_size = 2,
      smoke =
      {
        {
          name = "smoke",
          deviation = {0.25, 0.25},
          frequency = 50,
          position = {0, 1.5},
          slow_down_factor = 0.9,
          starting_frame = 3,
          starting_frame_deviation = 5,
          starting_frame_speed = 0,
          starting_frame_speed_deviation = 5
        }
      }
    },
    consumption = "1000kW",
    friction = 0.007,
    ........
    ........
    weight = 20000,


Also, on a different subject... If you also know how to calculate a vehicle max speed and acceleration speed, I'd love the get more clarification.

I think friction, effectivity, weight and consumption can change a vehicle speed but I don't know how to properly calculate it.


EDIT: Ok so i'm using 'emissions' and just found in the modding page this "prototypes" called 'emissions_per_tick'
I think that's what I was looking for, gonna try and comment again later.

I still have no clues how to calculate speed properly but I got it somewhere I like now.
It does consume a lot of fuel though and when I lower the consumption I decrease the speed too much :(

What does 'weight' do?
Is it used to calculate collision damage?

Murlocking
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Thu Mar 10, 2016 11:41 pm
Contact:

Re: How does 'emission' (pollution) and speed are calculated?

Post by Murlocking »

Edited main post to add more information ...

Post Reply

Return to “Modding help”