The International Simutrans Forum

 

Author Topic: Class reassignemet - line/convoy override  (Read 541 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2676
    • My addons, mostly roadsigns
  • Languages: EN, CS
Class reassignemet - line/convoy override
« 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?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18690
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Class reassignemet - line/convoy override
« Reply #1 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.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2676
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Class reassignemet - line/convoy override
« Reply #2 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)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18690
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Class reassignemet - line/convoy override
« Reply #3 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.

Offline Ves

  • Devotee
  • *
  • Posts: 1664
  • Languages: EN, SV, DK
Re: Class reassignemet - line/convoy override
« Reply #4 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


Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18690
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Class reassignemet - line/convoy override
« Reply #5 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.