Help: Changing Company Colors

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
goldobsidian
Engineer
Engineer
Posts: 14
Joined: 22 Aug 2010 20:24

Help: Changing Company Colors

Post by goldobsidian »

I need help, I want to make newgrf's that modify company colors. Mainly adding in black and a gold color, replacing existing colors such as mauve and yellow if nessisary. I have ZERO experiance with making newgrf or modding past installing and running a newgrf. Can some one walk me though step by step? I dont want a huge 40 page tutorial they tend to lose me and I get very confused on what im suppost do to if its not like.
1.) run program _____
2.) open/create file
3.) replace ______ with ______
Im sorry if this is a repost but iv tried searching the forums and I wasnt coming up with any answers.
Thank you.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Help: Changing Company Colors

Post by planetmaker »

Generally company colours are not an item which should be modified by NewGRF. Changing them changes the total palette of the game and also breaks the GUI and possibly and in particular all other NewGRFs along.

You'll want to read up on recolour sprites and change the appropriate ones.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Help: Changing Company Colors

Post by Eddi »

afair there is already an old grf that adds black as company colour
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Help: Changing Company Colors

Post by planetmaker »

Eddi wrote:afair there is already an old grf that adds black as company colour
Yes.
User avatar
Gremnon
Tycoon
Tycoon
Posts: 1517
Joined: 16 Sep 2005 12:23
Skype: the_gremnon
Location: /home
Contact:

Re: Help: Changing Company Colors

Post by Gremnon »

You can find them here
There is also the NewCC set available on Bananas that changes most, if not all, of the default colours. You'll quickly notice it causes certain UI elements to change colour as well, though not unreadably so.
goldobsidian
Engineer
Engineer
Posts: 14
Joined: 22 Aug 2010 20:24

Re: Help: Changing Company Colors

Post by goldobsidian »

Oh kool didnt know some one had allready made one. I would like to know though cause I dont like the yellow and I dont mind a UI change, plus if it messes to many things up I can always change it back.
goldobsidian
Engineer
Engineer
Posts: 14
Joined: 22 Aug 2010 20:24

Re: Help: Changing Company Colors

Post by goldobsidian »

so can any one tell me how to modify one of these so I can put my own colors in?
User avatar
Emperor Jake
Tycoon
Tycoon
Posts: 3427
Joined: 24 Apr 2007 09:37
Skype: Discord: Emperor Jake #4106
Location: Not Actually Japan
Contact:

Re: Help: Changing Company Colors

Post by Emperor Jake »

That's not too hard. Feel free to take my NewCC set and edit the colours to your liking. You'll need to edit and compile the NML code, and refer to this page on the colour codes that are available in OpenTTD; and this page on how to code recolour sprites in NML.

The source for the NewCC set can be found here. Specifically, here is the code that defines NewCC's 'dark red' colour, which replaces pink.

Code: Select all

//dark red
 replace(777) {
  recolour_sprite {
   0xC6: 0x46;
   0xC7: 0xB2;
   0xC8: 0xB3;
   0xC9: 0xB4;
   0xCA: 0xB5;
   0xCB: 0xB6;
   0xCC: 0xB7;
   0xCD: 0xB8;
  }
 }
The first column of numbers are the original colour coordinates, the second column are the ones that I replaced them with.
ZxBiohazardZx
Tycoon
Tycoon
Posts: 1534
Joined: 14 Mar 2006 12:46
Location: Netherlands

Re: Help: Changing Company Colors

Post by ZxBiohazardZx »

mauve to black and purple to black replace mauve or puple with black as new CC, do note that if you pick mauve; all windows will turn semi black as well
goldobsidian
Engineer
Engineer
Posts: 14
Joined: 22 Aug 2010 20:24

Re: Help: Changing Company Colors

Post by goldobsidian »

Thank you Emperor, ill give it a shot after the holidays when I got a little free time.
goldobsidian
Engineer
Engineer
Posts: 14
Joined: 22 Aug 2010 20:24

Re: Help: Changing Company Colors

Post by goldobsidian »

