Unofficial TAG Format Specification


Overview

The tag file format is a very small and rarely used format specifically for the server. It is a copy of client tags (the tags from the model formats) on the first frame. Their only use case back then was to describe a location and orientation value of a coordinate system, so that the server could locate and orient script mover collision models, but probably it had more use cases.

Symbols

Name Description
UINT8 unsigned 8-bit integer
INT16 signed 16-bit integer
UINT16 unsigned 16-bit integer
INT32 signed 32-bit integer
UINT32 unsigned 32-bit integer
F32 32-bit floating-point (IEEE-754)
ASCII 8-bit ASCII character
(*) Marks a list of objects of the same type. There can be multiple appearances of * inside those round brackets, for example (**) describes a list of lists.

Tables

TAG

Name Description Type
header reference to TAGHeader object. TAGHeader
tags list of tag objects, size=num_tags. TAGData (*)

Notes:

Container object. References all TAG data.

TAGHeader

Name Description Type
ident magic number, ASCII encoded, length 4, reads "TAG1". 4*ASCII
version version number, latest known is 1. UINT32
num_tags number of tags. UINT32
ofs_end file offset to end of file. UINT32

Notes:

General information about TAG data. Used mainly to navigate file data.

TAGData

Name Description Type
name name of tag, ASCII encoded, null-terminated, length 64. 64*ASCII
location location coordinates. 3*F32
orientation orientation as rotation matrix. The values are encoded in row major order, the first 3 floats make up the x-coordinates of a basis vector, etc. TODO recheck on this 9*F32

Notes:

A tag in the first frame of the corrseponding tag in a client model.

UML View

UML view of TAG file format
Figure: UML view of TAG file format