Welcome to Adventures in Simantics…
A TS2 Tutorial by Carrigon
I’ll be your Ghost Guide as we journey into the unknown of how to Change a GUID, add a BHAV, and actually make it do something.
Today’s Lesson: A Max Fun Menu Option for the Alienware PC
For today’s lesson, you will need, a copy of my Alienware Energy PC and the latest version of SimPe. I’m including my Energy PC file for use in this tutorial. If you already have it, it’s the same GUID, but we’ll be changing it here.
Download the Alienware Energy PC here:
Before we get started:
I want you to make two folders. One you can name project, the other, backupproject. Put a copy of the alienware pc into each folder. As we work, only use the project folder. That way if you mess up, you have a back up.
Please do not email me, PM me, or otherwise bug me about this tutorial. It’s too difficult for me to answer everyone. If you get stuck, post on the MTS2 board and someone will probably help you there. But try to retrace your steps first. The MTS2 board can be found here:
MTS2 Main Page
Now, the very first thing we will do is to change the file name. So rename your .package file to something you will remember. It doesn’t have to be a long name, just do something like mypcproject.package
Step one, changing the GUID:
Open SimPe, open your package file that you just renamed.
Now, I want you to click on Object Data, then highlight it on the right. Click on Plugin View on the tabs below. Now, look at GUID, we’re going to change the GUID. For this lesson, Just change the last three values. I’d say, go one up or down for each value. If you have any problems later with this file, you might have just picked a GUID that’s already in the game, so you’d just come back here and change it again and that should fix it. Now, click commit, then do a file, save.
Step Two, the BHAVs:
Click Behavior Function. Now look at the right. For this lesson we’re just going to add a BHAV motive to this pc file. And I’ll explain what you have to do with it. Highlight the last BHAV, it should have an instance that ends in 1004. Look at it plugin view and it should say my motives energy in the code line. Then you’ll know you have the right BHAV.
Right click the BHAV, choose extract, and save it to your project folder. (When I said right click, that’s the BHAV line with the Instance code in it, not what you’re looking at in the plugin view window.)
Step 3, import the BHAV:
Okay, now I want you to go to File, Add from the main menu of SimPe at the top. We’re going to reimport the BHAV you just exported. Just add the .simpe file. It’s going to hide in SimPe, so now you have to find it. On your left, click the plain line above Animation Resource, then on your right, you should find a "user defined" line. That’s your BHAV you just imported. Click the User Defined. Now click Packed File in the Tab Menu below.
In File Properties you will see User Defined in the drop down menu. I want you to change that to Behavior Function. Click commit, file, save. Your new imported BHAV will now show up in the Behavior Functions section.
Step 4, Group and Instance:
We must now change the Group and Instance of the new imported BHAV. So I want you to go to Behavior Functions, click on the last one, it should be your new imported BHAV. Look at it in the Packed File tab.
Step 5, Group and Instance Continued:
For Group, I want you to match the value of the other BHAVs that you see above. You should see 0xFFFFFFFF, that should be about 8 F’s. Just make sure it matches. So change that group value to the F’s.
For Instance, I want you to look at the Instances above of the other BHAV’s. Do you see how the numbers are consecutive? You must make this consecutive as well. If the last BHAV above this one ends in 1004, you must change this one to 1005. You would always do this for any file you added a BHAV to. Click commit, file, save.
Your new BHAV will now show up correctly in Behavior Functions. So come back to Behavior Functions. Click on the last BHAV, it should now be instance 1005. Look at it in Plugin View.
Step 6, changing the motive:
In plugin view, click on the blue code line that says "my motives energy". Look at the right at the Operands sections. The very first number of the Operands is all we are going to change. Energy is 05, so let’s make that Fun. The Fun code is 0F. So I want you to change that value now. Then click change. Click commit. Your code line will now read Fun instead of Energy. We are not done yet, but I’m now going to give more of an explanation of what we’re doing.
We have just changed the code so that the pc will not just max energy, it will also max fun. But there are other steps. What I first want to explain is what the code line does. You are telling it to take the Fun and up it to 100. The code line will not look for a BCON. It will just do the 100 value on it’s own. Literal Value 0×0064 is hex for 100. The code line is not dependant on a BCON, but it is dependant on a "test" BHAV. At the moment, we don’t have to worry about that because it’s already in the file for Energy and we’re just going to piggyback off of it when we do the Pie Menu Option. The reason I’m explaining this is because you cannot just import any old BHAV into your file. You must always know what that BHAV is dependant on, whether it requires a TEST or a BCON.
Motive codes. This is a list of the other motive codes for when you want to change the different motives in a future hacked objects:
BHAV motive code numbers:
- Energy is 05
- Comfort is 06
- Hunger is 07
- Hygiene is 08
- Bladder is 09
- Social is 0E
- Fun is 0F
These codes go in Operands, the first box on the left.
Now, back to our editing.
Step 7, changing the target:
You should still be in the same place, looking at the Operands we just changed. I want you to change one more thing here. Look at the False Target. I want you to change that value to Return True. Click change, click commit. Now both areas in your code should have this value: True: FFFD, False: FFFD That will enable the code when it runs. Click file, save.
Step 8, adding the Pie Menu Option:
So, we’ve changed the code, but it still won’t work yet. We need to add the Pie Menu Option for it. So, click on Pie Menu Strings, plugin view. You should see all the menu choices listed. We’re going to add. So click the little "add to all" option. On your left, you’ll see it added a blank option. In the Value, type Max Fun. Click change, click commit. Look at the value next to your new Max Fun option. It should say 0xE. You will need this value for the next step. Now click file, save.
Step 9, the TTAB:
Now, go to Pie Menu Functions. Look at it in Plugin view. Click add, and it will look like it just copied an option on your left. Look at Settings, Pie String ID. Change the last value so it matches your new function. Change it to an E. Click change, click commit.
Beneath the Pie String ID, you will see Guardian and Action. Remember when I said this file is dependant on a "test" BHAV? The Guardian is pointing to the test. Since we already have it in the file, you don’t have to do anything to it now. But we do have to edit the Action so that the TTAB will know to look at our new Fun action. Remember how we made the new BHAV have a consecutive instance number. It was 1005. So, you’ll just be changing the Action value to match that. So make your action say 1005. Click change, click commit. Click file, save.
Step 10, set the different color options:
This is how to set it so that you get all three pc colors. Go to Object Data, plugin view. Copy your GUID, just highlight the GUID, right click, copy. Go to Tools in the upper main menu. Click hex decimal converter. Paste your GUID in there, make sure you did it right. It should look exactly like your GUID, like this: 0xA3131311, now see the new numbers beneath it? You will have to put those numbers somewhere. So, copy them down someplace for the next step.
Step 11, adding those new GUID numbers:
Click on Model Material, you’ll see three MMAT files on the right. Click the first one. Look at it in plugin view. Find the line that has GUID in it. It should be about ten lines down, it’s the only one that has the word GUID. Now, see where there are a bunch of numbers that look like what you just saw in the hex converter? You have to replace those numbers with your new numbers. You are not replacing the hex, only the decimal, that was the bottom line of the converter. Click commit, file, save. Now, repeat this for the other two files in the Model Material. Make sure you click commit, and file save after each one. And that will take care of your pc colors showing up.
Step 12, change the name of the pc in the catalog:
Click on Catalog Description. Look at it in plugin view. See the name of it in the strings? There are two strings, one is the name string, the other is the description string. Just change it in value to whatever name you would like, click change, then do the same for the description value string under it that will describe your new file, click change. Where mine says it maxes energy, you can put that it now maxes both energy and fun. You are only changing the VALUE, do not change the Description area where it says "Sims2 - Needs Translation". That, you leave alone. When you are sure you’ve done it right, click commit, click file, save.
Step 13, change the price:
Go to Object Data, plugin view. Scroll down in the elements until you see Price. It’s not the Sale Price, it’s the regular Price you want. You’ll see the left part is hex, the right part tells you in regular numbers what the price is. Mine was 300. Change it to 500. Click Commit. Click file, save.
That’s it, all done, but you should double check your work to make sure you didn’t miss clicking commit or change somewhere. When you are sure you are sure you are done, copy your new file to your Documents/EA Games/Sims2/Downloads folder. Load up your game and see if it works.
I hope this tutorial was clear and helpful and that you’ve now come away with some knowledge of making a hacked object.


![Subscribe RSS feed [Valid RSS]](http://sims.ambertation.de/en/../img/rss2.gif)