Ran into a bit of a snag I didnt think about due to the holidays, how do I get to the code and pallet to modify them? would be hard to replace a color that already exists with a new one like yellow to gold, if I dont know this. Sorry to be such a pain for you guys.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Help: Changing Company Colors

Post by planetmaker »

goldobsidian wrote:Ran into a bit of a snag I didnt think about due to the holidays, how do I get to the code and pallet to modify them? would be hard to replace a color that already exists with a new one like yellow to gold, if I dont know this. Sorry to be such a pain for you guys.
Uhm... what exactly is missing on the verbose description with links to documentation and full code exampe which EmperorJake posted a few lines above?
User avatar
Emperor Jake
Tycoon
Tycoon
Posts: 3427
Joined: 24 Apr 2007 09:37
Skype: Discord: Emperor Jake #4106
Location: Not Actually Japan
Contact:

Re: Help: Changing Company Colors

Post by Emperor Jake »

I think he's referring to adding colours that aren't on the palette. I'm not sure if you can do this in a NewGRF, but the fact that OpenTTD supports full-colour 32bpp graphics may make it a possibility. I think it's at least possible to draw and code sprites that don't adhere to the original TTD palette.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Help: Changing Company Colors

Post by planetmaker »

Emperor Jake wrote:I think he's referring to adding colours that aren't on the palette. I'm not sure if you can do this in a NewGRF, but the fact that OpenTTD supports full-colour 32bpp graphics may make it a possibility. I think it's at least possible to draw and code sprites that don't adhere to the original TTD palette.
Well, yes. Colours which are not on the palette can only be implemented with 32bpp. There the mask sprites determine the alpha channel of the company-coloured areas. So you have there also much bigger freedom.
goldobsidian
Engineer
Engineer
Posts: 14
Joined: 22 Aug 2010 20:24

Re: Help: Changing Company Colors

Post by goldobsidian »

The thing I dont understand is how to open the files to get at the coding. All the information posted at least what iv seen is how to edit it once it open, not how to open it. Maybe I over looked it but iv looked though the information a number of times and I cant find even a program name to open the files. How do you open a newgrf file to get at the files/coding inside of it? I have tried notepad and that did not work.

When I opened the newgrf's in notepad I got this
vx„ê™&ØNà5°w„êßx%èí“
:É0êÂàÍ~é‰ê‚“
éØOÑ5xnLw&—âPé

And I have no idea where the pallet in itself.

The thing you guys I think keep forgetting is... I HAVE NEVER MODDED ANYTHING UNLESS IT WAS INSTALLING A NEWGRF. I have NONE OF the programs nessisary to mod them unless its notepad or paintbrush.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Help: Changing Company Colors

Post by planetmaker »

Then I suggest to start at the beginning... http://newgrf-specs.tt-wiki.net/wiki/NM ... ng_started and maybe http://www.tt-wiki.net/wiki/NMLTutorial

And yes. You won't get along without reading a bit. It's a programming language. You will need to understand what you do. And you will need to compile the source code; you never edit a grf file directly. That's why EmperorJake also pointed you to his source code.... :roll:
User avatar
UnicycleBloke
Engineer
Engineer
Posts: 74
Joined: 30 Aug 2011 14:39
Location: Cambridge, England

Re: Help: Changing Company Colors

Post by UnicycleBloke »

goldobsidian wrote: 1.) run program _____
2.) open/create file
3.) replace ______ with ______
Can I humbly suggest you give NewGRFEditor a go? It reads the NewCC GRF and has a graphical palette editor.

To be honest, though, I would not recommend trying create something like NewCC from scratch with the editor - 256 near identical palettes in a list and no helpful comments. The potential for confusion or error is high. You would be far better off copy/pasting or, better, generating NML.

Out of interest, I noted that NML appears to have replaced all the pinks with Colour00Blue.
palette.png
palette.png (34.72 KiB) Viewed 2621 times
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Help: Changing Company Colors

Post by michael blunck »

UnicycleBloke wrote: To be honest, though, I would not recommend trying create something like NewCC from scratch with the editor - 256 near identical palettes in a list and no helpful comments. The potential for confusion or error is high.
A couple of years ago, Uwe had written a valuable program for creating recolour tables from scripts.

regards
Michael
Image
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot] and 71 guests