The Sims™ Technical Aspects

BCON 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.

Analyzed by Greg Noel.

Behavioral constants are values that can be used to adjust how an object works. Instead of using a compiled-in literal in a BHAV resource, the code can refer to a constant in a BCON resource. This makes it possible to tune an object without having to modify the code. It also can be used for values that might change over time; instead of having to find and fix all the literal uses, the value only has to be changed in one place.

Of course, it does require that the programmer forsee that someone will wish to tweak some value and make the necessary provisions, but quite a wide range of values are exposed.

Some BCON resources have an associated TRCN resource that gives labels (and valid ranges) for each value. If such a TRCN resource exists, it has the same ID as the BCON resource. If an associated TRCN resource is not present, it takes guesswork and experimentation to determine what each value does.

BCON format
Offset Size Value
0 1 Count (N) of items
1 1 Flags?
2 2 Constant 1
4 2 Constant 2
6 var . . .
var 2 Constant N

The count is the number of behavioral constants in this resource. The smallest observed count is zero, although it's a puzzle why such a resource would be present. The largest observed count is 65. Well over half have a count of four or less and more than 80% have a count less than ten.

The flags field has only been observed to have the values 0x00 and 0x80. The purpose of the flag bit, if that's what it is, is unknown.

Each behavioral constant value is a two-byte little-endian integer.


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 Friday, 26-Sep-2003 00:19:50 UTC.
Made on a Mac
SourceForge