• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Making an .ini file for a bitmap font for AoP

Charles Johnson

Landlubber
Hi everyone,

I need some help. The question is: How can I create an .ini file for my own bitmap font to use in AoP or Seadogs 2: PoTC?
For example, I want to create my own font for the game, so I need a texture of this font (this is quite easy) and an .ini file to set the font coordinates.
I've looked through the Internet, but there's no software that would export the texture coordinates to an .ini file. Instead, they export to a .fnt or .xml file, which use a completely different language, so I can't copy them to the font.ini file, which is used by the game.
Is there a software to create a correct .ini file for a .tga.tx texture?
 
Ahoy! @Charles Johnson and welcome aboard!!! :cheers

I don't know if such a tool exists, but you could try to have the same letters in the same place as the original texture, so that you can use the same coordinates.
 
Hi everyone,

I need some help. The question is: How can I create an .ini file for my own bitmap font to use in AoP or Seadogs 2: PoTC?
For example, I want to create my own font for the game, so I need a texture of this font (this is quite easy) and an .ini file to set the font coordinates.
I've looked through the Internet, but there's no software that would export the texture coordinates to an .ini file. Instead, they export to a .fnt or .xml file, which use a completely different language, so I can't copy them to the font.ini file, which is used by the game.
Is there a software to create a correct .ini file for a .tga.tx texture?

No such thing exists, but I might be able to help you out. This Bitmap Font Generator @ BMFont - AngelCode.com is free open source. I downloaded the .exe and tried it for an example of what it produces -- a .tga file and a .fnt file with all the character map coordinates, spacing, etc, so far the program seems feasible for the purpose. Then I downloaded the source code for the program and the most recent versions of all the open-source libraries it uses. I compiled each of the various libraries, linked them to the BM Font Generator source and compiled BM Font Generator (a small amount of rework for the newer Visual Studio versions, but not too troublesome); it works to generate a .tga file and the .fnt file in my tests just as the downloadable app did for me, so my work was successful.

From what I see so far, I should now be able to add another output format that matches the format needed for this game. I can't promise it soon, as I'm busy at my day-job and will also be out of town for awhile, but I'll look into making this modification.
 
@TheBlackKnight made a mod with HD fonts, if I'm not mistaken.

To TheBlackKnight:
What software did you use for this modification? I mean, for matching texture UVs to fonts.ini file?

My guess is that is was probably a combination of putting the characters in the texture in matching positions, like Nameless mentioned, and for any additional characters, there are some "hacks" to get around it, like putting an Excel spreadsheet together with a fixed width/height for each character in two cells, then a column with iterating numbers 1 through Y, a row with numbers 1 through X for characters, then simply concatenating a string from the fixed width/height of the X/Y, plus whatever row/column each character is into a comma separated string like seen in the font.ini file, then copy paste that string concatenation into a text document.

It's a bit tedious (I have actually done something similar to what I described for some things in the game) and I like the idea of using this BM Font Generator program to produce it all for fonts, automatically from the TrueTypes, with very little work needed to fix up the remaining details in the .ini and convert the .tga to .tga.tx.
 
Hi everyone,

I need some help. The question is: How can I create an .ini file for my own bitmap font to use in AoP or Seadogs 2: PoTC?
For example, I want to create my own font for the game, so I need a texture of this font (this is quite easy) and an .ini file to set the font coordinates.
I've looked through the Internet, but there's no software that would export the texture coordinates to an .ini file. Instead, they export to a .fnt or .xml file, which use a completely different language, so I can't copy them to the font.ini file, which is used by the game.
Is there a software to create a correct .ini file for a .tga.tx texture?

I got this done. Using the source for BM Font Generator @ BMFont - AngelCode.com I generated a .tga, .fnt (changed extension to allow upload) and added code to simultaneously create a similarly named .ini file with compatible font config text for this game. Some manual tweaking might be needed for shadow in the .ini, and also convert the .tga to .tga.tx, but saves much work mapping the characters.
 

Attachments

  • mytest2_0.tga
    1 MB · Views: 326
  • mytest2.ini
    4.8 KB · Views: 276
  • mytest2.fnt.txt
    31.9 KB · Views: 285
I got this done. Using the source for BM Font Generator @ BMFont - AngelCode.com I generated a .tga, .fnt (changed extension to allow upload) and added code to simultaneously create a similarly named .ini file with compatible font config text for this game. Some manual tweaking might be needed for shadow in the .ini, and also convert the .tga to .tga.tx, but saves much work mapping the characters.
Thanks a lot! I'll try it :cheers
 
Got a response from @Charles Johnson and this appears to work, so will post link.

Download from MEGA: MEGA

I compiled with Visual Studio 2017, so you may need Microsoft's VC++ Runtimes for that version. I included them in the .zip file: vc_redist.x86.exe

For the game, I suggest choosing the export/output options of:

Equalize the cell heights
Bit depth 32
Preset White text with alpha
Texture tga, no compression

File format font descriptor as text will generate both a .fnt and a .ini

Also, you may want to increase the texture width/height to 512x512 because this program appears to create multiple textures/pages if the characters don't all fit and that won't work for the game. If that happens during your output, just increase the size until you get just one texture file.

If this modification to the AngelCode program works out for you, I will make it publicly available.
 
Back
Top