BHAVs & Multi-State Objects

Multi-state objects that have a sim directed interaction will have entries in the BHAV.  This is by no means a fix for every object, but just what I have observed with the few objects I have worked with.  The images here show a light specifically when a subset is added.  This subset was intended to lit and not-lit the same as the other two subsets.  I’ve not done everyone object that has multiple states, but it stands to reason that other objects that have Sim directed behavior will be similar.

The first thing I would like to point out before you start changing values is that what each entry in the BHAV does is fairly self-explanatory.  When you select either the Off of On BHAV look at the bottom in Plugin view.  Each entry is for one of the mesh subsets, in this case glass and solid and we will be adding the wreath.  Look at the first pic with the second entry (solid) selected.  On the bottom right you can see what it is referencing.  It shows the MMAT for the “solid_black_unlit” and the mesh subset “solid”.

1.  Select the BHAV
in this case we will start with the CT-Light-OFF state. There are two entries in this BHAV, one for each material.  We need to add one additional entry for the extra mesh subset that was added.  Select the the last entry in Plugin View, we are going to add basically via copy.  Select the Add button, you will now have an additional entry below that is identical.


2. Order the Entries
 We need to change the linking for the original entry number 2 so that the game processes them in order.  Select the second entry (0x1) and in the box for True Target place a 2.  Then select the third entry, you will now see a green arrow pointing from 0x1 to 0x2.

3. Edit Added Entry
We now will edit the third entry (0x3) that you added.  With the third entry selected click the hammer/wrench icon.

4.  Choose MMAT 
In the pop up dialog box we need to point to the correct material and mesh subset.  Select the double arrow button, and another box dialog box pops up.  Remember that we are working on the CT-Light-OFF or the unlit state.  We are also adding an entry for our third subset, the wreath.  So in the box choose the MMAT for the unlit state.  Press ok once to accept the MMAT.
5. Choose Mesh Subset  
Now we need to choose the mesh subset.  Select the second set of double arrows, and when the second dialog box pops up choose the new subset mesh (in this case the wreath).  Press Okay.  Then press Okay a second time to accept both fo the changes made.

6.  Press Commit.
Press commit to save your changes.

7. Rinse and Repeat

Since you object has two states you need to do this for the other state.  In the case you need to go back to step one and do the same for the lit state.  Substituting lit for where you chose unlit the first time.

8. Material Names

If your object is repository you will need to edit the String Resource (str) Material Names to point to the main texture mesh.  This example is linking to a Maxis mesh, but the same applies to cc meshes.  Just copy the values from the cc meshes Material Names to paste here, making sure to copy the right subsets to the right place.  Each objects lists these in a different order.