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:AGS room file

From ReverseEngineering.wiki
Format
Endianness little
On this wiki Facts · Code · Notes · Topics

A room of an Adventure Game Studio game: a file that starts with a uint16 format version (17 to 36315 are accepted by the current engine), followed by blocks identified by a one-byte id and ended by 0xFF.

Identification

ReadRoomHeader (Common/game/room_file.cpp lines 618-625 at 01cc4c3) reads a uint16 version and rejects anything below 17 (2.5.0b) or above the current value 36315, and also rejects 40 (reserved for an early 4.0 alpha). Version numbers and their release history are in Fact:AGS room file/enum/Room file versions. Up to 33 they are sequential; from the 3.6 line the value is the AGS version as N,N,N,NN in 16 bits.

Blocks

After the header the file is a sequence of blocks. The block ids are in Fact:AGS room file/enum/Room file block ids; the list ends with the byte 0xFF (WriteRoomEnding writes kRoomFile_EOF, lines 633-636). The reader skips blocks it was not asked to read by seeking over the block length.

Code & repositories

  • https://github.com/adventuregamestudio/ags @ 01cc4c3dafea4a5fc5804d887ca21975f738ce4e · license: Artistic-2.0 (declared by the contributor; GitHub's detector did not recognize License.txt)
    AGS engine and editor source: Common/ac/game_version.h, Common/game/main_game_file.cpp, Common/data/multifilelib.cpp, Common/game/room_version.h and room_file.cpp.
    Tested on: source read, not run · checked 2026-10-19; last activity 2026-10-19; Note: the latest release ships binaries; the wiki links only the source, never the binaries

Open questions

Unverified: exact block header sizes (the block length field width and the handling of extension blocks with id 0 and a text id) were not read for this page.