Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Aug 21, 2018 8:15 am

All times are UTC




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Vehicle ageing effects
PostPosted: Sun Jul 15, 2018 10:55 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 22, 2005 7:31 pm
Posts: 6336
Location: Wakefield, West Yorkshire
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!


Top
   
PostPosted: Sun Jul 15, 2018 11:38 pm 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
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.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
PostPosted: Mon Jul 16, 2018 12:03 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 22, 2005 7:31 pm
Posts: 6336
Location: Wakefield, West Yorkshire
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!


Top
   
PostPosted: Mon Jul 16, 2018 2:11 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Nov 03, 2017 6:57 pm
Posts: 1259
Location: Courbevoie, near Paris, France
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.

_________________
NewGRFs by Tony Pixel :
North American Passenger Railroads
Not Enough Subways


My screenshots


Top
   
PostPosted: Mon Jul 16, 2018 5:57 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
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.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
PostPosted: Mon Jul 16, 2018 10:55 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Nov 03, 2017 6:57 pm
Posts: 1259
Location: Courbevoie, near Paris, France
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.

_________________
NewGRFs by Tony Pixel :
North American Passenger Railroads
Not Enough Subways


My screenshots


Top
   
PostPosted: Mon Jul 16, 2018 1:14 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7095
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 :)


Top
   
PostPosted: Mon Jul 16, 2018 11:44 pm 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
Eddi wrote:
you could also detect whether servicing is disabled


No, I don't think you can do that in NewGRF.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
PostPosted: Tue Jul 17, 2018 8:18 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7095
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 :)


Top
   
PostPosted: Fri Jul 20, 2018 9:07 am 
Online
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 2367
Location: Virgo Supercluster
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:


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.