Skip to content

RMF File Format

Colin Basnett edited this page Oct 22, 2018 · 5 revisions

Summary

This page describes the format for Rich Map Format (RMF) files used by Valve Hammer Editor 3.x for the Goldsource engine.

All binary numeric values are in little-endian byte-order.

Data Types

String

Name Type Notes
Length uint8
Data char[Length] Null-terminated string.

Color

Name Type Notes
R uint8
G uint8
B uint8

Vector

Name Type Notes
X float
Y float
Z float

Property

Name Type Notes
Key String Max length is 32.
Value String Max length is 100.

VisGroup

Name Type Notes
Name char[128] Fixed length, null-terminated string.
Color Color Display color
Unknown1 byte
Index uint32
Visible bool
Unknown2 byte[3]

Face

Name Type Notes
TextureName char[256] Fixed length, null-terminated string.
Unknown1 float
TextureUAxis Vector
TextureXShift float
TextureVAxis Vector
TextureYShift float
TextureRotation float In degrees.
TextureXScale float
TextureYScale float
Unknown2 byte[16]
VertexCount uint32
Vertices Vector[VertexCount] Vertex coordinates in clockwise order looking from front of face.
Plane Vector[3] 3 points defining plane of face (VHE simply uses a copy of the first 3 vertices)

Objects

Name Type Notes
Type String [CMapSolid, CMapEntity, CMapGroup]
Data Variable (see below)

The Data field type is determined by the value of Type. For example, if Type is CMapSolid, then Data is of type Solid.

Solid (CMapSolid)

Name Type Notes
VisGroupIndex uint32
Color Color Display color (VHE ignores this if the solid is part of an entity or group)
Unknown1 byte[4]
FaceCount uint32
Faces Face[FaceCount]

Entity (CMapEntity)

Name Type Notes
VisGroupIndex uint32
Color Color Display color (VHE draws all entities purple regardless of this or any other color value)
SolidCount uint32
Solids Solid[SolidCount]
ClassName String Max length is 128
Unknown1 byte[4]
Flags uint32
PropertyCount uint32
Properties Property[PropertyCount]
Unknown2 byte[14]
Location Vector Location of entity in world coordinates (only used for point entities)
Unknown3 byte[4]

Group (CMapGroup)

Name Type Notes
VisGroupIndex uint32
Color Color Overrides color of any contained solids.
ObjectCount uint32
Objects Object[ObjectCount] See below.

References

  1. https://developer.valvesoftware.com/wiki/Rich_Map_Format