[0.15.19] Fluid train condition not evaluated properly

Bugs that are actually features.
Post Reply
User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

[0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

Here is setup, and i'm able to reproduce it anytime.

have train (waiting in station), that has condition set to leave station when cargo is empty.
add fluid wagon to train.
wait until fluid vagon is full (must be full, otherwise bug will not show), there also must be still some items to unload from cargo vagons.

change train wait condition to (item count = 0) and (fluid count >= some number)

train will not leave station when cargo items hit zero.

reason seems to be, that after fluid vagon is full, it stops updating, therefore fluid condition will never be evaluated to true.

imo when you create condition, fluid value condition is set to nill or zero, and waits for update, instead to be set to current fluid vagon content value.


User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

Loewchen wrote:Post a save please.
using save has a problem.
if you load save, where train is in such condition, on load all logic conditions are evaluated, and train will leave station.

that's why i posted steps, it's only reproducible manually.

i can post save, where is train prior adding fluid condition (i will add it later, i have save on main pc, not on notebook), but when you have fluid condition in save, it works. it only bugs out, if you add fluid condition on train in running game.

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mrvn »

I had some problems with conditions not reacting too. What I think always works is to first set all the conditions and only then set the train to automatic. Or switch to manual and back to automatic. Even better instead of setting it to automatic send it to a station.

User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

mrvn wrote:I had some problems with conditions not reacting too. What I think always works is to first set all the conditions and only then set the train to automatic. Or switch to manual and back to automatic. Even better instead of setting it to automatic send it to a station.
which will mean, that changed condition are not properly evaluated, if they are changed when train is on automatic mode. but so far i have not this issue, i have changed condition on train multiple time. this is first time, when train got stuck in station, after i changed condition on it.

real scenario was, that i had train delivering stiratite, then i needed to suply mine with sulfuric acid (for infitine patches mining), when full loaded train arived to station, i added fluid wagon (which immediately started filling with acid from tank i had prepared before). then i changed condition on train, at that time fluid vagon was already full of acid.

i did eventually run out of stiratite, at that time i noticed, that my train is stuck on station with full acid tank and empty cargo (condition is stiratite = 0, sulfuric acid >= 5000). sending train away manualy did solve issue, but since i was curious about cause i did some experiments and come to above described condition to stuck train at station.

User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

mexmer wrote:
Loewchen wrote:Post a save please.
using save has a problem.
if you load save, where train is in such condition, on load all logic conditions are evaluated, and train will leave station.

that's why i posted steps, it's only reproducible manually.

i can post save, where is train prior adding fluid condition (i will add it later, i have save on main pc, not on notebook), but when you have fluid condition in save, it works. it only bugs out, if you add fluid condition on train in running game.
nvm. seems i have save, where train is stuck even after load :D

attached
Attachments
15 angel.zip
(9.59 MiB) Downloaded 84 times

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mrvn »

When you add a wagon to a train it goes into manual mode. Did you put it back on automatic?

User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

mrvn wrote:When you add a wagon to a train it goes into manual mode. Did you put it back on automatic?
well, as you can see in save

Image

Rseding91
Factorio Staff
Factorio Staff
Posts: 13220
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by Rseding91 »

Please zip and upload your mods somewhere else when i load it the train is empty and half the factory is gone.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13220
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by Rseding91 »

Your fluid condition is wrong. You set it to the vanilla sulfuric acid instead of the modded one.
If you want to get ahold of me I'm almost always on Discord.

User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

Rseding91 wrote:Your fluid condition is wrong. You set it to the vanilla sulfuric acid instead of the modded one.
i see, you are right.
then there is different bug, that logistic condition offers liquid, that is not available for production.

it's not possible to create vanilla sulfuric acid with mod set i have (mind game was started with that set of mods), so it should not be available in conditons.

should i set new post for that? :mrgreen:

Rseding91
Factorio Staff
Factorio Staff
Posts: 13220
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by Rseding91 »

mexmer wrote:
Rseding91 wrote:Your fluid condition is wrong. You set it to the vanilla sulfuric acid instead of the modded one.
i see, you are right.
then there is different bug, that logistic condition offers liquid, that is not available for production.

it's not possible to create vanilla sulfuric acid with mod set i have (mind game was started with that set of mods), so it should not be available in conditons.

should i set new post for that? :mrgreen:
No, that's working as intended. It shows all fluids - it doesn't care if you can produce them or not because that's not a requirement to have fluid in a wagon.
If you want to get ahold of me I'm almost always on Discord.

User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

Rseding91 wrote:
mexmer wrote:
Rseding91 wrote:Your fluid condition is wrong. You set it to the vanilla sulfuric acid instead of the modded one.
i see, you are right.
then there is different bug, that logistic condition offers liquid, that is not available for production.

it's not possible to create vanilla sulfuric acid with mod set i have (mind game was started with that set of mods), so it should not be available in conditons.

should i set new post for that? :mrgreen:
No, that's working as intended. It shows all fluids - it doesn't care if you can produce them or not because that's not a requirement to have fluid in a wagon.
i think that needs to be improved, if mod removes recipe (or technology), result product should not be available in conditions.

i'm not talking about products you might research in future, i'm talking about removed products.

like you cannot use (and see) such recipes in factories (assemblers, chemical factories, and so on), conditions should also not show disabled/removed stuff.

it's inconsistent, since for example i don't see vanila green/red/blue boards in conditions, yet i can see vanilla liquids that were removed.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13220
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by Rseding91 »

mexmer wrote:i think that needs to be improved, if mod removes recipe (or technology), result product should not be available in conditions.

i'm not talking about products you might research in future, i'm talking about removed products.

like you cannot use (and see) such recipes in factories (assemblers, chemical factories, and so on), conditions should also not show disabled/removed stuff.

it's inconsistent, since for example i don't see vanila green/red/blue boards in conditions, yet i can see vanilla liquids that were removed.
You don't see the items because the mod *removed* them. The mod(s) didn't remove the fluids - they still exist in the game - or they wouldn't show in the GUI.
If you want to get ahold of me I'm almost always on Discord.

User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

Rseding91 wrote:
mexmer wrote:i think that needs to be improved, if mod removes recipe (or technology), result product should not be available in conditions.

i'm not talking about products you might research in future, i'm talking about removed products.

like you cannot use (and see) such recipes in factories (assemblers, chemical factories, and so on), conditions should also not show disabled/removed stuff.

it's inconsistent, since for example i don't see vanila green/red/blue boards in conditions, yet i can see vanilla liquids that were removed.
You don't see the items because the mod *removed* them. The mod(s) didn't remove the fluids - they still exist in the game - or they wouldn't show in the GUI.
i see, thanks for explanation.

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mrvn »

You can have fluids that you can not produce. Imagine a scenario where you can not create any suphuric acid but you are given 3 fluid wagons filled with it at the start and have to ration it.

User avatar
mexmer
Filter Inserter
Filter Inserter
Posts: 869
Joined: Wed Aug 03, 2016 2:00 pm
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mexmer »

mrvn wrote:You can have fluids that you can not produce. Imagine a scenario where you can not create any suphuric acid but you are given 3 fluid wagons filled with it at the start and have to ration it.
by cannot produced was meant, it's not on production tab, and there is no research for it (since condition filters shows you all items, including those, you have not researched yet).

but as rseding explained, if entity is not removed, it will show there. which indeed makes sense ... including in context of your scenario.

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [0.15.19] Fluid train condition not evaluated properly

Post by mrvn »

mexmer wrote:
mrvn wrote:You can have fluids that you can not produce. Imagine a scenario where you can not create any suphuric acid but you are given 3 fluid wagons filled with it at the start and have to ration it.
by cannot produced was meant, it's not on production tab, and there is no research for it (since condition filters shows you all items, including those, you have not researched yet).

but as rseding explained, if entity is not removed, it will show there. which indeed makes sense ... including in context of your scenario.
Exactly. I just wanted to point out that it could be intentional, like in my scenario, instead of accidental, like with your mod.

Post Reply

Return to “Not a bug”