Trains: show progress while unloading

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Trains: show progress while unloading

Post by mrvn »

TL;DR
When a train is at a station waiting to be unloaded show the progress in the schedule of the train.

What ?
When a train is loading (left side) the condition is usually one of ">" or ">=" and the progress is shown as items present / items needed:
unloading-progress.png
unloading-progress.png (111.03 KiB) Viewed 750 times
When a train is unloading (right side) the condition is usually "= 0" or "<" or simply "Empty cargo inventory". The last will show a progress computed from the amount present in the train on arrival and the amount currently left in the train. The first two conditions show no progress and only turn green when they are finally met.

My suggestion is to show the progress for any condition with a count as follows:
  1. on arrival remember the current content of the train
  2. calculate the difference between the current content and the needed content = delta
  3. for any condition not already met the progress is: abs(needed - current) / delta
This will work for any condition with a count for both loading and unloading.

Note: On loading the progress will start at 0% even if the train already is partially loaded. I think that is a divergence from current behavior but will show the actual progress made at this station towards the goal.
Why ?
Having a train schedule open and watching what the train does one can clearly see what is happening when the train is loaded. But on unloading nothing seems to happen unless the "Empty cargo inventory" condition is included. Showing a progress for all condition with count would be more constistent and easier to see what is going on when a train is stuck at a station or when simply watching the train.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Trains: show progress while unloading

Post by ssilk »

Agreed. For these specific rules, this would be possible.

But why don’t you add the empty cargo rule everywhere, if you mean that specifically? That’s the reason for this rule!

Because for any other case (e.g. “item < 20”) you cannot clearly show the progress, because it can also be 0, that’s “over progressed”, what to display then? There are too many right answers, one could say that is an important information and should be displayed in the progress bar (e.g. different color) the other can say,it’s just a binary rule either it’s above then display progress or below, then it’s progress is ready. Both are right.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

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

Re: Trains: show progress while unloading

Post by mrvn »

ssilk wrote:
Sun Sep 19, 2021 7:08 am
Agreed. For these specific rules, this would be possible.

But why don’t you add the empty cargo rule everywhere, if you mean that specifically? That’s the reason for this rule!

Because for any other case (e.g. “item < 20”) you cannot clearly show the progress, because it can also be 0, that’s “over progressed”, what to display then? There are too many right answers, one could say that is an important information and should be displayed in the progress bar (e.g. different color) the other can say,it’s just a binary rule either it’s above then display progress or below, then it’s progress is ready. Both are right.
The train might only unload Iron Plates but keep the Copper Plates. Or it might unload stone and load stone bricks at the same time. No one condition fits all.

As for what to do if the condition is "item < 20" and 0 items are present. You do the same as "item > 200" and 400 items present. The condition is already met and turns green. No progress needed. Progress bars are only for conditions that a) have a count, b) are not met already.

If you wanted exactly 20 items and not more then the condition would be "= 20". And then progress gets a bit tricky as you can overshoot. Say you start with 10 items and that's the baseline for 0% progress. Inserter adds 4 so you are at 14 or 40% progress. Then 18 or 80% progress. Then you overshoot to 22 and 120% progress. I guess at that point the progress should turn red. I would say it should show 0-80% empty, 80% - 100% red. That way it's visible that the goal was overshot as opposed to a train coming in with 100 items and having to unload down to 20. That one would start out green but could turn red if it undershoots.

Note: Some people have LTN stations like that. They overload the train with stack inserters and then have one inserter that takes back what gets overloaded. For stations with mixed cargo it is important that all requested cargo fits. Overloading might use an extra slot for one item so another item doesn't fit anymore. Stations have to reserve empty slots for this case or load count perfect. To make a long story short: overshooting the goal for a condition does happen so the GUI should be able to visualize when it happens.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Trains: show progress while unloading

Post by ssilk »

Ok. Then 0% is what has been remembered when the train has arrived at the station. And 100% is the mark, when the condition gets true. And it makes no sense to display anything above or below that.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Ideas and Suggestions”