Adding loading states

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
Samscam
Engineer
Engineer
Posts: 3
Joined: 25 May 2009 19:29

Adding loading states

Post by Samscam »

Hey, I want to make a grf wich adds loading states to the goods wagon, but I can't seem so make it right.
Here is what I have, but it doesn't change anything in the game.. I hope you can help me out:

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	 0C 00 00 00
    1 * 30	 08 06 "VS" 13 04 "Sam's MasterMind Goods" 00 00
    2 * 4	 01 00 02 04
    3 sprites/mastermind.pcx 66 8 01 18 8 -3 -10
    4 sprites/mastermind.pcx 82 8 09 16 20 -14 -7
    5 sprites/mastermind.pcx 114 8 01 12 28 -14 -6
    6 sprites/mastermind.pcx 162 8 09 16 20 -4 -8
    7 sprites/mastermind.pcx 66 40 01 18 8 -3 -10
    8 sprites/mastermind.pcx 82 40 09 16 20 -14 -7
    9 sprites/mastermind.pcx 114 40 01 12 28 -14 -6
   10 sprites/mastermind.pcx 162 40 09 16 20 -4 -8
   11 * 13	 02 00 00 02 02 00 00 01 00 00 00 01 00
   12 * 10	 03 00 01 20 01 05 00 00 00 00
What it has to do: Change the sprite of the goods wagon so that it has 2 loading states: full or empty, also use these states when the train is moving.

What it currently does: Nothing :s

Thx in advance,
Sam
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Adding loading states

Post by DJ Nekkid »

try adding a action 0, with property 12 set to FD, and you may have success :)
Member of the
ImageImage
Samscam
Engineer
Engineer
Posts: 3
Joined: 25 May 2009 19:29

Re: Adding loading states

Post by Samscam »

DJ Nekkid wrote:try adding a action 0, with property 12 set to FD, and you may have success :)
Thx, you think this will work:

Code: Select all

2 * 6 00 00 01 20 12 FD
I'm currently giving it a try, will edit when done.

Edit: The sprite is changed now, thx, but the loading states aren't working :s
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Adding loading states

Post by DJ Nekkid »

i would do it like this:

Code: Select all

    2 * 4    01 00 02 04
// Empty
    3 sprites/mastermind.pcx 66 8 01 18 8 -3 -10
    4 sprites/mastermind.pcx 82 8 09 16 20 -14 -7
    5 sprites/mastermind.pcx 114 8 01 12 28 -14 -6
    6 sprites/mastermind.pcx 162 8 09 16 20 -4 -8
// Full
    7 sprites/mastermind.pcx 66 40 01 18 8 -3 -10
    8 sprites/mastermind.pcx 82 40 09 16 20 -14 -7
    9 sprites/mastermind.pcx 114 40 01 12 28 -14 -6
   10 sprites/mastermind.pcx 162 40 09 16 20 -4 -8
// two sets
   11 * 13    02 00 A0 02 02 \w0 \w1 \w0 \w1

// action 0 with "new sprites, + action 3
   13 * 6 00 00 01 20 12 FD
   12 * 7      03 00 01 20 00 A0 00
Member of the
ImageImage
Samscam
Engineer
Engineer
Posts: 3
Joined: 25 May 2009 19:29

Re: Adding loading states

Post by Samscam »

Thx, it's working now. I just took the wrong graphics for full and empty, so the wagon looked full when is was empty :lol:
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Adding loading states

Post by DJ Nekkid »

good...

nice to see your first stumbling steps of .nfo turning into something... who knows, one day you might program something like the 2cc set :)
Member of the
ImageImage
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 45 guests