From SimsWiki
Jump to: navigation, search

This primitive is used to do things that can't be done with SimAntics, sorta like an operating system call.



The desired call is chosen using the first operand byte. The second maybe used in the future to allow more.


The avaliable calls vary with the expansion pack.

Original Game Calls

0x0(0) Exit Lot
Exits the lot (for use in Tutorial)
neighborhood ID
0 - leave family in lot
Nonzero - evict family
0 - no save lot
Nonzero - save lot
0 - no reset tutorial episode
Nonzero - reset tutorial episode
0x1(1) center view on stack object
Centers the main game window on the stack object.
0x2(2) set action icon to stack object
Sets the icon of my current action to the stack object's thumbnail.
0x3(3) uncenter view
If the center function was used recently, centers the main game view to where it was before that call.
0x4(4) add to family
Adds the neighbor with id in stack object to the family ID passed in via Temp 0. If this id is 0, then the current family is used. If this id is a non valid family ID (like -1), then a new family will be constructed.
0x5(5) combine assets of family in temp 0
Adds the net worth from the family in Temp 0 to the current family.
0x6(6) remove from family
Remove the neighbor specified in the stack object from the current family.
0x7(7) make new neighbor (depreciated)
Make a copy of the neighbor id in the stack object. New neighbor id is also returned in the stack object. No longer implemented.
0x8(8) family tutorial complete
Marks the family tutorial as being finishes.
0x9(9) architecture tutorial complete
Marks the architecture tutorial as completed.
0xA(10) disable build and buy
Temporarily disables the build and buy buttons in the user interface. Only to be used for special situations.
0xB(11) enable build and buy
After the disable call has been made, re-enables the build and buy buttons in the user interface. Only to be used for special situations.
0xC(12) get distance to camera in temp 0
For the stack object, computes an integer in temp 0 that varies increasingly the further an object is from the camera.
0xD(13) abort interactions
Aborts all interactions associated with the stack object.
0xE(14) house radio station = temp 0
Sets the global house radio station to number provided in temp 0.
0xF(15) My routing footprint = temp 0
Set the footprint extension of me to the value in temp 0
0x10(16) change normal outfit
Changes the normal suit of the person to the next available suit.
0x11(17) Swap Lot
Pass in lot ID you want to change to inside of Temp 0
0x12(18) Set Simulator Speed
Pass in temp 0 speed you want:
0 - pause
1 - unpause
2 - normal
3 - fast
4 - ultra
0x13(19) Swap Lot to Lot of Family in NeighborID in temp0
Pass in neighbor ID in temp 0 and lot will get swapped to that family's lot.
0x14(20) Swap Lot via Family in Temp 0
Put Family number in Temp 0 and lot will get swapped to their family lot.
0x15(21) Add Child to Family Relationship Array
Put a new child in the family tree array, passing in neighbor ID of new child in temp 0 and Parent NID in Temp 1
0x16(22) Add Spouse to Family Relationship Array
Put a new Spouse in the family tree array
temp 0 - neighbor ID of new spouse
temp 1 - neighbor ID of initial spouse
0x17(23) Remove From Family Relationship Array
Remove relationships between two Sims in the family tree array
temp 0 - neighbor ID of Sim to remove
temp 1 - neighbor ID of the relative
0x18(24) Preload New Sim Age
Given age in temp 0 (Same age range as SetAge Primitive uses), preload resources for this sim.
0x19(25) Set Selected Sim
Set the selected sim to the sim person object ID in temp 0
0x1A(26) Start Lot Transition
This call will exit the lot and bring up the neighborhood in a mode where you can select a community lot to go to and then load that lot. It is uknown whether this saves the current lot.
0x1B(27) Get Number of community lots in temp0
Gets the number of community lots in temp0
0x1C(28) Perform Money Effect
Temp0 - amount (for negative change, this needs to be negative)
Temp2 - multiplier (0 is taken as 1)
0x1D(29) Preload Visitor
Temp 0 contains the neighborID of the visitor you wish to preload
preloading takes approx 2 seconds (minimum)
0x1E(30) Preload Clothing
The outfit to preload is in Temp0 (comes from the drop down in Change Outfit)
takes 1/2 second to preload.
0x1F(31) Preload Object
Place GUID of object to be loaded in temp0/1 for object to be preloaded on separate thread.
0x20(32) Get Outfits Information
Place outfit Type in Temp0 and this will return how many outfits there are available for that type on the current ME in temp 1
0x21(33) Update Footprint
Used when you change intersection flags, to update the path planner with the change. This is called automatically after the init BHAV.
0x22(34) Get Distance Between Lots
Returns distance in Temp 2.
Temp0 - source lot ID
Temp1 - destination lot ID
Lot ID is same as House Number.
0x23(35) Get Zoning Type
Lot ID in Temp 0. Returns Zoning Type in Temp 1. See LOT for values.
0x24(36) GetIDOfFamilyInLot
Lot ID in Temp 0. Returns ID of the family residing in the lot in Temp 1. If there is no family in lot, Temp 1 will have -1 upon return.
0x25(37) LotTransitionDone
Needs to be sent after every lot load.
0x26(38) UnlinkCharacter
Neighbor ID in Temp 0. Removes all 3D and Edith resources associated with the character, leaving only UI representation.
0x27(39) Force Recalc of Wants
Forces a recalc of whatever the current Sim is. Ensure this is only called when Me is a sim.
0x28(40) Game State Transition Control
This disables/enables: saving, quitting, exiting to the neighborhood, lot transitions, and lot entry.
Temp 0
0 - disabled
Nonzero - enabled
0x29(41) Facial Overlay Zits Toggle
0 - off
Nonzero - on
0x2A(42) Sim Fitness Update
Syncs the 3D view of the sim to the simulator body settings (fit, fat, normal)
0x2B(43) Is It Ok to Idle Here
0x2C(44) Hide / Unhide Puck
Don't try and hide the puck twice without restoring it, that will cause an error
0 - unhide
Nonzero - hide
0x2D(45) Copy Last Name
Copy last name from object id in Temp 0 to stack object.
0x2E(46) Set Sim Hair Override
Called on a sim, this will override the current hair the sim is wearing.
This string is the FamilyId to search for in the Skin Catalogue for the override hair (for the given age/gender/haircolor of the sim).
Temp0 - the table Id
Temp1 - the index Id
Temp3 - if set to 1, fallback to globals can happen if the string isn't found
0x2F(47) Clear Sim Hair Override
Clears any hair overrides present on the sim.
0x30(48) Get Remapped Neighbor Id
For imported lots (message broadcast would be "import lot"), pass in Temp0 the old neighbor id, and the remapped/new neighbor id will be set in Temp1. Will return true if a remapped id is found, false otherwise.
0x31(49) Can Change Footprint?
Tests whether a footprint change would cause intersection with another object's footprint. Pass the footprint index in temp0.
0x32(50) Extract Money From other Lot
Temp0 - if non zero, take money from other lot
Temp1 - neighborID of sim from other lot to take money from
Temp2 - percentage of money we want to add to this lot
Temp3/4 - contain the amount of money added to this lot post call
0 - we get the money from the funds of the lot the neighborID came from
Nonzero - we get the funds from the lot assets of the lot the neighborID came from
0x33(51) Show Info On Lot Loading Screen
Pass 1 in Temp0 to show dialog for NPCs and Townies generation
0x34(52) Wall in Front?
Direction in temp0. Returns true if there is a wall within 1.5 tiles in that direction. Returns first object on that tile in temp1, if there is a wall.
0x35(53) Set Facial Overlay State
Temp0 - the table ID
Temp1 - the index ID
Temp2 - state
0 - off
Nonzero - on
Temp3 - 1 means to allow fallback to globals


This data is taken from STR# resource 7fe59fd0-000000dc-00000000 in objects.package.

University Added Calls

0x36(54) add want slot
0x37(55) add fear slot
0x38(56) add want lock
0x39(57) reset uni wants
0x3A(58) get a want/fear
0x3B(59) plastic surgery
0x3C(60) set skin
0x3D(61) save special outfit
0x3E(62) scholarship funds
0x3F(63) Uni transition
0x40(64) set time
0x41(65) generic init
0x42(66) unknown

Nightlife Added Calls

0x43(67) set attraction
0x44(68) unknown
0x45(69) vampire on/off

Open for Business Added Calls

0x46(70) add clothes to inventory

See also

Personal tools

game select