More Carmageddon 2 FONT discoveries!

Okay, so I’m still working on my BETA MOD and am again currently fiddling around with the fonts, now I haven’t read my previous post on my font discoveries for a while and I’m pretty sure I didn’t mention this at all but in any case I shall explain as best I can, there will likely be a bit of repeated information from the last font discovery post but that can’t be helped.

I am writing this assuming that you’ve read the previous post, if not then please do so as it will help you understand the role that files like SCROLLERS.TXT play within the game, read it here:

Right, we’ll use the BIG_ITALIC font as an example as it’s the font I am currently editing!

Inside \data\64x48x8\FONTS\Big_Italic\TiffRGB are a series of images, these images reference specific characters in the BIG_ITALIC font face, the aspects of this font (as I’ve explained in my previous post on this subject) are defined in FONT.TXT within the font’s main folder, BIG_ITALIC‘s FONT.TXT file looks as follows:

// Large timer digits and colon
133 // number of characters (ORIGINALLY: 133)
-4 // inter-character spacing (ORIGINALLY: 1)
33 // ASCII offset ( value of first character)
20 // font character height (ORIGINALLY: 24)
12 // Blank width

Let’s explain the contents of this file for you:

Anything with // in front of it is a comment in the file and has no bearing on the actual data that the game takes from this file.
// Large timer digits and colon
133 // This is the number of characters within this font type, 133 individual characters
-4 // This is the spacing between each character
33 // This is the value of the first character within the font, basically the first image within Big_Italic\TiffRGB is named 33.TIF, the final image being 165.TIF *I shall explain this later)
20 // This is the size of the font when displayed on screen
12 // This is the width of a blank space

Okay, so again we understand what FONT.TXT does and how it relates to it’s font, in this case BIG_ITALIC, we’ll now look at the images within Big_Italic\TiffRGB (edited for my BETA MOD).

Going back to how I resolved the COMBO message issue in SCROLLERS.TXT, I replaced symbols with images of the text I wanted to be displayed.
This is the same method I want to use to display more custom messages within SCROLLERS.TXT using foreign characters.

Now here is where the confusion comes in, a lot of people who have attempted to translate this game have said they have run into issues when trying to use foreign characters (foreign being non-standard English characters,) the game won’t display them, it will instead display nothing but why is this?

In trying to figure this out and attempt to work out whether these characters just aren’t implemented or whether there is something else at fault I decided to take another look at the game’s executable, here we find the list of characters the game recognises:

Here you will notice the bog-standard English characters and symbols but also we have a large pool of additional characters that the game recognises and will display for us so why doesn’t it work when people are attempting to translate the game and use characters native to their language? Heading back into Big_Italic\TiffRGB I noticed the following glaring error that I failed to notice when previously editing these fonts.

NOTE: 91.TIF,92.TIF,93.TIF,94.TIF,95.TIF,123.TIF,124.TIF,125.TIF are actually the following characters [\]^_{|} I just edited the images for my previously mentioned COMBO message workaround.

Here you will notice that the image numbers skip from 95 to 123, this means we have a missing 27 characters to work with right there, going back to the executable, we are able to notice that these missing 27 characters are here:

So it turns out we can use lower-case characters as additional characters in our font but that’s getting away from the crux of the translation issue, so I’ll try and get that out of the way before going back to my butchering of the C2 fonts.

Okay, so going back to the BIG_ITALIC FONT.TXT there are 133 characters defined as usable in this font and the first character is numbered 33, basically how the game works is each of the characters defined in the executable is given a number, this number is absolute based on where it is in the executable, so looking back at the executable we will say that: ! = 0, ” = 1, # = 2, $ = 3, % = 4 and so on but because FONT.TXT says that the first character is 33 then: ! = 33, ” = 34, # = 35, $ = 36, % = 37 and so on, so from here we can see that the previously mentioned missing 27 characters between 95 and 123 are the aforementioned lower-case characters defined within the executable, not only that but we can also spot another glaring error within Big_Italic\TiffRGB

REMEMBER: 91.TIF,92.TIF,93.TIF,94.TIF,95.TIF,123.TIF,124.TIF,125.TIF are actually the following characters [\]^_{|} I just edited the images for my previously mentioned COMBO message workaround.

Do you see the error here? If not then I’ll explain it using the image 129.TIF, this image displays the following character Ü but if we go back to the executable and take a look at character the corresponding character (of course remembering to do the math of 129-33=96) we see that the character we land on is actually €

Upon discovering this, I decided to edit SCROLLERS.TXT to test whether € did indeed display image 129.TIF and it did:

Now I’m thinking ‘this is too good to be true’, so I decide to do a somewhat definitive test, so I go into BIG_ITALIC‘s FONT.TXT increase the number of characters from the default 133 to the max 224, I also add Ü to SCROLLERS.TXT and I rename 129.TIF to 220.TIF, we rename it to 220.TIF because if we count the number of characters within the executable starting with ! at 1 then Ü is the 188th character, so we add 33 to 188 and then we subract 1 because we started counting at 1 as opposed to 0 then we finally get 220, so in the BIG_ITALIC font the character Ü is number 220.
I tested this and boom, it works:

So now we can almost certainly come to the conclusion that each and every one of these characters defined within the executable can actually be displayed within the game, the only reason people were having issue when translating the game is none of the fonts in the game actually have images for all 224 of the available characters, nor are all 224 available characters actually used within any of the game’s FONT.TXT files and the few that we do have aren’t being used correctly at all.

Discovering this is great news because it means all you’d need to do is edit a font’s FONT.TXT file to use all 224 available characters, then change the names of the incorrect characters, create the additional characters you need and you’re all set to go with a perfect translation of Carmageddon 2 but even better is that for me I now have (including the incorrect characters) an additional 158 characters to work with which in-turn means that I can create an even better mod!

Hooray for DIY workarounds!


Post a Comment