Change vehicle age

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

Post Reply
User avatar
DerekCZ
Engineer
Engineer
Posts: 105
Joined: 29 Jul 2014 18:08
Location: Czech Republic

Change vehicle age

Post by DerekCZ »

Hello. I'd like to ask if it is possible to change age of an individual vehicle.
I am working on a scenario in which you start with a single airport and few aircraft, and I want the aircraft to be aged a lot to basically simulate that you bought them used.
I tried doing some edits in the save file, but boy, did it not end well...

Also, a little side-question, is it somehow possible to add the vehicle symbols that normally appear next to station names to signs? (it's not that important so I didn't want to start a new topic for it)

Thank you in advance for any answers or suggestions.
Tony Pixel
Route Supervisor
Route Supervisor
Posts: 459
Joined: 14 Oct 2017 11:06
Location: Ukraine

Re: Change vehicle age (and vehicle symbols)

Post by Tony Pixel »

Hello, DerekCZ.
1) No, You can't change those characteristics in-game. You can go to the settings>>limitations and change parameter "Vehicles never expire" to "Yes".
2) No, but You can make those symbols in newGRF.
Image Image
Sprite artist and NewGRF developer, coding in NML. My projects:
NewGRFs: Not Enough Subways Set | North American Passenger Railroads | Elevated Subway Bridge | Tony Pixel's Subway Equipment Set (frozen)
Screenshots: New York City Subway Episodes
User avatar
DerekCZ
Engineer
Engineer
Posts: 105
Joined: 29 Jul 2014 18:08
Location: Czech Republic

Re: Change vehicle age (and vehicle symbols)

Post by DerekCZ »

Tony Pixel wrote:... You can go to the settings>>limitations and change parameter "Vehicles never expire" to "Yes" ...
I know about that, but the premise of the scenario was supposed to be that you need to make enough money before the planes you had from start become obsolete, so you can later buy new ones.
I guess I'll how to do it without the age then :(
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Change vehicle age (and vehicle symbols)

Post by acs121 »

DerekCZ wrote:
Tony Pixel wrote:... You can go to the settings>>limitations and change parameter "Vehicles never expire" to "Yes" ...
I know about that, but the premise of the scenario was supposed to be that you need to make enough money before the planes you had from start become obsolete, so you can later buy new ones.
I guess I'll how to do it without the age then :(
You CAN add vehicle type symbols on signs. They are characters. Ask McZapkie, he did this in the Polroad set.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Change vehicle age

Post by Eddi »

DerekCZ wrote: I tried doing some edits in the save file, but boy, did it not end well...
before trying to hack savegames, make sure you save them uncompressed (setting in the conifg file)
Also, a little side-question, is it somehow possible to add the vehicle symbols that normally appear next to station names to signs? (it's not that important so I didn't want to start a new topic for it)
it's not really meant for that, but internally they have character codes in the "custom" unicode range, so you could technically "type" them
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: Change vehicle age

Post by Wahazar »

Why not just set game start earlier, buy vehicles, press "fast forward" button, wait a while, save and rename to .scn?
Symbols can be inserted as {BUS} for example.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
jfs
Tycoon
Tycoon
Posts: 1750
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Change vehicle age

Post by jfs »

You can't type in the string formatting codes {BUS} etc. in-game, but you can copy-paste the Unicode Private Use Area characters to get the symbols.

When pasted into OTTD, these five characters become the five vehicle symbols: 
They will probably show as garbage in your web browser, and I hope the forums software won't mangle them :)
User avatar
DerekCZ
Engineer
Engineer
Posts: 105
Joined: 29 Jul 2014 18:08
Location: Czech Republic

Re: Change vehicle age

Post by DerekCZ »

McZapkie wrote:Why not just set game start earlier, buy vehicles, press "fast forward" button, wait a while, save and rename to .scn?
I also thought of that, and that's probably what I'm gonna do. It's just a very uncontrolled way to do it and it can not be changed back after I re-save it and start further editing.

PS: I'll experiment with those symbols tomorrow, I genuinely did not expect that it could work
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Change vehicle age

Post by acs121 »

DerekCZ wrote:
McZapkie wrote:Why not just set game start earlier, buy vehicles, press "fast forward" button, wait a while, save and rename to .scn?
I also thought of that, and that's probably what I'm gonna do. It's just a very uncontrolled way to do it and it can not be changed back after I re-save it and start further editing.

PS: I'll experiment with those symbols tomorrow, I genuinely did not expect that it could work
If you rename a .sav to .scn, it can be loaded in scenario editor, and you can change the start date.
User avatar
DerekCZ
Engineer
Engineer
Posts: 105
Joined: 29 Jul 2014 18:08
Location: Czech Republic

Re: Change vehicle age

Post by DerekCZ »

jfs wrote:You can't type in the string formatting codes {BUS} etc. in-game, but you can copy-paste the Unicode Private Use Area characters to get the symbols.

When pasted into OTTD, these five characters become the five vehicle symbols: 
They will probably show as garbage in your web browser, and I hope the forums software won't mangle them :)
That sounds interesting, too bad you can't paste to OTTD in Linux :D
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Semrush [Bot] and 15 guests