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: 6580
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Vehicle ageing effects

Post by Redirect Left » 15 Jul 2018 22:55

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
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5391
Joined: 13 Sep 2004 13:21
Location: The Moon
Contact:

Re: Vehicle ageing effects

Post by PikkaBird » 15 Jul 2018 23:38

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: 6580
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Vehicle ageing effects

Post by Redirect Left » 16 Jul 2018 00:03

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
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

User avatar
acs121
Tycoon
Tycoon
Posts: 1944
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Vehicle ageing effects

Post by acs121 » 16 Jul 2018 02:11

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: 5391
Joined: 13 Sep 2004 13:21
Location: The Moon
Contact:

Re: Vehicle ageing effects

Post by PikkaBird » 16 Jul 2018 05:57

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: 1944
Joined: 03 Nov 2017 18:57
Location: Courbevoie, near Paris, France

Re: Vehicle ageing effects

Post by acs121 » 16 Jul 2018 10:55

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: 7414
Joined: 17 Jan 2007 00:14

Re: Vehicle ageing effects

Post by Eddi » 16 Jul 2018 13:14

well, you could also detect whether servicing is disabled and flip between the two variables
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5391
Joined: 13 Sep 2004 13:21
Location: The Moon
Contact:

Re: Vehicle ageing effects

Post by PikkaBird » 16 Jul 2018 23:44

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: 7414
Joined: 17 Jan 2007 00:14

Re: Vehicle ageing effects

Post by Eddi » 17 Jul 2018 20:18

well, a rework of the way settings are accessible is quite overdue, i guess.
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
Pyoro
Tycoon
Tycoon
Posts: 2472
Joined: 17 Oct 2008 12:17
Location: Virgo Supercluster

Re: Vehicle ageing effects

Post by Pyoro » 20 Jul 2018 09:07

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 1 guest