The Sims™ Technical Aspects

TRCN Resource Format


The following information is not based on any proprietary knowledge or restricted documentation—it was entirely derived from observation, experiment, and public information, thus it may be inaccurate or incomplete.

PRELIMINARY

Analyzed by Greg Noel.

The TRCN resource provides labels for the BCON resource with the same resource ID. It is not required for gameplay, so it is usually not present in production files.

Fill in stuff here...

Fill in stuff here...

All numeric values in the TRCN resource are little-endian order (least significant byte first).

TRCN Layout
Offset Size Value
0 4 zero
4 4 version
8 4 'NCRT'
12 4 Count (N)
16 var Entry 1
var var Entry 1
var var . . .
var var Entry N

The TRCN resource consists of a 12-byte header, a 4-byte count, and some number of variable-length entries.

The first field of the header is always zero.

The second field of the header is the version. Known versions are zero, one, and two. Version two is only found in The Sims Online™ (TSO).

The third field of the header is the string 'TRCN' in little-endian order. Note: A few version two resources have a zero in this field. These were all in pre-release files, so this may be a bug that will be fixed before TSO is released.

The fourth field (first field after the header) is a count giving the number of entries.

The first entry starts at the fifth field (second field after the header); subsequent entries immediately follow their predecessors with no padding.

Fill in stuff here...

TRCN Entry
Offset Size Value
0 4 Disable flag?
4 4 unknown
8 var Label
var var Comment
Fields below added in version 1
var 1 Range enabled?
var 2 Low range
var 2 High range

The first field of an entry is always zero or one, thus it is most likely some sort of flag. When the value is one, it always seems to be associated with an unused BCON entry. It could indicate a BCON slot that is available for assignment or it could indicate that the slot is inactive.

The purpose of the second field of an entry is unknown.

The third field of an entry is a variable-length string containing the lable for the BCON slot. In versions zero and one, it is a null-terminated string, padded if necessary to an even boundry with 0xA3. Starting with version two, it is a counted string, with the first byte containing the length, and is not padded to an even boundry. Caution: since no version two strings longer than 127 were found, it is possible that the length itself is encoded as is done with strings in CTSS format FCFF.

The fourth field of an entry is a variable-length string containing a comment. It is stored the same way as the label field.

Starting with version one, three additional fields were added. The default values in version zero for these fields are probably zero, zero, and one hundred.

The fifth field of the entry is a single byte that is always zero or one. It seems to be set only in cases where the following two range fields contain values that need to be enforced.

The sixth field of the entry is a two-byte integer giving the lowest legal value of the corresponding BCON value.

The seventh field of the entry is a two-byte integer giving the highest legal value of the corresponding BCON value.

Fill in stuff here...


Reminder: This information is not based on any proprietary knowledge or restricted documentation—it was entirely derived from observation, experiment, and public information, thus it may be inaccurate or incomplete.

Valid XHTML 1.1! Valid CSS!
Copyright © 2001-2008 Dave Baum and Greg Noel. All rights reserved.
The Sims™ is a trademark of Maxis and Electronic Arts.
This page was last modified Wednesday, 27-Aug-2003 00:18:42 UTC.
Made on a Mac
SourceForge