0x0024

From SimsWiki
Jump to: navigation, search
Dialog
OpCode:0x0024
Game Version:The Sims 2


Contents

Overview

This primitive is used to display informations like "The car pool will arrive in one hour" and / or to display messages to which the player can reply by clicking on buttons like "Yes", "No" and "Cancel".

Using the Instruction Wizard

Dialog Instruction Wizard

This wizard allows you to choose the type of dialog you want (see the table below) and then configure various things about that dialog depending on the type you chose. Things that do not apply to your chosen dialog type, are hidden on the wizard, so do not worry if it doesn't look exactly like the picture. For many of the dialog types, the main things to be chosen are the strings used for Title, Message and buttons. These strings are taken from Text List (STR#) resource 0x0000012D (see String Resources for all the different Text List usages). The wizard allows you to pick the string from a pop-up window, so you don't have to remember that line 0x00 in the text list is "01" in the operands field, line 0x01 is "02", and so on. Another useful reference is String Substitutions which are very handy when popping up a text notification, or indeed any dialog.


Instruction Wizard Parameters

Since the dialogue type "Text Notification", which displays a message in the top right corner, is a commonly needed one, it's a good example to demonstrate what the various additional parameters do.

Name Description Notes Valid values (if applicable)
Dialogue Type Specifies which type of text pop-up you'd like to see See below.
Icon Controls the Sim or object that is shown as the "subject" of the text box automatic: use the Stack Object
none: no icon
neighbour: only works if Stack Object contains an nID
indexed: ???
named: uses whatever is contained in STR resource 0x012D (seen used for $Me and $Object), the index is picked in the field next to Icon
automatic real-time: ???
TNS Style Controls the text box design There are six currently known working types, with varying inputs Sim: white speech bubble pointing at the object defined by the "Icon"
System: yellow speech bubble pointing at the object defined by the "Icon"
System Dialogue: ???
Birthday: displays a birthday cake as the icon and the birthday Sim in an icon in the corner. Make sure to set Temp 1 to the days until the birthday happens
Sim (about Object ID in Temp 1): white speech bubble pointing at the object defined by the "Icon", with the object ID in Temp 1 in an icon in the corner
Sim (about Object ID in Temp 1 by Sim nID in Temp 2): This style exists but is unknown to SimPE at present. White speech bubble pointing at the Sim nID defined in Temp 2, with the object ID in Temp 1 in an icon in the corner. Useful if you need the Stack Object to be something else.
Priority Controls which text boxes appear at the top?
Timeout Controls how long the text box stays on screen Time seems to be specified in seconds. If you leave this at 0, the text box will never vanish on its own and has to be closed by the player.
String Scope Controls which STR resource 0x012D the text for the Message, Buttons and Title is drawn from Private, Semiglobal or Global
Temp Var Returns the ID of the dialogue box in the given Temp value Only useful if you want to use Stop Text Notification, Text Notification Modify or Text Notification Append. However, keep this in mind when using this primitive.
Use temp Takes dialogue from the position specified in the given Temp value if this is ticked For example, if you set this to use Temp 1, and Temp 1 is 3, then the 3rd dialogue from the STR resource 0x012D is used.
Wait for user ?
Block Sim ?

Dialogue Types

Num Dialog Type EP Notes & Picture
00 Message Basegame.gif Display a dialog with a message and yes button
01 yes-no message Basegame.gif Display a dialog with a message, a yes button and a no button. Return true on yes and false on no.
02 yes-no-cancel message Basegame.gif Display a dialog with a yes, no and cancel button. If yes is chosen, returns true. If no is chosen, returns false and sets temp to 0. If cancel is chosen, returns false, and set temp to 1.
03 text entry Basegame.gif Display a dialog with an OK button and a space for the user to type in a name. The next call to "make a new character" will use the typed name as the name of the new character.
04 tutorial Display a tutorial dialog, with only an OK button.
05 Phone Book - Services Display the phone book dialog for services - uses private string table 147 to get service choices in. Returns index selected in array0 at position 0.
06 Phone Book - Invite Basegame.gif

