Any way to filter vehicles in the purchase list?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
Asperamanca
Engineer
Engineer
Posts: 42
Joined: 11 Jun 2014 05:21

Any way to filter vehicles in the purchase list?

Post by Asperamanca »

Okay, so I am using a NewGRF which has really lots of vehicles in it. My fault, I guess.

However, is there a way to make life easier by, say, filtering out vehicles that have less than x maximum speed, or more than y running costs?

The only feature I found is to hide vehicles by Ctrl-Clicking them. However, that seems to be lost when reloading the game.

Disclaimer: I am only asking for advice. Do not read any bug reports into this, because I messed with NewGRFs in a running game.
leifbk
Chairman
Chairman
Posts: 814
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway

Re: Any way to filter vehicles in the purchase list?

Post by leifbk »

Selection_062.png
Selection_062.png (10.19 KiB) Viewed 1551 times
You can at least sort the list by maximum speed or by running cost.
Asperamanca
Engineer
Engineer
Posts: 42
Joined: 11 Jun 2014 05:21

Re: Any way to filter vehicles in the purchase list?

Post by Asperamanca »

True, I can sort. But with well over 100 engines, finding those where the power is at least x, the speed at least y, reliability at least z, and running costs no more than r is quite a challenge.

My best approach is to sort by maximum speed, then hide the 40 engines that are too slow anyway, then do the same with power...it's complicated.
User avatar
kamnet
Moderator
Moderator
Posts: 8589
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Any way to filter vehicles in the purchase list?

Post by kamnet »

Unfortunately there's no way to offer what you're asking. OpenTTD is not that sophisticated, and likely it probably won't get implemented, since it will probably be far too much work to develop for too little gain. So, I will try to offer some other advice to address your problem.

The problem I see here is not that you messed with NewGRFs in a running game, but you've either: a) added far more vehicle NewGRFs than you needed or b) you disabled vehicles expiring, which leaves you ever vehicle ever built. You can fix the former in a running game, likely without corruption. You can remove a vehicle NewGRF, but to do so you will need to find all the vehicles from that NewGRF set if they're running, send them to depots and sell them all off before you remove the set. If you can't determine that, then stop every vehicle and sell it off. This is a real pain in the but, so understandable if you don't want to try this. But, it's an option. The latter you can change by going into your game settings, disabling "Vehicles Never Expire", then turn on the console (~), type "resetengines", and then close the console by hitting the ~ key again. Any of the old vehicles you own will still be owned, but you won't be able to buy new copies of them.

As a general rule, don't load more NewGRFs than you are actually going to use in a game. As you have probably seen by now, train NewGRFs can give you quite a many train options. Most sets are arranged around the theme of a region, time period, or particular transport companies and their liveries. If you're not trying to emulate the look and feel of a particular period or region, skip sets dedicated to a country and possibly skip 2CC Trains as well, because they will just drown you in vehicles. If you like the default trains but want better stats, use OpenGFX+ Trains. If you want better game play, look at using Iron Horse, Pineapple Trains, or NUTS, which offered more, but still limited number of vehicles while providing you a thoughtful, purposeful progression of vehicles to use based on cost, speed and efficiency.
Asperamanca
Engineer
Engineer
Posts: 42
Joined: 11 Jun 2014 05:21

Re: Any way to filter vehicles in the purchase list?

Post by Asperamanca »

Thanks for your reply. It's a single NewGRF (2cc) with tons on trains. I wasn't aware how many vehicles I would be getting. So I can't remove it. But I'll take your advice of disabling outdated vehicles.
User avatar
kamnet
Moderator
Moderator
Posts: 8589
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Any way to filter vehicles in the purchase list?

Post by kamnet »

Asperamanca wrote:Thanks for your reply. It's a single NewGRF (2cc) with tons on trains. I wasn't aware how many vehicles I would be getting. So I can't remove it. But I'll take your advice of disabling outdated vehicles.
Two other things you can do.

1) Go into the NewGRF settings and turn off trains from regions you don't want to use.
2) Open the new vehicle purchase window, and use ctrl+click to hide vehicles you don't want to see. There's another button that will make them visible again if you wish to do so at a later time.
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Re: Any way to filter vehicles in the purchase list?

