Group info
Moderator: OpenTTD Developers
Group info
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.
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
-
- Preview 1
- group_stats_1.png (8.05 KiB) Viewed 17473 times
-
- Preview 2
- group_stats_2.png (7.33 KiB) Viewed 17472 times
-
- group_info_r21289.patch
- (3.35 KiB) Downloaded 618 times
Last edited by MagicBuzz on 21 Nov 2010 18:38, edited 2 times in total.
Re: Group info
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)
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)
Re: Group info
same here! looks good
*wishes for group-based vehicle replacing*

*wishes for group-based vehicle replacing*
Re: Group info
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.
Re: Group info
how about a min/max profit value for each group? Especially the min would be useful to see if you have a runaway.
Re: Group info
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 versionsMagicBuzz 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.
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)
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)
Re: Group info
hmmmBilbo wrote: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 versionsMagicBuzz 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.
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.
Re: Group info
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...
Re: Group info
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.
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
-
- patch_group_info_r11039.patch
- r11039
- (5.71 KiB) Downloaded 664 times
-
- An exemple of groups with information panel
- group_stats.png (17.43 KiB) Viewed 4596 times
-
- Engineer
- Posts: 40
- Joined: 15 May 2007 16:49
Re: Group info
Thank You! I've been wanting something like this for a while. I'm just not that good at C++ *yet*.
-
- Route Supervisor
- Posts: 415
- Joined: 07 Oct 2004 10:05
Re: Group info
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? 

Re: Group info
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.
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.
Re: Group info
*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.
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 578 times
-
- group_info.png (20.95 KiB) Viewed 4210 times
Re: Group info
What does "FF" stand for?
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Group info
FF for "French Francs"
It's my money setting, but as I use a {CURRENCY} wildcard, you'll see $, €, £ or whatever you chose.

- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Group info
Given the language... French Franc?Zuu wrote:What does "FF" stand for?
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
Re: Group info
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)
Junctioneer (a traffic intersection simulator)
Re: Group info
@see codeblock (code in group_gui.cpp) and screenshot.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.

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: Select all
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;

- Attachments
-
- Farfingford Transport, 2151-01-29#1.png (19.6 KiB) Viewed 14478 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.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
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.
Re: Group info
Thank you Chillcore 
Here is the lasted patch version.

Here is the lasted patch version.
- Attachments
-
- group_info_r21289.patch
- (3.35 KiB) Downloaded 569 times
Re: Group info
Well, three years later, here it is !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.

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. -- 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 544 times
Who is online
Users browsing this forum: No registered users and 11 guests