Difference between revisions of "4F424A66"

From SimsWiki
Jump to: navigation, search
m (Changed to new template)
Line 152: Line 152:
 
|-
 
|-
 
| 0x1F
 
| 0x1F
| Dry Clothes
+
| Restock
 +
| Used by OfB employees/business owners to restock certain items. Example can be seen on the bookshelf. (Was previously labeled as Dry Clothes)
 
|-
 
|-
 
| 0x20
 
| 0x20
Line 244: Line 245:
 
| Object Updated by Design Mode
 
| Object Updated by Design Mode
 
| Called when Design mode updates an object, so we can set the correct state on it.
 
| Called when Design mode updates an object, so we can set the correct state on it.
 +
|-
 +
| 0x37
 +
| ?
 +
| Unknown Function
 +
|-
 +
| 0x38
 +
| ?
 +
| Unknown Function
 
|}
 
|}
  

Revision as of 20:07, 2 January 2007

4F424A66
Short name: OBJf
Long name: Object Functions

Format

64 bytes
File name (null terminated)
8 bytes
null
DWORD
Header (fJBO)
DOWRD
Number Of Entries
for each entry
WORD
Function ID
WORD
Action ID
WORD
Guardian ID

Functions

Code Name Description
0x0 init The init tree is called whenever an object is reset. This happens when the object is first being placed, and if "Reset" is chosen after an object error.
0x1 main The main tree is the initial point of entry for the object's main simulation. Parameters may be passed to main if the "create object" primitive specifies.
0x2 load The load tree is called whenever an instance of the object is loaded from a save file. It is only called if the "object version" instance variable is different from the corresponding variable in the object definition.
0x3 cleanup The cleanup tree is called whenever an object is about to be deleted, or if a person's interaction with the object had to be aborted.
0x4 queue skipped The queue skipped tree is called if an interaction in a person's queue was deleted for any reason.
0x5 allow intersection This tree is a last resort hook for object intersection tests. If all the normal intersection tests pass, this tree is called to determine if two objects are allowed to intersect. Parameter 0 is the id of the object that is being tested.
0x6 wall adjacency changed This tree is called whenever the wall configuration around an object changed. At that time, the "wall adjacency flags" instance variable will indicate the new configuration.
0x7 room changed This tree is called whenever the room id of an object changes. At this time, the "room id" instance variable will contain the new room id.
0x8 dynamic multi-tile update If this function is defined for a multi-tile object, the object is "dynamic". This means that any time one is placed, it is joined with any neighboring objects. When the joining takes place, this tree is called for each object in the multi-tile group.
0x9 placement This tree is called any time the position of an object changes.
0xA pickup This tree is called when an object is removed from the world, either to be deleted or to be re-placed in the world.
0xB user placement This tree is called when the user clicks to place an object.
0xC user pickup This tree is called just before an object is picked up by the user.
0xD level info request This tree is called when the "level info" button is pressed. May not be used in final game.
0xE serving surface This tree is used by people who are looking for a place to drop food.
0xF portal If this tree is defined for a portal object, then the object may be used to transfer a person from one room to another. If two such objects are part of the same multi-tile group and lie in different rooms, then a person will push the tree to go between the rooms.
0x10 gardening If this tree is defined, then the gardener will use it to take care of the plants.
0x11 wash hands This tree is used by any person looking to wash hands.
0x12 prep This tree is used a person who is trying to prepare food.
0x13 cook This tree is used by any person trying to cook food.
0x14 surface This tree is used by a person who is looking for a surface on which to place an object.
0x15 dispose This tree is used by a person looking to throw away an object.
0x16 food This tree is used to eat an object. It is only used by the fridge to transfer control of the person to the food after it is created.
0x17 pickup from slot This tree is used by a person to pick up an object.
0x18 wash dish This tree is used by a person who is looking to wash a dish.
0x19 eating surface This tree is used by a person who wants to find a surface suitable for eating.
0x1A sit This tree seats a person. If the tree is defined, the game considers the object to be a chair.
0x1B stand If a person is sitting and contained in an object, this tree must be defined so that the person may stand up.
0x1C clean This tree is used by the maid to clean objects.
0x1D repair This tree is used by the repair man to repair objects.
0x1E ui event This tree is called in the current situation object when an event in the user interface occurs. The first parameter is the type of the event. The second parameter is the id of the event.
0x1F Restock Used by OfB employees/business owners to restock certain items. Example can be seen on the bookshelf. (Was previously labeled as Dry Clothes)
0x20 Wash Clothes
0x21 Start Live Mode This is called when ever live mode is reentered. It is not called after a simple pause.
0x22 Stop Live Mode This is called when ever live mode is left. It is note called for a simple pause.
0x23 Link Objects This tree is called so that the object can set links to the previous and next objects in a doubly-linked list of objects. The first parameter is the ID of the previous object in the chain or -1 if this is the first object. The second parameter is the ID of the next object in the chain or -1 if this is the last object.
0x24 Message Handler This tree is called when the object receives a broadcast message from the message primitive.
0x25 Pre Route This tree handles the transition from the idle-neutral pose, to the locomotion neutral pose if they are different at the beginning of a route. An example is of a toddler changing from sitting to crawling pose brefore routing.
0x26 Post Route This tree handles the transition from the locomotion neutral pose, to the idle-neutral pose if they are different at the end of a route. An example is of a toddler changing from crawling to a sitting pose brefore routing.
0x27 Goal Check This tree checks if the routing goal is still available. Its called on the object that issues the goto command. For example if a sim is trying to route to a seat, and another sim gets there false, this call can return false, allowing the sim to stop and choose another seat.
0x28 Reaction Handler This tree is called from a message handler tree, if the message receiver decides to actually handle the message.
0x29 Along Route Callback This tree is called on the sim once per tile along the route, and can interupt it by returning false. This tree can be used to run idles while the sim is routing.
0x2A awareness This tree is used by objects to advertise that they are interesting things to look at.
0x2B reset Called when object is reset on loading of lot. This should never happen in shipped game.
0x2C lookatTarget Called to choose objects to lookat along a route
0x2D Walk Over When an object is walked over, this tree gets called.
0x2E Utility State Change When a utility changes state, this tree gets called.
0x2F Set Model by Type Left | Right | Both
0x30 Get Model Type Left | Right | Both
0x31 delete Called before an object is killed.
0x32 user delete Called before an object is "deleted" or "sold" by the player, even if the object is not immediately killed.
0x33 Just Moved In Called on objects that have been created by moving in a sim that have objects they own from another lot.
0x34 prevent place in slot Called on container object during placement test for placing in a slot; return true to prevent placement even when all other tests pass.
0x35 Global Awareness Added to make Paul B's life easier.
0x36 Object Updated by Design Mode Called when Design mode updates an object, so we can set the correct state on it.
0x37  ? Unknown Function
0x38  ? Unknown Function

Notes

This needs to have the same instance number as the corrisponding object data resource.

This article is one of several on this topic imported from the old MTS2 wiki. It's original pages, with comments, can be found at http://old_wiki.modthesims2.com/4F424A66 and http://old_wiki.modthesims2.com/OBJD

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox