Author Topic: passenger and mail classes  (Read 2098 times)

0 Members and 1 Guest are viewing this topic.

Offline Ves

Re: passenger and mail classes
« Reply #35 on: September 29, 2017, 09:45:49 AM »
No worries :)
Speaking of bugs, did you have a look on this issue:
http://forum.simutrans.com/index.php?topic=17401.msg165683#msg165683?

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15697
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #36 on: September 29, 2017, 09:52:08 AM »
Because branch switching takes a little time, I am trying to fix all the significant master branch bugs first; however, I have noted that, and will look into that when I get a chance after I have merged the master branch and your latest work into the passenger-and-mail-classes branch.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15697
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #37 on: October 20, 2017, 07:40:57 PM »
Thank you very much for all your work on this, and apologies that I have not had a chance to look at this earlier. I have now merged and pushed your latest work onto the passenger-and-mail classes branch after merging from the master branch and fixing the bug to which you refer above.

I am in the process of reviewing this, so I may amend this post in due course, but one thing that I notice is that the passenger display always separates passengers by class. It seems to me that this really ought to be optional, as there are many situations when it is more useful to know the total number of passengers than the details of the class; a simple checkbox, perhaps, which, when unticked, reverts to the old behaviour of treating passengers from all classes alike.

Edit 1: I have made one or two minor fixes and changes to some GUI elements. One query, if I may: does the comfort display in the depot window take into account catering? The former comfort display used to show the comfort level with and without the effect of the catering on board a vehicle.

Edit 2: Similarly, it would be extremely useful to be able to see the combined passenger capacity in the deopt/replacer window for each vehicle that a player may purchase.
« Last Edit: October 20, 2017, 10:17:05 PM by jamespetts »
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

passenger and mail classes
« Reply #38 on: October 21, 2017, 09:17:23 AM »
Thank you very much for all your work on this, and apologies that I have not had a chance to look at this earlier. I have now merged and pushed your latest work onto the passenger-and-mail classes branch after merging from the master branch and fixing the bug to which you refer above.

Great! I will check up on that!

Quote
I am in the process of reviewing this, so I may amend this post in due course, but one thing that I notice is that the passenger display always separates passengers by class. It seems to me that this really ought to be optional, as there are many situations when it is more useful to know the total number of passengers than the details of the class; a simple checkbox, perhaps, which, when unticked, reverts to the old behaviour of treating passengers from all classes alike.
This was the trade off from incorporating it directly in the simconvoy_t and simhalt_t instead of in freight_list_sorter_t. A better way overall would be to have it in the freightlistsorter, changing the sort button to a scrolled list and add a bunch of new sort options, but I had to give up on that since I could not figure out all required steps in the freightlistsorter. I think some remains of my attempts are commented out in that file.
Therefore, I initially did not want to do too much work in the sim..-files. I do, however have an idea that should be quite easy to implement that would achieve what you want.

Quote
Edit 1: I have made one or two minor fixes and changes to some GUI elements. One query, if I may: does the comfort display in the depot window take into account catering? The former comfort display used to show the comfort level with and without the effect of the catering on board a vehicle.
I have made the comfort display in the depot window (and elsewhere) follow this syntax:
"Base comfort + catering comfort"
So if the catering car has a comfort of 100 and is a catering car, it would look like:
"100 + 20"
I like to know the logic behind the comfort, and I think doing it this way helps the player see through the mechanism.
What do you think?

Note that the "+20" only comes visible if the cars class matches its catering level.

Quote
Edit 2: Similarly, it would be extremely useful to be able to see the combined passenger capacity in the deopt/replacer window for each vehicle that a player may purchase.
So you mean in the depot window something like:

P_class[0]: 100
P_class[1]: 50
Total: 150

That would actually also solve the overcrowded display issue.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15697
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #39 on: October 21, 2017, 08:42:45 PM »
This was the trade off from incorporating it directly in the simconvoy_t and simhalt_t instead of in freight_list_sorter_t. A better way overall would be to have it in the freightlistsorter, changing the sort button to a scrolled list and add a bunch of new sort options, but I had to give up on that since I could not figure out all required steps in the freightlistsorter. I think some remains of my attempts are commented out in that file.
Therefore, I initially did not want to do too much work in the sim..-files. I do, however have an idea that should be quite easy to implement that would achieve what you want.

Excellent - do let me know how you get on or if you have any queries.

Quote
I have made the comfort display in the depot window (and elsewhere) follow this syntax:
"Base comfort + catering comfort"
So if the catering car has a comfort of 100 and is a catering car, it would look like:
"100 + 20"
I like to know the logic behind the comfort, and I think doing it this way helps the player see through the mechanism.
What do you think?

