Page 1 of 1

[0.15.19] Fluid train condition not evaluated properly

Posted: Mon Jun 12, 2017 9:08 am
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Mon Jun 12, 2017 10:39 am
by Loewchen
Post a save please.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Mon Jun 12, 2017 11:23 am
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Mon Jun 12, 2017 1:31 pm
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Mon Jun 12, 2017 2:20 pm
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Mon Jun 12, 2017 2:40 pm
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

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 9:22 am
by mrvn
When you add a wagon to a train it goes into manual mode. Did you put it back on automatic?

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 3:33 pm
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

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 6:30 pm
by Rseding91
Please zip and upload your mods somewhere else when i load it the train is empty and half the factory is gone.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 6:41 pm
by Rseding91
Your fluid condition is wrong. You set it to the vanilla sulfuric acid instead of the modded one.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 7:04 pm
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:

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 7:06 pm
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 7:09 pm
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 7:20 pm
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Tue Jun 13, 2017 7:21 pm
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Fri Jun 16, 2017 9:55 am
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Fri Jun 16, 2017 10:22 am
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.

Re: [0.15.19] Fluid train condition not evaluated properly

Posted: Fri Jun 16, 2017 10:40 am
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.