News:

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

Vehicle upgrade notifications?

Started by Ves, March 21, 2014, 12:47:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ves

Hello again there :)

When playing simutrans, I usually miss when I'm able to upgrade a vehicle into another, simply because there is no way to instantly see (at least what I'm aware of) that a vehicle is able to be upgraded. Currently I have to have a purchased vehicle, take it to the depot or press the "replace"-button and then press the little arrow next to 'buy/sell' in order to check whether my vehicle might upgrade.

Would it be undesired or to much hard work to add a solid text like Upgrade is possible! for instance in the convoy detail-window and maybe also in the vehicle-details in the depot? Maybe even in the line management window could have a text like: A vehicle in this line can upgrade! if the line is selected.
If implemented and wanted, pressing the upgrade text (or a triangle next to it) could open up the the replacer (with the upgrade mode already selected) or an universal infowindow with name and specs of the vehicle(s) that might be upgraded to.
You probably guessed already that the texts should only be visible when in fact the vehicles that might be upgraded to are currently available ???

I don't know if I'm the only one missing this, or I'm doing something wrong, but it would be sad if such a great feature as vehicle upgrading might be missed by players, simply because they are not aware of new vehicle upgradings.

jamespetts

This is an interesting idea. I shall add this to my to do list.
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.

MCollett

You can already see what upgrades are available, by selecting "Show all" in the depot window. 

But.

This is of limited usefulness, since the information that appears when you click on an upgrade does not include the single most important thing you need know:  what vehicle (or vehicles) the upgrade is for.

(There are a couple of other reasons to do with game mechanics and economic balance that make upgrades much less useful in the game than in the real world, but that's a different matter.)

Best wishes,
Matthew

Ves

If you press "show all" in the depot and all the vehicles are shown, vehicles that are not available, could show what is needed in order to make them be available. Eg:

This vehicle needs Dm(a) or Dm3 to be in front, or This vehicle is upgraded from Rc1, Rc3 or Rc6

Vladki

Ves, would you be able to implement this feature? I've noticed that you have been involved with GIU programming recently.

I'd suggest the following:

- in the depot - remove the bottom combo (buy/upgrade), and instead add upgrade to the first combo (append, insert, sell, upgrade)
- in the line list - add new color to lines/vehicles that can be upgraded (just like obsolete ones are blue, upgradable could be violet or something)
- in the detail window - info this could be upgraded and link to upgrade windows as you suggested

Ves

#5
Oh, I almost forgot!  :o
Sure, I will take a look at it!


edit:
I started by combining the two comboboxes and I think it was a success. Could you try and see if you find any errors?

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


edit 2:
I putted a text in the convoy details window that displays wether there are any upgradeable vehicles in the convoy. The vehicle it self in the list will have a text and a list of vehicles up to 3 (to save space) it can upgrade into. All the text relating to this is colored purple, as I think this is the color used in the depot window when a vehicle can only be built as upgrade. So it is 'kind of' already connected to that color.
Since I have been working on the convoy details window with the classes, I added it to that branch here:
https://github.com/VictorErik/Simutrans-Experimental-Ves/tree/gui-classes
You can use that branch with a 'normal' extended pakset too.

Vladki

Hi Ves, that wonderful!

combined combobox works fine.

Displaying the upgradeability is also good, but it overlaps with the description of the first vehicle. Just as obsolescence info does. So perhaps if you could, fix both at the same time. Also the pink colour could be used also in the convoy name, in similar way as blue is used to show obsolescence. (see the screenshot).

I have noticed that the class_manager dialog is not protected from tampering by other players. It can be opened also on other players convoys.


Rollmaterial

I do not think the convoy and line names should be highlighted as upgrades may not always be necessary (e.g. push-pull fitting). In those cases highlighting constitutes a false alert which is annoying.

That said, another interesting feature would be separate retirement dates for availability as new and as an upgrade.

Ves

Good point rollmaterial. A variant could be to have the color show when a vehicle, which can upgrade, is also too old.
Definitively, a text in the line management could be shown displaying how many (if any) vehicles in the line can be upgraded.
Other ideas?

What do you mean with the second statement?

Vladki, yes it is overlapping and I will fix it.
Oh, I will have a look at how the other buttons deal with different players. Can you also change the class for other players?

Vladki

Quote from: Ves on September 07, 2017, 09:07:19 PM
Good point rollmaterial. A variant could be to have the color show when a vehicle, which can upgrade, is also too old.
Definitively, a text in the line management could be shown displaying how many (if any) vehicles in the line can be upgraded.
Other ideas?
I like this - change color, only if it is obsolete and can be upgraded. Info in line management window is fine. Whatever to make the player aware, that his vehicles can be upgraded, because the new vehicle notice in the bottom scroll bar can be easily ignored.

Quote
Oh, I will have a look at how the other buttons deal with different players. Can you also change the class for other players?
I did not play with class enabled pakset, so the dialog did not do anything even with my own vehicles.

Ves

There is a new version, which should change the color of the line when a vehicle is old AND able to upgrade.
I have however not managed to test it, as it also demands that the convoy is running profitably, which I appears to have problems with....

Questions could be made: in which priority should the status line be shown?
Currently it is in this order:

no convoys assigned to this line
Loss-making
nothing moved
Overcrowded
Is missing scheduled slots.
has obsolete vehicles
has obsolete vehicles that can upgrade
normal state
   

Vladki

:) I have similar problem with profitability...

