Making an Apartment Control controlled object
1. Unzip the downloaded patch. Open the object you want to adapt in IffPencil2 I have included the object I used for this tutorial in the zip in case you want to start with that.
2. Right-click in a space, or use the Edit menu, and choose Import
3. Select the option shown above, and click OK.
4. Navigate to the file shown above, open it, and agree to everything.
5. Above you can see the new BHAV #5000
6. All the conditional tests for the Sims interacting with your object now need to include the test in BHAV #5000. Go to the TTAB section and open the menu for your object. The object I am using for this example is the cheap kitchen sink.
7. The test to see if a Sim can use the wash hands menu option is BHAV #4109
8. Go back to the BHAV section and open #4109
9. This one's simple, it only has one line. Right-click on it and choose Duplicate
10. Now you have the line twice. It just saves you having to try inserting, which has never gone all that well for me.
11. Turn the original first line into a call to our imported BHAV #5000. Type 5000 into the Function box on the right. See it changes to "Allowed to use?" on the left? You can ignore the numbers after it, they are just parameters left over from what it was before and the game will ignore them.
12. You need to make sure the second line still runs, so change the True line to 1, so it goes there next. Leave the False line saying False, because if the call to #5000 comes back saying "no" then the Sim is not to use the object and we don't need to see if line 2 is true.
(Note: Your object may not have a Check tree BHAV with only one line in it like this. The general rule is: duplicate the first line. Scroll down if necessary to make a note of the number of the new line you just created. Make sure Line 0 is selected. In the "True line" box put the number of that new last line, and in the "False line" box put 255, which is "False". In the "Function" box type "5000".)
13. Click OK.
14. Do the same for any of the other menu options you want controlled by the Apartment system.
15. In many objects, and certainly in a sink, there are other ways besides the menu options that a Sim can be told to use an object. After using the toilet he might be told by the toilet to look for somewhere to wash his hands. Or he might be told by a dirty plate to look for a sink to wash it in. These activities are listed on the OBJf table. Open it...
16. You see there is a "wash hands" function, "wash dish" and "repair". For "wash hands" and "wash dish" you can just type "5000" in the box where it says "ID# of the BHAV resource check tree".
Under "repair" however, it is already using a BHAV for a check tree. So if you want to control that you will need to go back to the BHAVs and edit #4118 like you did for #4109 that was mentioned in the menu section. You might have already done it, if you did decide to control all the menu options while you were at it, because the "repair" option on the menu uses the same test in this example!
(Note: objects from early EPs or ones without hidden options might not have an Objf. You may or may not be able to get them hacked satisfactorily but it's worth just doing what you can and trying it in the game anyway, it will probably be fine. Only ever apply the #5000 test to "serving surface", "portal", "gardening", "wash hands", "surface", "wash dish", "eating surface", "sit", "clean", or "repair" functions. If you alter any of the other settings you may cause problems in your game.)
17. Anyway, finally close your object in IffPencil, agreeing to Save. You will probably also want to change the description.