Patch: Build and Refit

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

gule
Engineer
Engineer
Posts: 60
Joined: 16 Dec 2004 15:08
Location: Slovenia

Patch: Build and Refit

Post by gule »

v3.1 (r20538)
- update to trunk
- in list mode is buy and refit button hidden

v3.0 (r20521)
- resurrected from death :)
- update to trunk

v2.3 (r12176)
- default size of window bigger
- update to trunk

v2.2 (r12072)
- update to trunk

v2.1 (r11957)
- remove cargo buttons and replace them with dropdown

v2 (r11915)
I updated patch "Filter vehicles by cargo" and added new button "Build and Refit".
If you are in filter mode (one filter cargo selected) you can click on button "Build and Refit" and you get a new vehicle which is already refited in selected cargo. Now you can easy build the same wagon with different cargo or quicly build same trucks refited to different cargo in one click.
It is working for all vehicle types.

Old version (v1)
I made a patch to filter vehicles in build vehicle window by which cargos they can transport, so you can eazy find the right one.
My next idea is to add a button "Build and refit", which will create a new vehicle and also directly refit it to selected cargo.
Attachments
screen.png
screen.png (7.3 KiB) Viewed 14010 times
build_and_refit_r20538.patch
(5.2 KiB) Downloaded 399 times
Last edited by gule on 18 Aug 2010 07:20, edited 6 times in total.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Filter vehicles by cargo

Post by Bilbo »

I think this patch is a great area, makes orientation amongth all that various wagons for various cargoes in newgrfs much easier.
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)
gule
Engineer
Engineer
Posts: 60
Joined: 16 Dec 2004 15:08
Location: Slovenia

Re: Patch: Build and Refit

Post by gule »

I updated this patch and add a new button "Build and Refit".
If you are in filter mode (one filter cargo selected) you can click on button "Build and Refit" and you get a new vehicle which is already refited in selected cargo.
Diff file and screenshot in first post.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Build and Refit

Post by Bilbo »

Nice. Also, have you added your path to the bugtracker? If not, head to http://bugs.openttd.org and add it there as patch - you increase the chance one of the devs will notice it and add it to trunk.
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)
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: Build and Refit

Post by planetmaker »

gule wrote:v2 (r11915)
I updated patch "Filter vehicles by cargo" and added new button "Build and Refit".
This is a great feature and patch. I hope it'll make it into trunk
Bot_40
Engineer
Engineer
Posts: 105
Joined: 27 Jan 2005 18:56
Contact:

Re: Patch: Build and Refit

Post by Bot_40 »

That's an awesome idea! But I wonder if the "build and refit" button is a bit redundant. I think it would be fine to just have the regular build button do the refitting automatically when you are filtering.
User avatar
Sir A. Boey
Transport Coordinator
Transport Coordinator
Posts: 299
Joined: 17 Nov 2006 17:40
Location: Everywhere and nowhere

Re: Patch: Build and Refit

Post by Sir A. Boey »

I'll repeat what almost everybody's thinking...
OMG OMG OMG that's a very very good patch
I can't wait to see this in the trunk, this will make
choosing the right carriage much easier and
(which I regularly get) you can't forget to refit anymore!!!

Very good feature for all the absent-minded professors ;-)
[Like me, not a professor though ;-)]
Image
_____________# If you believe in it, you can achieve it" # ____________
__________________# Check out My Closed Platform #___________________
Gonozal_VIII
Traffic Manager
Traffic Manager
Posts: 165
Joined: 03 Dec 2007 15:06

Re: Patch: Build and Refit

Post by Gonozal_VIII »

Great idea :D but I think the buttons at the side are problematic... e.g. with all of Georges ECS vectors loaded, they won't fit there, I also think that they are not needed... Most of the time you would only select one of them anyways... I made a little mockup out of your screenshot how I think it could be more flexible... (Sort by text removed, triangle only, enough space for a dropdown where you can select any cargo).
And as Bot_40 wrote: The Build Vehicle button should refit to the selected cargo by default
Attachments
cargo.png
cargo.png (2.68 KiB) Viewed 17562 times
gule
Engineer
Engineer
Posts: 60
Joined: 16 Dec 2004 15:08
Location: Slovenia

Re: Patch: Build and Refit

Post by gule »

Bot_40 wrote:But I wonder if the "build and refit" button is a bit redundant. I think it would be fine to just have the regular build button do the refitting automatically when you are filtering.
Gonozal_VIII wrote:And as Bot_40 wrote: The Build Vehicle button should refit to the selected cargo by default
I do not agree with you two. I think that we have to keep both buttons, because some players will still use the old way (first build all vehicles and then refit them) and if I remove "build and refit" they can not use filter options.
Gonozal_VIII wrote:but I think the buttons at the side are problematic... e.g. with all of Georges ECS vectors loaded, they won't fit there, I also think that they are not needed... Most of the time you would only select one of them anyways... I made a little mockup out of your screenshot how I think it could be more flexible... (Sort by text removed, triangle only, enough space for a dropdown where you can select any cargo).
I know that windows can be too small to accomodate all filter buttons.
There are two solutions:
- resize window at creation time (very eazy for me)
- use dropdown (harder to code, and one click more at useing it - open dropdown -> select cargo)
So i think i will go with resizing (I am leazy :) ).
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Build and Refit

