Nuclear flag for burner energy_source

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Nuclear flag for burner energy_source

Post by darkfrei »

Hi all!

Can you add some flag to burner energy_source?

Code: Select all

energy_source = 
{ type = "burner",
  fuel_category = "chemical",
  effectivity = 1 ,
  fuel_inventory_size = 1,
  flag = {"nuclear"}
}
So the maximum output energy is the same, but the fuel will be spent independently from consumption.

Or separatly:

Code: Select all

energy_source = 
{ type = "nuclear",
  fuel_category = "chemical",
  effectivity = 1 ,
  fuel_inventory_size = 1
}

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Nuclear flag for burner energy_source

Post by bobingabout »

I added a flag to the reactor, "scale_energy_usage" that causes it to behave like a normal energy consuming entity when set to true. This was part of the edit to make it accept a dynamic energy source tag (so you can have an electric powered reactor for example)

Perhaps the same tag could be added to the burner energy source? is that something you'd would want?
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Nuclear flag for burner energy_source

Post by darkfrei »

bobingabout wrote:
Thu Nov 22, 2018 10:11 am
I added a flag to the reactor, "scale_energy_usage" that causes it to behave like a normal energy consuming entity when set to true. This was part of the edit to make it accept a dynamic energy source tag (so you can have an electric powered reactor for example)

Perhaps the same tag could be added to the burner energy source? is that something you'd would want?
I want something like "power consumption while idle" (pcwi) and "power consumption while working" (pcww).
So all nuclear entities need the same energy amount on idle and working (like it was made by nuclear reactor), but solid fuel burner entities need energy when they working.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Nuclear flag for burner energy_source

Post by eradicator »

bobingabout wrote:
Thu Nov 22, 2018 10:11 am
[...] an electric powered reactor [...]
It's not really a reactor if it runs on electric energy :D.

I think what OP wants is a "dont_scale_usage" i.e. "always_consume" flag for the burner source. If you put a non-negated flag (i.e. "do_scale_usage") onto burners, wouldn't that imply that all burners must specify the flag to behave like they do now? I.e. all mods with burners would have to be updated to include the flag...?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Nuclear flag for burner energy_source

Post by bobingabout »

eradicator wrote:
Thu Nov 22, 2018 12:04 pm
bobingabout wrote:
Thu Nov 22, 2018 10:11 am
[...] an electric powered reactor [...]
It's not really a reactor if it runs on electric energy :D.
True, it's the reactor entity, but in that mode, it's basically an electric heater.
eradicator wrote:
Thu Nov 22, 2018 12:04 pm
I think what OP wants is a "dont_scale_usage" i.e. "always_consume" flag for the burner source. If you put a non-negated flag (i.e. "do_scale_usage") onto burners, wouldn't that imply that all burners must specify the flag to behave like they do now? I.e. all mods with burners would have to be updated to include the flag...?
That's what I was thinking.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Nuclear flag for burner energy_source

Post by eradicator »

bobingabout wrote:
Thu Nov 22, 2018 12:26 pm
That's what I was thinking.
Well then, i'll give the topic a +0.5, for "might be useful in the future" but i don't have a personal usecase yet™ :D.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Nuclear flag for burner energy_source

Post by bobingabout »

Looking into this a little further. The entity requests however much fuel it wants from the energy source, so simply adding this to burner's energy source definition isn't going to be enough, you'd need to edit every entity that can use the burner energy source (which is almost EVERYTHING that requires energy) to look for the tag.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Nuclear flag for burner energy_source

Post by darkfrei »

bobingabout wrote:
Mon Nov 26, 2018 8:51 am
Looking into this a little further. The entity requests however much fuel it wants from the energy source, so simply adding this to burner's energy source definition isn't going to be enough, you'd need to edit every entity that can use the burner energy source (which is almost EVERYTHING that requires energy) to look for the tag.
Now all electric powered entities have drain consumption when they idle and drain+working power consumption when they are working.
"Nuclear" entities like nuclear reactor has also "drain", which is exactly same fuel consumption by idle and working state.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Nuclear flag for burner energy_source

Post by bobingabout »

I'm just saying that, since each entity controls it's own power consumption, you'd have to edit every entity that you want the feature to function on. This is a little beyond what I'd be comfortable with trying to do myself.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Trebor
Filter Inserter
Filter Inserter
Posts: 288
Joined: Sun Apr 30, 2017 1:39 pm
Contact:

Re: Nuclear flag for burner energy_source

Post by Trebor »

darkfrei wrote:
Mon Nov 26, 2018 9:28 am
Now all electric powered entities have drain consumption when they idle and drain+working power consumption when they are working.
When determining power requirements using the values from the Wiki do you need to add the drain to the consumption also?

Post Reply

Return to “Modding interface requests”