News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

I want to know which class reassigned to

Started by Ranran(retired), February 23, 2019, 05:04:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

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.  :-*
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ves

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


Ranran(retired)

#2
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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ves

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

Ves

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!

ACarlotti

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.

Ranran(retired)

#6
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.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

Ves

Quote from: ACarlotti 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)
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:

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

ACarlotti

Quote from: Ves on February 24, 2019, 09:48:28 PMI 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).

jamespetts

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

Phystam

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.

p_class[i] -> p_fare_class[i] / p_acc_class[i]

ACarlotti

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.

jamespetts

Splendid, thank you for the clarification: a fully backwards compatible system as you describe is likely to be very helpful.
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.