From SimsWiki
Jump to: navigation, search
Sims 2 Logo transparent.png This article is written for The Sims 2. For the equivalent Sims 3 article, click here.

Short name: OBJD
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.

Catalog Sort

Catalog sort selection
This tab lets you set where in the catalog your object will show up. A little bit of game play should be all that is required to understand this particular section.

You can select the type of room Icon RoomSort.JPGon 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 File

RAW Data - OBJd File section
I don't know much about this except that one of the things you must do to make an object Base Game compatible is to set "version_1 - Read Only" (0x0000) to 0x008b - with expansion packs it is set to 0x008c.

RAW Data - Catalog Price

Catalog Price RAW Data
This section contains the various prices relating to this object. You might want to switch to Decimal view to read and set these.

The price (0x0012) is the most obvious item here and it specifies how much a new object will cost in Buy Mode. For decorative objects, the price will have a direct effect on the object's Environmental Rating or room score.

The others are obvious to some extent, but the detail behind them is something that is not yet documented here.

RAW Data - Catalog Sorting

Catalog Sorting RAW Data
This section contains various settings for where your items will show up in the catalogs.

The room sort flags (0x0027) Icon RoomSort.JPG 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

Line 0x0011: Catalog Use Flags controls additional information given in blue text below an objects catalog description. For more than one flag add the individual values together. For example group activity that can only be used by toddlers, 4 + 32 = 36.

Note, motive gain and skill flags are controlled under Catalog Ratings.

Decimal value Catalog Use Flag
0 No flag
1 Can only be used by Adults
2 Can only be used by Children
4 Group Activity
8 Can only be used by Teens
16 Can only be used by Elders
32 Can only be used by Toddlers

Build mode type and subsort

Icon BuildMode.JPGBuild mode has two sets of flags, for type and subsort. Some game items use a resource similar in function to the OBJD but have a different resource name.

In-game sub-section type subsort In-game sub-section type subsort
Icon Wall.jpg Wall Tool ? ? Icon Trees.jpg Trees 0x0004 0x0001
Icon Halfwall.png Half Wall XFNC ishalfwall Icon Flowers.jpg Flowers 0x0004 0x0004
Icon Doors.png Doors 0x0008 0x0001 Icon Garden.jpg Gardening 0x0004 0x0010
Icon Window.jpg Windows 0x0008 0x0004 Icon Shrubs.jpg Shrubs 0x0004 0x0002
Icon 2StoryDoor.png Two Story Doors 0x0008 0x0100 Icon Architecture.png Architecture 0x0001 0x1000
Icon 2StoryWindow.jpg Two Story Windows 0x0008 0x0002 Icon Column.jpg Column 0x0001 0x0008
Icon Arches.jpg Arches 0x0008 0x0010 Icon 2Column.jpg Two Story Column 0x0001 0x0100
Icon Flooring.JPG Flooring XOBJ ie: brick, cment Icon CColumn.jpg Connecting Columns 0x0001 0x0200
Icon WallCoverings.JPG Wall Coverings XOBJ ie: paint, paneling Icon Awning.jpg Awnings
Icon Staircases.png Staircases 0x0001 0x0020 Icon Pool.jpg Pools 0x0001 0x0040
Icon ModStairs.jpg Modular Stairs 0x0000 0x0000 Icon Fireplace.jpg Fireplaces 0x000 0x000
Icon Garage.png Garage 0x0001 0x0400 Icon Fence.jpg Fence XFNC none
Icon Foundation.JPG Foundations and Decks ? ? Icon Gates.jpg Gates 0x0008 0x0008
Icon Terrain.JPG Terrain XFLR none Icon Elevator.jpg Elevator 0x0001 0x0800
Icon Roofing.JPG Roofing XROF none

Community Sort

Icon CommunitySort.JPG 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.

In-game sub-section sort
Icon Food.JPG Food bit 1 (0x0001)
Icon Shopping.JPG Shopping bit 2 (0x0002)
Icon Outdoor.JPG Outdoor bit 3 (0x0004)
Icon Street.JPG Street bit 4 (0x0008)
Icon BuildMisc.JPG Miscellaneous bit 8 (0x0080)

RAW Data - Catalog Ratings

Catalog Ratings RAW Data
This section contains fields for each of the types of motives an object can increase. Setting these add the information to the catalog description.
Example of catalog description with a rating

No other effect is provided by these - i.e. they don't actually do the motive increase - you must code this as well.

The Environmental Rating (Room Rating), is an exception to the coding requirement in that the motive increase for decorative objects depends on both the object's Price and its "Niceness Multiplier" (0x002D). "ratingRoom" (0x0059) should be given a value that is appropriate to the object's Price.

"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. Values listed below are decimal values. For multiple skills, add together the value of the individual skills. For example the FT activity table gives creativity and mechanical, 16+2 = 18.

ratingSkillFlags value Skill
1 Cooking
2 Mechanical
4 Logic
8 Body
16 Creativity
32 Charisma
128 Cleaning

RAW Data - User placement

User Placement RAW Data
This section controls where the user is allowed to place the object after buying it, e.g. against walls, etc.

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

Mesh and Graphics RAW Data
This section details various things about the actual object (or mesh as it is known).

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?

Setting Extend Footprint (0x004E) causes the game to dynamically create the footprint on the basis of the size of the object mesh (or the bounding mesh?). Presumably footprint tiles created this way cannot have the same properties as traditional multi-tile object creation, such as being impassable, but this approach is useful for ceiling lights.

RAW Data - Resource cross-refs

Resource cross-refs RAW Data
This section, as its name suggests, links together the various resources used for this object.

The Interaction Table ID (0x0007) must contain the number that matches the instance ID for the Pie Menu Functions (TTAB) and the Pie Menu Strings (TTAs).

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

This section mainly provides read-only access to the various GUIDs you change on the left hand side of this editor. The picture shows the mapping.

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

Data Space RAW Data
The data space section is essential for having space allocated for certain types of constructs.

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.

The number of object arrays (0x003B) is essential if you are using the Array Operation [prim 0x0076]. Without the correct space allocated you will get the "Bad Object Array" error.

RAW Data - Memories & Wants

Memories and Wants RAW Data

Object want category list can be found in "tsData\Res\Wants\WantTuning.package"

RAW Data - Miscellaneous

Miscellaneous RAW Data
This section has a random selection of other fields.

"Niceness Multiplier" (0x002D) is set to 0x0190 for decorative objects and 0x0064 for all others.

"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

0x009 type
2 Person
4 Objects
5 Architectural Support
7 Sim Type
8 Doors & Arches
9 Windows
10 Stairs
11 Modular Stairs
12 Modular Stairs Portal
13 Vehicles
14 Outfit
15 Memory
16 Template
19 Tiles
Personal tools

game select