Page 1 of 1

Sprite Pallette Issues

Posted: 28 Aug 2008 20:33
by SquireJames
Hello

Well, I was trundling along through the early 30's in my latest game, and I wanted to replace the early UKRS carriage with a teak one i'd drawn. However, I knew the teak one was out of pallette, but the maroon Mk.1 i'd done for the BR Set was done according to the pallette given in their colour standards thread.

After lengthening the sprite for the longer UKRS carriage, I packed up the grf, and well disaster. It came out purple.

After messing about with colour tables (and managing to load swatches in Photoshop, good for future sprites but not these ones) I somehow got my carriage in the same weird pallette as UKRS appears in. Now, the _ view works. Success I thought, so I went to try and do the same to my teak carriages. However, nothing I did actually changed it.

So, heres the issue. If I made my carriage to the pallette given to me by the BR Set (which is identical to the pallette I extracted from UKRS, so its correct) then why does it have to appear so strange to work right? Am I encoding/decoding it badly?

Image

Re: Sprite Pallette Issues

Posted: 28 Aug 2008 20:43
by FooBar
Apart from using the colours from the palette, you also have to have these colours in the right order in that palette.

The easiest way to do it is to decode a grf, copy the pcx file from it and paste your new sprites in it. Any self-respecting graphics program should respect that palette and leave it the way it is.

Now when it comes to decoding and encoding a grf, you should consider the -p switch option. If you want to encode a Windows grf, it's mandatory to use that switch because else grfcodec will assume the dos palette. You can use this switch option like so: grfcodec.exe -d -p 2 nameofgrf.grf or for encoding: grfcodec.exe -e -p 2 nameofgrf.grf

The following is equally important:
Decode in Dos mode, draw in dos mode and encode in dos mode, OR Decode in Windows mode, draw in windows mode and encode in windows mode. Don't mix it up! The palette isn't saved with the grf, so the game (and grfcodec for that matter) assumes you have used the right one!

Re: Sprite Pallette Issues

Posted: 28 Aug 2008 20:44
by michael blunck
Whatever your real problem is, you´re another one with a buggy palette (wonder where they all come from ...).

See http://www.tt-forums.net/viewtopic.php?p=708678#p708678

regards
Michael

Re: Sprite Pallette Issues

Posted: 28 Aug 2008 20:57
by Ameecher
The trouble that we have is that there is a thread with a post in that needs to be corrected, I should really tell csuke/Dave and get them to remove it really.

Re: Sprite Pallette Issues

Posted: 28 Aug 2008 21:02
by SquireJames
Foobar, your a genius! I guess it was decoding in DOS, hence the weird colouring.

With the -p switch, everything looks so much better, and I dare say i won't even need to change the pallette now (well, might need to, but not to the same extreme)