Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Jan 16, 2019 11:20 am

All times are UTC




Post new topic  Reply to topic  [ 24 posts ]  Go to page 1 2 Next
Author Message
 Post subject: Group info
PostPosted: Tue Jul 17, 2007 4:48 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
When you have a lot of groups with many trains, you may have difficults to see which groups earn a lot of money and which ones don't.

So I designed yesterday a path that add a new panel in the group list window.
When selecting a group, it will show for the group the same stats as for the vehicules, but for the whole group :
- Profit this year : sum of all profits of all vehicules in the group for this year
- Profit last year : sum of all profits of all vehicules in the group for last year
- Profit button : work like the vehicule profit button, but for the all group

Flyspray :
http://bugs.openttd.org/task/1042

See then end of the topic for lastest patch version.


Attachments:
File comment: Preview 1
group_stats_1.png
group_stats_1.png [ 8.05 KiB | Viewed 9837 times ]
File comment: Preview 2
group_stats_2.png
group_stats_2.png [ 7.33 KiB | Viewed 9836 times ]
group_info_r21289.patch [3.35 KiB]
Downloaded 145 times


Last edited by MagicBuzz on Sun Nov 21, 2010 6:38 pm, edited 2 times in total.
Top
   
 Post subject: Re: Group info
PostPosted: Tue Jul 17, 2007 4:51 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Jun 06, 2007 9:07 pm
Posts: 1710
Location: Czech Republic
This looks great and useful, I have to test it :)

_________________
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)


Top
   
 Post subject: Re: Group info
PostPosted: Wed Jul 18, 2007 8:54 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Thu May 17, 2007 1:36 pm
Posts: 253
Location: Netherlands
same here! looks good :o

*wishes for group-based vehicle replacing*

_________________
Image
alternate airport building rules (r10663)


Top
   
 Post subject: Re: Group info
PostPosted: Wed Jul 18, 2007 9:14 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
rav wrote:
*wishes for group-based vehicle replacing*

:?:

that works already !
select a group, then in the "manage list" button select "replace vehicules" and it will replace only the vehicules of the selected group.


Top
   
 Post subject: Re: Group info
PostPosted: Wed Jul 18, 2007 1:49 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Feb 28, 2003 2:49 pm
Posts: 196
Location: Germany
how about a min/max profit value for each group? Especially the min would be useful to see if you have a runaway.


Top
   
 Post subject: Re: Group info
PostPosted: Wed Jul 18, 2007 4:20 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Jun 06, 2007 9:07 pm
Posts: 1710
Location: Czech Republic
MagicBuzz wrote:
rav wrote:
*wishes for group-based vehicle replacing*

:?:

that works already !
select a group, then in the "manage list" button select "replace vehicules" and it will replace only the vehicules of the selected group.


Well, you can select the replacement from the group loist, but in the end, it affected all vehicles and not onmly the ones in group. At least in older versions

_________________
If you need something, do it yourself or it will be never done.

My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility

Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)


Top
   
 Post subject: Re: Group info
PostPosted: Wed Jul 18, 2007 7:02 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
Bilbo wrote:
MagicBuzz wrote:
rav wrote:
*wishes for group-based vehicle replacing*

:?:

that works already !
select a group, then in the "manage list" button select "replace vehicules" and it will replace only the vehicules of the selected group.


Well, you can select the replacement from the group loist, but in the end, it affected all vehicles and not onmly the ones in group. At least in older versions

hmmm

can't say.

i'm using my "autorenew" patch that send for servicing only my vehicules from a current list if they actually need replacement.
but this works only with breakdown disabled.


Top
   
 Post subject: Re: Group info
PostPosted: Thu Jul 19, 2007 7:36 am 
Offline
Director
Director

Joined: Thu Jul 28, 2005 9:31 am
Posts: 536
Actually, this is the only place from where autoreplace replaces only a selection of all trains - the train lists that are called from the station window or from the shared train orders list still replace all trains...


Top
   
 Post subject: Re: Group info
PostPosted: Mon Sep 03, 2007 6:46 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
Here is a small update of this patch.

I updated it according the lastest trunk version, and I now use proper strings IDs.

Also, the patch fix a small display bug in the group window : "All vehicles" and "Ungrouped vehicles" panels were not properly sized and positionned.


Attachments:
File comment: r11039
patch_group_info_r11039.patch [5.71 KiB]
Downloaded 203 times
File comment: An exemple of groups with information panel
group_stats.png [17.43 KiB]
Downloaded 388 times
Top
   
 Post subject: Re: Group info
PostPosted: Mon Sep 03, 2007 7:42 pm 
Offline
Engineer
Engineer

Joined: Tue May 15, 2007 4:49 pm
Posts: 40
Thank You! I've been wanting something like this for a while. I'm just not that good at C++ *yet*.


