The International Simutrans Forum

 

Author Topic: Vehicle Manager  (Read 751 times)

0 Members and 1 Guest are viewing this topic.

Offline Ves

  • Devotee
  • *
  • Posts: 1550
  • Languages: EN, SV, DK
Vehicle Manager
« on: September 07, 2018, 12:40:28 AM »
This thread will be about the new window in Simutrans Extended, currently called the "Vehicle Manager".
I have previously mentioned it in other places, but I believe it never got its own thread, so here it is!
The thread is intended to be partly to show the progress and to get opinions on how it should function and what to have in the window.

The vehicle manager is a window where the player will be able to get information from, and perform actions to, multiple vehicles across all lines and convoys in one go. It will, for instance, be possible to select all 12 "Blue Pullman" -railway cars currently visible in the right hand window in the below picture, and manipulate all 12 cars in one go, for instance sending them to depot (which should result in the convoys with the selected cars go to depot, the 12 cars gets removed from the convoy, and the rest of the convoy departs again)

As of today the window looks like this:


Road vehicles:


I would like to adress some issues I have with the window and ask for some feedback on how to solve those:

1) Advanced Sorting
Currently, there is a sorting combobox on top of each vehicle field. They are currently limited to just a number of sort options, but those will be extended to further options.
However, I am thinking of adding more sets of tabs to help with the sorting in the left hand vehicle field, for instance the same tab system as in the depot, which for road vehicles is:

| Buses | Trolleybuses | Trucks | Trailers |

... and for rail:

| Passenger carriages | Electric units | Locomotives | Freight wagons |

Pro's is that the player should immediatedly recognize the tabs from the depot. Con's is that it is not 100% accurate with some flaws on edge cases, and that also players might want to see vehicles from two groups simultaneously.

If not using the depot window tab approach, one could instead have a set of comboboxes with display parameters and numberinputs (see my suggestion for the right hand window selection system below). It would be easier to finetune just exactly what you want to be displayed with the risk of it being very tedius and unintuitive.

I anticipate also that James will eventually implement some feature of "inseparatability" designed to handle multiple unit vehicles, say articulated busses or permanently attached cars, which cant disconnect outside the depot. The idea in the window is that it is supposed to be able to show the permanently attached unit as one entry, making it easy for the player to see how many such units (s)he has. That could also be sorted with tabs, alternatively just a button "separate articulated vehicls", to make each part of a multiple unit vehicle go into its own entry.


2) Right hand window selection system:
It is very easy to select one or a few individual vehicles, and its even easier to select all vehicles, just by pressing the "select all" button. What is difficult, however, is to select a bunch of vehicles, since you quickly loose track of which vehicle to select, and it is simply tedious to select multiple individual vehicles.
To explain why this might be an issue:
When you have, say 100 horses, and you want to select around 50 of them because those 50 should be upgraded to stronger horses, you need a way to quickly identify which 50 horses you need. With the existing sorting mechanism, you can easily sort by age, but that will just make your desired horses the 50 topmost entries, not select them. For that, you would still have to click each horse for selection.

What I had imagined could work is some kind of display system, where the player can narrow down the amount of horses displayed in the list by having a combobox and a number input.
The combobox would have entries like "bought before year", "bought after year", "overhauled before year", "overhauled after year", "wear remain minimum", "wear remain maximum", " etcetc, and in the numberinput you can specify a value, say "1956" if it is a year value. One could have two or three rows of such comboboxes and numberinputs to help further narrow down the list.
Then in addition to that a new button that says "select visible" which will select all vehicles that is now visible in the list.


3) The information tab system:
The tabs benieth the vehicle selection fields will be the place where the action takes place. I have now just created some tabs and called them something, but I am not sure with what grade of detail the tabs should be made to.

