Difference between revisions of "4F424A66"

From SimsWiki
Jump to: navigation, search
(Added infobox)
m (Added info from OBJF, etc)
Line 1: Line 1:
 
{{Resource tgi
 
{{Resource tgi
|short = OBJF
+
|short = OBJf
|long = Object functions
+
|long = Object Functions
 
}}
 
}}
  
Line 18: Line 18:
 
;WORD
 
;WORD
 
:Action ID
 
:Action ID
 +
 +
==Functions==
 +
{|
 +
! Code
 +
! Name
 +
! Description
 +
|-
 +
| 0x1
 +
| 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.
 +
|-
 +
| 0x2
 +
| 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.
 +
|-
 +
| 0x3
 +
| 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.
 +
|-
 +
| 0x4
 +
| 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.
 +
|-
 +
| 0x5
 +
| queue skipped
 +
| The queue skipped tree is called if an interaction in a person's queue was deleted for any reason.
 +
|-
 +
| 0x6
 +
| 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.
 +
|-
 +
| 0x7
 +
| 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.
 +
|-
 +
| 0x8
 +
| 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.
 +
|-
 +
| 0x9
 +
| 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.
 +
|-
 +
| 0xA
 +
| placement
 +
| This tree is called any time the position of an object changes.
 +
|-
 +
| 0xB
 +
| 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.
 +
|-
 +
| 0xC
 +
| user placement
 +
| This tree is called when the user clicks to place an object.
 +
|-
 +
| 0xD
 +
| user pickup
 +
| This tree is called just before an object is picked up by the user.
 +
|-
 +
| 0xE
 +
| level info request
 +
| This tree is called when the "level info" button is pressed. May not be used in final game.
 +
|-
 +
| 0xF
 +
| serving surface
 +
| This tree is used by people who are looking for a place to drop food.
 +
|-
 +
| 0x10
 +
| 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.
 +
|-
 +
| 0x11
 +
| gardening
 +
| If this tree is defined, then the gardener will use it to take care of the plants.
 +
|-
 +
| 0x12
 +
| wash hands
 +
| This tree is used by any person looking to wash hands.
 +
|-
 +
| 0x13
 +
| prep
 +
| This tree is used a person who is trying to prepare food.
 +
|-
 +
| 0x14
 +
| cook
 +
| This tree is used by any person trying to cook food.
 +
|-
 +
| 0x15
 +
| surface
 +
| This tree is used by a person who is looking for a surface on which to place an object.
 +
|-
 +
| 0x16
 +
| dispose
 +
| This tree is used by a person looking to throw away an object.
 +
|-
 +
| 0x17
 +
| 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.
 +
|-
 +
| 0x18
 +
| pickup from slot
 +
| This tree is used by a person to pick up an object.
 +
|-
 +
| 0x19
 +
| wash dish
 +
| This tree is used by a person who is looking to wash a dish.
 +
|-
 +
| 0x1A
 +
| eating surface
 +
| This tree is used by a person who wants to find a surface suitable for eating.
 +
|-
 +
| 0x1B
 +
| sit
 +
| This tree seats a person. If the tree is defined, the game considers the object to be a chair.
 +
|-
 +
| 0x1C
 +
| stand
 +
| If a person is sitting and contained in an object, this tree must be defined so that the person may stand up.
 +
|-
 +
| 0x1D
 +
| clean
 +
| This tree is used by the maid to clean objects.
 +
|-
 +
| 0x1E
 +
| repair
 +
| This tree is used by the repair man to repair objects.
 +
|-
 +
| 0x1F
 +
| 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.
 +
|-
 +
| 0x20
 +
| Dry Clothes
 +
|-
 +
| 0x21
 +
| Wash Clothes
 +
|-
 +
| 0x22
 +
| Start Live Mode
 +
| This is called when ever live mode is reentered. It is not called after a simple pause.
 +
|-
 +
| 0x23
 +
| Stop Live Mode
 +
| This is called when ever live mode is left. It is note called for a simple pause.
 +
|-
 +
| 0x24
 +
| 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.
 +
|-
 +
| 0x25
 +
| Message Handler
 +
| This tree is called when the object receives a broadcast message from the message primitive.
 +
|-
 +
| 0x26
 +
| 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.
 +
|-
 +
| 0x27
 +
| 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.
 +
|-
 +
| 0x28
 +
| 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.
 +
|-
 +
| 0x29
 +
| Reaction Handler
 +
| This tree is called from a message handler tree, if the message receiver decides to actually handle the message.
 +
|-
 +
| 0x2A
 +
| 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.
 +
|-
 +
| 0x2B
 +
| awareness
 +
| This tree is used by objects to advertise that they are interesting things to look at.
 +
|-
 +
| 0x2C
 +
| reset
 +
| Called when object is reset on loading of lot. This should never happen in shipped game.
 +
|-
 +
| 0x2D
 +
| lookatTarget
 +
| Called to choose objects to lookat along a route
 +
|-
 +
| 0x2E
 +
| Walk Over
 +
| When an object is walked over, this tree gets called.
 +
|-
 +
| 0x2F
 +
| Utility State Change
 +
| When a utility changes state, this tree gets called.
 +
|-
 +
| 0x30
 +
| Set Model by Type
 +
| Called to change the model based on a type defined in the game code.  The first parameter holds the model 'type'. e.x.  Modular stair railing types: None | Left | Right | Both
 +
|-
 +
| 0x31
 +
| Get Model Type
 +
| Called to get the model type as defined by the game code. e.x.  Modular stair railing types: None | Left | Right | Both
 +
|-
 +
| 0x32
 +
| delete
 +
| Called before an object is killed.
 +
|-
 +
| 0x33
 +
| user delete
 +
| Called before an object is "deleted" or "sold" by the player, even if the object is not immediately killed.
 +
|-
 +
| 0x34
 +
| Just Moved In
 +
| Called on objects that have been created by moving in a sim that have objects they own from another lot.
 +
|-
 +
| 0x35
 +
| 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.
 +
|-
 +
| 0x36
 +
| Global Awareness
 +
| Added to make Paul B's life easier.
 +
|-
 +
| 0x37
 +
| Object Updated by Design Mode
 +
| Called when Design mode updates an object, so we can set the correct state on it.
 +
|}
  
 
{{OldWikiEntryCleanedOther}}
 
