Page 1 of 1
[0.17.79] Train station update progress incorrect
Posted: Tue Feb 04, 2020 11:05 am
by wobbycarly
I have a train at a station waiting until Cargo X = 4000, Cargo Y = 2000 and Cargo Z = 2000. If I check the contents of the wagon, and the station progression, I can see that X and Y are at 100%, but cargo Z in the wagon is about 40%, but shows 0% on the station progress.
I would expect the progress at the station to show about 40% fulfillment.
Not sure if all that makes sense, so hopefully the screenshots will help.
Playing Bob's and MSP, a few QOL mods. Can provide mod list and/or save if relevant.
Re: [0.17.79] Train station update progress incorrect
Posted: Tue Feb 04, 2020 11:27 am
by Klonan
This isn't a bug, we just don't have anything to compare against,
For instance, if you had 3,000 in the wagon, and the condition was to leave when it was 2,000, what is the progress?
Re: [0.17.79] Train station update progress incorrect
Posted: Tue Feb 04, 2020 5:37 pm
by valneq
I kind of disagree with Klonan: When the condition is set to a certain value and the starting cargo was a given amount exceeding it, then you could define progress as:
Code: Select all
1 – (current cargo – target cargo)/(initial cargo – target cargo)
while when the starting amount is lower, you should be using
Code: Select all
current cargo / (target cargo - initial cargo)
Then you always start at 0 and go towards 1. You would need to multiply the above numbers by 100 to get percent values, but you get the point.
The above choice does not exist if you set the condition to be at most a specific value, or at least a specific value. The problem of deciding is only when you set the leaving condition to be exactly a set amount of cargo.
I believe that Factorio does show a correct progress bar (assuming "initial cargo" in above formulas to be 0) when you choose "at least 2000". Then, having a starting amount of 1000, the progress bar will actually start at 50% and increase while more cargo is being added. And this is probably what the OP wants to do.
In order to do what I propose, Factorio would need to keep track of the cargo content the train had when arriving at the station. I don't know if Factorio currently does that, nor if the developers agree that my suggestion is worth the trouble of implementing it.
Alternatively, what I calledd "initial cargo" could be assumed to be "cargo amount if wagons were fully packed with this stuff". This is analogous to the "leave upon cargo is empty" condition which does show a correct progress bar. In this case Factorio would not need to keep track of the actual initial cargo, and the progress bars could start with a value other than 0.
Re: [0.17.79] Train station update progress incorrect
Posted: Tue Feb 04, 2020 6:07 pm
by Klonan
valneq wrote: Tue Feb 04, 2020 5:37 pm
In order to do what I propose, Factorio would need to keep track of the cargo content the train had when arriving at the station. I don't know if Factorio currently does that, nor if the developers agree that my suggestion is worth the trouble of implementing it.
That is why its a idea, and not a bug
Re: [0.17.79] Train station update progress incorrect
Posted: Tue Feb 04, 2020 10:11 pm
by wobbycarly
valneq wrote: Tue Feb 04, 2020 5:37 pm
I believe that Factorio does show a correct progress bar (assuming "initial cargo" in above formulas to be 0) when you choose "at least 2000". Then, having a starting amount of 1000, the progress bar will actually start at 50% and increase while more cargo is being added. And this is probably what the OP wants to do.
This is what I observe most of the time. I just don't understand why this particular scenario is different. Doesn't really bother me, so I'm not going to argue against NaB, just wanted to report it in any case.
Re: [0.17.79] Train station update progress incorrect
Posted: Tue Feb 04, 2020 11:26 pm
by Blacky007
it very easy to fix on your side
use ">=" instead of "=" then you can see the progress of loading
and you have no progress because factorio doesn't control if the value comes from a higher or from a lower value to your target value
Re: [0.17.79] Train station update progress incorrect
Posted: Wed Feb 05, 2020 6:29 am
by wobbycarly
@Blacky007 - thanks, I get it now.