Nforenum and property 1C (infrastructure maintenance cost)

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

Moderator: Graphics Moderators

Post Reply
User avatar
Snail
Tycoon
Tycoon
Posts: 1287
Joined: 28 Apr 2003 18:52
Contact:

Nforenum and property 1C (infrastructure maintenance cost)

Post by Snail »

Hi all,

Now that the infrastructure maintenance cost factor has been included in the trunk, I tried to code my railtypes using this feature. I'm coding them in NFO and then I'm using grfcodec to create the GRF file.
The GRF seems to work fine. However, when I run NFORenum on my NFO file, I get this error message:

Code: Select all

//!!Fatal Error (47): Offset 61: Invalid property 1C.
The version of NFORenum and GRFcodec I'm using is 5.1.3 . Perhaps NFORenum still doesn't support this property?
The French Narrow Gauge Train Set is now released! Get it here
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Nforenum and property 1C (infrastructure maintenance cos

Post by DaleStan »

It does indeed look like it's still missing. If you can compile NFORenum yourself, you can add «WORD,» to the end of line 664 (« /*18*/ SUBDATA, SUBDATA, BYTE, WORD,») in data.cpp, and then recompile. Or you can wait until the next nightly and see if it's there.
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
Snail
Tycoon
Tycoon
Posts: 1287
Joined: 28 Apr 2003 18:52
Contact:

Re: Nforenum and property 1C (infrastructure maintenance cos

Post by Snail »

Hi Dalestan,

You mean that line 664 should read:

Code: Select all

/*18*/ SUBDATA, SUBDATA, BYTE, WORD, WORD,
? I modified src/data.cpp like this, recompiled nforenum and the re-ran it on my NFO code, but the results are the same... i.e. I still get the same error message as before...
The French Narrow Gauge Train Set is now released! Get it here
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Nforenum and property 1C (infrastructure maintenance cos

Post by DaleStan »

Hmm....

If you have a 0.dat, you probably also need to delete that, or increment 17 to an 18 in line 488 (from «NDF_HEADER(0x0D, 17),» to «NDF_HEADER(0x0D, 18),»). NFORenum has (since I played with it) been changed to sometimes not generate/use those files, but I don't know the conditions for that optimization.
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
Snail
Tycoon
Tycoon
Posts: 1287
Joined: 28 Apr 2003 18:52
Contact:

Re: Nforenum and property 1C (infrastructure maintenance cos

Post by Snail »

That did the trick! :D Thanks, DaleStan!
The French Narrow Gauge Train Set is now released! Get it here
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 12 guests