[0.17.79] Train station update progress incorrect

Bugs that are actually features.
Post Reply
wobbycarly
Fast Inserter
Fast Inserter
Posts: 241
Joined: Tue Jan 29, 2019 4:00 am
Contact:

[0.17.79] Train station update progress incorrect

Post 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.
Attachments
Factorio 0.17.79-Station Status.png
Factorio 0.17.79-Station Status.png (139.46 KiB) Viewed 1213 times
Factorio 0.17.79-Train Cargo Progress.png
Factorio 0.17.79-Train Cargo Progress.png (191.92 KiB) Viewed 1213 times

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.79] Train station update progress incorrect

Post 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?

User avatar
valneq
Smart Inserter
Smart Inserter
Posts: 1150
Joined: Fri Jul 12, 2019 7:43 am
Contact:

Re: [0.17.79] Train station update progress incorrect

Post 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.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.79] Train station update progress incorrect

Post 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

wobbycarly
Fast Inserter
Fast Inserter
Posts: 241
Joined: Tue Jan 29, 2019 4:00 am
Contact:

Re: [0.17.79] Train station update progress incorrect

Post 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.

Blacky007
Fast Inserter
Fast Inserter
Posts: 177
Joined: Fri Dec 29, 2017 8:05 pm
Contact:

Re: [0.17.79] Train station update progress incorrect

Post 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
My color birthday was May 2nd 2020 - Thank you Enchroma

wobbycarly
Fast Inserter
Fast Inserter
Posts: 241
Joined: Tue Jan 29, 2019 4:00 am
Contact:

Re: [0.17.79] Train station update progress incorrect

Post by wobbycarly »

@Blacky007 - thanks, I get it now.

Post Reply

Return to “Not a bug”