Back Previous Next

Menu Test: the mailbox hack

Going through objects and menu test routines to look for child checks (see previous), I discovered some very interesting menu options in the file "Mailbox.iff" (extracted from GameData/Objects/Objects.far):

Option #6 is probably what's called to leave all Sims refreshed after moving to a new house, options #2 to #4 are things that happen outside the Sims' control and options #5 and #7 were presumably put in by Maxis programmers for easier testing. That these options never appear in any menu is due to the menu test routine, which for options 2 to 7 is #4108. Looking this line up in the BHAV block:

There is only one instruction: compare X to X, if they are unequal (which they can't possibly be, they're the same) return false, ie. abort operation; else, also return false. I can make all these menu options available by simply changing both outcomes to "true", by replacing "go to" line numbers 255 and 255 with 254 and 254. Or I can choose the value "true" from the drop-down box.

A Sim can now bring the whole family's need bars into the green simply from clicking on the mailbox; the character doesn't even have to walk there, or be at home. A burglar can be summoned for some quick cash from insurance, or a reward. If the newspaper was trashed too quickly, a replacement is brought. The use of the last three options should be obvious. And Sim life suddenly becomes much easier!

(The Unleashed mailbox has an eighth option: "New job listing". This mailbox is compatible with Deluxe, but not with the original Livin' Large. The Superstar mailbox, with its new fame-related options, is not compatible with Unleashed.)

A bit of fine-tuning: to avoid all these extra options crowding the pie menu, they can be put under submenu "extra". The block to edit is TTAs (menu option strings). Put "Extra/" before each extra-option menu string, and use "Set for all languages" for the same effect in each language. (These strings are mostly in English anyway, since they are not intended to be shown.) In the four languages at the bottom of the list - Traditional and Simplified Chinese, Thai and Korean - the strings are not copied and the "Extra/" has to be added by hand. After all strings have been filled for each language, translate as desired (I usually add a Dutch translation). There will now be only one extra menu item, "Extra", which opens the extra options in a new pie menu.

Actually, there'll be two submenus, "*Extra" and "Extra". The older TTAB entries come prefixed with an asterisk, and I don't know how to remove it. I do know, however, how to rebuild the menu.

Step 1: export the TTAs block by choosing Edit|Export. IFF Pencil will supply a suitable filename for the exported menu strings. This will safeguard the translations. (I exported the data without header information, but it probably doesn't make a difference.)

Step 2: look at all the menu options that follow "Get Mail" and note their Menu Option string (topmost field of the Properties rectangle), Action Tree, Test Tree (these are the two numbers pointing to routines in the BHAV block) and advertisement info: Attenuation value/threshold. Make screen caps for each menu item if necessary.

Step 3: delete the entire TTAs block, to avoid troublesome duplications. In the TTAB block, delete all the menu options after "Get Mail". They must all be deleted and remade, even the last "good" one, because you can't insert menu options.

Step 4: first, enter the old menu option names in the now empty option string field of the surviving TTAB menu options. This has to be done in the right order, ie. first #1, then #2, because when an option string field is filled, a TTAs item is created, and the TTAs order has to correspond with the TTAB order, or the menu strings get crosswired. Then choose Edit|Add in the TTAB block to add a new menu option, replace "New item" in the option string field with "Extra/" followed by the extra function, and edit this TTAB to the way it was by copying the test/action tree and attenuation values from the screen cap or wherever you noted them (the adult and child boxes are already ticked by default). As with the existing items, the new items have to be in the right order and need their menu string filled instantly, or there may be problems with the TTAs later. The translations are not important for now, this is just setting up the menu structure.

Step 5: choose Edit|Import to import the old TTAs export file back over the new TTAs. The translations are now restored and the asterisk in "*Extra" is gone: all the extra options are now in one single "Extra" submenu.





Back Previous Next