Using the Functions Tree
The OBJf resource / Find Best Object for Function / Run Functional Tree
Please note: The word function is frequently used for Simantics Primitives. This text is NOT about those 'functions'.
The OBJF resource as seen in IffPencil2.
Functions are listed in the Object Function Tree (OBJf).
Each function in the OBJf has "action tree" and "check tree (or, if you are a mac user, "guard tree") just like the TTAB (they may not be labeled as such but they do work the same way.)
The "check tree" is almost never used.
An object can direct a sim to "Find Best Object for Function ( xxxxxx )" (Simantics Primitive 14)
and then can direct a sim to "Run Functional Tree ( xxxxx )" (Simantics Primitive 20)
See BHAV#4195 ("dispose food by washing") in any food file for working examples.
When a Sim is instructed to Find Best Object For Function (dish washing) it will scan the lot looking for any objects that have a BHAV number listed in that line of it's Object Function Table (OBJf). The Sim will then compare all of the objects it found to rate which one is the "best".
Best = highest "function points" (proximity is also an influence but not much)
So the object must have a BHAV listed in the OBDf's "action tree" and it must also be assigned a number of function points. Points are assigned in BHAV. They are originally assigned in the "init" BHAV and typically the cheaper objects are given lower function points than the moderate objects with the expensive objects having the highest points of all. Unfortunately, many of the objects (such as counters and sinks) that came with later expansion packs (and many of the ones we download) are simply clones of the early "expensive" versions so we don't get to experience Sims making the more interesting choices they made when the game came out (the super swank gold toilet is not "better" than a plainer toilet from any expansion pack).
The function points can be changed ("updated") any time, for any reason you like.
- Some examples of updated function points :
- A table has an "Eating Surface" function. The Eating Surface function points are zero UNLESS a chair is facing the table.
- Stoves have "Cook Food" function. it's entirely possible someone will want to put both a microwave and a normal stove in a kitchen. To prevent the Sim from using the same appliance over and over stoves randomly drop and raise their Cook Food function points every hour. The appliance with the best (highest) cook points at breakfast may not be the one with the best(highest) cook points at lunch.
- Many items drop their function points to a very low number when they are broken. That way if your shower is busted your Sim can still use it if he needs to but if there are two showers your sim will choose the working one instead.
See BHAV#4102 ("tweak update function scores") in any counter for examples of function points being updated during game play.
BEING BETTER THAN THE BEST
To force the sim to use your object over any other similar object that might be placed on the same lot you must give it insanely high function points. For example SSoW offers functioning sideboards (including the "convert to sideboard" object). They were made by giving them so many Serving Surface function points that no counter made could compete. Their prep surface points are lower than any counter's would ever be and (if I recall correctly) they were not given an Eating Surface function at all. The result is a household with Sims that Prep Food on kitchen counters but then Serve it in a dining room.
APPLYING THIS INFORMATION TO YOUR PROJECT
The object needs to be given functional BHAVS and function points.
Let us assume you make that ultimate dishwasher. It's a pretty safe bet that your Sims will also have sinks around for hand-washing purposes. Those sinks may have high dish washing (again, people stopped paying attention to what they were cloning and the effect it would have on the whole game's balance) so you'd need to do what I did for sideboards - jack the function points up so high that it's always rated the best object on the lot for that task. In this case you'd check in dishwashers (the appliance) and use those as a guide since they always have more dish-washing points than sink.
BALANCE IN ALL THINGS
You only need to be better than the sinks that currently exist (or are likely to exist in the near future). Leave some room for improvement just in case you (or anyone) makes an Ultimate Plus dishwasher in the future which should have higher function points than your current project.