Open TTD Palette Colors Problem...

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

User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Open TTD Palette Colors Problem...

Post by Benbo »

Ok, I need an explanation of the pink in the Open TTD Palette. (It's the same as the TTD one isn't it :?: This is how the story goes :arrow:

About ago I was new to making sprites (well I still am) and I was looking to find what the bright pink was for because I had looked at the PCX file of TRG1r.grf and found that there was A LOT of pink. I was confused at this because, everything in the game wasn't pretty much pink was it? So when I searched about it, I found a topic on TT-Forums and someone said that 'magic-pink' was black. I was still confused, because everything wasn't black in the game either. I carried on searching, and have been up to this day. I then discovered today, when I was in my image editing programme, that as I scrolled over several different 'magic-pinks', that they had slightly different RGB values. I mean it wasn't exactly obvious to the eye, but they were all different shades of pink. This has lead me to think that they, when put on sprites, come out in different shades of black and grey. Now can someone confirm this, and if I am right, then could someone please draw up a table that on one side has the different shades of pink, and on the other side show the what color comes out in the game.

Thanks :wink:

Ben.
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

The easiest way for me is just load a TTD-Win color palette to the respective pcx. I think there are some default colors in PCX, which are not handled well in all editors. So I just load this (and keep the indices) and it looks fine.
Attachments
ttd-win.zip
(1.18 KiB) Downloaded 97 times
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

If you are drawing in the API pinks, you are probably doing something wrong.
Just pretend those colors don't exist. When drawing letters, TTD automagically turns (at least one of) the pinks to black.

If you get API pinks in places other than the letter sprites, you decoded with the wrong palette. (Try "grfcodec -p ?")
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
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Upload Please...

Post by Benbo »

Dalestan, or someone else, could you please upload a picture of sprite 989 please. I would like to see what it looks like on yours. :wink:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

In which file?
trg1r.grf? If so:
Attachments
989.png
989.png (2.84 KiB) Viewed 3376 times
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
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

Ok. For mine, I got a pink hair-style of pink. I'll post it when I get home. I'll try to decode trg1r.grf again using grf wizard. I don't know what palette i selected.

And yes it was trg1.grf

So is 'magic-pink' black?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

No. Black is black and pink is pink.

As I said, there is some magic surrounding the letter sprites, but beyond that, if you encode something that contains pink, it will appear as pink, and if you encode things that contain black, it will appear as black.
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
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

I Have A Problem Then...

Post by Benbo »

I have a problem then... Attached is sprite 989 from trg1r.grf as I have it.

It is wrong, and I said I would try to decoder trg1r.grf again, but I seem to get the same problem every time I try to decode it... I get this error:
GRF Wizard wrote: Runtime error '5':
Invalid procedure call or argument
What's that all about :?: And when I press OK, it just closes the program. This happens when I click 'Next' on the page where you chose which file you want decoding. GRF Wizard won't let me choose using the circle buttons (I think they're called radio buttons or something) and so I have to do it manually.

If you have any information about the problem, then please send mea private message or just reply in this topic.

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

Post by DaleStan »

Well, then, don't use GRFWizard; use grfcodec directly. Don't hold your breath waiting for GRFWizard to be fixed; its author is infamous for not fixing bugs.

Yeah, so grfcodec is a command-line program. Makes scripting so much easier.
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
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

Thanks. I have done what it says to do here and I can't seem to get the thing to work. I have extracted the files to the right place, in the folder where trg1r.grf and all that are and when I double-click on GRFCodec.exe all that happens is that command pops up and back down in a flash. :cry: What's going on :?:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Command. Line. Program.

You have to start a command prompt. (Start->Run, and type "cmd" if you're on WinNT/XP, Start->Run; and type "command" if you're on Win9x/ME)
Then cd to the appropriate directory and run grfcodec from the command line.
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
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

Sweet.

I'd like to that you DaleStan my friend are great. Thankyou so much. Now I Have the correct file, and the decoding worked first time.

Now, once I have made my sprites, I need to know what things I need to code and how to code them :hint: :hint: :roll:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

DaleStan wrote:Coding is very well documented here.
If you require assistance, the best places to ask are the TTDPatch Graphics forum, #tycoon on quakenet, and the TTDPatch Problems forum.
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
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

I have read through that and now I understand it. But what says that 'this is the front of the train', and 'this is the side', and even 'this is a train'?

Is there another type of code behind this sort of thing to make my own GRF set? Or is it just the NFO file and the PCX file required to make a GRF set?
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

NFO tells it what is what.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

Does it? Where?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Read go read Action0.
Look for "feature"
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
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

I searched through the document using Ctrl+F for 'Feature' and 'Action' and 'Action0' but couldn't find anything.

I wasn't completely sure what you meant, Dalestan :roll:

What sprite number is it near?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

I've told you where to find the coding documentation. Twice. Try looking there.

If you can't find the Action0 page, then I can't help you.

GIYF
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
User avatar
Benbo
Transport Coordinator
Transport Coordinator
Posts: 380
Joined: 09 Jan 2006 18:51
Location: UK

Post by Benbo »

Sorry... You never said that you meant in the Wiki.

If anyone else is looking for it, then you can find it here.

Edit: Also, would Action0 stations work for a bus stop/bus station?
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 23 guests