Cloned vehicle naming
Moderator: OpenTTD Developers
Cloned vehicle naming
Hello,
I usually name my vehicles for their purpose. For instance, if I have a bus going between city A and B, the name will probably be like "A - B Ps 1". Of course, there is a LOT of renaming to be done when I make a route. 8 or so vehicles servicing a certain set of stations would have numbers from 1-8. This makes it possible for me to, when I click a vehicle, quickly see what route it's on or what the purpose for it is.
Now I'm sure you've all guessed what I'm going for - a patch that will increment the number of the cloned number by 1, taking the name in account. I did some forum crawling and found an old patch for this. It's back to revision 5000 something though, so I doubt it will work. It can be found here.
They mention there are limitations on the naming, but since this was 2006 something, I'm curious if it has been changed. Is there an upper limit on how many named vehicles one can have in a company? If not, anyone know if there's a new patch for this purpose that my searching missed?
I usually name my vehicles for their purpose. For instance, if I have a bus going between city A and B, the name will probably be like "A - B Ps 1". Of course, there is a LOT of renaming to be done when I make a route. 8 or so vehicles servicing a certain set of stations would have numbers from 1-8. This makes it possible for me to, when I click a vehicle, quickly see what route it's on or what the purpose for it is.
Now I'm sure you've all guessed what I'm going for - a patch that will increment the number of the cloned number by 1, taking the name in account. I did some forum crawling and found an old patch for this. It's back to revision 5000 something though, so I doubt it will work. It can be found here.
They mention there are limitations on the naming, but since this was 2006 something, I'm curious if it has been changed. Is there an upper limit on how many named vehicles one can have in a company? If not, anyone know if there's a new patch for this purpose that my searching missed?
Re: Cloned vehicle naming
The answer to both questions is no.
No - there is no longer a limit on the amount of renaming you can do in the game. I forget the exact revision (it was a while back) but (re)names are no longer held in an array but are attached to the object that has been (re)named.
No - there is no one (to my knowledge) that is working on a patch that allows automatic naming and incremental numbering of cloned vehicles in the game. I am a bit obsessive when it comes to naming vehicles so I do keep an eye out for such things.
No - there is no longer a limit on the amount of renaming you can do in the game. I forget the exact revision (it was a while back) but (re)names are no longer held in an array but are attached to the object that has been (re)named.
No - there is no one (to my knowledge) that is working on a patch that allows automatic naming and incremental numbering of cloned vehicles in the game. I am a bit obsessive when it comes to naming vehicles so I do keep an eye out for such things.
Humor is the second most subjective thing on the planet
------------------------------------------------------------
Brevity is the soul of wit and obscenity is its downfall
--------------------------------------------------------
Good Night And Good Luck - Read You Soon
------------------------------------------------------------
Brevity is the soul of wit and obscenity is its downfall
--------------------------------------------------------
Good Night And Good Luck - Read You Soon
Re: Cloned vehicle naming
Its a bit of a round-about way of doing it, but you could write an AI that automatically names things for you. Then when you want to play simply start that AI and then using the cheat menu switch to the same team as that AI player. You'll still have control over everything, but the AI will continue in the background.
In my opinion at least, Squirrel is easier to write than C++, AND you won't need to patch anything.
You'll need at least a nightly build or 0.7.0-beta1 for this functionality.
In my opinion at least, Squirrel is easier to write than C++, AND you won't need to patch anything.
You'll need at least a nightly build or 0.7.0-beta1 for this functionality.
PathZilla - A networking AI - Now with tram support.
Re: Cloned vehicle naming
Thanks for the suggestion, I will look into squirrel. No clue how it works though. Any pointers to where I could start learning squirrel? I do know a fair deal of C++, so if I can't figure squirrel out I'll just have to make a new patch of my own 
edit: Looked at the examples on the Wiki, seems interesting. Managed to make the sample AI there, so I will have to explore this. A patch might actually be possible though, and perhaps it'd be simpler in the end..

edit: Looked at the examples on the Wiki, seems interesting. Managed to make the sample AI there, so I will have to explore this. A patch might actually be possible though, and perhaps it'd be simpler in the end..
-
- Chief Executive
- Posts: 697
- Joined: 10 Jun 2003 00:19
- Location: Australia
Re: Cloned vehicle naming
A patch will have to be constantly reapplied and kept up to date with changes in the source. Having said that, the AI API has been getting some backwards incompatible changes recently. Anyway, once the API has settled a bit, doing it as an AI will be write and forget, doing it as a source code patch will require more keeping up to date.
Re: Cloned vehicle naming
I agree with the concept of an automatic naming style. I usually name my vehicles to hold easily retrieved info to help keep up with them, such as "Truck 1401Vh" which to me means that this RV gets too old in January 2014 and it hauls Vehicles. Or a train i might name "#5412 CDC - Lvp", which means this train needs to be replaced in December 1954 and it travels between the station at Central Distribution Complex and the one at Liverpool.
I didn't realize others also used their own naming styles to suit their own purposes. Perhaps if there was a configurable naming/numbering style that a player could customize, such as "Train "[mm][yy][ID], which would use a literal, the year and month in 2-digit form, and the Cargo ID. Or something like this. Of course, i have no clue how hard it would be to implement this, but it would provide some kind of configurable standard.
I didn't realize others also used their own naming styles to suit their own purposes. Perhaps if there was a configurable naming/numbering style that a player could customize, such as "Train "[mm][yy][ID], which would use a literal, the year and month in 2-digit form, and the Cargo ID. Or something like this. Of course, i have no clue how hard it would be to implement this, but it would provide some kind of configurable standard.
Re: Cloned vehicle naming
I'm glad I'm not the only one who's like this with naming
I've started poking around a bit with squirrel, but writing an AI like this is still ages away. If it only was LUA, I'd have it done faster
I'll keep you posted on my progress.


Re: Cloned vehicle naming
Did you try to play with groups?
Town Names:


Still work in progress: OpenGFX or/and OpenSFX - Please help!
Re: Cloned vehicle naming
Like Ammler said groups does a bit of the same - you wont be able to instantly see what route a vehicle when you click it, but when you list all vehicles theyll be nicely organized. Itll be easy to find a vehicle running on a specific route if you want to clone it and itll be easy to see how many vehicles you have on a specific route.
Re: Cloned vehicle naming
Is the group belonging cloned when you (Ctrl-)copy a vehicle ?
Re: Cloned vehicle naming
i know yesHypolite wrote:Is the group belonging cloned when you (Ctrl-)copy a vehicle ?
Re: Cloned vehicle naming
Yeeepeeee !
*runs naked in the grass*
Hem
Thanks for the hint, I would have tried myself but it's more enjoyable to know before trying that it's gonna work
*runs naked in the grass*
Hem

Thanks for the hint, I would have tried myself but it's more enjoyable to know before trying that it's gonna work

Who is online
Users browsing this forum: Google [Bot] and 5 guests