Remove/change drain of furnaces and assemblers

Place to get help with not working mods / modding interface.
Post Reply
AntiElitz
Filter Inserter
Filter Inserter
Posts: 446
Joined: Sat Aug 29, 2015 11:37 pm
Contact:

Remove/change drain of furnaces and assemblers

Post by AntiElitz »

i can remove the drain of inserters with

Code: Select all

for key, entity in pairs(data.raw["inserter"]) do
      entity.energy_source.drain = nil
end
but this does not work with furnaces and assemblers. they seem to have a % of the base energy as drain and don't own this poperty.
However i still want to delete/edit this drain. Any idea where I can find it?

Thanks and greetings, AntiElitz

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

Re: Remove/change drain of furnaces and assemblers

Post by aubergine18 »

entity.energy_usage ?
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.

AntiElitz
Filter Inserter
Filter Inserter
Posts: 446
Joined: Sat Aug 29, 2015 11:37 pm
Contact:

Re: Remove/change drain of furnaces and assemblers

Post by AntiElitz »

aubergine18 wrote:entity.energy_usage ?
I want to remove the drain only, not the entire power consumption ;)

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

Re: Remove/change drain of furnaces and assemblers

Post by aubergine18 »

entity.energy_source.emissions ?

I can't see anything else on those protos that would cause energy drain.

BTW, don't some recipes have an energy cost?

Example:

Code: Select all

  {
    type = "recipe",
    name = "gun-turret",
    enabled = false,
    energy_required = 10,  <--------------
    ingredients =
    {
      {"iron-gear-wheel", 10},
      {"copper-plate", 10},
      {"iron-plate", 20}
    },
    result = "gun-turret",
    overload_multiplier = 20
  }
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.

AntiElitz
Filter Inserter
Filter Inserter
Posts: 446
Joined: Sat Aug 29, 2015 11:37 pm
Contact:

Re: Remove/change drain of furnaces and assemblers

Post by AntiElitz »

aubergine18 wrote:entity.energy_source.emissions ?

I can't see anything else on those protos that would cause energy drain.

BTW, don't some recipes have an energy cost?

Example:

Code: Select all

  {
    type = "recipe",
    name = "gun-turret",
    enabled = false,
    energy_required = 10,  <--------------
    ingredients =
    {
      {"iron-gear-wheel", 10},
      {"copper-plate", 10},
      {"iron-plate", 20}
    },
    result = "gun-turret",
    overload_multiplier = 20
  }
entity.energy_source.emissions is a factor for pollution and has nothing to do with energy.
energy_required is the strange name for the crafting time of the reciept.

entity.energy_source.drain is what i am looking for , but this does not exist for assemblers and furnaces.

AntiElitz
Filter Inserter
Filter Inserter
Posts: 446
Joined: Sat Aug 29, 2015 11:37 pm
Contact:

Re: Remove/change drain of furnaces and assemblers

Post by AntiElitz »

i actually found a solution...

while

Code: Select all

entity.energy_source.drain = nil
results in a dynamic drain

Code: Select all

entity.energy_source.drain = 0
will disable the drain

antekj123
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Jan 26, 2019 2:33 am
Contact:

Re: Remove/change drain of furnaces and assemblers

Post by antekj123 »

Can someone help me or just make for me a mod that can set all idle drain to 0?

Post Reply

Return to “Modding help”