Skip to content

Modding Guide

Quick recipes for common FA modding tasks using fx. Formats, field tables, and offsets used below are specified in formats/; per-format tooling status is in the status matrix.

The commands are shell-neutral: fx takes the same arguments everywhere, and forward-slash paths work in bash and PowerShell alike. Where a recipe needs the game CD, <CD> stands for your CD or mounted ISO — e.g. F: on Windows, /run/media/$USER/FA2 on Linux.

Extract PALETTE.PAL from FA_2.LIB once before any paletted image work:

fx lib unpack FA_2.LIB out/FA_2
# PALETTE.PAL is now at out/FA_2/PALETTE.PAL

Texture mod (FA_3.LIB aircraft skins)

FA_3.LIB lives on the CD. All 822 textures are raw (uncompressed) 8-bit indexed PICs. No palette is needed to decode them, but you do need the palette to re-encode.

# Extract textures from the CD (or mounted ISO)
fx lib unpack <CD>/FA_3.LIB out/FA_3

# Decode one texture to PNG
fx pic unpack out/FA_3/F16C_0.PIC -o F16C_0.png

# Edit F16C_0.png in GIMP, Photoshop, etc. -- keep the original dimensions.

# Re-encode to PIC (uses the system palette)
fx pic pack F16C_0.png -p out/FA_2/PALETTE.PAL -o F16C_mod.PIC

# Patch the modified texture back into a copy of the LIB
fx lib patch <CD>/FA_3.LIB F16C_0.PIC F16C_mod.PIC FA_3_mod.LIB

# Place FA_3_mod.LIB in the install directory -- the game prefers it over the CD copy

The re-encoded PIC is format 0 (dense) with an inline 256-color palette. The engine accepts this in place of the original JPEG format.

Text / data mod (mission text, pilot bios)

fx lib unpack FA_2.LIB out/FA_2

# Edit out/FA_2/BALTIC.TXT in any text editor, then patch it back
fx lib patch FA_2.LIB BALTIC.TXT out/FA_2/BALTIC.TXT FA_2_mod.LIB

Aircraft stats mod (.PT)

fx lib unpack FA_2.LIB out/FA_2

# Export to editable text
fx pt unpack out/FA_2/F16C.PT -o F16C.pt.txt

# Edit F16C.pt.txt -- thrust, max_speed, fuel_capacity, etc.

# Re-encode and patch
fx pt pack F16C.pt.txt -o F16C_mod.PT
fx lib patch FA_2.LIB F16C.PT F16C_mod.PT FA_2_mod.LIB

3D model inspection (.SH)

fx lib unpack FA_2.LIB out/FA_2

# Quick stats
fx sh info out/FA_2/F16C.SH

# Export to Wavefront OBJ and open in Blender / MeshLab
fx sh unpack out/FA_2/F16C.SH -o F16C.obj

Mission edit (.M)

fx lib unpack FA_2.LIB out/FA_2
fx mission unpack out/FA_2/BALTIC.M -o BALTIC.m.txt

# Edit object positions, weather, side assignments...

fx mission pack BALTIC.m.txt -o BALTIC_mod.M
fx lib patch FA_2.LIB BALTIC.M BALTIC_mod.M FA_2_mod.LIB

Cutscene edit (.SEQ)

fx lib unpack FA_2.LIB out/FA_2
fx seq unpack out/FA_2/KDEAD.SEQ -o KDEAD.seq.txt

# Edit timings, bitmap references, sound names...

fx seq pack KDEAD.seq.txt -o KDEAD_mod.SEQ
fx lib patch FA_2.LIB KDEAD.SEQ KDEAD_mod.SEQ FA_2_mod.LIB

Mission briefing text (.MT)

.MT files are plain-text companions to .M files and can be edited directly — no fx command needed. They live alongside the .M in the .LIB.

fx lib unpack FA_2.LIB out/FA_2

# Open out/FA_2/BALTIC.MT in any text editor. Edit section 2 (briefing)
# and sections 3/4 (debrief success/failure), then patch back:
fx lib patch FA_2.LIB BALTIC.MT out/FA_2/BALTIC.MT FA_2_mod.LIB

See formats/M.md for the section and directive syntax.

Aircraft flight model reference data

The community has produced G-envelope spreadsheets for 70+ real aircraft (F-4, F-14, F-15, F-16, F/A-18, F-22, MiG-25, Rafale, Typhoon, and many more), measuring stall and max speeds in KTAS at altitude breakpoints from sea level to 65,000 ft across −4 G to +9 G. These map directly to the env section in .PT files.

The Fighters Anthology Resource Center and USNRaptor community archives include spreadsheets covering dozens of airframes. They use KTAS at altitude breakpoints — convert to .PT env units as follows:

speed_ft_per_sec = ktas * 1.6878         # 1 knot = 1.6878 ft/s
altitude_ft      = altitude_as_read      # already in feet

Font mod (.FNT)

FA's fonts are compiled x86 inside PE DLLs, but the fx round trip makes them editable as images (#97):

  1. fx lib extract FA_1.LIB 4X6.FNT — pull the font from the archive.
  2. fx fnt unpack 4X6.FNT -o work/ — renders glyph_sheet.png (printable glyphs in a 16-column grid) and metrics.csv (per-character advance widths and the font height).
  3. Edit glyph_sheet.png in any editor — white pixels are set, black are transparent. Keep each glyph inside its cell; widths can be adjusted in metrics.csv.
  4. fx fnt pack 4X6.FNT work/ -o 4X6.FNT — recompiles the glyphs to x86 with the engine's own encoding and rebuilds the function table. The recompiled code must fit the original code region (roughly: similar ink coverage) — pack refuses if it would overrun.
  5. fx lib patch the font back into FA_1.LIB.

An unedited unpack→pack loop reproduces the original file byte-for-byte, so any diff you ship is exactly your edit.

Tips

  • The game loads flags=0 (uncompressed) LIB entries just as well as flags=4 (compressed). fx lib patch always writes uncompressed — no need to re-compress.
  • Keep image dimensions unchanged. The engine does not resize at load time.
  • Pixels are quantized to the nearest palette color on PIC re-encode. Keep source art at 256 colors or less for best fidelity.
  • Test mods by placing the modified .LIB in the install directory. The engine searches there before the CD, so you can override without burning a disc.

$ = paid software. Free alternatives are listed first within each category.

Text editors

For SEQ, BRF (.OT/.NT/.PT/.JT/.SEE/.ECM/.GAS), mission text (.MT), and unpacked mission files.

Tool Platform Notes
VS Code Win / Mac / Linux Multi-file search, find/replace across a full LIB unpack
Notepad++ Windows Lightweight; column editing useful for SEQ time fields
Notepad / TextEdit Windows / macOS Built-in; sufficient for small edits

Image editors

For PIC textures and CB8 frames (after fx pic unpack / fx cb8 frames). Also for RAW screenshots (fx raw unpack).

Tool Platform Notes
GIMP Win / Mac / Linux Handles indexed-color well; batch scripting via Script-Fu
Paint.NET Windows Simple and fast for texture touch-ups
Photoshop $ Win / Mac Industry standard; use 8-bit indexed mode
Affinity Photo $ Win / Mac One-time purchase; strong alternative to Photoshop

Audio editors

For FA audio files (after fx audio unpack to WAV).

Tool Platform Notes
Audacity Win / Mac / Linux Free; can also import raw PCM directly (File → Import → Raw Data: signed 8-bit, mono)
Adobe Audition $ Win / Mac Paid; professional mastering and spectral repair

3D editors

For shape inspection (after fx sh unpack to OBJ). Geometry editing requires the FASHion + SketchUp 8 community workflow — see SH.md.

Tool Platform Notes
Blender Win / Mac / Linux Free; best for inspecting and measuring OBJ exports
MeshLab Win / Mac / Linux Free; lightweight mesh viewer with basic statistics
FASHion Windows Free (FA-specific, community tool); vertex repositioning only
SketchUp 8 Windows Free (legacy version required by FASHion plugin)
3ds Max $ Windows Paid; full mesh editing

Hex editors

For PAL files and binary formats without full ft support (PLT pilot saves, FBC).

Tool Platform Notes
HxD Windows Free; fast and straightforward
VS Code + Hex Editor Win / Mac / Linux Free; convenient if already using VS Code for text editing
010 Editor $ Win / Mac / Linux Paid; binary templates enable structured editing once a format is fully mapped

FA-specific tools

Tool Notes
fx (this toolkit) Primary CLI for all LIB, PIC, audio, mission, shape, and screenshot operations
FATK (DuoSoft 1998) Original GUI toolkit; free (abandonware). Does not run natively on 64-bit Windows — requires a compatibility layer. Supports pilot editing and project-based LIB management.