|This article is written for The Sims 2. For the equivalent Sims 3 article, click here.|
|Long name:||Object Data|
There is, not surprisingly, quite a lot of data about each object. We will look at each section in turn. For a single tiled object you will likely only have one OBJD, combining within it the role of Master OBJD and lead tile. For a multi-tile object you will have one OBDJ for each tile, plus an extra one for the Master OBJD. For each OBJD there will also be an OBJf resource with the same Instance value.
The Object Data Editor is the place where you allocate a new unique GUID to an object you have cloned.
You can select the type of room on the left hand side panel and the function sort on the right. There are sub-sections to the function sort which can be selected in the drop-down labelled "Overall Sort:". The same data is also reflected in the RAW Data, in the Catalog Sorting section.
RAW Data - OBJd FileBase Game compatible is to set "version_1 - Read Only" (0x0000) to 0x008b - with expansion packs it is set to 0x008c.
RAW Data - Catalog Price
The price (0x0012) is the most obvious item here and contains the price you will see this item costs in Buy Mode in the game. The others are obvious to some extent, but the detail behind them is something I have not yet investigated.
RAW Data - Catalog Sorting
The room sort flags (0x0027) and function sort flags(0x0028) both have plus signs next to them which, when clicked, will open out to show the various flags decoded. This information is exactly the same as that shown on the Catalog Sort tab.
Valid EP Flags (0x0040 and 0x0041) marks which EP's are required for object to work. If you want to make an object Base Game compatible you may clear "Valid EP Flags 1" (0x0040) and "Valid EP Flags 2" (0x0041) to 0x0000. Otherwise you should set related flag for each EP your object require.
Example : 0x0000 0x0000 would require no EP's installed. 0x040F 0x0001 would require Base Game + University + Night Life + Open for Business + Bon Voyage + Apartment Life installed for object to work.
|0x0040: Valid EP Flags 1||0x0041: Valid EP Flags 2|
|Expansion||bin (flag)||hex||bin (flag)||hex|
|Base game||0000 0000 0000 0001||0x0001||0000 0000 0000 0000||0x0000|
|University||0000 0000 0000 0010||0x0002||0000 0000 0000 0000||0x0000|
|Night Life||0000 0000 0000 0100||0x0004||0000 0000 0000 0000||0x0000|
|Open For Business||0000 0000 0000 1000||0x0008||0000 0000 0000 0000||0x0000|
|Family Fun||0000 0000 0001 0000||0x0010||0000 0000 0000 0000||0x0000|
|Glamour Life||0000 0000 0010 0000||0x0020||0000 0000 0000 0000||0x0000|
|Pets||0000 0000 0100 0000||0x0040||0000 0000 0000 0000||0x0000|
|Seasons||0000 0000 1000 0000||0x0080||0000 0000 0000 0000||0x0000|
|Celebration||0000 0001 0000 0000||0x0100||0000 0000 0000 0000||0x0000|
|HM Fashion||0000 0010 0000 0000||0x0200||0000 0000 0000 0000||0x0000|
|Bon Voyage||0000 0100 0000 0000||0x0400||0000 0000 0000 0000||0x0000|
|Teen Style||0000 1000 0000 0000||0x0800||0000 0000 0000 0000||0x0000|
|0001 0000 0000 0000||0x1000||0000 0000 0000 0000||0x0000|
|Free Time||0010 0000 0000 0000||0x2000||0000 0000 0000 0000||0x0000|
|Kitchen and Bath||0100 0000 0000 0000||0x4000||0000 0000 0000 0000||0x0000|
|Ikea||1000 0000 0000 0000||0x8000||0000 0000 0000 0000||0x0000|
|Apartment Life||0000 0000 0000 0000||0x0000||0000 0000 0000 0001||0x0001|
Build mode type and subsort
Community Sort (0x0064) is also a set of flags which corresponds to the community lot catalog which has slightly different categorization than residential lots. With a zero value the item will not show up in the community lot catalog, any other bits set will have it show up in the appropriate section.
|Food||bit 1 (0x0001)|
|Shopping||bit 2 (0x0002)|
|Outdoor||bit 3 (0x0004)|
|Street||bit 4 (0x0008)|
|Miscellaneous||bit 8 (0x0080)|
RAW Data - Catalog Ratings
No other effect is provided by these - i.e. they don't actually do the motive increase - you must code this as well.
ratingSkillFlags (0x0059) is a combination of all the skills, so rather than the value here being the amount of that rating, it is a bit flag turning on "+ skill" in the catalog description as the following table details.
RAW Data - User placement
Also, "Keep Buying" (0x0060) controls whether you can place multiple of this object without having to reselect it from the catalog, dining chairs are a good example of this.
RAW Data - Mesh & Graphics
If you have a multi tile object, the Master OBJD (generally the one without co-ordinate numbers as part of its name) has Multi-Tile sub index (0x000B) set to 0xffff and the others have the grid-reference of their tile. For example, a tile named as "My Object - 2,4" will contain 0x0204 in this field.
Multi-tile objects always have one tile nominated as the lead tile (no idea whether there are any good rules for choosing this tile) and it has Multi-Tile lead object (0x003F) set to 1, the others have it set to 0.
If you intend your object to be able to run animations, you should ensure the 3D Object Type (0x0063) is not set to zero. If you don't set this you will get the "3D object is not animatable" error. Whether any values other than 0 or 1 are meaningful, I don't know.
In order to have the placement of objects on shelves operate correctly for the size of your object, Object Size (quantity per shelf) (0x004F) should be set to 0 for large objects, 1 for medium objects, and 2 for small objects. Have also seen 3 - what does that mean?
RAW Data - Resource cross-refs
The slots id (0x0014) must contain the number that matches the instance ID for the Slot File (SLOT).
The catalog strings id (0x0029) must contain the number that matches the instance ID for the Catalog Description (CTSS).
If your object contains more than one mesh, you can indicate which one is is to be used by default. Generally when you have more than one mesh you have specific code to switch between the two meshes, but it can be helpful to set the default graphic (0x0048) for the mesh to be used for catalog icons and the like. The number you put in here indicates the line in the STR resource that holds the mesh names (often called 'Model Names'). These strings are taken from Text List (STR#) resource 0x00000085 (see String Resources for all the different Text List usages). In some earlier versions of SimPE I believe this field was labeled as 'object model guid 1 - Read-Only' - the number 0x0048 is the way you will know you have the correct field for sure.
RAW Data - GUIDs
The "object model guid 1 - Read Only" (0x0048) actually isn't a GUID at all. It is the number of the string in Text List instance number 0x00000085 that represents the default mesh/graphic for this model.
RAW Data - Data Space
The num attributes (0x003A) is essential if you are defining attributes in your object (perhaps also using strings stored in Text List (STR#) resource 0x00000100 (see String Resources for all the different Text List usages)). Without the correct space allocated you will get the "Attribute Number out of range" error.
RAW Data - Memories & Wants
RAW Data - Miscellaneous
"Ignore Current Model Index In Icons" (0x0037) is described in this Tutorial on Custom Thumbnails for Objects
"Selector Category" (0x004B) and "Selector Sub-Category" (0x004C) are described in this Tutorial: Creating a random object in a particular category