What I think is supposed to exist:
* An information field with similar information as the text information in the depot window. This information is largely picked up from vehicle_desc_t. However, if any mail- or passenger vehicles are selected, the classes might have been reassigned, so that section will have to take that into consideration
* Additional information from vehicle_desc_t about upgrade information, livery information etc that is currently not displayed in the depot.
* Information about the specific selected vehicle: Odometer, Bought year, Overhauled year, Upgraded year, Income, etcetc, simply all information that is ever available about individual vehicles. If more vehicles are selected, I would suggest this information is still visible, but is displayed in ranges, like "Bought year: 1840 - 1849".
* Actions that the player can perform on the vehicle. This would largely be buttons like: "send to depot", "upgrade", "change livery", "delete on layover" etc. Simply every action that is available to the player. The window should send the command to whatever convoy the vehicle is traveling in and tell the convoy what to do with the vehicle. In case with the "upgrade" command, the window would have to perform basicly all the same actions as the current "replacer tool" available from todays convoy windows does.

Now, if we try to put it into tabs, I think that these two tabs are pretty good:

| General information |
- The "depot information"

| Upgrade |
- This would hold some of the technical information that is important in regards to the health of the vehicle. That would be the odometer, the build year, when it was last overhauled, how much wear it has taken, as well as what vehicle(s) (if any) it can upgrade into, and the cost to do that.
The buttons for upgrade, overhaul and other similar functions would also live here.

Then I am unsure about the rest, but to throw some ideas for tabs:

| Echonomics |
- Revenue for the vehicle, along with all other echonomic statistics that might exist, and possibly the change livery button. For passenger- and mail vehicles, the classes would be reassignable from here too.

| Advanced |
- A tab that holds "dangerous" buttons, like delete, send to depot and similar commands.

| Details |
- A tab that is a combination of the previously mentioned Echonomics and Advanced tabs.

---
This window has been my biggest project to date in coding for Simutrans Ex, and I would really appreciate feedback and suggestions on some of the topics mentioned above, and even on topics that I have not touched above. I would hate to have programmed a window that proved to be useless because I made some wrong assumptions along the way  :)

The link to the progress of the window: https://github.com/VictorErik/Simutrans-Experimental-Ves/tree/veh-managment-gui
Link to a partly developed savegame to demonstrate its functions: https://github.com/VictorErik/saved-games/blob/master/veh-managment-gui/Vehicle%20Management.sve

You need this menuconf.tab in order to have the button to open the window. Make a copy of the pakset and replace the menuconf in paksetdirectory\config with this one:
https://github.com/VictorErik/saved-games/blob/master/veh-managment-gui/menuconf.tab
« Last Edit: September 07, 2018, 12:52:01 AM by Ves »

Offline Phystam jp

  • *
  • Posts: 175
  • Pak256-Ex developer
  • Languages: JP, EN
Re: Vehicle Manager
« Reply #1 on: September 07, 2018, 04:34:10 AM »
Thank you very much for working!
I tried to compile new change but I could not.

In this code, there are no need to write "vehicle_manager_t::" class qualifiers since these functions are already in-class function.

This compile error is compiler dependent, so I think that it should be corrected.

Offline Ves

  • Devotee
  • *
  • Posts: 1550
  • Languages: EN, SV, DK
Re: Vehicle Manager
« Reply #2 on: September 07, 2018, 09:15:02 AM »
Thank you, I have uploaded your fix to Github!

I am a little unsure if that was the compiler dependent error, or are there still some other error?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18030
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Vehicle Manager
« Reply #3 on: September 08, 2018, 09:57:22 PM »
This is very interesting - thank you for starting this thread. I am a little preoccupied with bug fixing related work at present, but I will have a look at this in a little more detail when I have time. It does look promising, however.

Offline Ves

  • Devotee
  • *
  • Posts: 1550
  • Languages: EN, SV, DK
Re: Vehicle Manager
« Reply #4 on: September 10, 2018, 10:57:25 AM »
Thanks James!

Phystam, where you able to compile it now?

Offline Phystam jp

  • *
  • Posts: 175
  • Pak256-Ex developer
  • Languages: JP, EN
Re: Vehicle Manager
« Reply #5 on: September 10, 2018, 11:44:02 AM »
Yes, I could compile it!

Offline Ves

  • Devotee
  • *
  • Posts: 1550
  • Languages: EN, SV, DK
Re: Vehicle Manager
« Reply #6 on: January 17, 2019, 02:28:38 PM »
I have uploaded the sources for a new version of the vehicle manager to GitHub. Still, the window is not really usefull for anything else than see the "dat file information", as found in the depot, however improvements have been made to the listing, and displaying of the vehicles. Also the list of upgrades are available in the correct tab.