I think the order is correct, except for the last two options. Upgrade should have precedence over obsolescence.
Perhaps it could be shown even if the vehicle is out of production, but not obsolete (i. e. has extra costs) yet.
It seems that blue is used only for those that have been obsoleted.

Sent from my ONEPLUS A3003 using Tapatalk


Rollmaterial

Quote from: Ves on September 07, 2017, 09:07:19 PM
What do you mean with the second statement?
I mean that right now, a vehicle that is available both to build as new and as an upgrade to an existing vehicle becomes entirely unavailable when it is retired. My idea is to allow for obtaining that vehicle by upgrading an existing one also after it is no longer available as new.

Ves

#13
Ok I see what you mean! I think that is not a GUI-issue, but a functionality issue. It can, however, also be solved by pakset design: if you create two of the same vehicles, the second one with intro date when the first one expires and have the "can only be upgraded into" flag checked and no retire date. Then you will get 'a vehicle' which you still can upgrade to even though it cannot be built new anymore. I have a few such examples in the Swedish pakset to circumnavigate the very issue you describe.

Vladki

I have checked out the new version, the vehicle details are now displayed correctly. But I too cannot test the line color change (almost nothing profitable :)

Ves

#15
Hm, maybe the order should be different anyway? :p
I have changed the order of the "has obsolete" and "has obsolete and can upgrade" but I don't remember if I managed to upload it before I had to leave?

