The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended future development discussion => Topic started by: Vladki on January 13, 2019, 09:02:31 PM

Title: Class reassignemet - line/convoy override
Post by: Vladki on January 13, 2019, 09:02:31 PM
Another idea about classes:

currently it seems, that every vehicle keeps its info about classes and their possible reassignment. The change of class in convoy or line window changes all vehicles that are currently in use by that line/convoy. But if you add more vehicles, they will have their default classes. I find it quite tedious to check from time to time if all vehicles have the same class. Would it be possible to store the class assignments in line/convoy objects, and force them upon newly added vehicles?
Title: Re: Class reassignemet - line/convoy override
Post by: jamespetts on January 13, 2019, 10:01:46 PM
It would probably be better in the long term to allow players to reassign the classes on a per vehicle basis, but this would be a fairly significant UI project and there are higher priorities at present. If anyone would like to have a go at this, it would be a worthwhile thing.
Title: Re: Class reassignemet - line/convoy override
Post by: Vladki on January 14, 2019, 10:18:08 PM
Well, at the moment, you can assign classes to individual vehicles, although it is a bit tricky. Just make several short convoys, assign them different classes, and then reassemble into one longer convoy. The classes will stay, until you change them later in convoy or line class manager. Assigning class to individual vehicles is quite a micromanagement. What I'm aiming for is quite the opposite. Set classes in line management, and forget about them. When adding new vehicles to such line, they will be assigned the lines classes. (Now you have to check the line's class manager and fix classes whenever you buy new vehicles, or move them from one line to another)
Title: Re: Class reassignemet - line/convoy override
Post by: jamespetts on January 14, 2019, 10:20:43 PM
Perhaps there is some demand for some overarching class management UI at a higher level? If Ves would be up for implementing this, it would probably be worthwhile, but I do not think that I can dedicate time to doing this at present.
Title: Re: Class reassignemet - line/convoy override
Post by: Ves on January 16, 2019, 12:51:54 AM
I think this would require writing to actual game mechanic parts, and that is something I have never done. The class manager(s) work as a tool to change here and now and doesn't remember anything significant when not in use.

For this to work, I believe there would need to be a place in eg simline that the gui_convoy_creater can look up upon when buying new vehicles.
It could be useful also later on when recombinating convoys is a thing, so the vehicles can change classes on the fly...

I could look and see, for instance how the name of a line is stored, and work my way out from there.

Skickat från min ONEPLUS A6003 via Tapatalk

Title: Re: Class reassignemet - line/convoy override
Post by: jamespetts on January 18, 2019, 12:29:22 AM
In principle, storing these data should not be too difficult. The most difficult part (and that is not difficult when you know how to do it) is saving these data with the saved games. This sort of work (adding data structures and code for loading/saving them) is more tedious than difficult.