News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Class reassignemet - line/convoy override

Started by Vladki, January 13, 2019, 09:02:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

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?

jamespetts

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

Vladki

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)

jamespetts

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

Ves

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


jamespetts

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