The International Simutrans Forum

 

Author Topic: I want to know which class reassigned to  (Read 532 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran jp

  • *
  • Posts: 412
  • Languages: ja
I want to know which class reassigned to
« on: February 23, 2019, 05:04:06 PM »
I want to know which class I reassigned to before easily. (´・ω・`)
I mean, that information is hiding in the depths.
Reassigned class can be known only with changed prices dialog.
When the class is changed, it does not display which class it is now other than changed prices dialog.

Look at this. (´・ω・`)御覧じて?



This convoy has one High class car, one Low class car and one car its class changed from Low to Very Low.
HighLowLow->Very low
1911072

(1) Convoy information dialog:
This is a screen that is often used.



On this dialog, we can not get information that it has Very low class car. Or rather it deceives us.  ::(
American very low class passengers may sue against this - "F***, I missed the train that should be able to ride!"


(2) Convoy detail window:


It shows "(1 reassigned class)" but... it is also mimicking. It's original is Low. I changed its class to very low. (´・ω・`)Why you gotta be so mean~♪


(3) Change prices dialog:


Yeah, he is the only honest guy.  :-*
« Last Edit: February 23, 2019, 05:17:13 PM by Ranran »

Offline Ves

  • Devotee
  • *
  • Posts: 1659
  • Languages: EN, SV, DK
Re: I want to know which class reassigned to
« Reply #1 on: February 23, 2019, 05:55:27 PM »
I'm not sure I understand, is there a bug or is it a request to display the information differently?

Skickat från min ONEPLUS A6003 via Tapatalk


Offline Ranran jp

  • *
  • Posts: 412
  • Languages: ja
Re: I want to know which class reassigned to
« Reply #2 on: February 23, 2019, 11:28:09 PM »
Sorry for my poop English. (´・ω・`)

There is no bug in the flow of passengers. It is a issue of display inaccuracy.

I think it is better to be modified as follows.

It seems as if a passenger of Very low class rode illegally to Low class.
And very low class fare is paid, not low class.


The contents of cargo are delimited by original classes, it does not consider reassigned class.
In the example above, since Low and Very low are mixed, it should be distinguished. And player can not know that the convoy has a Very low passenger car except for change prices dialog.
« Last Edit: February 23, 2019, 11:42:26 PM by Ranran »

Offline Ves

  • Devotee
  • *
  • Posts: 1659
  • Languages: EN, SV, DK
Re: I want to know which class reassigned to
« Reply #3 on: February 24, 2019, 12:11:20 AM »
Ah ok I see, thanks! I wil look into it.
I believe I already found the issue with the details window, and currently trying to see where it went wrong in the convoy cargo manifest screen...

Offline Ves

  • Devotee
  • *
  • Posts: 1659
  • Languages: EN, SV, DK
Re: I want to know which class reassigned to
« Reply #4 on: February 24, 2019, 12:49:15 AM »
Replying with a double post ( :::) ) to tell that I think I found both the bugs and they are available here:

https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/gui-small-improvements

please test it and see if it works in your case!

Offline ACarlotti

  • *
  • Posts: 439
Re: I want to know which class reassigned to
« Reply #5 on: February 24, 2019, 04:36:32 AM »
The first thing that I want to make clear is that there are two kinds of class - accommodation class and fare class. (There is no fundamental reason for these to share the same set of categories, but for historical reasons they do). Mixing up these two different types of class was the source of a number of bugs that I fixed just over a year ago (my first patches, as it happens). At the time I made a deliberate decision to show what accommodation class passengers were occupying; I now see that this was not always the right decision. (Original thread here)

There are two cases to consider here:
1. In the vehicle details window, the passengers are currently listed according to the accommodation class they are in. I think it is important to separate them this way - you'd want to know how many passengers were inside a stagecoach and how many were sitting on the roof even if you were charging them the same fare class. Furthermore, with your proposed fix, you would end up with two separate lists of passengers under identical headings.
The correct change in this case would be to add the information about the reassigned (fare) class while retaining existing information about the accommodation class.

2. In the convoy information window passengers are currently listed according to their accommodation class. I think I agree that in this case knowing the fare class is more useful than knowing the accommodation class. It might be better to add this as a new sort method, but at the moment I can't see any reason to sum over accommodation classes given that the same accommodation class could mean different things in different vehicles.

Actually, I'm beginning to think that having accommodation spaces in vehicles described in the same terms as passenger wealth levels is probably a mistake - perhaps it would be better to change the code (and extend the dat file format) so that each vehicle has a list of accommodation spaces, each of which has a comfort value, a capacity, a name (so we can actually talk about 3rd class compartments, etc.), and a suggested wealth level. A stagecoach might then have it's capacity categorised as "Inside (High)" and "Outside (Very Low)".
This would also allow the removal of a nasty botch I put in the code to retrospectively fix the number of classes in a vehicle. I think such changes could be made fully backwards compatible, and would also lead to a reduction in memory usage (especially if anyone tries introducing a 200 class system). I can go into more detail later once I have more time.

Offline Ranran jp

  • *
  • Posts: 412
  • Languages: ja
Re: I want to know which class reassigned to
« Reply #6 on: February 24, 2019, 05:24:45 AM »
First of all, thank you very much for working on this, Ves. :)


I tested it and it was displayed as I wanted to.  :thumbsup:

"Base profit per km (when full)" is also displayed properly reassigned one.


I do not understand the difference between accommodation class and fare class. Is it different from the wealth of people and the (reassigned) class of vehicles?
I opened one of my low class car to very low wealth people, then that car's fare is very low class's.
It means, the loaded class type of that vehicle is very low. Speaking of the fare mechanism, Is not it the same as very high wealth people riding high class when there is no very high class vehicle?
Am I misunderstanding?


EDIT:
btw, this is another issue but, these vehicles display Max. Brake force: 65535.
« Last Edit: February 24, 2019, 04:46:35 PM by Ranran »

Offline Ves

  • Devotee
  • *
  • Posts: 1659
  • Languages: EN, SV, DK
Re: I want to know which class reassigned to
« Reply #7 on: February 24, 2019, 09:48:28 PM »
The first thing that I want to make clear is that there are two kinds of class - accommodation class and fare class. (There is no fundamental reason for these to share the same set of categories, but for historical reasons they do). Mixing up these two different types of class was the source of a number of bugs that I fixed just over a year ago (my first patches, as it happens). At the time I made a deliberate decision to show what accommodation class passengers were occupying; I now see that this was not always the right decision. (Original thread here)
Thanks ACarlotti, and also thank you for repairing the bugs and clearing up stuff in the first place (as listed in the thread you link). It was rather confusing to begin with....

Quote
There are two cases to consider here:
1. In the vehicle details window, the passengers are currently listed according to the accommodation class they are in. I think it is important to separate them this way - you'd want to know how many passengers were inside a stagecoach and how many were sitting on the roof even if you were charging them the same fare class. Furthermore, with your proposed fix, you would end up with two separate lists of passengers under identical headings.
The correct change in this case would be to add the information about the reassigned (fare) class while retaining existing information about the accommodation class.
Yes, I remember that I initially wanted to list each accommodations, but I dont think that was possible really before your alterations to the code.
It should now be possible to send information both about the original class and the reassigned class to the freight_list_sorter in order to display it properly, however, it might be difficult to have the greyed color text (which I would like in order to keep it discrete). One solution could be to make the details window ask for cargo information one time for each accommodation, instead of asking for all cargo information in one go. I could look into it, but I dont have much time currently..

Now it does display the text "(x reassigned classes)" when there are reassigned classes. I agree that that is not optimal, but it might work for the moment?

Quote
2. In the convoy information window passengers are currently listed according to their accommodation class. I think I agree that in this case knowing the fare class is more useful than knowing the accommodation class. It might be better to add this as a new sort method, but at the moment I can't see any reason to sum over accommodation classes given that the same accommodation class could mean different things in different vehicles.
Well indeed!

Quote
Actually, I'm beginning to think that having accommodation spaces in vehicles described in the same terms as passenger wealth levels is probably a mistake - perhaps it would be better to change the code (and extend the dat file format) so that each vehicle has a list of accommodation spaces, each of which has a comfort value, a capacity, a name (so we can actually talk about 3rd class compartments, etc.), and a suggested wealth level. A stagecoach might then have it's capacity categorised as "Inside (High)" and "Outside (Very Low)".
This would also allow the removal of a nasty botch I put in the code to retrospectively fix the number of classes in a vehicle. I think such changes could be made fully backwards compatible, and would also lead to a reduction in memory usage (especially if anyone tries introducing a 200 class system). I can go into more detail later once I have more time.
I proposed for James a while ago to have some kind of descriptions to the accommodations, so the you in game could read "Roof", "Coupe" or similar, but as it surely only is a cosmethic thing it never came around.

edit:

Quote
I do not understand the difference between accommodation class and fare class. Is it different from the wealth of people and the (reassigned) class of vehicles?
I opened one of my low class car to very low wealth people, then that car's fare is very low class's.
It means, the loaded class type of that vehicle is very low. Speaking of the fare mechanism, Is not it the same as very high wealth people riding high class when there is no very high class vehicle?
Am I misunderstanding?

I believe that the "accommodation class" is the class that is specified in the dat-file and will not change during the game. If you in game reassign that class to another class one has to keep track of the reassigned class, therefore he calls it "fare class". When James first coded the classes feature, there where no such things in the code as "accommodation class" and "fare class", but ACarlotti came and cleared it up so it is easier to code and less likely to create bugs due to misconceptions..
Am I right, ACarlotti?

Offline ACarlotti

  • *
  • Posts: 439
Re: I want to know which class reassigned to
« Reply #8 on: February 25, 2019, 12:03:11 AM »
I believe that the "accommodation class" is the class that is specified in the dat-file and will not change during the game. If you in game reassign that class to another class one has to keep track of the reassigned class, therefore he calls it "fare class". When James first coded the classes feature, there where no such things in the code as "accommodation class" and "fare class", but ACarlotti came and cleared it up so it is easier to code and less likely to create bugs due to misconceptions..
Am I right, ACarlotti?

Yep.

With my suggestion above, the existing concept of 'accommodation class' would be replaced with something slightly different (enabling accommodation spaces to be described using different terminology to the current overloaded class names).

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18581
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: I want to know which class reassigned to
« Reply #9 on: March 10, 2019, 02:11:58 PM »
Thank you all for your thoughts on this. I have now incorporated Ves's fix.

A. Carlotti's suggestion of separation has merit (providing that it would not require changing every .dat file with class/accommodation information, which would be impractical), although I am not likely to be able to attend to this myself for a considerable time as it would be labour intensive and I need to prioritise critical bugs and balance issues. If anyone else would like to work on this, then that would be most welcome.

Ves's fixes should be in the next nightly build - I should be grateful if anyone could confirm whether this fixes the problem originally described.

Online Phystam jp

  • *
  • Posts: 223
  • Pak256.Ex developer
  • Languages: JP, EN, EO
Re: I want to know which class reassigned to
« Reply #10 on: March 10, 2019, 03:40:45 PM »
In my understanding,
 - accomodation "Low" class people can take "3rd class car" or lower
 - accomodation "Middle" class people can take "2nd class car" or lower etc., right?
If so, changing the name of passenger accomodation classes and fare classes is very important for our purpose. "1st/2nd/3rd class" are more precise names than "high/middle/low".
Anyway, I think that separating the name is not so hard work, but it needs little translation works for all paksets and languages.
Code: [Select]
p_class[i] -> p_fare_class[i] / p_acc_class[i]

Offline ACarlotti

  • *
  • Posts: 439
Re: I want to know which class reassigned to
« Reply #11 on: March 10, 2019, 06:00:27 PM »
Phystam: You are not fully understanding my proposal. My idea is to make the number of classes of accommodation in a vehicle completely independent of the number of wealth groups. Each portion of accommodation in a vehicle would have a suggested (default) wealth class assigned to it, and can be given a descriptive name in the pak file.

James: This would be fully backwards compatible - in the event that default wealth classes aren't in listed in the pak file or dat file, the default will be set to be equal to the index of the accommodation (which is consistent with the current dat file format). If the dat file and/or pak file does not give a label for an accommodation section, then it can be named according to it's default wealth category (perhaps in a slightly different form to the wealth description to avoid the existing ambiguity), or can be left unspecified if it is the only (non-empty) section in the vehicle.

I know what I intend to do here, and a lot of it involves reworking and fixing stuff I did last year, so I'll put this on my todo list and write it up when I have time.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18581
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: I want to know which class reassigned to
« Reply #12 on: March 10, 2019, 10:52:49 PM »
Splendid, thank you for the clarification: a fully backwards compatible system as you describe is likely to be very helpful.