Open main menu

UESPWiki β

Oblivion Mod:Mod File Format/REFR

< Mod / Oblivion: Oblivion Mod: Modding: Mod File Format

An REFR record represents a placed object in a CELL. It has a lot of possible subrecords depending on its type and state.

Some of its properties (seen in the Construction Set) depend on the CELL the REFR is in (coordinates, 'persistent ref', 'visible when distant', etc.)

HeaderEdit

The flags1 field (ubyte[4]) so far contains the following flags:

  • Disabled by default : 0x00080000

SubrecordsEdit

(Most unknown subrecords taken from GhostWheel: Tes4.xml)

C SubRecord Name Type/Size Info
+ NAME FormID formid Base Object FormId
- EDID EditorID zstring Record Editor ID
- XMRK Map Marker 0 Is present when the reference is a map marker (uses the base static object MapMarker, 0x10)
- FNAM Map Flags ubyte[1] Holds map flags if the reference is a map marker
  • 0x01 = Visible
  • 0x02 = Can Travel To
- XOWN unknown formid Owner (NPC or faction)
- XRNK unknown long Faction rank (if owner is faction)
- XGLB unknown formid Global variable (if owner is NPC)
- XSCL Scale data float Present only if scale <> 1.0
- XTEL unknown ubyte[28] Teleport information
  • Destination Door Reference ID (formid)
  • Destination Location (float X, Y, Z)
  • Destination Angle in Radians? (float AX, AY, AZ)
- XTRG unknown formid Target Reference (REFR, ACHR or ACRE)
- XSED unknown (?) unknown
- XLOD unknown ubyte[12] unknown
- XPCI unknown (?) unknown
- XLOC unknown ubyte[12] or
ubtye[16]
Lock information (only present if object is a DOOR or CONT, and if object is locked). Only partially understood:
  • First byte is the base lock level for the lock (0-100; 100 means key required)
  • Bytes 5-8 are the formid of the KEYM that opens this lock (00000000 if there is no key)
  • Last 4 bytes (i.e., bytes 9-12 if 12 bytes long, or bytes 13-16 if 16 bytes long) appear to be flags
    • 0x00000004 = Is lock leveled
- XESP unknown (?) unknown
- XLCM unknown ubyte[4] unknown
- XRTM unknown formid CELL reference[verification needed — see talk page]
- XACT unknown ubyte[4] unknown
- XCNT Count long Only present if count is greater than 1
- FULL Full Name zstring Full name
- TNAM Marker Data ubyte[2] Present when the reference is a map marker
  • 0x00 = None?
  • 0x01 = Camp
  • 0x02 = Cave
  • 0x03 = City
  • 0x04 = Elven Ruin
  • 0x05 = Fort Ruin
  • 0x06 = Mine
  • 0x07 = Landmark
  • 0x08 = Tavern
  • 0x09 = Settlement
  • 0x0A = Daedric Shrine
  • 0x0B = Oblivion Gate
  • 0x0C = Unknown? (door icon)
- ONAM Open by Default 0 Present only if the object is "open by default"
  • Object must be a door
+ DATA Object data float[6] Object coordinates : X , Y, Z, rX, rY, rZ
  • Angles are in radians
  • Angles actually represent negative rotations. For example, a rotation of 90 degrees about the x-axis would mean that when looking toward the origin from a positive coordinate on the x-axis, the rotation would appear to be clockwise rather than counterclockwise. (Most coordinate systems define positive rotations as counterclockwise.)
  • The rotation about the z axis is applied first, followed by the y rotation, and the x rotation is applied last