Read out origin of steam

Place to get help with not working mods / modding interface.
Post Reply
Eineiiger
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon May 21, 2018 1:42 pm
Contact:

Read out origin of steam

Post by Eineiiger »

Hello there!

So I've been thinking about a way to read out that steam originates from water. The only way to produce steam in a vanilla game is by adding fuel to a boiler and supply it with water (as you all know), but either I am overseeing something or it is quite hard to read this out from the possibilities of LuaGamescript .

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

Re: Read out origin of steam

Post by darkfrei »

Eineiiger wrote:Hello there!

So I've been thinking about a way to read out that steam originates from water. The only way to produce steam in a vanilla game is by adding fuel to a boiler and supply it with water (as you all know), but either I am overseeing something or it is quite hard to read this out from the possibilities of LuaGamescript .
We are need to have some steam recipe.

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

Re: Read out origin of steam

Post by bobingabout »

It's defined on the boiler itself. input fluid box has the filter "water" set, and output fluid box has the filter "steam" set. The input filter means "This is the only fluid that can enter this fluid box", but the output fluid box filter is more of a "this is the fluid that comes out", not quite intuitive, but, that's how you get it.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Eineiiger
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon May 21, 2018 1:42 pm
Contact:

Re: Read out origin of steam

Post by Eineiiger »

darkfrei wrote:
Eineiiger wrote:Hello there!

So I've been thinking about a way to read out that steam originates from water. The only way to produce steam in a vanilla game is by adding fuel to a boiler and supply it with water (as you all know), but either I am overseeing something or it is quite hard to read this out from the possibilities of LuaGamescript .
We are need to have some steam recipe.
We really are :roll:
bobingabout wrote:It's defined on the boiler itself. input fluid box has the filter "water" set, and output fluid box has the filter "steam" set. The input filter means "This is the only fluid that can enter this fluid box", but the output fluid box filter is more of a "this is the fluid that comes out", not quite intuitive, but, that's how you get it.
But do I see correctly that the fluidbox is related to an entity but not an entity_prototype? Can you imagine a way to read it out from any game prototypes?

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

Re: Read out origin of steam

Post by bobingabout »

I think that's just one of those things you'll need to pre-program into your script.
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: Read out origin of steam

Post by eradicator »

You can iterate over game.entity_prototypes to get the boiler prototypes as LuaEntityPrototype but it looks like there's currently no access to the fluid_box definition, so you'll have to file a request. Also there is access to the fluid produced by offshore pumps, which you'll also need to check to make sure nothing else produces the target fluid.

Post Reply

Return to “Modding help”