Page 1 of 1

Problems with drawing & coding new graphics

Posted: 30 Jul 2006 09:28
by BlueEagle
I've got some problems while drawing and coding new graphics via Purno's Drawing Tutorials and the coding tutorials at wiki.ttdpatch.net, but when coding my graphics via GRFCodec v0.9.9 I get several errors:
  • When coding my pcx and nfo, grfCodec gives an error: Can't read truecolor pcx. I use grfcodec -e betrain.grf to run grfcodec.
  • When coding my pcx and nfo, after saving my pcx as 256 colors with no palette, the default palette or an optimized palette (I use MGI PhotoSuite 4 to encode my png to pcx), GRFCodec gives the error Unrecognized palette with the above action in cmd. After using grfcodec -e betrain.grf -f and testing my grf in TTDPatch 2.5b7, I notice the colors are all messed up.
Someone who knows a solution to this problem?

I added my images/grf and some in-game screenshots to show the problem.

Re: Problems with drawing & coding new graphics

Posted: 30 Jul 2006 09:39
by Purno
BlueEagle wrote:[*]When coding my pcx and nfo, after saving my pcx as 256 colors with no palette, the default palette or an optimized palette (I use MGI PhotoSuite 4 to encode my png to pcx), GRFCodec gives the error Unrecognized palette with the above action in cmd. After using grfcodec -e betrain.grf -f and testing my grf in TTDPatch 2.5b7, I notice the colors are all messed up.
Decode the grf again. Now the pcx file got the correct palette. Paste your sprites over the ones in the pcx file, and encode again. That used to do the trick for me.

Posted: 30 Jul 2006 10:39
by Korenn
or, decode one of the official .grfs, open the file, save the palette (as "ttdpalette.pal" or something)
then when you convert your image to 256 colors, choose a custom palette and load the file.

That's how I do it.

Re: Problems with drawing & coding new graphics

Posted: 30 Jul 2006 11:52
by DaleStan
Do what Purno or Korren say.
BlueEagle wrote:GRFCodec gives the error Unrecognized palette with the above action in cmd. After using grfcodec -e betrain.grf -f and testing my grf in TTDPatch 2.5b7, I notice the colors are all messed up.
There is a reason that check is there. If you override it, you are basically guaranteed that the in-game colors won't be what you wanted. In my experience, starting TTDPatch just to test a grf is a rather long process, so I do my best to catch errors as early as possible.