{{OldWikiEntryCleanedOther}}

Revision as of 18:37, 3 August 2006

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

Functions

Code Name Description
0x1 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.
0x2 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.
0x3 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.
0x4 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.
0x5 queue skipped The queue skipped tree is called if an interaction in a person's queue was deleted for any reason.
0x6 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.
0x7 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.
0x8 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.
0x9 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.
0xA placement This tree is called any time the position of an object changes.
0xB 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.
0xC user placement This tree is called when the user clicks to place an object.
0xD user pickup This tree is called just before an object is picked up by the user.
0xE level info request This tree is called when the "level info" button is pressed. May not be used in final game.
0xF serving surface This tree is used by people who are looking for a place to drop food.
0x10 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.
0x11 gardening If this tree is defined, then the gardener will use it to take care of the plants.
0x12 wash hands This tree is used by any person looking to wash hands.
0x13 prep This tree is used a person who is trying to prepare food.
0x14 cook This tree is used by any person trying to cook food.
0x15 surface This tree is used by a person who is looking for a surface on which to place an object.
0x16 dispose This tree is used by a person looking to throw away an object.
0x17 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.
0x18 pickup from slot This tree is used by a person to pick up an object.
0x19 wash dish This tree is used by a person who is looking to wash a dish.
0x1A eating surface This tree is used by a person who wants to find a surface suitable for eating.
0x1B sit This tree seats a person. If the tree is defined, the game considers the object to be a chair.
0x1C stand If a person is sitting and contained in an object, this tree must be defined so that the person may stand up.
0x1D clean This tree is used by the maid to clean objects.
0x1E repair This tree is used by the repair man to repair objects.
0x1F 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.
0x20 Dry Clothes
0x21 Wash Clothes
0x22 Start Live Mode This is called when ever live mode is reentered. It is not called after a simple pause.
0x23 Stop Live Mode This is called when ever live mode is left. It is note called for a simple pause.
0x24 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.
0x25 Message Handler This tree is called when the object receives a broadcast message from the message primitive.
0x26 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.
0x27 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.
0x28 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.
0x29 Reaction Handler This tree is called from a message handler tree, if the message receiver decides to actually handle the message.
0x2A 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.
0x2B awareness This tree is used by objects to advertise that they are interesting things to look at.
0x2C reset Called when object is reset on loading of lot. This should never happen in shipped game.
0x2D lookatTarget Called to choose objects to lookat along a route
0x2E Walk Over When an object is walked over, this tree gets called.
0x2F Utility State Change When a utility changes state, this tree gets called.
0x30 Set Model by Type Left | Right | Both
0x31 Get Model Type Left | Right | Both
0x32 delete Called before an object is killed.
0x33 user delete Called before an object is "deleted" or "sold" by the player, even if the object is not immediately killed.
0x34 Just Moved In Called on objects that have been created by moving in a sim that have objects they own from another lot.
0x35 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.
0x36 Global Awareness Added to make Paul B's life easier.
0x37 Object Updated by Design Mode Called when Design mode updates an object, so we can set the correct state on it.

Template:OldWikiEntryCleanedOther Template:OldWikiEntryCleanedOther

Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox