Vehicle ageing effects

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7234
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Vehicle ageing effects

Post by Redirect Left »

Hi
I'm wondering, is there currently any way of altering a units sprite set as the vehicle gets older. For example, as a vehicle ages, replace the sprite set with one where the colors are less vivid, and obviously tarnished with dirt.
Also, can it be done based upon the last service, so instead of 'ageing' you have to take a vehicle to a depot to essentially wash it, and it comes out look all sparkly with vivid color sets again, instead of a slowly getting more darker and greyer as things 'get dirty' or 'get old'.

If this isn't possible currently, is there any realistic way of implementing it myself, as I think it may be a nice little effect, and an instant notice of "this vehicle needs replacing or servicing" instead of going to the vehicle info sheets.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Vehicle ageing effects

Post by PikkaBird »

Redirect Left wrote:I'm wondering, is there currently any way of altering a units sprite set as the vehicle gets older. For example, as a vehicle ages, replace the sprite set with one where the colors are less vivid, and obviously tarnished with dirt.
Also, can it be done based upon the last service, so instead of 'ageing' you have to take a vehicle to a depot to essentially wash it, and it comes out look all sparkly with vivid color sets again, instead of a slowly getting more darker and greyer as things 'get dirty' or 'get old'.
Yes. Both age_in_days and date_of_last_service are variables that exist.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7234
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Vehicle ageing effects

Post by Redirect Left »

Hmm. I will have to figure out to how use them to switch to an entire different set of sprites in the .grf then. I'm still a bit rusty, as i only do little custom things for my local games as an when i think of something i'd rather like.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Vehicle ageing effects

Post by acs121 »

Redirect Left wrote:Hi
I'm wondering, is there currently any way of altering a units sprite set as the vehicle gets older. For example, as a vehicle ages, replace the sprite set with one where the colors are less vivid, and obviously tarnished with dirt.
Also, can it be done based upon the last service, so instead of 'ageing' you have to take a vehicle to a depot to essentially wash it, and it comes out look all sparkly with vivid color sets again, instead of a slowly getting more darker and greyer as things 'get dirty' or 'get old'.

If this isn't possible currently, is there any realistic way of implementing it myself, as I think it may be a nice little effect, and an instant notice of "this vehicle needs replacing or servicing" instead of going to the vehicle info sheets.
It can be done even in NML, as far as i can tell the Dutch Trainset 2 is the best example. There's also the CFF set, but i don't know if it's coded in NFO or NML.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Vehicle ageing effects

Post by PikkaBird »

acs121 wrote:It can be done even in NML
Yes, hence me referencing the NML variable names.

In the case of "based upon the last service", though, you should probably bear in mind that most "advanced" OpenTTD players (ie the ones who use NewGRFs) play with breakdowns and vehicle servicing turned off.
User avatar
acs121
Tycoon
Tycoon
Posts: 1956
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Vehicle ageing effects

Post by acs121 »

PikkaBird wrote:
acs121 wrote:It can be done even in NML
Yes, hence me referencing the NML variable names.

In the case of "based upon the last service", though, you should probably bear in mind that most "advanced" OpenTTD players (ie the ones who use NewGRFs) play with breakdowns and vehicle servicing turned off.
Then it's better to use age_in_days. It's used by the Dutch Trainset.
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: Vehicle ageing effects

Post by Eddi »

well, you could also detect whether servicing is disabled and flip between the two variables
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5601
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Vehicle ageing effects

Post by PikkaBird »

Eddi wrote:you could also detect whether servicing is disabled
No, I don't think you can do that in NewGRF.
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: Vehicle ageing effects

Post by Eddi »

well, a rework of the way settings are accessible is quite overdue, i guess.
User avatar
Pyoro
Tycoon
Tycoon
Posts: 2558
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: Vehicle ageing effects

Post by Pyoro »

It's one of the effects I absolutely love in Transport Fever so it'd certainly be nice to have, if it can be made to work visually.

Although Pikka is right, I do play without servicing :mrgreen:
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests