The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Simutrans-Extended major projects => Topic started by: Ves on September 07, 2018, 12:40:28 AM

Title: Vehicle Manager
Post by: Ves 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:
(https://farm2.staticflickr.com/1861/43803727154_199d3d54ab_o_d.png)

Road vehicles:
(https://farm2.staticflickr.com/1844/44469218042_dd34af7179_o_d.png)

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 (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 (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 (https://github.com/VictorErik/saved-games/blob/master/veh-managment-gui/menuconf.tab)
Title: Re: Vehicle Manager
Post by: Phystam on September 07, 2018, 04:34:10 AM
Thank you very much for working!
I tried to compile new change but I could not.
(https://cdn.discordapp.com/attachments/483941895773618196/487478730684497921/veh-man.png)
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.
Title: Re: Vehicle Manager
Post by: Ves 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?
Title: Re: Vehicle Manager
Post by: jamespetts 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.
Title: Re: Vehicle Manager
Post by: Ves on September 10, 2018, 10:57:25 AM
Thanks James!

Phystam, where you able to compile it now?
Title: Re: Vehicle Manager
Post by: Phystam on September 10, 2018, 11:44:02 AM
Yes, I could compile it!
Title: Re: Vehicle Manager
Post by: Ves 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 (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
Title: [Compliment] Vehicle Manager
Post by: fam621 on January 17, 2019, 06:16:03 PM
Quote from: Ves 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:
(https://farm2.staticflickr.com/1861/43803727154_199d3d54ab_o_d.png)

Road vehicles:
(https://farm2.staticflickr.com/1844/44469218042_dd34af7179_o_d.png)

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 (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 (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 (https://github.com/VictorErik/saved-games/blob/master/veh-managment-gui/menuconf.tab)

Love it!  ;)
Title: Re: Vehicle Manager
Post by: wlindley on January 17, 2019, 07:38:20 PM
Note "Economics" (spelling)
Title: Re: Vehicle Manager
Post by: Ves on January 17, 2019, 07:48:38 PM
Thanks, and thanks for the heads up with spelling!
Title: Re: Vehicle Manager
Post by: Ves 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 (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 (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.

(https://farm8.staticflickr.com/7839/39821922133_af59ae7b4d_o_d.png)

(https://farm8.staticflickr.com/7885/46787357621_ce129bcfa4_o_d.png)

(https://farm5.staticflickr.com/4839/32911532758_d7b89929de_o_d.png)

(https://farm5.staticflickr.com/4913/32911532778_400d62ee34_o_d.png)
Title: Re: Vehicle Manager
Post by: Spenk009 on February 21, 2019, 05:53:36 PM
This tool handles very well, it is well thought out and could turn managing larger maps into playing larger maps. I'm quite taken in with the possibilities of smart vehicle/convoy replacement in combination with the vehicle schedule management overhaul.

A few notes:
The windows are player based, switching between players does not cause the windows to disappear. Is this intended to aid people running multiple companies?
There is no sort_vehicles_by: retire_year on the left panel.
The display_vehicles_by: selection is very good and adapts great between input options. Comfort doesn't yet seem to filter properly.
You don't mention it which doesn't exclude intentions, but also having the retire date in the maintenance information tab would be handy.
Could preselect_all up on the right side enable the same selection and deselection style on the left as on the right? In a similar vein, could it be implemented that holding shift when selecting one vehicle and a second vehicle auto-select the intermediate vehicles in the list?

I don't want to criticize too much, since you have a vision for the tool and many items I list are probably in line with your intentions anyway.


This is on a Linux Mint machine, running wine. Due to the following error I've only poked around in the default loading save.
I've downloaded the files and while it ran once and the vehicle manager opened without any issues, the game crashes when loading a map (or more accurately when unloading map is displayed in-game):
wine: Unhandled page fault on read access to 0x00000000 at address 0x58140d (thread 00c0), starting debugger...
00c0:err:seh:start_debugger Couldn't start debugger ("winedbg --auto 191 600") (2)

Title: Re: Vehicle Manager
Post by: Vladki on February 21, 2019, 06:01:25 PM
Why are you running simutrans in wine? You can compile native Linux executable.
Title: Re: Vehicle Manager
Post by: Ves on February 22, 2019, 01:33:21 PM
Quote from: Spenk009 on February 21, 2019, 05:53:36 PM
This tool handles very well, it is well thought out and could turn managing larger maps into playing larger maps. I'm quite taken in with the possibilities of smart vehicle/convoy replacement in combination with the vehicle schedule management overhaul.
Thanks! Yes one of the big aims with this window is to easily identify large amount of vehicles that needs attention across the entire map, and allow you to make alterations to them. I will make som class reassign tools, a way to upgrade them, a way to replace them, order them to overhaul, sell them etcetc. Basicly as many functions as possible.

Quote
A few notes:
The windows are player based, switching between players does not cause the windows to disappear. Is this intended to aid people running multiple companies?
It follows the same "rules" as the schedule list dialog. You can open the schedule list for one player and then switch player and open another schedule list for that player. I have no opinion about wether it should be possible or not, but I think they should behave in similar ways.

Quote
There is no sort_vehicles_by: retire_year on the left panel.
True, do you think it is wortwhile to have?

Quote
The display_vehicles_by: selection is very good and adapts great between input options. Comfort doesn't yet seem to filter properly.
Thanks, Im happy to hear this! Did you figure out the syntaxes that I had prepared?
And thanks for the bug report, there was a bug which I have fixed on my local branch, but not yet uploaded.

Quote
You don't mention it which doesn't exclude intentions, but also having the retire date in the maintenance information tab would be handy.
True, I have not yet really designed that tab yet. I think it should hold a mix max of "maintenance" information about the individual vehicles in general (age, odometer, wear, time since last overhaul etc) as well as some command buttons (send to depot, upgrade, replace etc). Having the retire date there too might be usefull, thanks!

Quote
Could preselect_all up on the right side enable the same selection and deselection style on the left as on the right? In a similar vein, could it be implemented that holding shift when selecting one vehicle and a second vehicle auto-select the intermediate vehicles in the list?
How do you mean?
Currently you can only select one desc to be displayed on the right. I have thoughts of making it possible to select multiple vehicles on the left, but I think that would have to come in at a later stage, when James have dealt with the (hopefully to be implemented) feature of "permanent attached vehicles".
Unfortunately, however, I think it is too difficult to have the autoselect with holding shift. It would be a great feature, but the way the list and selections are created no entry knows of any other entries or wether they are selected or not. I can try to play around a bit with it, but I cant make any promise on that....

Quote
I don't want to criticize too much, since you have a vision for the tool and many items I list are probably in line with your intentions anyway.
Im very happy to have your views, thats after all why I post about it in the first place! :) It is easy to grow blind on what you are doing, thinking that it is what everybody else wants, and then one have created something that is way beyond the target or extremely complicated to use.
My currently biggest concern is after all the "display by" sections and the overall sorting mechanism and how intuitive it would be

Quote


This is on a Linux Mint machine, running wine. Due to the following error I've only poked around in the default loading save.
I've downloaded the files and while it ran once and the vehicle manager opened without any issues, the game crashes when loading a map (or more accurately when unloading map is displayed in-game):
wine: Unhandled page fault on read access to 0x00000000 at address 0x58140d (thread 00c0), starting debugger...
00c0:err:seh:start_debugger Couldn't start debugger ("winedbg --auto 191 600") (2)

I know that it is not (really) possible to load an existing game map, but I dont think that is because of my window, but rather that this window exists in the new vehicle reattachment branch of simutrans.
If you create a schedule, you will se that the schedule look different with lots of new (not working) options.
Technically, I could create the window in the master branch of simutrans, but given the aim of the window, I initially thought it best to create in this branch.

I have uploaded the latest version of the window, and I have added a few bits and improvements, among others certain display by entries is made with a combobox.
Thank for your feedback!
Title: Re: Vehicle Manager
Post by: Spenk009 on February 22, 2019, 03:19:52 PM
Quote from: Ves on February 22, 2019, 01:33:21 PMThere is no sort_vehicles_by: retire_year on the left panel.
True, do you think it is wortwhile to have?
I think it can help increase players awareness of what vehicles are to end their sales soon. I often encounter the case where lines need additional vehicles, but the vehicles currently used are no longer for sale. This results in either replacing perfectly able convoys or creating another layer of complexity in replacing vehicles in the future.

Quote from: Ves on February 22, 2019, 01:33:21 PM(1) It would be a great feature, but the way the list and selections are created no entry knows of any other entries or wether they are selected or not. I can try to play around a bit with it, but I cant make any promise on that....
(2) How do you mean?
(1) I understand it's a difficult task. Programming is difficult and if a player properly utilizes the filtering system they will be able to do just fine on their own.
(2) Currently one needs to select the vehicles in the right pane to issue orders to them. But there is no multi-selection on the left side. If you tick the "preselect_all" box, could that allow multi-selection of left side items? The thought here is e.g: An EMU consists of several vehicles. If you are able to select all of the found units on the left, it could allow replacing all vehicles in that selection. I think my example isn't very clear and you reference "permanently attached vehicles" which are most definitely a solution to the issue I raised here. I think it best to wait for the integration of such before we elaborate on a topic that will resolve itself regardless.

Quote from: Ves on February 22, 2019, 01:33:21 PMI know that it is not (really) possible to load an existing game map, but I dont think that is because of my window, but rather that this window exists in the new vehicle reattachment branch of simutrans.
I was able to load one savegame (this was a fluke). It ran well, even if all lines were empty as the schedules did not fit any lines. I can't comment on whether it loads again, as it seems any hibernation on my machine re-allows for one loading of a game.




Quote from: Vladki on February 21, 2019, 06:01:25 PM
Why are you running simutrans in wine? You can compile native Linux executable.
I'll edit a small guide if I get it working in the stickied thread. If you could make a better guide I would be very grateful, since I'm still quite new to Linux and am very liable to posting humbug/bad practice.
Title: Re: Vehicle Manager
Post by: Ves on February 22, 2019, 09:05:57 PM


Quote from: Spenk009 on February 22, 2019, 03:19:52 PM
I think it can help increase players awareness of what vehicles are to end their sales soon. I often encounter the case where lines need additional vehicles, but the vehicles currently used are no longer for sale. This results in either replacing perfectly able convoys or creating another layer of complexity in replacing vehicles in the future.
True, that sounds reasonable ? one could also expand the display by to add further information!

Quote
(1) I understand it's a difficult task. Programming is difficult and if a player properly utilizes the filtering system they will be able to do just fine on their own.
Yes, the display by feature came to life when I realized that the player might want to select a big bunch of vehicles out of perhaps thousands. Currently there are not so many display by parameters but it should be quite easy to add more.
I was thinking wether it would be worth having two display by boxes, in order to further narrowing down vehicles but that might be redundant and would also further clutter the window.

Quote
(2) Currently one needs to select the vehicles in the right pane to issue orders to them. But there is no multi-selection on the left side. If you tick the "preselect_all" box, could that allow multi-selection of left side items? The thought here is e.g: An EMU consists of several vehicles. If you are able to select all of the found units on the left, it could allow replacing all vehicles in that selection. I think my example isn't very clear and you reference "permanently attached vehicles" which are most definitely a solution to the issue I raised here. I think it best to wait for the integration of such before we elaborate on a topic that will resolve itself regardless.
Yes, once we know how the reassemble feature will work more precisely it will be easier to work with that idea. I would like to have a checkbox that toggle permanent attached vehicles to be shown as one entry in the left list.
The idea is to get entries that consists of complete DMU's or steam engines and their tenders. Each variant of the DMU's would have its own entry, so if for instance you have made a DMU that consists of DMU model A and B, and another DMU with DMU model A and C, it would show up as two different entries in the left list.

Selecting such an entry would display all vehicles making up the DMU's in the right hand list, and performing actions would affect all of the vehicles.

When that is implemented, the step to make normal multi selection from the left hand list would be quite small.

Skickat från min ONEPLUS A6003 via Tapatalk

Title: Re: Vehicle Manager
Post by: Ves on December 30, 2019, 01:15:45 AM
Wow, time flies fast!

I am working away with the window, slowly making progress, but currently got stuck on the livery list, from which the player should be able to choose a new livery for their vehicles. However, I read from other places in the forum that liveries might be reworked a little bit, so, James, could you perhaps update the "vehicle-management" branch with the latest additions from the master?
Title: Re: Vehicle Manager
Post by: Phystam on December 30, 2019, 01:51:21 AM
If the "automatic GUI patch" implemented in Standard would be available, would that coding of GUI be easier?
Anyway, we also have to do that work in the future in order to follow the Standard code, so reconstruction of all GUI code is needed first.

Yes, I imagine that that work is very difficult and takes long time.
Title: Re: Vehicle Manager
Post by: Ves on December 30, 2019, 10:31:57 AM
Honestly, I dont know if it would be easier to code GUI, I have never programmed with the new GUI code of standard. True, redoing work is never fun, but we will have to see what that looks like when it is actual in Extended.
Anyway, the coding of this window has taken a very long time already, and if it is to be finish anytime (soon?), then I cant wait for the new GUI.
Title: Re: Vehicle Manager
Post by: jamespetts on December 30, 2019, 11:11:27 AM
The only livery changes that there have been recently is incorporating a relatively modest patch from Ranran which has the effect of limiting the visible liveries in the list in the depot (but not elsewhere) to those for which there are at least some vehicles of the waytype served by the depot.

I am away from home at present and not easily able to work on the code; but, if you look at Ranran's branch on Github, you should be able to see the code and work out whether that affects what you are doing or not.
Title: Re: Vehicle Manager
Post by: Ves on December 30, 2019, 12:21:11 PM
So far I can see, Ranran did create some functions in vehicle_desc and livery_scheme that I find usefull, for instance the "get_available_livery_count" and possibly some of the other stuff too.
Title: Re: Vehicle Manager
Post by: jamespetts on December 30, 2019, 12:41:13 PM
Quote from: Ves on December 30, 2019, 12:21:11 PM
So far I can see, Ranran did create some functions in vehicle_desc and livery_scheme that I find usefull, for instance the "get_available_livery_count" and possibly some of the other stuff too.

Excellent. I have noticed that Ranran has created some more patches for the livery system which I have not integrated yet as I cannot get them to compile, so am awaiting a fix for that.
Title: Re: Vehicle Manager
Post by: Ranran(retired) on December 30, 2019, 12:45:06 PM
Many thanks to Ves for his big work.  :thumbsup:
There seems to be a request to change Livery individually instead of Livery scheme. (It also includes outdated liveries.)
Currently, livery information is masked and can be a bit inconvenient, and it would be beneficial to have a lot of liveries available for network games.
I think this Vehicle Manager is best for implementing such feature.  :)

I might make a patch that shows a bit more of the masked information, but I don't think I'll add any new functions anymore.
Title: Re: Vehicle Manager
Post by: Ves on December 30, 2019, 01:21:33 PM
Thank you!
What I had in mind for the liveries in this window is that the player will be able to choose between all subliveries for each vehicle, not only the livery scheme. Why I think this is a good idea is twofold:
1) - Players gets to visually see all (even obsolete) liveries of the vehicle, helping the player to understand the "livery paths".
2) - Players might want to apply an old livery to a vehicle for whatever reason (simulating heritage lines, running it as model trains etc).

I also think that in the depot and line management, it is sufficient to just choose the livery scheme, with all vehicles recieving the latest available livery for that given scheme.
Title: Re: Vehicle Manager
Post by: Ranran(retired) on December 30, 2019, 01:36:58 PM
Quote from: Ves on December 30, 2019, 01:21:33 PMPlayers gets to visually see all (even obsolete) liveries of the vehicle
Sounds great! It is like a vehicle picture book.
Is there a plan to be able to check the future livery (and intro_date)?
Title: Re: Vehicle Manager
Post by: jamespetts on December 30, 2019, 02:03:39 PM
Perhaps the ability to select old liveries should be enableable/disableable as a simuconf.tab option in much the same way as buying obsolete vehicles in the depot, for much the same reasons.
Title: Re: Vehicle Manager
Post by: Ranran(retired) on December 30, 2019, 02:36:25 PM
Quote from: jamespetts on December 30, 2019, 02:03:39 PMPerhaps the ability to select old liveries should be enableable/disableable as a simuconf.tab option in much the same way as buying obsolete vehicles in the depot, for much the same reasons.
Oh, that's exactly the same as I wrote in another thread now.
Title: Re: Vehicle Manager
Post by: Ves on December 30, 2019, 07:27:20 PM
No, I didnt think that you should be able to select future liveries. Only in timeline off all liveries should be shown.

Quote from: jamespetts on December 30, 2019, 02:03:39 PM
Perhaps the ability to select old liveries should be enableable/disableable as a simuconf.tab option in much the same way as buying obsolete vehicles in the depot, for much the same reasons.
Yes sounds great! Either that or a button directly in the window to display or hide. There is no economical effect (as buying obsolete vehicles might have), purely an esthetic effect after all.
Title: Re: Vehicle Manager
Post by: jamespetts on December 30, 2019, 07:57:47 PM
Quote from: Ves on December 30, 2019, 07:27:20 PM
No, I didnt think that you should be able to select future liveries. Only in timeline off all liveries should be shown.
Yes sounds great! Either that or a button directly in the window to display or hide. There is no economical effect (as buying obsolete vehicles might have), purely an esthetic effect after all.

Actually, probably both the button and the simuconf.tab setting: ideally, this would work in exactly the same way as buying obsolete vehicles, where there is a button to allow them to be shown, and the button itself can be disabled by a simuconf.tab setting.
Title: Re: Vehicle Manager
Post by: Ves on December 30, 2019, 09:52:34 PM
Button added, and it will hide when allow_buying_obsolete_vehicles is turned of. The function of the button is not active, though, due to missing livery-tools.

Added also the buttons found in the depot: "show vehicles out of production" and "show obsolete vehicles" to the general desc display list, and they will also disappear when the said setting is turned of.
Title: Re: Vehicle Manager
Post by: Ves on January 06, 2020, 09:35:03 PM
James, would it perhaps be possible to update the "vehicle-management", so that I can utilize all the new nice GUI features and other stuff being incorporated the last six months?

As well as being on the upfront with potential merge conflicts...
Title: Re: Vehicle Manager
Post by: jamespetts on January 06, 2020, 10:11:20 PM
I will be able to look into this after I get home next week, although there will be something of a queue of things waiting for me at that point.
Title: Re: Vehicle Manager
Post by: Ves on January 21, 2020, 10:21:15 PM
I have uploaded a new version of the manager to the github branch:

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

The window has mostly had some bug fixes, as well as some small new added features. The window is not operational as such yet, since alot of the features needs to be able to speak to individual vehicles directly, and that is currently not very effective yet.

One new feature though already works as intended, which is the new cargo manifest. When a selection of vehicles are made, it will combine all the cargo of those vehicles and display it like we are used to in the convoy- and station info window. The section is not complete yet, I plan to elaborate more on some of the parameters.
Also, the classes section and the livery section have gotten their places, although no buttons or comboboxes works yet, and the livery list currently only ever display the default livery.

(https://live.staticflickr.com/65535/49420925243_72a739f716_o_d.png)
Title: Re: Vehicle Manager
Post by: Ranran(retired) on January 21, 2020, 10:50:15 PM
Thank you for your work.  :hat:

IMO, the border of the frame seems a little confusing.
How about making the center selector on the left the same background color as the image below?
(https://i.imgur.com/Kkda9td.png)
I think this will make it clear that it is just a scrollable information frame or a selector.

Secondly, if the roles are exactly the same, using the same words in the other dialog will save the translator effort.
For example, show_obsolete_vehicles: is probably the same as "Show obsolete" in the depot dialog.
Title: Re: Vehicle Manager
Post by: DrSuperGood on January 21, 2020, 11:01:36 PM
Looking good. Although there is a list of space between entries in the list that could be trimmed down to improve information density.
Title: Re: Vehicle Manager
Post by: Ves on March 01, 2020, 02:32:35 PM
Thank you for your suggestions!

Quote from: Ranran on January 21, 2020, 10:50:15 PMIMO, the border of the frame seems a little confusing.
How about making the center selector on the left the same background color as the image below?
Apparently, this turns out to not be very easy. I would need to draw a square behind the entire thing, but this turned out to be much harder than anticipated. It interfered with the scrolled list, making clipping errors and what not. Also there where problems with aligning the background with the scrolled list, not having it overlap. As far as I understand, the list-function, which is used by the line list you display, have all this built in already.
I agree, however, that it could perhaps be beneficial to have another color, so perhaps I can do it in the future using some other approach.

Quote from: Ranran on January 21, 2020, 10:50:15 PMSecondly, if the roles are exactly the same, using the same words in the other dialog will save the translator effort.
For example, show_obsolete_vehicles: is probably the same as "Show obsolete" in the depot dialog.
Oh those darn translations.... There are so many old translations in this game that has been made to fit a specific spot, and I try to keep them all if possible. Sometimes I have had to make the same word or rephrase the same translation (for instance if there are alot of variables also translated with the translated text). Thanks for pointing out this case, though.

Quote from: DrSuperGood on January 21, 2020, 11:01:36 PMLooking good. Although there is a list of space between entries in the list that could be trimmed down to improve information density.
Thanks, I aim to have around one linespace of separation between the entries.




I am working on the feature to select multiple desc's, and the feature as such is now implemented in the window.
A subfeature of that, and rather the main reason for being able to select multiple desc's at all, is that I would like to list vehicles with fixed couplings together in the same entry. That would mean that a steam engine would be listed along with its tender, because the connection between the two are fixed. Of corse there will be buttons to separate that and list all vehicles individual.
This would also enable us to show entire multiple unit sets as a single entry, and hopefully the player will be able to have a better overview over what DMU's and EMU's he has and how they are configured.
I would also like to display this for unbuilt vehicles, so that the player can get an overview of what complete DMU's and EMU's he can buy, but here it starts to get tricky:

If we list every available combination of a set, it might turn into alot of combinations, if not unlimited!
Also, many combinations would be with the same vehicles, just arranged different, so it would essential be the same convoy.
For sets where the same vehicle can appear more than once, there is theoretical an unlimited amounts of combinations.

Therefore, this would have to be dummed down slightly, to not be so overwhelming:
1) - I would suggest that for unbuilt sets, we only combine and display a set if there is a new different vehicle, not just the same ones rearranged.
2) - Then I am not sure, but I think I would suggest that a vehicle is only allowed once in a set, even though it can exist many times when you actually build the convoy. Alternatively two or three copys of the same vehicles could be allowed.

With those two rules, I think this should be possible while still making sense. I am not sure about the second rule, but without it I see no practical solution to the "infinite convoy" problem. Do you have any suggestions or thoughts on the matter?