Page 1 of 1

Help with coding Depot Sprites to a Station

Posted: 12 Feb 2009 13:37
by JacobD88
Hi all,

This is mostly for seeking help with coding some station tiles for a long term project to create special station tiles that can service trains (and maybe build them too) over at this thread at the OTTD forum https://www.tt-forums.net/viewtopic.php?f=36&t=40577

The main thing at the moment however is just to have some working station tiles :D

I had previously asked for someone to do it for me there, but seen as I'm now keen to learn how to code a station, and as i cannot really find any comprehensive tutorials out there for station coding, i thought it best to post here and hopefully learn myself with assistance.

Now, i will be using the following sprites i developed from Snorbuckles work last year, which are as follows
PNG Preview of PCX...
PNG Preview of PCX...
bgdpostn.png (3.32 KiB) Viewed 1545 times
bgdpostn.pcx
Current PCX file...
(10.96 KiB) Downloaded 117 times
And i currently have the following NFO based on the Bigger Depot GRF i have already created, i realise that except for the Action 1, GRF-ID, and sprite coordinates everything else is totally incorrect, including how the sprites should be aligned in a game-tile. So basically i'm coding the NFO from scratch, anyone who can provide code to create the NFO for compiling with GRFCodec, or point me to a tutorial, or tell me how to use GRF Maker correctly, i'd be exceptionally grateful :)
bgdpostn.nfo
Current NFO file...
(765 Bytes) Downloaded 84 times
I think i've already got the coordinates and sizes of each sprite accurate in the NFO, they are as follows...

Sprite 3 Coordinates 59 8 Size 11 16
Sprite 4 Coordinates 91 8 Size 38 50
Sprite 5 Coordinates 157 8 Size 11 16
Sprite 6 Coordinates 189 8 Size 37 48
Sprite 7 Coordinates 252 8 Size 38 49
Sprite 8 Coordinates 314 8 Size 37 49
Sprite 9 Coordinates 377 8 Size 45 64
Sprite 10 Coordinates 456 8 Size 45 64

First thing to point out is that sprite 5 must be placed on the left of sprites 6 and 10, and similarly sprite 3 must be placed on the right of sprites 4 and 9 to form the walls correctly. This is the same as they operate in mine and Snorbuckle's Bigger Depots GRF in the above thread

Sprites 4, 6, 7, and 8 are non-track "buffer" tiles

Sprites 9 and 10 are the station-track tiles



Many thanks

Jacob

The service-station will be constructed in-game like the following example when the grf is complete...

Image

:?: