Format:FRM (Fallout)
| Magic | none |
|---|---|
| Extensions | .frm |
| Endianness | big |
| On this wiki | Facts · Code · Notes · Topics |
Sprite file of Fallout 1 and 2 (.FRM): a big-endian header with frame rate, action frame, frames per direction, per-direction offsets and data offsets, then 12-byte frame headers each followed by 8-bit palette-indexed pixels.
Layout
As read by artRead in fallout2-ce (src/art.cc). All integers are big-endian (fileReadInt16 builds the value from high then low byte; fileReadInt32 byte-swaps).
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | field_0 (the reference reader keeps it unnamed; Unverified: this is a version number) |
| 4 | 2 | frames per second |
| 6 | 2 | action frame |
| 8 | 2 | frames per direction |
| 10 | 12 | xOffsets[6], int16 |
| 22 | 12 | yOffsets[6], int16 |
| 34 | 24 | dataOffsets[6], int32 |
| 58 | 4 | dataSize |
| 62 | - | frame data |
The header is 62 bytes (4 + 2 + 2 + 2 + 12 + 12 + 24 + 4). The in-memory Art struct of the reference reader also has a padding[6] array that is not in the file.
Frames are stored directory by directory: for each of the 6 directions the file holds framesPerDirection consecutive frames, each a 12-byte header (int16 width, int16 height, int32 size, int16 x, int16 y) followed by size bytes of pixels (one palette index per byte). The reader does not seek to dataOffsets; it reads frames sequentially and reads a direction's frames only when its dataOffset differs from the previous direction's, so directions with equal dataOffsets share one stored copy.
Some FRMs have dataSize 0; fallout2-ce substitutes the file size.
File naming
The game keeps art lists in art\<type>\<type>.lst for the types items, critters, scenery, walls, tiles, misc, intrface, inven, heads, backgrnd, skilldex; entries are file names of 13 bytes in memory. The rules that build critter file names from weapon and animation codes (the _art_get_code function) were not read in full.
Unverified
Unverified: the FID (frame ID) bit layout and the mapping from an object to a file name; the palette used (color.pal); that the six directions are the six hex rotations in game order.
Unverified: that Fallout 1 FRM files have exactly this layout (only fallout2-ce's art.cc was read; fallout1-ce's art.cc was not).
Code & repositories
- https://github.com/alexbatalov/fallout2-ce @
e97087b9582f37075db347a89898887320753f8b· license: LicenseRef-Sustainable-Use-1.0 (declared by the contributor; GitHub's detector did not recognize LICENSE.md)
Fallout 2 Community Edition: src/dfile.cc (Fallout 2 DAT reader), src/db.cc (big-endian helpers) and src/art.cc (FRM reader). Sustainable Use License 1.0: cite facts only, do not copy code.
Tested on: source read, not run: source read at the cited commit, not run · checked 2026-10-19; last activity 2025-02-17; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/alexbatalov/fallout1-ce @
0609bcfd0ec40ff0571d0f57fab2821eb461dc8b· license: LicenseRef-Sustainable-Use-1.0 (declared by the contributor; GitHub's detector did not recognize LICENSE.md)
Fallout 1 Community Edition: src/plib/db/db.cc, assoc.cc and lzss.cc (Fallout 1 DAT tree, codecs and LZSS); its art.cc was not read. Sustainable Use License 1.0: cite facts only, do not copy code.
Tested on: source read, not run: source read at the cited commit, not run · checked 2026-10-19; last activity 2025-01-15; Note: the latest release ships binaries; the wiki links only the source, never the binaries