Topic: Changing Empire Tile Colors  (Read 166 times)

0 Members and 1 Guest are viewing this topic.

Offline USFTethys

  • Lt. Junior Grade
  • *
  • Posts: 7
Changing Empire Tile Colors
« on: April 12, 2024, 04:01:12 am »
Short story: I suffer from acute color blindness in where yellow and green are indistinguishable, and some hues of purple are indistinguishable from blue. So I came up with a fix via hex editing. Here I will outline the process for Upgrade Mod 3.2 (additional races) so others can benefit from the fruits of this labor (Special thanks to Jan on this forum for the idea).

You will first need a hex editor. I use HxD. Starting at address 00464748 (hex) are the tile colors of each race. There are 3 bytes for each color, in the following order:

Stock values:
00 66 F5 = Federation
CF 33 00 = Klingons
00 AA 00 = Romulans
9B 91 4B = Borg
87 62 BA = Dominion
A0 66 12 = Cardassians
CE 65 E6 = Ferengi

Color Blind (for mine) values:
STOCK = Federation
E0 00 20 = Klingons (new, darker with hint of purple for blood)
STOCK = Romulans
70 70 40 = Borg (new, brownish/grey)
A6 06 A6 = Dominion (new, darker purple)
FF 50 00 = Cardassians (new, light orange with hint of red)
FF FF 00 = Ferengi (new, bright, yellow AF)

Most similarities have been removed (for my eyes) the Borg and Cardassians were really bad and the Ferengi/Dominion/Federation were just terrible. Hopefully this alleviates some problems for others and maybe other color blind people could work up the values they need for their own special cases.

Finally, you should be able to extrapolate the remainder of the color values using the stock table of values
(this sequence only occurs 12 times in the file via hex-value search = 00 66 F5 CF 33 00 00 AA 00 9B 91 4B 87 62 BA A0 66 12 CE 65 E6)

Offline TAnimaL

  • Lt.
  • *
  • Posts: 771
  • Gender: Male
    • Combat Logs from the Cold Depths of Space
Re: Changing Empire Tile Colors
« Reply #1 on: April 14, 2024, 12:28:11 pm »
Thanks for identifying this problem and finding the fix! I too suffer from some color blindness (1 in 12 men do, and my glaucoma exacerbates color loss) so I appreciate your efforts. I'd like to poke around and find where these values live in SFCOP. To explain to any others - the 3 sets of numbers in the hexadecimal format are R , G,  B in 16bit format. There are many tools to convert a color to hexadecimal - one decent one is https://www.rgbtohex.net/rgb/ So now that USFTethys has found the address in SFC3, you can make the races whatever colors work best for you.

As part of my day job in online education, ADA color compliance is practically a religion for us. Web design, UIX, videogames, and advertising are all directly effected by color relationships. Finding solutions for older games like the SFC series is greatly appreciated.

Offline USFTethys

  • Lt. Junior Grade
  • *
  • Posts: 7
Re: Changing Empire Tile Colors
« Reply #2 on: April 17, 2024, 03:47:33 am »
Thanks for identifying this problem and finding the fix! I too suffer from some color blindness (1 in 12 men do, and my glaucoma exacerbates color loss) so I appreciate your efforts. I'd like to poke around and find where these values live in SFCOP. To explain to any others - the 3 sets of numbers in the hexadecimal format are R , G,  B in 16bit format. There are many tools to convert a color to hexadecimal - one decent one is https://www.rgbtohex.net/rgb/ So now that USFTethys has found the address in SFC3, you can make the races whatever colors work best for you.

As part of my day job in online education, ADA color compliance is practically a religion for us. Web design, UIX, videogames, and advertising are all directly effected by color relationships. Finding solutions for older games like the SFC series is greatly appreciated.

I appreciate the praise. Jan here found them first but I don't think he ever publicly posted their locations. Said they could be found by searching the values in one of the openable files in SFC3. Indeed, they are all in a particular order, however, there could be more out there; alone and afraid.

I have a little background in disassembly, over the last 15 years have been puttering around with the Birth of the Federation game's code using IDA Pro over in the AFC/BotF community. Which by the way has done some pretty amazing things (replaced graphics engine, bug squashing, unlocked codespace via relocation tables, game/file editor, and BRAND NEW features). I did some big stuff as well, but I won't elaborate on it here; if anyone here is interested in BotF they are likely already members there as well. I did some things for Bridge Commander as well, fixing up the Gamespy stuff so multiplayer works through the game interface once more. Openspy helped out a LOT there; they did the leg work, all I had to do was change a masterserver.txt file and it worked right "out of the box".

It would be awesome if someone could create a true colorblind color guideline/mod. Because I know of at least one program that can create a patch installer, which can be used to patch in the new color blind values quickly and easily for those who suffer from code-illiteracy, or those who want to avoid downloading the modified game exe from 3th party sources.

Also, I am glad to help! I am sure staring at these blue-lit screens all these years is probably also a contributing factor for losing color vision in color deficient people. But what more can one do, it's tech after all. Game on!