News:

SimuTranslator
Make Simutrans speak your language.

Visualization of factory storage in the main game view

Started by Ranran, August 30, 2021, 01:34:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran

Hello to all the weirdos who work harder at cargo transport than passenger transport. (´・ω・`)
Things are continuous, and I recently had the opportunity to work on coding for overlay displays.
Today I'm introducing a new metamorphosis.


I took the industrial chain buildings placed on the simutrans map as a kind of station. Yes, marine resources have already been considered a station in simutrans.
This patch gives the option to view all industries as such and display them in the main game view.
This makes it possible to see the inventory and operating status of industries from the main game window to some extent, and may eliminate the need to display the industry info dialog every time, which may reduce the number of tedious clicks and stress for humans.

Also such an overlay tooltip may help to confirm it's existence. Of course, it can be turned on and off with shortcut keys. (You will need to edit menuconf).
For example, small one-tile end-consumer buildings are sometimes buried in the city and are often missed by the player. They may not be visible, especially if they are behind a skyscraper or under an elevated structure. Even if you don't hide or slice the building, the tooltip will let you know it's there.

Related to this recently introduced patch, there will be consistent color coding by input/consume and output/supply.

The end consumer has only the blue box (consumption storage), and the primary industry has only the orange box (shipping storage).
Manufactures have both.
It's a new learning curve, but I don't think it will be too difficult for players to figure it out.


Please note that this is only an option. I think it would be ideal to use it if you want to create a freight transport route and check it's availability, and turn it off otherwise.
Three options are provided, similar to the convoy tooltip. These options are: show only when mouse over, show only factories connected to the current player's network, and show all.
It also supports the registration of shortcut key. (´・ω・`)b


The patch was created as tooltip improvement patches.
Similarly, a new tooltip have been added to depots.
This is somewhat immature, but the functionality is available and can be enhanced in the future. You can test this at the same time. Please check the pull request #435.
Check out this thread for more information on the depot tooltip patch. Unfortunately, I failed to implement the ability to name the depot. Any help in bringing this to perfection will be appreciated.



simple_tool[39]=,
simple_tool[135]=,

Use the menuconf shortcut keys 39 for depot tooltip and 135 for industry tooltip.


I'd love to hear your thoughts on the patch. (´・ω・`)

jamespetts

Thank you for this. Is there a particular branch of your repository that we should use for testing - or alternatively, have you any screenshots of this in action if not? Do I understand correctly that this gives little graphs for industries in the main game window in the same way as stations have waiting graphs for passengers, mail and freight?
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.

Ranran

Quote from: jamespetts on August 30, 2021, 10:51:10 PMIs there a particular branch of your repository that we should use for testing
That branch is here.
https://github.com/Ranran-the-JuicyPork/simutrans-extended/tree/tooltip-kai

QuoteDo I understand correctly that this gives little graphs for industries in the main game window in the same way as stations have waiting graphs for passengers, mail and freight?
Yes.

jamespetts

Excellent, thank you for that. The industry visualisation is very useful, especially when set to the mouseover mode, as it makes it much easier to identify where industries are, as the smaller ones can often look like city buildings.

However, there is an issue with the depot name feature: only the untranslated name is shown.
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.

Ranran

Quote from: jamespetts on August 31, 2021, 09:58:14 PMHowever, there is an issue with the depot name feature: only the untranslated name is shown.
Thank you for pointing that out. I think I've fixed it.
Also, the color of the text was darker than other tooltips and it was a little hard to read, so I made it a little brighter.

jamespetts

Excellent, thank you. Confirmed fixed and now incorporated.
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.

prissi

A slightly modified version had made it also into standard.

Ranran

As it was added in standard, the translatable terms were changed to the common ones. Check the pull request #437.
It also includes the addition of a kind warning message regarding slope tilt angle error by roboron.

Matthew

#8
Thank you for adding this, Ranran. I am still thinking about how to use it, but more information is always helpful.

However, I may have found a bug.

Steps to reproduce
1. Open Simutrans-Extended and load Bridgewater-Brunel (either the online game or a recent save).
2. Go to Zenlyn Town Hall (303,1758) and zoom in as far as possible.
3. Change options > Display Window > Display > Tooltips/overlays > Industry tooltip: Change to "Always show all".



4. Zoom out two or more levels.

EDIT: Better reproduction case
2. Find a market
3. Change options > Display Window > Display > Tooltips/overlays > Industry tooltip: Change to "Show only when hovering with the mouse".
4. Move the mouse cursor over a market.

Expected behaviour
The map zooms out and you can see the visualizations of factory storage.

Actual behaviour
Hard crash, with nothing in the log file.

Notes
I am not sure what triggers the crash. The visualizations display correctly in rural areas and some small towns. But I get a crash in big cities. Maybe this is because there is a certain type of industry in those cities?? [EDIT: Markets, I think] Or maybe there are too many industries?? Or maybe something else.....
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Ranran

Thank you for your report.
I think I found the cause of this bug and fixed it. Check the pull request # 443.
Sorry for inconvenience. (´・ω・`)

jamespetts

Excellent, thank you for this. Now incorporated. Apologies for the delay.
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.