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/ (rarely used)

/<datadir>/set46/hfonts/ (rarely used)

Editing

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

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”.

H_FINDER.ILBM 16  ; TYPE_NS

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. It should be noted that some identifiers have multiple characters but using multiple characters in other identifiers may not work; this is the case with unit icons, for example.

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.

M  211   69 20     ; USR   FOX
modding/fon_file.txt · Last modified: 2013/12/05 16:52 (external edit)
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