[1.1.100] A generator's max_temperature isn't updated properly (and maybe others)

Bugs that are actually features.
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

[1.1.100] A generator's max_temperature isn't updated properly (and maybe others)

Post by Honktown »

The default max temperature of a filtered fluidbox seems to be taken from the fluid's max temperature, except that if the max temperature is increased (changed at all?) the max temperature of the fluidbox for existing entities on the ground isn't updated.

Picture of situation:
fluidboxes.jpg
fluidboxes.jpg (1.23 MiB) Viewed 903 times

Simple example demonstrating behavior:
example.jpg
example.jpg (749.76 KiB) Viewed 903 times
existing_fluidbox_max_temp_test.zip
(611.78 KiB) Downloaded 48 times
max_temperature_water_0.0.1.zip
(843 Bytes) Downloaded 38 times
To provoke the bug:
1) mod has not been part of save, so make sure mod is enabled and then load save
2) Hovering over the storage tank:

Code: Select all

/c game.player.selected.insert_fluid{name = "steam", temperature = 150000, amount = 10000}
3) Observe: Neither the steam engine nor the steam turbine permit steam to flow in
4) Place new steam engine. It works.
I have mods! I guess!
Link
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [1.1.100] A generator's max_temperature isn't updated properly (and maybe others)

Post by Honktown »

By "maybe others" I meant possibly other properties, though maybe this applies to other entities too, if they have a filtered fluidbox.
I have mods! I guess!
Link
Rseding91
Factorio Staff
Factorio Staff
Posts: 14671
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.100] A generator's max_temperature isn't updated properly (and maybe others)

Post by Rseding91 »

Thanks for the report. This is a known mechanic/limitation of pipes being able to support setting filters per-pipe through the Lua API: https://lua-api.factorio.com/latest/cla ... set_filter

Since the fluidbox has no way to know "this filter was set from a prototype value" it does not know that on-load when prototypes change it should re-set the filter from the prototype value. For all it knows it was set from the Lua API and changing it to the prototype value would erase what was actually supposed to be there.
If you want to get ahold of me I'm almost always on Discord.
Honktown
Smart Inserter
Smart Inserter
Posts: 1045
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Re: [1.1.100] A generator's max_temperature isn't updated properly (and maybe others)

Post by Honktown »

Rseding91 wrote: Wed Dec 13, 2023 2:21 pm
Some entities cannot have their fluidbox filter set, notably fluid wagons and crafting machines.
Might there be room for "updating" existing entities fluidboxes, for the kinds that can't change? As far as I'm aware, a generator doesn't make sense as something configurable at runtime... and to be honest, I've never considered changing the filter of a fluidbox at runtime with script, and I'm not sure where it would even apply.

If it's something that makes more sense for 2.0, "ok", but I can't think of a single place where manually setting a fluidbox filter makes sense in terms of existing mechanics. If there were mods that wanted it, for like, configurable fluid wagons that can attach 1-3 pumps and only allow 1 fluid in, that almost makes sense, but ironically, it's noted that's not possible. Rambling on, fluids are either specific (like generators, recipes, etc), unfiltered (most pipes), or set by prototype because a mod wanted pipes or an auto-recipe-thing like a flare-stack filtered. What else IS there?

Edit: after some talk on the Discord, this behavior is "better to stay as-is". A mod can "update" fluidbox temps on init / config change (with some caveats) if one really wants it.
I have mods! I guess!
Link
Post Reply

Return to “Not a bug”