Post by Bilbo »

But with resizing, you can end up with situation where you have more cargo types that can fit on the screen. So then perhaps you will need two, three or even more rows of cargo buttons. Or you can make the drop-down ...
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)
gule
Engineer
Engineer
Posts: 60
Joined: 16 Dec 2004 15:08
Location: Slovenia

Re: Patch: Build and Refit

Post by gule »

Bilbo wrote:But with resizing, you can end up with situation where you have more cargo types that can fit on the screen. So then perhaps you will need two, three or even more rows of cargo buttons. Or you can make the drop-down ...
You are right. It looks like I have to make dropdown. Goodbye to my laziness..... :)
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Re: Patch: Build and Refit

Post by richk67 »

One extra suggestion: if a wagon is only refittable to 4 cargoes, either a) only list 4 cargoes, or b) list all cargoes, but with only the available 4 enabled. Then it is nice and clear that I can have X, Y, and Z, rather than it looking as though I could choose A,B, and C as well.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: Build and Refit

Post by Bilbo »

richk67 wrote:One extra suggestion: if a wagon is only refittable to 4 cargoes, either a) only list 4 cargoes, or b) list all cargoes, but with only the available 4 enabled. Then it is nice and clear that I can have X, Y, and Z, rather than it looking as though I could choose A,B, and C as well.
Well, but what I thought is that with this patch you first select a cargo, rthen you see all wagons capable of transporting selected cargo ...

So all cargoes (or at least all that could be transported by at least one existing wagon) would be selectable at all time ...
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)
User avatar
Rainer
Traffic Manager
Traffic Manager
Posts: 240
Joined: 14 Nov 2007 10:01
Location: Wiesbaden, Germany

Re: Patch: Build and Refit

Post by Rainer »

Hi Bilbo,
Bilbo wrote:Well, but what I thought is that with this patch you first select a cargo, then you see all wagons capable of transporting selected cargo ...
A big yes from my side. And I'd like to see all buttons (perhaps in two columns) and a window with more rows...

cu
Rainer
gule
Engineer
Engineer
Posts: 60
Joined: 16 Dec 2004 15:08
Location: Slovenia

Re: Patch: Build and Refit

Post by gule »

gule wrote:
Bilbo wrote:But with resizing, you can end up with situation where you have more cargo types that can fit on the screen. So then perhaps you will need two, three or even more rows of cargo buttons. Or you can make the drop-down ...
You are right. It looks like I have to make dropdown. Goodbye to my laziness..... :)
I made a new version with dropdown. It looks better now, you can see full cargo name and not just abbreviation.
Screenshot and diff file are in first post.
Gonozal_VIII
Traffic Manager
Traffic Manager
Posts: 165
Joined: 03 Dec 2007 15:06

Re: Patch: Build and Refit

Post by Gonozal_VIII »

wow nice update *downloading*

edit: compiled it with r11965, lots of vehicle newgrfs and the ecs vectors and it works fine :D only problem is, that i have to resize the new vehicle window everytime to be able to read it.. could you make the default size of that window bigger or make the buttons smaller?
another edit: could you add cargo type: none, to filter out only the engines/special cars?
gule
Engineer
Engineer
Posts: 60
Joined: 16 Dec 2004 15:08
Location: Slovenia

Re: Patch: Build and Refit

Post by gule »

Updated to trunk, diff in first post.
gule
Engineer
Engineer
Posts: 60
Joined: 16 Dec 2004 15:08
Location: Slovenia

Re: Patch: Build and Refit

Post by gule »

Gonozal_VIII wrote:compiled it with r11965, lots of vehicle newgrfs and the ecs vectors and it works fine :D only problem is, that i have to resize the new vehicle window everytime to be able to read it.. could you make the default size of that window bigger or make the buttons smaller?
I made window bigger. Diff file in first post.
Gonozal_VIII wrote:could you add cargo type: none, to filter out only the engines/special cars?
I'll try. :)
gule
Engineer
Engineer
Posts: 60
Joined: 16 Dec 2004 15:08
Location: Slovenia

Re: Patch: Build and Refit

Post by gule »

I resurrected this patch. :)
It is updated to trunk. It should work as the old version.
Diff and screenshot in first post.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: Build and Refit

Post by planetmaker »

It seems the buttons should be next to eachother, not in two rows.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 10 guests