How to get the palette right?

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

Moderator: Graphics Moderators

Post Reply
User avatar
Wotan
Traffic Manager
Traffic Manager
Posts: 143
Joined: 27 May 2008 22:35

How to get the palette right?

Post by Wotan »

I've downloaded the GRFmaker utility since trying to learn to code NFO files by hand made my brain bleed.

I've got some problems with it however. When I try to load my BMP (or PCX) into the program I get a "Range Check Error", whatever that means... Searching on the error here on the forum suggests that there is something wrong with the palette used.

Is there a way to alter the BMP so that the palette will be correct?

I've attached the PCX file if that is of any interest.11
Attachments
DSB_Litra_E-6.pcx
(14.17 KiB) Downloaded 103 times
Coders wanted: Image DSB Litra E in 2cc - Image DSB Litra A in 2cc

ImageUnless stated otherwise all works published by me on these forums is covered by a Creative Commons Attribution Non-commercial share-alike License. Please PM me if you are interested in obtaining a different license.
User avatar
Chrill
Moderator
Moderator
Posts: 16075
Joined: 18 Dec 2004 17:35
Location: Stockholm, Sweden
Contact:

Re: How to get the palette right?

Post by Chrill »

When discussions are on about palette, what I have managed to understand is that it's often connected with using a DOS palette instead of the one for Windows. I may be very wrong right now, though...
Image
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: How to get the palette right?

Post by DJ Nekkid »

here is a working pcx. Atleast it works with the std. grfcodec :) Open it in your favorite gfx software, copy/paste the content of your file into this one, and hit save, and try again :)
Attachments
template-singleunit.pcx
(4.13 KiB) Downloaded 110 times
Member of the
ImageImage
User avatar
Wotan
Traffic Manager
Traffic Manager
Posts: 143
Joined: 27 May 2008 22:35

Re: How to get the palette right?

Post by Wotan »

Thanks for the help:). GRFmaker loads the file now which leads me to my next three problems...

I don't know how to control which sprites are used for each direction. For instance right now the sprite that should be displayed when the train is moving upwards is displayed when the train moves right to left. How do I assign each sprite for the right place?

When loading the bitmap GRFmaker does not select all sprites completely. How do I manually change the sizes of the selection?

And finally:

How do I add a tender?
Coders wanted: Image DSB Litra E in 2cc - Image DSB Litra A in 2cc

ImageUnless stated otherwise all works published by me on these forums is covered by a Creative Commons Attribution Non-commercial share-alike License. Please PM me if you are interested in obtaining a different license.
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: How to get the palette right?

Post by AndersI »

I have PM:ed you a copy of my Swedish set, GRFmaker project + the .pcx files. Hopefully you can see both the preferred (by GRFmaker) sprite layout and some coding info. There are tenders, different goods, loading states, Mu:s with hardwired layouts, etc.

Hope it helps!

Edit: The problem with your original .pcx is that it is not in 256 color, but 16 million - does make it a bit difficult for GRFmaker...
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 15 guests