Note that the "+20" only comes visible if the cars class matches its catering level.

This is good except for one issue: the catering level used by each passenger depends on the class of passenger, not the class of accommodation. A wealthier passenger does not buy a cheap meal simply because he/she has decided to travel in a lower class of accommodation. We do need to show the comfort modification for the catering irrespective of the class of accommodation.

Quote
So you mean in the depot window something like:

P_class[0]: 100
P_class[1]: 50
Total: 150

That would actually also solve the overcrowded display issue.

Yes, indeed, that would work well.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #40 on: October 21, 2017, 08:52:02 PM »
This is good except for one issue: the catering level used by each passenger depends on the class of passenger, not the class of accommodation. A wealthier passenger does not buy a cheap meal simply because he/she has decided to travel in a lower class of accommodation. We do need to show the comfort modification for the catering irrespective of the class of accommodation.

Hmm, I dont really understand. Are saying that a p_class[4] passenger riding in a p_class[2] accommodation in a train featuring a catering car level 2 would not get the bonus comfort?
Or do you mean that a p_class[4] passenger riding in a p_class[2] accommodation in a train featuring a catering car level 4 would go and eat in that car, even though he has purchased a p_class[2] ticket?
I did write it a bit clumpsy however and it might just be a misunderstanding:
The +20 will come to all classes at or above the catering level. Should it do something else?
Quote
Yes, indeed, that would work well.
Great! It will be located above the class sections if there are two classes or more!

edit:
clarification
« Last Edit: October 21, 2017, 09:05:52 PM by Ves »

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15697
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #41 on: October 21, 2017, 10:59:50 PM »
Actually, the comfort modifier of catering is currently class insensitive; however, yes, a class 4 passenger would buy a class 4 meal even if travelling in a class 2 compartment - but this only affects catering revenue, not the comfort modification.

« Last Edit: Yesterday at 11:08:28 AM by jamespetts »
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #42 on: October 21, 2017, 11:52:37 PM »
Ok, so how precisely does the catering affect the comfort in a convoy? I think Im still a bit confused  :P
But I think I then will rephrase the "catering_income_pr_km_(when_full)" to something like "estimated_catering_income_pr_km" to illustrate that it is difficult to predict.


I have now made a button, both in the convoy window and in the halt window.
I do however have one problem:

I wanted the window to remember the state of the checkbox, so you dont have to tick it every time you open a window. I have made what I think is correct, however the state is not saved!
Even so, in the convoy window, the state randomly alternates between checked and unchecked upon opening convoy windows...
suggestions?

the changes are live on my usual github branch (dont touch the translation basefile yet please! :) )

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15697
  • Total likes: 395
  • Helpful: 174
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #43 on: Yesterday at 12:01:20 AM »
The catering affects the comfort very simply: there is just an increase of a fixed amount in the comfort of the whole convoy when one or more catering vehicles of a given level is added to the convoy. This is separate from the catering revenue.

As to making the state saved, may I suggest using a static variable?

Edit: I have now had a chance to review your latest changes: thank you for that. One bug that I have noticed is that, in the vehicle classes display, when a vehicle has multiple classes, the wrong capacities appear to be shown: if you use the testing saved game that you sent to me and reset the classes on the passenger trains, you will see that the displayed class capacity for each class is only 48 when the class separation display is enabled, whereas it shows it correctly as being >400 when it is disabled.

Another issue with the vehicle class display is that, while it shows something different from the stop classes display (i.e., what class of accommodation that the passengers occupy rather than their underlying class), the display appears to be exactly the same, which is likely to cause players to think that something is wrong when some passengers marked in a stop as "medium" board a vehicle and immediately become "low". Do you think that you could make it clear that different things are being represented here?

Also, I notice that the new checkbox takes away some vertical space from the convoy and halt information windows; could this not be positioned so that it does not do this? The current position reduces the useable window space.

In the depot window, the total capacity display is very useful, but I notice that it is only used when a vehicle has more than one class. It would be much easier to interact with, I think, if it were consistent, and displayed the total capacity even when a vehicle had only one class so that players would have only to look for a single total capacity display for every vehicle. Also, is there any need to have a new translation text, "total_capacity" for this? Would not the existing "Capacity" text be better, to take away the need for this text to be re-translated into a large number of languages?

Thank you again for your work on this - it is much appreciated.
« Last Edit: Yesterday at 11:08:36 AM by jamespetts »
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.