JK and MotS Editing >> 2D Graphics >> I have no idea what I'm doing wrong with msgfont16.sft     (Moderator: Admins) Previous Topic | Next Topic
Page 1 of 1
Post 22-Jan-2021 23:42        

I'm trying to make my own custom msgfont16. No matter what I do, even though I've set it to be IDENTICAL to the official one, including indexed color and the same color for transparency, nothing seems to work. The colors always end up garbled, and the transparency doesn't work. Is there something I'm missing?
Post 23-Jan-2021 23:02        

I fixed it myself again, lol.

So... basically, for msgfont16.sft, you have more freedom than I initially thought. While it's true that the game version uses an 8-bit indexed bmp (with the UI CMP as a palette), I made an 8-bit RGB image, but with colors all taken from a BMP screenshot of the font in-game. Then, I opened up my .sft in a hex editor, alongside the original game's sft, and I noticed that AN ADDRESS AT 0x4f0 somehow got shifted over to 0x4EC. I moved it back and it worked!

Also, for good measure, I copied the 2 byte value at 0x4CC and pasted it over every instance of my background color. The 4CC address is where the transparent RBG value is stored (It's inRGB565)


You can use this generator to create 2-byte colors, just be sure to reverse the first 2-digit number with the last one in the .sft, since the game reads them in reverse order. So, for example, in RGB565, my transparent background color is 'F8 1F', but in the .sft, in hex, I need to enter it as '1F F8' in order for it to work.
*** Post commands are unavailable for guests. ***