FON files

FIXME Link up to how the FON file gets used!

FON files define the interface graphic objects and icons, often called “fonts”. Here “icon” means any such object. See unit_icons for an in-depth example on how to change or create new graphics.

File locations

/<datadir>/fonts/fonts/ (mostly for low resolution)

/<datadir>/fonts/hfonts/ (mostly for high resolution)

/<datadir>/set46/fonts/ (unknown FIXME)

/<datadir>/set46/hfonts/ (unknown FIXME)

Editing

FON files are plain text files so they can be edited using ordinary text editors such as Notepad++. Windows Notepad has often problems with different line separators so it's not the most recommended choice. WordPad may work well.

Format

The format of FON files is pretty straightforward but there are some differences in how the game handles each file.

Like in most UA files, semicolon (;) is a comment tag and everything after it will be skipped by the game.

First line

The first line tells the corresponding graphics file. The number defines the height of the icons but it's not always used by the game. It's usually recommended to leave the first line untouched. Note that the filename extension can be “ilbm” although the real file has “ilb”.

This example is from TYPE_NS.FON which defines the unit icons for the map and the squadron manager:

H_FINDER.ILBM 16  ; TYPE_NS

The first line tells that the icons are loaded from H_FINDER.ILB and the height of each icon is 16 pixels.

Other lines

The first string defines the identification code which is either called by another file (e.g. unit script) or hard-coded into the game. The identifier is a single character from the extended ASCII set FIXME »which encoding, to be accurate??« or a number between 0 and 255 marked with a hash, for example: #147

The next two numbers are the X and Y coordinates of the top-left corner of the icon in the corresponding graphics file.

The last number defines the width of the icon. It's usually recommended to leave it untouched or use same value as is used in the file for other similar icons.

This example from TYPE_NS.FON defines the icon of Fox:

M  211   69 20     ; USR   FOX

The character M is used in the vehicle script. The corresponding number would be #77. The top left corner (x,y) of the icon is (211,69) and the width of the icon is 20.

modding/fon_file.txt · Last modified: 2018/02/21 15:54 by Ormu
Back to top
CC Attribution-Noncommercial-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0