Top
   
 Post subject: Re: Group info
PostPosted: Fri Oct 17, 2008 8:26 am 
Offline
Route Supervisor
Route Supervisor

Joined: Thu Oct 07, 2004 10:05 am
Posts: 415
I really like this patch but I can't seem to get it working with current trunk, do you plan an update or is there an update floating around already? :)


Top
   
 Post subject: Re: Group info
PostPosted: Tue Oct 21, 2008 1:01 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
I do not plan any update now.
I was quite bored to write patches and need to upgrade them each new trunk version without having any hope of getting into trunk.

Since 2 months I got a girlfriend, and I don't spend much time on my computer anymore. May be later, but not now.


Top
   
 Post subject: Re: Group info
PostPosted: Tue Nov 16, 2010 6:02 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
*bump*

http://bugs.openttd.org/task/1042

Here is an update of the patch.

I removed the profit button as I think it's useless.


Attachments:
group_info_r21209.patch [2.75 KiB]
Downloaded 121 times
group_info.png [20.95 KiB]
Downloaded 2 times
Top
   
 Post subject: Re: Group info
PostPosted: Wed Nov 17, 2010 6:56 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4545
Location: /home/sweden
What does "FF" stand for?

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject: Re: Group info
PostPosted: Wed Nov 17, 2010 6:58 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
FF for "French Francs" ;) It's my money setting, but as I use a {CURRENCY} wildcard, you'll see $, €, £ or whatever you chose.


Top
   
 Post subject: Re: Group info
PostPosted: Wed Nov 17, 2010 6:59 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9102
Location: Sol d
Zuu wrote:
What does "FF" stand for?

Given the language... French Franc?

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: Group info
PostPosted: Wed Nov 17, 2010 7:24 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4545
Location: /home/sweden
Ah ok. I only looked at the patch-text, not the surrounding interface text. Also I'm used to having alpha-numerical currency labels to the right of the numbers, so I though FF was maybe an abbreviation for something related to the patch.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject: Re: Group info
PostPosted: Sun Nov 21, 2010 4:53 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Oct 04, 2008 11:05 pm
Posts: 2650
Location: Lost in spaces
MagicBuzz in another thread wrote:
There is currently a bug with group info, you may wait for a fix before integrating it if you are interested in.
=> The last line in the group's vehicle list isn't used. I didn't find how to use it in the list.

@see codeblock (code in group_gui.cpp) and screenshot. :)
Perhaps you may need to replace the "- 25" by the height of the widget based on font height specified by the user ... I have not yet tested what happens if font size is bigger or smaller.

Code:
   virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize)
   {
      switch (widget) {
         case GRP_WIDGET_LIST_GROUP:
            this->tiny_step_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP;
            resize->height = this->tiny_step_height;
            /* Minimum height is the height of the list widget minus all and default vehicles and a bit for the bottom bar */
-            size->height =  4 * GetVehicleListHeight(this->vli.vtype, this->tiny_step_height) - (this->tiny_step_height > 25 ? 2 : 3) * this->tiny_step_height;
+            size->height =  (4 * GetVehicleListHeight(this->vli.vtype, this->tiny_step_height) - (this->tiny_step_height > 25 ? 2 : 3) * this->tiny_step_height) - 25;
            break;


Nice patch. Me likes. ;)


Attachments:
Farfingford Transport, 2151-01-29#1.png
Farfingford Transport, 2151-01-29#1.png [ 19.6 KiB | Viewed 6842 times ]

_________________
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Top
   
 Post subject: Re: Group info
PostPosted: Sun Nov 21, 2010 6:37 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
Thank you Chillcore :bow:

Here is the lasted patch version.


Attachments:
group_info_r21289.patch [3.35 KiB]
Downloaded 212 times
Top
   
 Post subject: Re: Group info
PostPosted: Mon Nov 22, 2010 11:07 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Feb 15, 2003 5:32 pm
Posts: 1139
Location: Paris, France
Aydan wrote:
how about a min/max profit value for each group? Especially the min would be useful to see if you have a runaway.

Well, three years later, here it is ! ;)

In fact, when I removed the profit button of the selected group, I thought it could become usefull if it was shown for every group in the list.

Here is the lastest version of the patch with this complement.
Attachment:
group_info_profit_button.png
group_info_profit_button.png [ 18.09 KiB | Viewed 6778 times ]


-- Edit : There was a bug with the "all" group. I forgot to check the vehicle type when displaying the profit button, so the profit button was computed for all vehicle of any type...


Attachments:
group_info_r21293.patch [6.35 KiB]
Downloaded 109 times
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 24 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: BeSt-Com, Google Adsense [Bot], JGR and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.