RCOL
Contents |
Scenegraph File Format Specification
RCOL, or Scenegraph Resource Collection, is a Sims 2 data type that contains numerous, arbitrary data blocks containing a variety of information.
This information is primarily used for objects, animation, textures, and the like. The file is composed of a header (somewhat confusing), and one or more data blocks. Each data block can have multiple sections or can even be recursive in nature.
After reading the header and the index, each data block must be read according to its own specification. The specifications for each possible type of data block follow the first part of this specification.
IMPORTANT NOTES: To further explain a strange quirk of this file type. The header has two possible configurations that are not readily apparent. In the specification below, the first two WORDs, "Language" and "String Format", may not be present. If, when parsing raw data of an RCOL, the first 4 bytes when read as a DWORD are not 0xFFFF0001, then reading must BACKTRACK, and reread the first 4 bytes as the "File Links" DWORD. If, when parsing, you DID backtrack and the first two WORDs are not present, then when reading "File Links", you must read only a TGI, not a TGIR (i.e. read 3 DWORDs per link, rather than DWORDs).
RCOL Header
; header DWORD Version Mark ; Optional - Always 0100FFFF. If present, use TGIR instead of TGI below DWORD File Links ; Defines number of repetitions that follow LOOP ; repeat "File Links" times DWORD GroupID DWORD InstanceID DWORD ResourceID ; Only appears if first two WORDs are 0x01/0xFF DWORD TypeID ENDLOOP ; Index DWORD ItemCount LOOP ; repeat "ItemCount" times DWORD RCOL ID ENDLOOP LOOP ; repeat "ItemCount" times ARBIT Data Block ; See individual data blocks for further file structure ENDLOOP
Data Block
BYTE Block name length PRIOR Block name DWORD Block RCOL ID (Referenced in Index) DWORD Block Version ARBIT Data Section
Data Section Specifications
Each block ID# has a unique block name. Following are links to specifications for each known block type, by their TypeID and the translated type code (i.e. 0xAC4F8687/GMDC).
Known Data Blocks
- FB00791E ANIM filetype
- 4D51F042 CINE filetype
- E519C933 CRES filetype
- AC4F8687 GMDC filetype
- 7BA3838C GMND filetype
- C9C81B9B LGHT filetype - Lighting (Ambient Light)
- C9C81BA3 LGHT filetype - Lighting (Directional Light)
- C9C81BA9 LGHT filetype - Lighting (Point Light)
- C9C81BAD LGHT filetype - Lighting (Spot Light)
- ED534136 LIFO
- FC6EB1F7 SHPE
- 49596978 TXMT aka MATD - Material Definition
- 1C4A276C TXTR
Internal data blocks
- e9075bc5 cBoneDataExtension
- 1cfeceb8 cBoundingVolumeBuilder
- dcdda078 cCompactorBuilder
- 6A836D56 cDataListExtension
- 9bffc10d cIndexedMeshBuilder
- 253d2018 cLightRefNode
- 5ce7e026 cProcessDeformationsBuilder
- 65245517 cShapeRefNode
- 9a809646 cTagExtension
- 5d054225 cTangentSpaceBuilder
- 65246462 cTransformNode
- 2b70b86e cTSFaceGeometryBuilder
- dca76dbb cViewerRefNode
- 0c152b8e cViewerRefNodeRecursive
Misc data blocks. These blocks have block ID's of zero
Remaining RCOL Unknowns
- CINE - Unknown 1(first), Unknown 2, Unknown 3.1
- GMDC - (purpose & effect for Submodel in compositions(linkages)), corrupt[obj.pack/lots]
- GMND - unknown3
- cLight - unknown byte
- 253d2018 cLightRefNode - Ushort1,Uint1, B1,B2,B3,B4,B5
- SHPE - (LOD listing entry purpose)
- 65245517 cShapeRefNode - U1,U2,U3,U4,U5,U6, UINT COLL, BYTE COLL
- TXTR - Unk2
- e9075bc5 cBoneDataExtension - 1.1,1.2,1.3,1.4,2.1,2.2,2.3,2.4
- 2b70b86e cTSFaceGeometryBuilder - Unk1,2,3, Unk1(per set)
- ANIM - LOTS (mostly P5/P6)
- 9bffc10d cIndexedMeshBuilder - LOTS
- dca76dbb cViewerRefNode - LOTS
- 0c152b8e cViewerRefNodeRecursive - LOTS
Update History
(Spec Updated by Karybdis on Jan. 1, 2006)
(Spec updated by DarkMatter on Dec. 4, 2004)
Terminology Key
- BYTE
- Smallest unit of data, 8 bits
- WORD
- Two bytes, or 16 bits
- DWORD
- Four bytes, or 32 bits
- QWORD
- Eight bytes, or 64 bits
- GUID
- Sixteen bytes, or 128 bits
- PRIOR
- Notation used when the length of a data element is equal to the value of the previous data element.
- ARBIT
- Notation used when the length of a data element or data block is of arbitrary length, and the details are defined elsewhere.
- 7BITSTR
- Notation used for a string that has its length encoded 7 bits at a time.
- ZDSTR
- Zero Delimited String. Notation used for a string that is ended by a 0 byte.
C# Data Type Key
- byte
- unsigned byte
- sbyte
- signed byte
- short
- 16bit signed integer
- ushort
- 16but unsigned integer
- int
- 32bit signed integer
- uint
- 32bit unsigned integer
- long
- 64bit signed integer
- ulong
- 64bit unsigned integer
- float
- 32bit floating point number
- double
- 64bit floating point number
- char
- UNICODE character (16bit)
- string
- UNICODE character string