Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:RFF (Blood resource file)

From ReverseEngineering.wiki
Format
Magic 52 46 46 1A ("RFF\x1a")
Extensions .rff
Endianness little
On this wiki Facts · Code · Notes · Topics

Resource archive of Monolith's Blood (BLOOD.RFF, SOUNDS.RFF, ...): the 4-byte magic 'RFF' 0x1A, a version (0x200 or 0x300), a directory of 48-byte entries with 8-character names and 3-character types, and an XOR cipher on the directory (version 3) and on flagged files.

Layout

Blood's engine is Build-based (Library:Build engine) but stores its resources in RFF files instead of a Format:GRP (Build engine group file). As read by NBlood's Resource class:

Offset Size Field
0 4 signature RFF + 0x1A
4 2 version; the high byte (0x200 or 0x300) selects the directory cipher, the low byte is used in the cipher key
6 2 padding
8 4 offset of the directory
12 4 number of files
16 16 padding
directory offset 48 x count directory entries (see the fact)

Names are 8 characters and types 3 characters, both not necessarily NUL terminated (NBlood copies them with strnlen). Files are looked up by name plus type or by the numeric id stored in the entry.

Cipher

A single XOR routine is used: byte i of the data is XORed with (key + i) >> 1, the key being a 16-bit value that increments for each byte. For version 0x300 the directory is decrypted with key offset + (version & 0xff) * offset (truncated to 16 bits). For an entry whose flags have bit 0x10 set, the first 0x100 bytes of the file (or the whole file if smaller) are decrypted with key 0.

Unverified

Unverified: the meaning of the unused bytes in the entry and which stock Blood versions use 0x200 versus 0x300; Blood maps (.MAP) and the SEQ/QAV/ART resource layouts inside the RFF were not read.

Code & repositories

  • https://github.com/NBlood/NBlood @ 497385d64b97f4fd13b6efb3929df0f2ab3adc87 · license: none
    NBlood: Blood port that carries the EDuke32 Build engine fork (source/build/src engine.cpp, tiles.cpp, palette.cpp) and Blood's RFF Resource class (source/blood/src/resource.cpp). Used for map version 9, the BUILDART prefix, PALETTE.DAT variants and the RFF format.
    Tested on: source read, not run: source read at the cited commit, not run · checked 2026-10-19; last activity 2026-10-02; Note: the latest release ships binaries; the wiki links only the source, never the binaries; no license: not reusable