If you guys would like to have a break from serverbug findings, you could try it out and check the functionallity of the sorting mechanism, especially the "display by" section, and tell me if you find it intuitive or how it could be improved. I would appreciate any feedback how to make it better  :)

https://github.com/VictorErik/Simutrans-Experimental-Ves/tree/veh-managment-gui

Remember, this menuconf.tab needs to be in the pakset directory, so make sure to make a copy of the pakset and replace the menuconf in new paksetdirectory\config with this one:
https://github.com/VictorErik/saved-games/blob/master/veh-managment-gui/menuconf.tab

Offline thegamer7893 england

  • *
  • Posts: 706
  • Languages: English
[Compliment] Vehicle Manager
« Reply #7 on: January 17, 2019, 06:16:03 PM »
This thread will be about the new window in Simutrans Extended, currently called the "Vehicle Manager".
I have previously mentioned it in other places, but I believe it never got its own thread, so here it is!
The thread is intended to be partly to show the progress and to get opinions on how it should function and what to have in the window.

The vehicle manager is a window where the player will be able to get information from, and perform actions to, multiple vehicles across all lines and convoys in one go. It will, for instance, be possible to select all 12 "Blue Pullman" -railway cars currently visible in the right hand window in the below picture, and manipulate all 12 cars in one go, for instance sending them to depot (which should result in the convoys with the selected cars go to depot, the 12 cars gets removed from the convoy, and the rest of the convoy departs again)

As of today the window looks like this:


Road vehicles:


I would like to adress some issues I have with the window and ask for some feedback on how to solve those:

1) Advanced Sorting
Currently, there is a sorting combobox on top of each vehicle field. They are currently limited to just a number of sort options, but those will be extended to further options.
However, I am thinking of adding more sets of tabs to help with the sorting in the left hand vehicle field, for instance the same tab system as in the depot, which for road vehicles is:

| Buses | Trolleybuses | Trucks | Trailers |

... and for rail:

| Passenger carriages | Electric units | Locomotives | Freight wagons |

Pro's is that the player should immediatedly recognize the tabs from the depot. Con's is that it is not 100% accurate with some flaws on edge cases, and that also players might want to see vehicles from two groups simultaneously.

If not using the depot window tab approach, one could instead have a set of comboboxes with display parameters and numberinputs (see my suggestion for the right hand window selection system below). It would be easier to finetune just exactly what you want to be displayed with the risk of it being very tedius and unintuitive.

I anticipate also that James will eventually implement some feature of "inseparatability" designed to handle multiple unit vehicles, say articulated busses or permanently attached cars, which cant disconnect outside the depot. The idea in the window is that it is supposed to be able to show the permanently attached unit as one entry, making it easy for the player to see how many such units (s)he has. That could also be sorted with tabs, alternatively just a button "separate articulated vehicls", to make each part of a multiple unit vehicle go into its own entry.


2) Right hand window selection system:
It is very easy to select one or a few individual vehicles, and its even easier to select all vehicles, just by pressing the "select all" button. What is difficult, however, is to select a bunch of vehicles, since you quickly loose track of which vehicle to select, and it is simply tedious to select multiple individual vehicles.
To explain why this might be an issue:
When you have, say 100 horses, and you want to select around 50 of them because those 50 should be upgraded to stronger horses, you need a way to quickly identify which 50 horses you need. With the existing sorting mechanism, you can easily sort by age, but that will just make your desired horses the 50 topmost entries, not select them. For that, you would still have to click each horse for selection.

What I had imagined could work is some kind of display system, where the player can narrow down the amount of horses displayed in the list by having a combobox and a number input.
The combobox would have entries like "bought before year", "bought after year", "overhauled before year", "overhauled after year", "wear remain minimum", "wear remain maximum", " etcetc, and in the numberinput you can specify a value, say "1956" if it is a year value. One could have two or three rows of such comboboxes and numberinputs to help further narrow down the list.
Then in addition to that a new button that says "select visible" which will select all vehicles that is now visible in the list.


