This page is located on the SimsWiki. To view it in it's original form, click here.
Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference 

Object Instances - OBJN
TypeID:0x4D1A5589
Game Version:The Sims 3



Contents

Overview

Research by Tiger - work in progress

Parts of the data contained in this resource follows the format of Sims_3:Catalog_Resource#Material_List and Sims_3:0xCF84EC98. The lot objects section references resources indexed by Sims_3:0x05ED1226.

This is a very rough draft, there are some key pieces of information missing.


Format

Header

DWORD version 0x14
DWORD unk 1
DWORD 0x02dc343f
DWORD count1
REP count1
   QWORD object catalog ID
   DWORD
DWORD 1
DWORD 0x736884f1
DWORD count2
REP count2
   DWORD
   DWORD
   DWORD
FLOAT
FLOAT
FLOAT
FLOAT
DWORD offset to 'NOBJ'
DWORD 0x1c
DWORD -1
DWORD length
[length BYTES #Lot Objects]
DWORD
[data like Sims_3:0xCF84EC98 starting in the Components section]

Lot Objects

DWORD count
REP COUNT
    QWORD object guid
    DWORD
    DWORD count3
    REP count3
        DWORD component
    WORD residx catalog object
    WORD residx ? (Seems like it's always 0:0:0)
    WORD residx VPXY
    [Component specific data]

The component specific data depends on what components are listed. The order is fixed, and completely unrelated to the order the components are listed in. Each section appears in the order here, only if the named component is included. This order is inferred by comparing different selections of components from different resources. In some places the order may not be exact when the components in neighboring locations never appear together, such as "Tree", "Effect" and "Steering".

Location

    3 FLOAT location

Transformation

    4 FLOAT rotation (Quaternion)
    QWORD guid (Containing object)
    IF containing guid != 0
        DWORD hash containment slot name
        WORD

Model

    WORD residx model
    WORD residx compositor prop file
    WORD residx compositor prop file
    DWORD count4
    REP count4
        WORD residx
        DWORD 8 offset? (To after next dword)
        DWORD length - 1 (Of rest of this entry)
        6 BYTES (Last sometimes 4, not clear data sizes)
        DWORD 0
        DWORD count5
        BYTE 1
        BYTE 0/1
        REP count5
            DWORD
    WORD complate xml residx
    IF complate xml is not 0:0:0
        DWORD 2
        DWORD 2
        DWORD offset		// from here to after TGI Block List
        OF offset is not 0
            WORD
            DWORD tgi offset	// see Sims 3:Key table
            DWORD tgi size		// see Sims 3:Key table - always 4
            --insert Sims_3:Catalog_Resource#Material_Block
            --insert TGI Block List	// see Sims 3:Key table - empty
        BYTE count6
        REP count6
            WORD residx for material list section
    IF VisualState in components
        --insert Model/VisualState data

Model/VisualState

This is seperate from the regular VisualState section, and only appears when both Model and VisualState components are present.

    4 BYTES (Seen 0x80 in first, 0 or 1 in last)
    DWORD hash (From MTST) or 0
    BYTE
    6 FLOATS
    3 BYTES (First 1)
    WORD residx
    BYTE

Animation

    WORD residx skeletal animation rig
    BYTE activeanimation (Flag? Or count?  Only seen 0/1)
    IF activeanimation != 0
        DWORD 1
        DWORD count
        REP count
            DWORD animation priority
            REP (Until first dword 0)
                DWORD (If 0, exit loop)
                DWORD data type
                IF data type = 1
                    DWORD actual data type (Apply this data then exit loop without a 0)
                [type specific data]

Data types

IF data type = 0
    DWORD 0
    DWORD 0
    DWORD 0
    DWORD 0
IF data type = 0x60caeef
    DWORD 1
    DWORD (Seems to be some sort of ID)
    BYTE (0/1)
    DWORD
    DWORD
    DWORD
    DWORD flags?
    FLOAT
    FLOAT
(Animation clip info will not be present)
IF data type = 0x664ed68
    DWORD 1
    DWORD (Seems to be some sort of ID)
    BYTE (0/1)
    DWORD count1
    DWORD 1
    DWORD count2
    REP count1
        REP count2
            FLOAT
    DWORD
    DWORD flags?
    FLOAT
    FLOAT
(Animation clip info will not be present)
IF data type = 0x664fb68
    DWORD 1
    DWORD (Seems to be some sort of ID)
    BYTE (0/1)
    DWORD
    DWORD
    DWORD flags?
    FLOAT
    FLOAT
IF data type = 0x67c5cab
    DWORD 1
    DWORD (Seems to be some sort of ID)
    BYTE (0/1)
    DWORD
    DWORD
    FLOAT
    FLOAT
(Always the first data element)
IF data type = 0x681c688
    DWORD 1
    DWORD (Seems to be some sort of ID)
    BYTE (0/1)
    DWORD
IF data type = 0x73b9d8c
    DWORD 1
    DWORD (Seems to be some sort of ID)
    BYTE (0/1)
    DWORD
IF data type = 0x7a11ba8
    DWORD 1
    DWORD (Seems to be some sort of ID)
    BYTE (0/1)
    DWORD
IF data type = 0x34f49f94
    DWORD 1
    DWORD (Seems to be some sort of ID)
    BYTE (0/1)
    DWORD
IF data type = 0xb489fc2c (Active animation clip)
    DWORD 2
    DWORD flag
    TGI64 clip
    TGI64 track mask
    DWORD count1?
    DWORD count2?
    DWORD -1
    IF (count2 > 0)
        REP until actor = 0 and slot = 0
            QWORD guid
            REP until value = 0
                DWORD value
            DWORD actor
            DWORD slot
    QWORD guid
    IF flag != 0
        DWORD paramcount
        REP paramcount
            DWORD hash actor name
            DWORD
            DWORD flags (Usually 0x40000001, also seen 0x40000003)
            DWORD
            QWORD guid assigned actor
            DWORD 0
    FLOAT
    FLOAT
    FLOAT
    DWORD
    DWORD
    DWORD
    BYTE (0/1)
    BYTE (0/1)
    BYTE (0/1)
    IF type 0x681c688, 0x73b9d8c, or 0x34f49f94 data present
    AND number of type 0x681c688, 0x73b9d8c, or 0x34f49f94 not more than number of type 0xb489fc2c
        (On the first occurrence)
            END type 0xb489fc2c data here
        (On occurrence after second but before the last)
            FLOAT
            FLOAT
            END type 0xb489fc2c data here
        (On last occurence)
            FLOAT
            FLOAT
            (Finish to end of type 0xb489fc2c data)
    DWORD
    DWORD flags?
    FLOAT
    FLOAT

Script

    DWORD (6)
    DWORD length
    CHAR[length] (Script class)
    BYTE (0/1)
    DWORD
    DWORD script object ID (References Sims_3:0x06B981ED)

Physics

    BYTE Physics enabled

Tree

    WORD residx speedtree data
    DWORD
    DWORD count
    REP count
        12 FLOATs transformation (3x4 transformation matrix)
        3 FLOATs location
        FLOAT (1.0)
        FLOAT tree scale

Effect

    WORD
    BYTE
    BYTE length
    CHAR[length] effect name

Sim

    Word residx sim outfit
    Word unk (residx?)

Steering

    BYTE
    DWORD

Sacs

    WORD
    BYTE
    BYTE count
    REP count
        DWORD sacs driver

Slot

    WORD residx RSLT data

Lighting

    WORD residx LITE data
    4 FLOATS

VisualState

    3 WORDS (Might be WORD/DWORD or DWORD/WORD)
    DWORD -1?

Footprint

    BYTE
    WORD residx FTPT data
    DWORD count7
    REP count7
        DWORD
    WORD residx FTPT data (Alternate?)
    DWORD count
    REP count
        DWORD
    BYTE
    FLOAT

Audio

    DWORD (2)
    2 FLOATs
    DWORD
    FLOAT
Modding Reference by Category

Sims 3 :DBPF | File Types | RCOL(Scene) | Catalog Resource | String Table | Key Table | TS3 Programmer's Reference