NL-ep2.gif
Example Phone Book Dialog
Display the phone book dialog for calling one sim over. Returns neighbor ID of invitee in array0 at position 0.
The main title of the phone book can be configured (NL onwards, i.e Node Version 0x01), as can the string in the top pane - using %s to substitute the name of the Sim currently selected in the lower portion of the Dialog. This dialog expects to be called with the Stack Object's array number 0 filled in with Neighbor IDs to display in the dialog. It returns the selected Neighbor ID in position 0 of this array.
07 Phone Book - Party Display the phone book dialog for having a party. Returns neighbors invited in array0.
08 Text Notification Text Notification on side of screen - returns unique ID in specified temp. For birthdays, days-Till-Birthday is expected in temp1
09 Stop Text Notification Stops Text Notification by passing in unique ID in specified temp
0A Text Notification Modify Modify existing text notification and reset timer
0B Magazine Rack
Example Magazine Rack Dialog
Put up Magazine rack dialog - pass in objects IDs of magazine to be selected via array 0, and return same array with non -1 entries for magazines selected.
This dialog doesn't have any configurable strings, however, it is already very generic, so that's not really an issue. It expects to be called with the Stack Object's array number 0 filled in with the IDs of objects to be displayed.
0C Jewelry Rack Put up Jewelry rack dialog - pass in objects IDs of jewelry to be selected via array 0, and return same array with non -1 entries for magazines selected.
0D VideoGame Rack Put up Video Game rack dialog - pass in objects IDs of video Games to be selected via array 0, and return same array with non -1 entries for magazines selected.
0E Food Rack Put up Food selection dialog - pass in 4 variables in consecutive vars indexed by Local Var Index edith field. Return new value via temp 0
0F Special Phone Services Special Phone services - pass in array 0 of neighbor ID's to be put up - return Array 0 with non -1 entries for those selected.
10 Clothing Purchase Clothing purchasing requires a clothing type in temp0 (same literals as the types in the Change Outfit primitive) - nothing is returned.
11 Clothing Selection Clothing Selection requires a clothing type in Temp 0 (same literals as in the Change Outfit Primitive) - nothing is returned
12 Tutorial Tasks List tutorial tasks. Pass in array 0 containing an array of string indexes to get strings from. These strings come from the private string array. Array 1 is a 1to1 corresponding array, where an entry for each string index of 1 means the task is displayed checked. An empty array 0 means the dialog will be removed.
13 List Selection Very much like the phone services dialog, except that you can set the dialog title you want and there is no phone icon.
14 Clothing Try On TryOn clothing dialog - requires a clothing type in temp0 (same literals as the types in the Change Outfit primitive) - nothing is returned.
15 Vanity Table Vanity Table dialog - no inputs or outputs. On a true return, change into the same outfit the sim is wearing to update changes.
16 TutorialNext Pass in title and message as usual. Pass in total number of dialogs in temp 2 and current dialog number in temp 1
17 Baby Name Set the baby name.
18 Set Aspiration Object ID == neighbor id of sim to set the aspiration for. Will set it for the neighbor and in the person if the person is instantiated.
19 TutorialNext Modal Pass in title and message as usual. Pass in total number of dialogs in temp 2 and current dialog number in temp 1 - MODAL
1A Set Major Object ID == neighbor id of sim to set the major for. Will set it for the neighbor and in the person if the person is instantiated.
1B Resurrect-O-Nomitron Put up Resurrect-O-Nomitron dialog to specify how much to pay the Grim Reaper - pass in 4 variables in consective local vars indexed by Local Var Index edith field. Return new value via temp 0. This is just like the Food Purchase dialog.
1C Text Notification Append Modify existing text notification by appending the string given and reset timer.
1D Move Grave To Lot
1E Visit Neighbourhood Or Lot
1F Dating Services
20 Manage Groups
21 Phone Groups
22 Set Turn On/Off's
23 Customize Your Craftable
24 Sims Available for Hire Choose a lot owned by the Sim. Set Local0 to lot (job) ID. Pass array of neighbor IDs eligible for employment. Returns number of hired employees in Temp0.
25 Choose a Lot to Purchase Choose a lot to purchase, returns temp0 = neighborhood ID, temp1 = lot ID
26 Choose a Lot to Transfer Ownership Choose a lot to transfer, returns temp0 = neighborhood ID, temp1 = lot ID
27 Choose Owned Lot - Generic Choose a lot owned by running Sim, returns temp0 = neighborhood ID, temp1 = lot ID
28 Set Price
29 Dress Employee
2A Food Rack
2B VideoGame Rack (Unused)
2C Jewelry Rack (Unused)
2D Magazine Rack
2E Clothing Rack
2F Manage Business Manage a business on a lot, given a lot id in temp 0.
30 Set Wage Input: Temp0 = wage level; Temp1 = fair wage. Returns: Temp0 = new wage level
31 Suggest an Outfit
32 Offer Job
33 Restaurant Menu T0 = Array Obj, T1 = Index, T2 = ( 0 = uninited, 1 = inited ), T3 = # Field Enabled?, T4 = # Field comparator. This dialog takes up to three arrays, in sequential order. If in 'inited' mode, the second array is the "selected" indicator (!0 = selected). If not in inited mode, the second array is the optional numeric field.
34 Service Phone Book (GUIDs)
35 Choose an Image to Paint For choosing a custom painting from "Paintings" inside the Documents Sims 2 folder.
36 Buy Collar
37 Give Up Pet For Adoption
38 Adopt a Pet
39 Game Tip No Texts can be set here. Set the Game Tip value to the Game Tip Instance. The Game Tip selects the image and text.
3A Make A Pet Make A Pet params: Input: Temp0 = neighbor ID of the pet in the display (0 for random); Output: Temp0 = neighbor ID of the created pet.
3B Change Pet Appearance Pet Vanity params: Input Temp0 = neighbor ID of the pet. No output params.
3C Change Breed Choose Breed params: Input Temp0 = neighbor ID of the pet. No output params.
3D Register Breed Register Pet params: Input Temp0 = neighbor ID of the pet. No output params.
3E Purchase Contained Pet No output params.
3F Fridge Storage Transfer fresh foods from inventory to refrigerator
40 Give Gift Provides a list of items from a Sim's inventory to be given to the recipient.
41 Juicer Stocking Provides a list of fruit from a Sim's inventory to be put into the selected refrigerator.
42 Grab Leftovers No input. Returns selected token index in Temp 0.
43 Choose Vacation Lot to Purchase
44 Visit Neighbourhood Or Lot (debug) Debug Travel Option: Will unconditionally make every Lot available to travel to. ~ USE WITH CARE.
45 Vacation Planner
46 Transportation Picker
47 Hotel Chooser
48 Photo Album Chooser
49 Photo Album Viewer
4A Vacation Benefits Selection
4B unknown
4C Honeymoon Planner
4D Sew Clothing Purchase
4E Sew Clothing Chooser
4F (hobby) Dish Chooser
50 Draft Table Image Chooser
51 Bug Collection Viewer
52 Song Name Input
53 Novel Writing Setup FT-ep7.gif
Example Novel Writing Dialog
This Free Time EP introduced dialog doesn't have any configurable strings. It will always have the title "Novel Writing" and the subtitles for the two main functions of the dialog - choosing the cover and choosing the plot lines. Given the very specific purpose of this dialog however this is not really a problem.
No specific input is required to call this dialog, but upon return the chosen cover and plot lines are returned in temporary variables as follows:-
Temp:n Contents
0-4 Plot Icon 1-5
5 Cover Art
54 Novel Personalize FT-ep7.gif
Example Novel Customisation Dialog
This Free Time EP introduced dialog can have title string configured, but unfortunately not the text that you overtype in the title and description panes.
Before calling this dialog, the object to be customized should be stored in the Stack Object variable. You can provide this dialog with a "Message" string as well as a "Title" string. The message string is post-pended to whatever the user types into the book title pane. For novels this is used to append "by author" but of course you could use it for anything.
55 unknown
56 Roommate Chooser
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox