NFO query - date vehicle built (vars 49/C4)

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

NFO query - date vehicle built (vars 49/C4)

Post by andythenorth »

I have created some NFO code that changes vehicle livery depending on date vehicle is constructed.

The code works as expected, and makes use of (EDIT) variable C4 (year built, counted since 1920) in a variational action 2.

However, because OpenTTD can start games before 1920, I thought it might be better to use (EDIT) variable 49 (year built, counted since 0). However nfo-renum (v3.4.6) reports the following error:

Code: Select all

//!!Warning (86): Offset 4: Testing nonexistant variable 49.
For my current purpose, (EDIT) variable C4 will suffice entirely. However I wondered if this was a known issue?

Variable 49 listed here: http://wiki.ttdpatch.net/tiki-index.php ... n2Vehicles

cheers,

Andy
Last edited by andythenorth on 21 Dec 2008 12:45, edited 2 times in total.
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: NFO query - date vehicle built (props 49/C4)

Post by frosch »

The variable is from "Wed 04 of Jun, 2008 [01:19]"
What is the release date of your nforenum?

So if it is the only warning, you can ignore it as you know better [1], you can check for a update of renum, and if none is available wait or politely ask for it.

However, when you do not need dates before 1920, you can just use variable C4. That would keep compatibility with TTDP.

[1] The rest of the action2 can be checked without knowing the variable.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
PhilSophus
Chairman
Chairman
Posts: 776
Joined: 20 Jan 2007 12:08
Location: Germany

Re: NFO query - date vehicle built (props 49/C4)

Post by PhilSophus »

andythenorth wrote: Thanks Frosch, I'll see if there's a newer nfo-renum.
I don't know if there is a release, but it seems to be in the svn ([url]svn://svn.ttdpatch.net/misc/nforenum[/url]) since August:

Code: Select all

r1980 | minime | 2008-08-06 03:37:07 +0200 (Mi, 06 Aug 2008) | 1 line

Added VA2 global variables 23 and 24, house variable 65, industry variable 46 and vehicle variable 49.
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFO query - date vehicle built (props 49/C4)

Post by DaleStan »

Except for 0.dat (still) breaking 0f8.dat (see the recent posts in the NFORenum thread) the data files on the NFORenum webpage should be up-to-date.

Also, neither "property C4" nor "property 49" are properties. Call things by their correct name, or don't call them anything at all. (Haven't I warned you about this before?)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
andythenorth
Tycoon
Tycoon
Posts: 5705
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NFO query - date vehicle built (props 49/C4)

Post by andythenorth »

DaleStan wrote: Also, neither "property C4" nor "property 49" are properties. Call things by their correct name, or don't call them anything at all. (Haven't I warned you about this before?)
I'll edit the posts above to fix that.

I had misunderstood a prior correction of my terminology in the context of an action 0 (in this case not by you DaleStan). My bad.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 8 guests