Difference between revisions of "0x0001"
(Reorganized and added new calls)
m (→Overview: Rewording and spelling)
|Line 3:||Line 3:|
using the first byte. The second maybe used in the future to allow more.
Revision as of 21:34, 13 July 2006
Generic Sims Call (0x0001)
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) - Temp0=neighborhoodID; Temp1=0/leave family in lot, Non-Zero/evict family; Temp2=0/no save lot, Non-Zero/save lot; Temp3=0/no reset tutorial episode, Non-Zero/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) deprecated - make new neighbor
- No longer implemented. tree error. Make a copy of the neighbor id in the stack object. New neighbor id is also returned in the stack object.
- 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, passing in neighbor ID of new spouse in temp 0 - temp 1 is neighbor ID of initial Spouse
- 0x17(23) Remove From Family Relationship Array
- Remove relationships between two Sims in the family tree array, passing in neighbor ID of Sim to remove in temp 0 - temp 1 is 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 (not sure if it saves) and bring up the neighborhood in a mode where you can select a community lot to go to and then load that lot.
- 0x1B(27) Get Number of community lots in temp0
- Gets the number of community lots in temp 0
- 0x1C(28) Perform Money Effect
- If a minus sign is required, make sure the value passed in temp 0 is negative. Temp 2 will contain the multiplier for this value - if it's set to 0 then the code will assume you meant 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
- 0x22(34) Get Distance Between Lots
- Source Lot ID in Temp 0, Destination Lot ID in Temp 1. Returns distance in Temp 2. Lot ID is same as House Number.
- 0x23(35) Get Zoning Type
- Lot ID in Temp 0. Returns Zoning Type in Temp 1. 0= Residential. 1= Community.
- 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
- If Temp 0 == 0, the below items will be Disabled. If Temp 0 != 0, the below will be Enabled. (This disables/enables: saving, quitting, exiting to the neighborhood, lot transitions, and lot entry.)
- 0x29(41) Facial Overlay Zits Toggle
- Temp0 == Off (0) / On (1)
- 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
- Hide or unhide puck based on value in temp 0 - if non zero puck is hidden. Don't try and hide the puck twice without restoring it, that will cause an error
- 0x2D(45) Copy Last Name
- Copy Last name from object id in Temp 0 to Object in Stack object.
- 0x2E(46) Set Sim Hair Override
- Called on a sim, this will override the current hair the sim is wearing. Temp0 is the table Id, Temp1 is the index Id. 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). If Temp3 is 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 Temp 0 the old neighbor id, and the remapped/new neighbor id will be set in Temp 1. 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 temp 0.
- 0x32(50) Extract Money From other Lot
- Temp 0 if non zero means take money from other lot. Temp 1 contains neighborID of sim from other lot to take money from. Temp 2 contains percentage of money we want to add to this lot. temp3/4 contain the amount of money added to this lot post call. If temp 5 is zero, then we get the money from the funds of the lot the neighborID came from. If it's non zero, then we get the funds from the lot assets of the lot the neighborID came from.
- 0x33(51) Show Info On Lot Loading Screen
- Pass in Temp 0: 1 == to show dialog for NPCs and Townies generation
- 0x34(52) Wall in Front?
- Direction in temp 0. Returns true if there is a wall within 1.5 tiles in that direction. Returns first object on that tile in temp 1, if there is a wall.
- 0x35(53) Set Facial Overlay State
- Temp0 is the table Id, Temp1 is the index Id, Temp2 is the state (1 == on, 0 == off), Temp3 can be set to 1 to allow fallback to globals.
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