HEY PATCHTEAM! What's wrong with this?

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
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

HEY PATCHTEAM! What's wrong with this?

Post by BobXP »

Ok, Since I haven't yet got the grd2grf thing from eis_os, I decided to do it the hard way. Now TTDPatch gives me the error that sprite 2 is invalid. So what's wrong with it?

Code: Select all

    2 * 11	 0A 03 52 01 49 04 0B 4E 04 07 4F
It's meant to replace the sets 1169-1250, 1259-1262 and 1271-1274.
<!-- End Of Post !-->
Image
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

I've had the same problem

apparently action 0A is invalid when you try to register more than 1 set of sprites. I think it's a bug.

I solved it by breaking up the multiple-set 0A action into several single-set 0A actions.
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

Ok, I'll try that.
<!-- End Of Post !-->
Image
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Have you got an action 8 and given your .grf file a proper GRFID? Without that, none of the sprite actions will be valid.
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

Didn't fix it... the line is now:

Code: Select all

    2 * 5	 0A 01 52 01 49 
Patchman wrote:Have you got an action 8 and given your .grf file a proper GRFID? Without that, none of the sprite actions will be valid.
Here's my Action 8 line:

Code: Select all

    1 * 116	 08 06 23 12 00 01 4D 61 67 6C 65 76 20 52 6F 61 64 73 00 52 65 70 6C 61 63 65 73 20 6D 61 67 6C 65 76 20 74 72 61 63 6B 73 20 77 69 74 68 20 72 6F 61 64 20 76 65 68 69 63 6C 65 73 20 74 6F 20 61 6C 6C 6F 77 20 6D 6F 72 65 20 66 6C 65 78 69 62 6C 65 20 72 6F 61 64 20 62 75 69 6C 64 69 6E 67 2E 20 28 43 29 20 32 30 30 34 20 4F 70 53 74 61 72 74 2E
Last edited by BobXP on 28 Mar 2004 18:20, edited 1 time in total.
<!-- End Of Post !-->
Image
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

BobXP wrote:Didn't fix it... the line is now:

Code: Select all

    2 * 5	 0A 01 52 01 49 
You're replacing 82 sprites?

In any case, the 01 49 is wrong, you probably mean 49 01 (i.e. 0149=329). Remember that word values have to be in little-endian byte order.
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

Ok, I juggled the digits round a bit and it works. It was actually "91 04". Thanks for your help :D
<!-- End Of Post !-->
Image
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13233
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Post by Hyronymus »

BobXP wrote:Ok, I juggled the digits round a bit and it works. It was actually "91 04". Thanks for your help :D
Soemhow what you did works too but when a number in hex is 01 49 then it should be 49 01 in little endian. Just switch the byte pairs, not every bit!
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

The number in hex was 0x0491. Which becomes 91 04 when in little endian format.
<!-- End Of Post !-->
Image
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

Code: Select all

// replace commando
 3 * 20 0A 06
           20 91 04
           08 15 05
           08 4D 09
           04 72 05
           06 1B 0A
           28 0C 11
Invalid sprite #3

it's supposed to replace 6 sets of sprites. What am I doing wrong?
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

bumpitty bump bump
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Don't bump after waiting less than half an hour! :roll:

Anyway, it looks fine so I'd need the .grf file to test why exactly it's giving that message. The only thing I can think of is that there aren't enough sprites in the .grf file for all six sets. (Unless it's a bug in TTDPatch, but that's impossible right?)
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

It was a bug with multiple sets after all. Fixed in alpha 22.
User avatar
spaceman-spiff
Retired Moderator
Retired Moderator
Posts: 20634
Joined: 28 Jul 2002 07:08
Location: Belgium
Contact:

Post by spaceman-spiff »

Korenn wrote:bumpitty bump bump
Boy, you're impatient
Well, back to work, lot's of it in the near future
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

sorry, I just finished some graphics and now I couldn't test them :lol:
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 14 guests