Race Fonts (*.fnt files)
Posted: Sat Feb 13, 2010 8:52 pm
Here is a great post by pigman
Hi anyone interested in using new fonts within BOTF
May have cracked this one.
Each empire has 4 font files, but the 9 pt font can be ignored as it contains race colour and is used on map screen (unless you want to change colour, that is). Sadly, can't change colour on the larger fonts, (I think 15 pt, 20 pt and 28 pt) as these are just grey and colour is added elsewhere within BOTF.
=> changing colors of race fonts / map-grids
Thought I'd do a little tutorial on this now that I've had success.
I have assumed that you will be able to use Winrar or similar to extract font files from stbof.res and after editing can then return them to same.
Have also assumed you can use a hex editor and a suitable graphics package to edit TGA graphics files.
Step 1
Having already extracted the fonts (all have file extension .FNT), you will need to open the font that you want to edit with your hex editor. Having done that you highlight the bytes that need removing from the file in order to be able to edit it in a graphics package.
Confirm delete and ignore warning about change of file size.
Step 2
Save your edited file , but with a TGA file extension!
Your original FNT file will be unchanged.
Step 3
Now you can edit the file in a graphics package. I'm using Photoshop Elements 2.0 as it can save TGA files in 16 bit.
You can now select a font from the text input part of your graphics package and can type onto the free black area of the graphics file.
I believe that the brightness of the characters is then reflected into the way BOTF displays the fonts, so I set the colour to grey at 90 % brightness. You can experiment as you wish. You can also try using colours. I haven't tried this yet as BOTF colours the fonts anyway, in the game and may just override your colours, or even crash the game.
Step 4
You can the cut and paste your new characters into their corresponding slots. Be careful not to overlap any of the outline/grid. The fun will be finding narrow enough fonts to fit in the spaces and you can't change the width of the boxes...I've tried!
You then save this file as a 16 bit TGA file (BOTF doesn't like TGAs of any other bit depth).
Step 5
Now some more hex editing. You need to put back the bytes removed in the first step.
Open both the original FNT file in your hex editor and the TGA file in same editor. You need to copy the bytes removed originally, from the FNT file, and then paste insert them back into the beginning of your edited TGA file.
Now save with the original font name and make sure you change extension to FNT.
You will now have a new font that you can Winrar back into stbof.res and away you go.
Here is the result using Aurora Bold Condensed on my new Gorn interface.
Hope this is useful to all you modders out there.
Regards
Pigman
Hi anyone interested in using new fonts within BOTF
May have cracked this one.
Each empire has 4 font files, but the 9 pt font can be ignored as it contains race colour and is used on map screen (unless you want to change colour, that is). Sadly, can't change colour on the larger fonts, (I think 15 pt, 20 pt and 28 pt) as these are just grey and colour is added elsewhere within BOTF.
=> changing colors of race fonts / map-grids
Thought I'd do a little tutorial on this now that I've had success.
I have assumed that you will be able to use Winrar or similar to extract font files from stbof.res and after editing can then return them to same.
Have also assumed you can use a hex editor and a suitable graphics package to edit TGA graphics files.
Step 1
Having already extracted the fonts (all have file extension .FNT), you will need to open the font that you want to edit with your hex editor. Having done that you highlight the bytes that need removing from the file in order to be able to edit it in a graphics package.
Confirm delete and ignore warning about change of file size.
Step 2
Save your edited file , but with a TGA file extension!
Your original FNT file will be unchanged.
Step 3
Now you can edit the file in a graphics package. I'm using Photoshop Elements 2.0 as it can save TGA files in 16 bit.
You can now select a font from the text input part of your graphics package and can type onto the free black area of the graphics file.
I believe that the brightness of the characters is then reflected into the way BOTF displays the fonts, so I set the colour to grey at 90 % brightness. You can experiment as you wish. You can also try using colours. I haven't tried this yet as BOTF colours the fonts anyway, in the game and may just override your colours, or even crash the game.
Step 4
You can the cut and paste your new characters into their corresponding slots. Be careful not to overlap any of the outline/grid. The fun will be finding narrow enough fonts to fit in the spaces and you can't change the width of the boxes...I've tried!
You then save this file as a 16 bit TGA file (BOTF doesn't like TGAs of any other bit depth).
Step 5
Now some more hex editing. You need to put back the bytes removed in the first step.
Open both the original FNT file in your hex editor and the TGA file in same editor. You need to copy the bytes removed originally, from the FNT file, and then paste insert them back into the beginning of your edited TGA file.
Now save with the original font name and make sure you change extension to FNT.
You will now have a new font that you can Winrar back into stbof.res and away you go.
Here is the result using Aurora Bold Condensed on my new Gorn interface.
Hope this is useful to all you modders out there.
Regards
Pigman