Help with GRFCodec?

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
Castaras
Engineer
Engineer
Posts: 29
Joined: 31 Dec 2007 11:49
Location: Cambridgeshire, UK
Contact:

Help with GRFCodec?

Post by Castaras » 08 Aug 2008 14:32

I've been trying to make some GRFs for myself to use(no, they're unlikely to go public), but I've had a slight problem with the graphics...

GRFCodec tells me that the palette I'm using isn't recognised. I override this, and it goes strange colours.

I'm using This palette, in accordance to the tutorial for NFO coding, but it still doesn't work. =S

So...am I using the right palette? If not, what is the right palette? If I am, then what am I doing wrong?

User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: Help with GRFCodec?

Post by DJ Nekkid » 08 Aug 2008 16:20

attached is a .pcx file. if you can save the palette from it, and then load it in the grf you created you should be fine ;)
Attachments
template.pcx
(9.81 KiB) Downloaded 139 times
Member of the
ImageImage

User avatar
Zephyris
Tycoon
Tycoon
Posts: 2826
Joined: 16 May 2007 16:59

Re: Help with GRFCodec?

Post by Zephyris » 09 Aug 2008 11:14

First check you are coding/decoding the correct palette - to decode a windows palette grf you must use "grfcodec -d [grfname] -p 2", to decode a dos palette grf you can just use "grfcodec -d [grfname".

Then do as DJ nekkid says, or alternatively copy your sprites into the templace pcx and save them again using a "use original palette" option if it asks.

User avatar
Purno
Tycoon
Tycoon
Posts: 16663
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: Help with GRFCodec?

Post by Purno » 09 Aug 2008 11:30

My trick used to be to decode my GRF, replace the sprites (copy, paste) and encode it again.
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."

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Help with GRFCodec?

Post by DaleStan » 20 Aug 2008 22:18

Castaras wrote:GRFCodec tells me that the palette I'm using isn't recognised. I override this, and it goes strange colours.
Then chances are overwhelming that the palette is incorrect.
Castaras wrote:So...am I using the right palette? If not, what is the right palette? If I am, then what am I doing wrong?
I'd guess that your image editor is "optimizing" the palette. Turn that off. GRF files only contain the palette indices, so even if the colors are correct, the palette can still be broken -- a correct palette has the correct colors in the correct locations.
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 “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest