LS,
I always end up going from factory to factory finding out where goods are and how the storage at suppliers and consumers is.
I updated info_con and info_prod from simfab.cc to contain :
This shows up in the fab window.
- at consumption
The number of halts that contain the goods for this fab and the amount
The number of convoys that contain the goods for this fab and the amount
- at consumer and supplier
The actual/max storage of the goods (not yet designated to a destination !) and whether a route exists.
See the attached picture for an example
For now I just did not cache anything, works fine with my (rather small) games.
If it is a usefull patch I can do more work on it to make it more efficient.
Herman
hreintke
Your Patch it very good that be are missing in Simutrans! :thumbsup:
The idea is nice. Just the presentations needs probably more userfreindlyness for non-professional gamers.
Some settings are imho better done with icons, like Route ok. Also the producer's text is better "oil pump at (2,3) has 13 of 111 m³ (route ok icon)" or as translator string "%s at (%s) offers %s of max. %s%s" For consumer just instead of offers use accepts.
The convoi stuff I found very confusing. Maybe add another statistics with the number of convois (or rather destinations) served by this factory. Especially since every ten crates those will be recalculated by every factory anyway, caching is almost free.
Prissi,
I agree on user friedliness. I first wanted to see whether I was able to get the information I wanted to show.
Didn't use an icon as I just don't know (yet) how to do that. Thought on colorcoding and will give it a try.
On Convoys, it are not only convoys which are directly linked to the factory. If goods are moved to an intermediate storage area (halt) another convoy will move goods further to the destination.
I want to show how much goods are in "Transition/Moving to" the factory. That's why I check all halts and convoys, where I check the specific good, bound for the destination (fab).
Will work further on it.
Herman
I like the goods in transit idea. It could be even added to factories, that goods in transit will be recorded at the recieving factory and so avoid the oversupply. I.e. production will stop when the factory input is
a) 100% full,
b) not empty and more than 200% of maximal input was sent
c) fully empty and more than 500% was sent
The just requires few additions to the code handing the removal of lost goods (i.e. when a convoi is sent to a depot) but would avoid the often problem of factories producing too much during not 100% input filled times.
Thus the input will be something like this
Requires
coal (sent 250t, avail. 14t of 300t max)
The produced sent goods cannot be tracked, as each packet only knows it destination. But this number is not so important imho. And the route information is anyway updated after every 10 unit of goods.
Counting convois seem rather too brute force for some games I have in my possession.
I would use the word ordered instead of sent. It seems clearer to me.
Or if not accurate, in transit. I would also put the available quantity first. It seems more important.
I like "in transit"... and it could be used for both sending and receiving, which might be a good or bad thing.
Wow, this amount of info on the goods being transported from/to a factory is great!
Btw, I like in transit too (+1) as a description for those goods.
LS,
I have some ideas to work on with the remarks given in this thread. But it has to wait until the weekend to actively do something.
Herman
The translation can be agreed on later. Even the order can be changed later. I would like two seperate strings, since not all languages may have this universal term.
LS,
Next version of the patch. It keeps a running value of goods in transit to avoid the full parsing of halts and convois.
Value is initialized in "laden_abschliessen" by a one time full parse.
Need to do
- update transit value after arriving in a depot when goods are removed
- update transit value after "recall ware"
- clean up coding
If anyone knows addtional locations in the code where running value of translit should be updated please let me know.
See attachments for current view and source patch.
Herman
Instead of Route ok, I think I would also add for the supplier the amount in transit.
Prissi,
I don't understand what you would like to see under suppliers.
For suppliers themself, the in transit counts is their input materials, not the output to the fab that we are detailing.
And the goods in transit do not know their origin (and even can be combined from several sources), so I cannot split the overall in transit of a good (as shown under consumption).
For a consumer the in transit could be added easily.
For the route, I agree that the text shown is not the best option. I have been looking into icons or even better buttons but just do not know/understand how to update the gui code to get them in. Some example code will be helpful there.
I prefer buttons as I am looking into the possibility to be able to show the latest calculated route for the goods when pushing that. I have some prototype code getting that info already so looks feasible.
Also for the other texts. I presume something has to be done to get them translated properly. Any hint on requirements for get that done are appreciated so I can also work on that.
Herman
LS,
Next version of the patch.
I think all base functionality is now included (all locations where in transit should be updated are in).
Each eingang of fab now has an addtional value of "in transit". For now only used for display.
Still to do, but I cannot do that is :
- Prissi's wish to make route ok text to a button
- Make it working on with translations.
I am happy to work on that too but will need help to get started.
Well, you work has kickstarted me to finish the stuff I had also started. The final result is likely a mixture of both ...
EDIT: Ok, submitted code, that chang be used to avoid cheating by not transporting stuff. There is a problem with the "In transit" button, as it is normally nor really seen in the factory statistics dialoge.
BTW, a good setting for the percentage in not too large maps is 25. (Default no limit as before.)
Prissi,
I am surprised you put the absolute value of in transit into the graphs. It has no "historical reference" as now for ealier months/years it is just the value what it was at the end of the reporting period. Maybe the max in transit is a better choice.
Also I would add the stock/in transit/max values for the consumers. That gives an easy insight in possibilty of delivery.
Herman
About the graph: Also stock is just the value at the end of the month. THis is just in accordance with these statistics.
Quote from: hreintke on November 19, 2012, 06:48:34 PM
Also I would add the stock/in transit/max values for the consumers. That gives an easy insight in possibilty of delivery.
What do you mean by consumers? Only the recieving amount could be calculated easily, the amount sent out an still in transit cannot be guessed (as wares does not remember their origin=.
Prissi,
Ok, understand graph. I am just used more to look at arrived, consumed, delivered and produced on which you see growth of factory.
For consumers, I meant the information shown in fab display. My focus on the patch is/was to show more details on the suppliers/consumers in the fab display so you need less clicking to get a complete factory overview.
In transit was added also but not main reason.
See the picture what is displayed with my patch. In there, in the information showed for consumers, the in transit amount can be added easily. And yes, this in transit amount can be also from other factories but knowing the overall figure "explains" why a factory is not producing or transporting to it's consumers.
Herman
Ok, those just repeat the stock/max numbers of the factories. But this will make the dialoge no longer fitting the targeted default tile size of all simutrans dialoges. I also do not see what information I gain from current amount in store and max amount, since this is not related to production at all.
And as mentioned before, a special mark (or maybe just bold text) for the active supplier resp. consumers in the last month could be easily added.
or even colour would work, if that's possible.
blue for connected route
orange or black for unconnected
While I think this would be a great feature, and it is, I'm afraid there's too much "wall-of-text" in the dialogues.
What if a bit of it were icons instead of texts?
The extra information would fit good in a details dialogue as seen with the convoy and halt info details; Keeps the main dialogue cleaner.
The original request was to show more information ...
But I agree with the wall of text. What about showing the goods symbol (which needs to be there anyhow) in front of a supplied factory. (So far, it will be mostly one for most factories.)
EDIT: See attached patch
Prissi,
Nice and neat idea. It now shows after some time the active connections, may take some time when a factory is overloaded due to in transit goods delivery.
Not sure yet how it will show when reset.
I am working with this now on my current gameplay.
Technical question : Is it easily possible to give the text a color to indicate specific status like "too much in transit" or "factory overloaded" ?
Herman
The factories could show their status bars. But I think this is rather too much information.
Also the "life time" of the symbols could depend on the amount sent.
LS,
If you apply the attached patch. The intransit value is also displayed in the factory list.
Herman
Instead of more subentries, I used 123+2044 to indicate input+transit. The sort by input will now also sort by input+transit, since this make more sense.
Prissi,
I see what you did.
Two remarks on the windows now.
1/ Button text doesn't match the sort order.
I am not sure yet what sortorder really happens in each sort option.
2/factorynames and numbers are not aligned and difficult to read.
See attached screenshot. Maybe a names and numbers should be split into two columns.
Herman
Input sorts by the first numer (in store + in tranit) since this is the amount available. The problem with not producing/consuming factories alway being first in one sort direction was already there before.
Hello
I view that the work on the extension of fab details go forward.
LS,
I noticed the input+transit and sorting on that, maybe button text should reflect that but is fairly clear.
I looked at output sort and don't think that's working correctly. See attached ascending and descending screenshots.
Further. Status of factory is now dependent on input only. That is correct when only using input but when using get_factory_maximum_intransit_percentage <> 0 maybe it should refect that status instead of input.
Herman
Prissi,
I found the issue in the sorting.
Your patch removed the "case factorylist::by_output" from compare_factories routine.
That means when using the by_output option, the list now gets sorted by the default value = by_name.
Herman
compare_factories(factorylist::sort_mode_t sortby_, bool reverse_) :
sortby(sortby_),
reverse(reverse_)
{}
bool operator ()(const fabrik_t* a, const fabrik_t* b)
{
int cmp;
switch (sortby) {
default:
case factorylist::by_name:
cmp = 0;
break;
Thank you, an extremely stupid copy&paste error. I am really getting old.