Problems with drawing & coding new graphics

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
BlueEagle
Engineer
Engineer
Posts: 1
Joined: 30 Jul 2006 08:58
Location: Dordrecht, The Netherlands
Contact:

Problems with drawing & coding new graphics

Post 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.
Attachments
The PNG with images of the train
The PNG with images of the train
betrain.png (1.97 KiB) Viewed 1715 times
betrain.grf
The GRF
(1.44 KiB) Downloaded 94 times
After enabling newgrf/betrain.grf<br />I didn't change the name of the SH 125, I just replaced it.
After enabling newgrf/betrain.grf
I didn't change the name of the SH 125, I just replaced it.
SCR2.png (159.06 KiB) Viewed 1715 times
BlueEagle,
Webmaster Autibende.tk
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: Problems with drawing & coding new graphics

Post 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.
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post 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.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Problems with drawing & coding new graphics

Post 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.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 21 guests