Post by lcd_47 »

kamnet wrote:Unfortunately there's no way to offer what you're asking. OpenTTD is not that sophisticated, and likely it probably won't get implemented, since it will probably be far too much work to develop for too little gain.
Having spent some time updating the advanced purchase window patch, I'm pretty confident adding an option to hide vehicles by a number of criteria would consist of adding a new drop-down list to the purchase and list menus, and writing a few 5-lines functions. I'm also pretty confident it isn't going to happen. :D
User avatar
kamnet
Moderator
Moderator
Posts: 8589
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Any way to filter vehicles in the purchase list?

Post by kamnet »

lcd_47 wrote:
kamnet wrote:Unfortunately there's no way to offer what you're asking. OpenTTD is not that sophisticated, and likely it probably won't get implemented, since it will probably be far too much work to develop for too little gain.
Having spent some time updating the advanced purchase window patch, I'm pretty confident adding an option to hide vehicles by a number of criteria would consist of adding a new drop-down list to the purchase and list menus, and writing a few 5-lines functions. I'm also pretty confident it isn't going to happen. :D
Well, if you've got some time to do that, then perhaps that's what the devs need to see and can then offer some advice on the coding to bring it up to OpenTTD standards?
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Re: Any way to filter vehicles in the purchase list?

Post by lcd_47 »

kamnet wrote:Well, if you've got some time to do that, then perhaps that's what the devs need to see and can then offer some advice on the coding to bring it up to OpenTTD standards?
Sorry, but no. Like many other patches, the advanced purchase window patch was rejected because it was judged useless. I prefer to keep scratching my own itches, and perhaps post some of the results of this activity once in a while.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: Any way to filter vehicles in the purchase list?

Post by Transportman »

lcd_47 wrote:
kamnet wrote:Well, if you've got some time to do that, then perhaps that's what the devs need to see and can then offer some advice on the coding to bring it up to OpenTTD standards?
Sorry, but no. Like many other patches, the advanced purchase window patch was rejected because it was judged useless. I prefer to keep scratching my own itches, and perhaps post some of the results of this activity once in a while.
I would not consider it being judged useless, just that one of the devs has reservations to the usefulness of the chosen solution (and the coding style).

I think your suggestion is quite good, to have some kind of filtering options and filter the vehicle lists based on that.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
kamnet
Moderator
Moderator
Posts: 8589
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Any way to filter vehicles in the purchase list?

Post by kamnet »

lcd_47 wrote:
kamnet wrote:Well, if you've got some time to do that, then perhaps that's what the devs need to see and can then offer some advice on the coding to bring it up to OpenTTD standards?
Sorry, but no. Like many other patches, the advanced purchase window patch was rejected because it was judged useless. I prefer to keep scratching my own itches, and perhaps post some of the results of this activity once in a while.
It was not rejected. It wasn't even submitted for consideration. It was merely posted on the forums, and commented on by one individual who just happened to also be a developer.

Even if it was submitted for a formal evaluation and rejected, that's not the end of it. The devs don't simply say yes or no and are done with it. They offer critical feedback as to why they rejected a patch in its current form and at the current time. It's not the end of discussion, it's the start of a dialogue and development.

Now maybe, after a period of time, there's no way to continue to develop a patch in a satisfactory manner, it might end. But until you've worked on it for awhile, you're not going to instantly reach that conclusion.
lcd_47
Engineer
Engineer
Posts: 78
Joined: 27 Sep 2006 18:04

Re: Any way to filter vehicles in the purchase list?

Post by lcd_47 »

Like I said, I was not volunteering, just pointing out that in my opinion it wouldn't be "far too much work" to add such a feature.
Asperamanca
Engineer
Engineer
Posts: 42
Joined: 11 Jun 2014 05:21

Re: Any way to filter vehicles in the purchase list?

Post by Asperamanca »

Thanks all. I think I have some reasonable options now (though a filter would still be cool).
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Google [Bot] and 27 guests