Question is, maybe the "loss making" state should be the last before the "normal state"? In this scenario, the "loss making" state would only come visible if everything else is "perfect" (it's not too old, it's not missing departure slots, it's not etcetc), it is only not making any money.
What is currently just a big bunch of red entries in (at least my lines) would now hopefully have other colors telling me what is wrong with the line.
Or am I thinking wrong?

Edit:

Hmm, thinking further about it, a light color could mean it's just, say, missing slots, but a dark color would mean that its missing slots AND loosing money?

jamespetts

Thank you for your work on this - it is much appreciated. My time is limited at present, as I am catching up with a large number of things after returning from holiday. May I ask whether this is considered mature yet or whether it is likely to need more work before integrating (and whether this is to be integrated into master or the passenger-and-mail-classes branch)?

Thank you again!
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

It exists in two different branches. One is called https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/misc-gui and the only thing in that branch is the combobox change, and that should be fine to merge to MASTER branch right away.

The rest are done in my https://github.com/VictorErik/Simutrans-Experimental-Ves/commits/gui-classes but are not yet fully done. I was thinking of creating some new functions, calc_upgradeability(), can_upgrade() etc (very similar to how the calc_obsolete() and is_obsolete() works), but I ran in to some pretty frustrating CTD's and I could not tell why this was happening. So currently, I have deleted all those tries and might attempt to do that at some later point. The point of doing all that would be to streamline the code to look similar to the rest and make it modular, so one easy can check if convoy_t has any vehicle that can upgrade.
Currently it shows the text in the info window of the convoy and thats it. No CTD's or other anomalities :)

jamespetts

Can I check what the code specifically in the misc-gui branch currently does? Thank you for your work on this.
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

Sorry, I never explained!
It merges two comboboxes in the gui_convoy_assembler: the va_action and u_upgrade. I removed the u_upgrade combobox and made a new va_upgrade entry in the former one. I found no error in it and vladki says he didn't either.
Also, I added some more details to the fault states in the convoy_info window. Like when runway is too short, it shows the vehicle minimum runway length. When out of range it shows the maximum range of the convoy (although at least airplanes seems to not get the out of range error, just the no route error)

jamespetts

Thank you for the explanation. Looking at the code, however, most of the places where the runway too short indication was displayed have been commented out. Was this intentional?
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

Yes, it was giving false positives in certain conditions, so I limited the use of it. I do think, however, I remembered to keep at least one?

jamespetts

Yes, you kept the one. May I ask: in what conditions did it give false positives? I should rather fix that than give false negatives in other cases.
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

#23
I don't remember from on top of my head but I will create a "state "entry for debugging so it should be easy to check!

edit:

I have created a state entry for debugging in the convoy_info window, which is online now. I realized it was a mistake on my side that the runway_too_long did not show up accordingly, but it should be corrected now.
Altough, if the runway is reserved by an airplane trying to land, but cannot since the runway is too short, airplanes waiting at the runway for take off wont show the flag (even in the debug version), probably since the plane doesnt know about the runway yet?

The RANGE state appears to trigger go to depot, is that intentional?

I do, however, struggle to get the is_overweight message shown.
Does it work as intended?

jamespetts

Thank you very much for your work on this. I have now had a chance to test this. I have incorporated this with a number of fixes, which I have pushed.

I should be grateful if you could try to avoid changing existing translation texts where possible, and try instead to incorporate the existing texts into a longer string, so that the existing texts (e.g. "Runway too short") do not need to be re-translated. You will see how this is done in the modifications that I have made.

Also, for any changes to be merged into the master branch, all new translation texts should always have: (1) a base texts file (I have uploaded one for the new word, "requires" now); and (2) a full translation in en.tab for all translation texts that are not in fully formatted plain English. I have removed all of the latter type in any event to preserve existing translation texts as described above.

I have also required DEBUG_CONVOY_STATES to be defined for all of the new debugging information to show (as I did not want this present in all debug builds), and have fixed a bug whereby the runway too short message would not appear in some cases.

I have not had the chance to test every possible case (including out of range and overweight), so I should be grateful if anyone else could report any issues with either of these things. If you can reproduce a problem that you are unable to fix, I should be very grateful if you could upload a saved game in which the problem can reliably be reproduced so that I can more easily fix it.

Thank you again for your help with this and other matters: it is much appreciated.
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

Oh, sorry for the messy code sometimes! And apologizes for the translations which I forgot should not be changed. I do have a big task ahead of me, since I have not done any translatios on the pass and mail class, so I was thinking of going through that at some point in the future...

jamespetts

Quote from: Ves on September 16, 2017, 05:46:10 AM
Oh, sorry for the messy code sometimes! And apologizes for the translations which I forgot should not be changed. I do have a big task ahead of me, since I have not done any translatios on the pass and mail class, so I was thinking of going through that at some point in the future...

Yes, this will need to be done before this is merged; I had assumed that you had wanted to finalise all of the GUI elements before starting the translation on that branch, as it is still work in progress.
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.