Is it possible to change fluid_box during gameplay?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
dragon-architect
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Dec 17, 2023 7:41 pm
Contact:

Is it possible to change fluid_box during gameplay?

Post by dragon-architect »

I've just had an idea for a potential mod that would require changing the base_level of a given entity's fluid_box during gameplay.

Does anybody know if this is possible to do?

Pi-C
Smart Inserter
Smart Inserter
Posts: 1654
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Is it possible to change fluid_box during gameplay?

Post by Pi-C »

dragon-architect wrote:
Tue Apr 16, 2024 11:13 pm
I've just had an idea for a potential mod that would require changing the base_level of a given entity's fluid_box during gameplay.

Does anybody know if this is possible to do?
The fluid_box is hard-wired into the prototype and can only be changed in the data stage. However, there may be a way to work around this problem: Define several look-alike prototypes that differ only in their fluid_box and swap the entities as needed in the control stage. I've used this technique in the Water Turret mod, so that the same turret (from the perspective of players) can shoot either water or steam, depending on the contents of the connected pipes: Image
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

User avatar
dragon-architect
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun Dec 17, 2023 7:41 pm
Contact:

Re: Is it possible to change fluid_box during gameplay?

Post by dragon-architect »

Hmmm, alright then. I'll have to figure out how to do that. 🤔

Post Reply

Return to “Modding help”