Page 1 of 1

NFO: Help with replacing original vehicle

Posted: 27 Jan 2009 13:10
by xerxesdaphat
Hi,

My eventual goal is to produce a NewGRF of the NZR DE class (a little shunter). To that end, I've been following the tutorial here: http://wiki.ttdpatch.net/tiki-index.php ... rstVehicle

At the moment I just nicked some graphics out of UKRS, just for testing as I try and produce a working NFO file.

The problem is, replacing an existing vehicle. If I choose vehicle ID 16 (as in the tutorial), this will replace the SH125, but of course keep the other data and it'll be a glitchy double-headed thing (just supposed to be a single shunter). Choosing another ID, such as replacing the UU37, results in nothing in-game -- just the original UU37 still there, except further down the list (sorted by EngineID) when buying in the depot.

Here's what I've written for the NFO:

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4        0D 00 \D= 00
    1 * 8        08 06 "TC" 15 88 00 00
    2 * 4        01 00 01 08
    3 sprites/nzrde.pcx 66 8 01 20 8 -3 -12
    4 sprites/nzrde.pcx 82 8 09 16 20 -11 -10
    5 sprites/nzrde.pcx 114 8 01 12 28 -10 -8
    6 sprites/nzrde.pcx 162 8 09 16 20 -3 -8
    7 sprites/nzrde.pcx 194 8 01 20 8 -3 -8
    8 sprites/nzrde.pcx 210 8 09 16 20 -15 -8
    9 sprites/nzrde.pcx 242 8 01 12 28 -18 -8
   10 sprites/nzrde.pcx 290 8 09 16 20 -7 -10
   11 * 9        02 00 00 01 01 00 00 00 00
   12 * 7        03 00 01 0F 00 00 00
   13 * 7        00 00 01 01 16 12 FD
I've also attached the encoded GRF. Line 12 is where I select the ID to replace -- in this case, 0F, which is the Floss 47.

I'd appreciate all help -- I've been poring over the NewGRF specs but as far as I can see what little is there is correct. Thanks.

Re: NFO: Help with replacing original vehicle

Posted: 27 Jan 2009 13:30
by xerxesdaphat
Solved! I wasn't paying attention when copying lines from the tutorial, and my Action 0 still had the SH125 vehicle ID in it. Changed to match the Action 3 and now it's working. Very silly mistake!

Thanks to petern on IRC for picking up on that -- I assume that's peter1138 here? Cheers :D