3) The information tab system:
The tabs benieth the vehicle selection fields will be the place where the action takes place. I have now just created some tabs and called them something, but I am not sure with what grade of detail the tabs should be made to.

What I think is supposed to exist:
* An information field with similar information as the text information in the depot window. This information is largely picked up from vehicle_desc_t. However, if any mail- or passenger vehicles are selected, the classes might have been reassigned, so that section will have to take that into consideration
* Additional information from vehicle_desc_t about upgrade information, livery information etc that is currently not displayed in the depot.
* Information about the specific selected vehicle: Odometer, Bought year, Overhauled year, Upgraded year, Income, etcetc, simply all information that is ever available about individual vehicles. If more vehicles are selected, I would suggest this information is still visible, but is displayed in ranges, like "Bought year: 1840 - 1849".
* Actions that the player can perform on the vehicle. This would largely be buttons like: "send to depot", "upgrade", "change livery", "delete on layover" etc. Simply every action that is available to the player. The window should send the command to whatever convoy the vehicle is traveling in and tell the convoy what to do with the vehicle. In case with the "upgrade" command, the window would have to perform basicly all the same actions as the current "replacer tool" available from todays convoy windows does.

Now, if we try to put it into tabs, I think that these two tabs are pretty good:

| General information |
- The "depot information"

| Upgrade |
- This would hold some of the technical information that is important in regards to the health of the vehicle. That would be the odometer, the build year, when it was last overhauled, how much wear it has taken, as well as what vehicle(s) (if any) it can upgrade into, and the cost to do that.
The buttons for upgrade, overhaul and other similar functions would also live here.

Then I am unsure about the rest, but to throw some ideas for tabs:

| Echonomics |
- Revenue for the vehicle, along with all other echonomic statistics that might exist, and possibly the change livery button. For passenger- and mail vehicles, the classes would be reassignable from here too.

| Advanced |
- A tab that holds "dangerous" buttons, like delete, send to depot and similar commands.

| Details |
- A tab that is a combination of the previously mentioned Echonomics and Advanced tabs.

---
This window has been my biggest project to date in coding for Simutrans Ex, and I would really appreciate feedback and suggestions on some of the topics mentioned above, and even on topics that I have not touched above. I would hate to have programmed a window that proved to be useless because I made some wrong assumptions along the way  :)

The link to the progress of the window: https://github.com/VictorErik/Simutrans-Experimental-Ves/tree/veh-managment-gui
Link to a partly developed savegame to demonstrate its functions: https://github.com/VictorErik/saved-games/blob/master/veh-managment-gui/Vehicle%20Management.sve

You need this menuconf.tab in order to have the button to open the window. Make a copy of the pakset and replace the menuconf in paksetdirectory\config with this one:
https://github.com/VictorErik/saved-games/blob/master/veh-managment-gui/menuconf.tab

Love it!  ;)

Offline wlindley us

  • Devotee
  • *
  • Posts: 953
    • Hacking for fun and profit since 1977
  • Languages: EN, DE
Re: Vehicle Manager
« Reply #8 on: January 17, 2019, 07:38:20 PM »
Note "Economics" (spelling)

Offline Ves

  • Devotee
  • *
  • Posts: 1550
  • Languages: EN, SV, DK
Re: Vehicle Manager
« Reply #9 on: January 17, 2019, 07:48:38 PM »
Thanks, and thanks for the heads up with spelling!

Offline Ves

  • Devotee
  • *
  • Posts: 1550
  • Languages: EN, SV, DK
Re: Vehicle Manager
« Reply #10 on: January 18, 2019, 11:48:34 AM »
I have attached some screenshoots to this post and am also uploading a binary, so you dont have to compile yourself. Remember, though, that you still need to have the correct menuconf.tab, so you will need to duplicate an existing pakset and replace the menuconf.tab with mine.

Menuconf.tab: https://github.com/VictorErik/saved-games/blob/master/veh-managment-gui/menuconf.tab
Executable: https://github.com/VictorErik/saved-games/raw/master/veh-managment-gui/Simutrans-Extended_veh-manager_190118.exe

It is compiled on MSVS1015, so I dont know if the executable will run on any type of machine.