TTO's "Dark Grey" company color

Got an idea for a new feature in TTDPatch? Post it here.

Moderator: TTDPatch Moderators

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

TTO's "Dark Grey" company color

Post by Purno »

IIRC, TTO had a "Dark Grey" company color which seemed almost black. How much effort would it be adding this company color in TTDPatch? AFAICT, the colors are already in the palette. Though I know this is pure eye-candy, could one of the developers look into the complexity of this suggestion?

Thanks in advance.
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
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

It's quite feasable to change the company colours with a grf file. However, it may change the colours of other gui elements as well (my experimentation with the red company colour also changed the red background of the error popups, for example).
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

TTO had a "Dark Grey" company color which seemed almost black. How much effort would it be adding this company color in TTDPatch?
You could quite easily modify the "gray" player colour (sprite #789) by simply shifting its original colour table entries towards "darker" (or "lighter") because there are quite a couple of white/gray/black entries in TTD´s palette.

See http://wiki.ttdpatch.net/tiki-index.php ... ustryTiles for an overview of the used player colour translation tables.

regards
Michael
Image
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Woo, looks quite complicated to me... :o
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."
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

> Woo, looks quite complicated to me...

Just write a .grf file with just one action0A substituting the original colour map sprite #789.

To do this, locate (and copy) sprite #789 in trg1[w].nfo. This sprite is a colourmap which sets up palette entries {04,...,0B} for the "gray" player colour which you may shift downward, e.g., to {02,...,09} to get the "gray" colour darker:

Code: Select all

1 * 5	0A 01 01 15 03 // #789
2 * 257	00 <new colour map (256 bytes)>
Be aware that DOS and Windows are using slightly different colour translation tables. 8)

regards
Michael
Image
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

What would be the correct notation, if, for example, I want to use {02,...,09} for <new colour map (256 bytes)> , in NFO?

And where can I find the colour translation tables?
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."
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

> where can I find the colour translation tables?
locate (and copy) sprite #789 in trg1[w].nfo.
> What would be the correct notation, if, for example, I want to use {02,...,09} for <new colour map (256 bytes)> , in NFO?

Check out sprite #789 in trg1[w].nf (don´t know exactly how it´s named under Windows) and you´ll see what I mean. Simply exchange those eight {04, 05, 06, 07, 08, 09, 0A, 0B} player colour values with your (lower) values.

regards
Michael
Image
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Sorry to sound like a noob, but
trg1r.nfo wrote: 789 * 257 00 00 01 00 00 00 00 00 00 00 00 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E
1F " !" 22 "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP"
"QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~" 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E "Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±"
"²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅXj !(õ" 0A 0B "ÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâã"
"äåæçèéêëìíîïðñòóôõ" 00 00 00 00 00 00 00 00 00 FF
doesn't make sense to me at all. Infact, I don't recognise {04, 05, 06, 07, 08, 09, 0A, 0B} in it...

EDIT: Hmm... perhaps I know what caused the mess, it seems the file is compressed, hang on and I"ll decode the grf again...

EDIT 2: Nopes, still
789 * 257 00 00 01 00 00 00 00 00 00 00 00 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E
1F " !" 22 "#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP"
"QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~" 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E "Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±"
"²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅXj !(õ" 0A 0B "ÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâã"
"äåæçèéêëìíîïðñòóôõ" 00 00 00 00 00 00 00 00 00 FF
, which still doesn't make sense to 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
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Post by Lakie »

Try decompiling with the option -t so it doesn't automatically convert certain hex codes into characters.

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

The problem is that you´re decoding into ASCII values. That´s why those funny chars are coming from. Try to avoid that.

Look here:

789 * 257 00
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
C0 C1 C2 C3 C4 C5 04 05 06 07 08 09 0A 0B CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF

The values which you want to modify are those bold ones. Notice that this is a DOS colour translation table. You may check out the Wiki to learn about the position of "player colours" in the Win table.

regards
Michael
Image
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Thanks, makes more sense now;

Code: Select all

  789 * 257	 00 00 01 00 00 00 00 00 00 00 00 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E
	 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E
	 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E
	 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E
	 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E
	 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE
	 BF C0 C1 C2 C3 C4 C5 58 6A 20 21 28 F5 0A 0B CE CF D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE
	 DF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 00 00 00 00 00 00 00 00 00
	 FF
However, I still don't recognise {04, 05, 06, 07, 08, 09, 0A, 0B} in this...

EDIT: Hmm... wrong palette I guess...
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."
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

> EDIT: Hmm... wrong palette I guess...

Yes, this is a translation table for the Win palette. Check out the link given above and you´ll see that lower gray values than "0A" are inserted as single entries elsewhere in that Win palette.

regards
Michael
Image
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

Note you also need to change the 256 2cc maps, as well as the 16 original maps. :lol:
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Post by michael blunck »

> Note you also need to change the 256 2cc maps, as well as the 16 original maps :lol:

If he wants to modify only one of the player colours, changing 16 of the 2cc maps and one of the original maps should be sufficient.


@Purno
> I still don't recognise {04, 05, 06, 07, 08, 09, 0A, 0B} in this...

Gray values below "0A" have different entries in the Win table than in the DOS table. Only in the DOS table {04, 05, 06, 07, 08, 09} are present. Corresponding values for Win table entries are those marked:
B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE
BF C0 C1 C2 C3 C4 C5 58 6A 20 21 28 F5 0A 0B CE CF D0
To make your "gray" darker, you´ll have to find out the positions of the colours two steps darker for {58, 6A, 20, 21, 28, F5, 0A, 0B}, i.e.:

-> {xx, yy, 58, 6A, 20, 21, 28, F5}

Yeah, it´s not that easy in Windows than in DOS. :P

regards
Michael
Image
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

michael blunck wrote:If he wants to modify only one of the player colours, changing 16 of the 2cc maps and one of the original maps should be sufficient.
You'd need to change 31 of the 2cc maps to change one colour, I reckon. Anyway, yes, if he's only changing one colour he won't need to change them all, as you said.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Actually, that's 31 maps total, but one of them has to be installed in two different 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
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Thanks for the help guys, but it's getting too complicated 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
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Post by athanasios »

Not bad idea to change the gray to darker one, but would be better to add an extra company color which is not possible if understood well. And all this trouble for 2cc, too much work to worth it.
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

athanasios wrote:And all this trouble for 2cc, too much work to worth it.
As I said at the beginning, I have changed one of the CCs before just for experimentation, including the 2cc maps. It took me about 3 minutes.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

Here, try this. It's for Windows, and changes the Purple company colour to Black.

Known issues:

1) it will only apply to nfo-recoloured vehicles if it is above them in newgrfw.cfg. Therefore, it should be placed right at the top, right after ttdpbasew.grf.

2) For some reason, it doesn't change the window title bar colours when starting a new game in TTDP. It works fine when loading an existing game.

3) it doesn't apply to every newgrf vehicle in OTTD; some will still be purple. I haven't yet worked out the rhyme or reason.
Attachments
purpletoblackw.grf
(69.23 KiB) Downloaded 871 times
Post Reply

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 17 guests