Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

[Patch] Compare players in finances window

Started by isidoro, January 19, 2009, 05:24:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


A patch heading towards multiplayer: as you can see in the image, a white button appears in the players' window.  The button leads to finance statistics about all players together as well as the possibility to compare one item in all players.

Incidentally, the screenshot is taken from a game in which:
- Yellow deals with in-city passenger transport
- Red deals with inter-city passenger transport
- Green deals with sea transport
- Violet deals with air transport
- Rest of players deal with goods land transport

The patch is not yet finished.  I would like to be able to keep at most one button selected when in all_players and compare mode.


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.


Final version of the patch.  Now, only one button is kept active in compare mode.  Moreover, selection is remembered just like other finances windows.  Hope you like it.


In your patch you save the finance history of each player twice: once in the player_t object and once in the static player_t variable. Is this really needed?


I don't understand you.

Information is only stored once.  The static variable holds only the total amount of all players.


Quote from: isidoro on January 20, 2009, 08:29:42 PM
Information is only stored once.  The static variable holds only the total amount of all players.

Ok, then I misunderstood your code ;)
Maybe you name it sum_finance_history_* or overall_finance_history_*?


Maybe this window should be just shown for the public player, as its finances have not meaning anyway.


Or perhaps, instead of the public player's.  Keeping the "All" label, and skipping the "public player" button.

But I wouldn't replace public player functionality.  Now, that window is not used, but nobody knows if that space or information would be needed in the future for multiplayer.


The longer I look at it, the less I like to misuse this window. I think the data should be taken from a dropdown, and on the right there should be some buttons to exclude/include players for comparisons. This one here breaks the player expectations on too many levels I fear.


Yes.  It can be taken away to other place. Or change the way the information is presented since only one quantity can be compared at the same time.  Besides, rethinking again, my idea to suppress "Public Service" button makes no sense: the button to switch to this player  would disappear too.

Or two buttons: Total and Compare.  The second with the same functionality of the compare but with the interface you propose (combo+select players)...



I have put the last one that I have in here:, but it's for r2243, I'm afraid...