sim poses and animations - the sims resource -...

13
Sim poses and Animations By Sim_man123, 28 April 2008 Page - 1 Getting a custom animation into the game isn’t really something that I view as hard, but you need to be experienced with SimPE and not afraid to break things. There is a fixed set of things which need to be done, but it’s not too hard to remember once you do it a few times. For this tutorial I assume that you have used SimPE for some time and know how to use it quite well, as well as that you are comfortable making a new mesh/texture for you object (if you want a new object). For this you will need SimPE, which I assume you already have, Milkshape (Trial version or registered version, just as long as you can save/export - http://chumbalum.swissquake.ch/ ) You also need to download and install the AniMesh plug-ins for Milkshape found at http://www.modthesims2.com/showthread.php?t=239060 (Extract them into your default Milkshape folder). You will need base files for making the pose found at http://www.modthesims2.com/showthread.php?t=239172 . Step 1. Clone a base object The first thing to do is clone whatever you want to use as a base. For my purpose I’m just going to clone a statue (Apple of the Eye) since I don’t need it for anything else than to make my sims do an animation. If you have something different in mind for you object, you can clone just about anything; however later along it can become pretty complicated. Use standard cloning options, but also check the "Pull Animations” box. -

Upload: dangdang

Post on 14-Feb-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 1

Getting a custom animation into the game isn’t really something that I view as hard, but you need to be experienced with SimPE and not afraid to break things. There is a fixed set of things which need to be done, but it’s not too hard to remember once you do it a few times. For this tutorial I assume that you have used SimPE for some time and know how to use it quite well, as well as that you are comfortable making a new mesh/texture for you object (if you want a new object).

For this you will need SimPE, which I assume you already have, Milkshape (Trial version or registered version, just as long as you can save/export - http://chumbalum.swissquake.ch/ ) You also need to download and install the AniMesh plug-ins for Milkshape found at http://www.modthesims2.com/showthread.php?t=239060 (Extract them into your default Milkshape folder). You will need base files for making the pose found at http://www.modthesims2.com/showthread.php?t=239172 .

Step 1. Clone a base object The first thing to do is clone whatever you want to use as a base. For my purpose I’m just going to clone a statue (Apple of the Eye) since I don’t need it for anything else than to make my sims do an animation. If you have something different in mind for you object, you can clone just about anything; however later along it can become pretty complicated. Use standard cloning options, but also check the "Pull Animations” box.

-

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 2

Making a custom Pose Step 2. Find the right file To start with, open one of the animation base files (see list at start of tutorial for download link) for the age group you want to make your animation for. Toddlers, Children, and Adults are the only options of base files you have. The Male vs. Female adult file doesn’t matter, as both have the same skeleton. Adult also translates into YA and Elder, and in the game, the adult gets shrunken automatically to form the teen skeleton. Your animation is for = Which file to use Adult Female = either FAanimbase or MAanimbase Adult Male = either FAanimbase or MAanimbase Elder Male/Female = either FAanimbase or MAanimbase Teen Male/Female = either FAanimbase or Maanimbase Child Male/Female = CHILDanimbase Toddler Male/Female = TODLRanimbase Step 3. Make the Pose When the file opens in Milkshape, the first thing you will want to do is activate ”Anim” mode, which will let you manipulate the sim and its pose.

-

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 3

Click the “Select” tool, and then to the bottom right of the tools panel click the “Joint” button. This will allow you to select the joint you want to move. Select the first joint you want to move, for me it is the head, by dragging the selection box around the base (the round part of the bottom of the joint). The base should turn red, and everything else after that join should be green.

Select the “rotate” tool (note that The Sims 2 uses a specific rotation/translation bone system, only certain bones being rotated will get imported into the game, and only certain bones getting translated will get imported into the game.) The majority of a sim’s skeleton only support rotation, while the “auskel” join (the one going between the sim’s legs down to the ground) supports being translated (Translated = Moved).

For my pose, I'm going to start with her head. By selecting the “neck” joint, I can get a pretty good angle that matches what I have in mind for the end result.

-

Repeat this process for each of the joints you want to move, until you have your sim standing in the final pose you want. This is almost the hardest part of it all, and it can really take some practice to getting used to the way joints rotate.

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 4

If at any point you try to rotate a joint and isntead of turning, it “grows” and distorts into some horrible mutation for your poor sim, try switching between “Global” and “Local” modes. I’ve found this problem mainly occurs with parts of the hands.

If you want your sim in a sitting pose, or similar, remember using “Move” will only work on “auskel”. If for some reason you decide to move a sim’s hand to stretch out an arm, for example, in the game it will not work out the way you wanted.

I’ve gone through here and rotated the head, arms, fingers, legs, feet, and hands. After rotating the legs I’ve also had to move “auskel” down a little to get the body back onto the ground. With the select tool, drag a box around the entire skeleton, and go to Animate > Set Keyframe (or press Ctrl+K). The entire skeleton should turn yellow and red.

-

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 5

Now, make positively sure that you have set a key frame for this pose, and exit Anim mode by clicking the Anim button in the bottom right again. Your sim should go back to the T pose. To check you can press Anim again, and your sim should go back to the pose you made. Now in order to save your file, you have to leave Anim mode yet again. Do a standard File > Save As (NOT “Save”) to save it as a new file, so that you have the template to use again later.

-

Step 4. Exporting the pose Here is my final pose, a sim standing with her hands out in a defensive position. At this point, it’s ready to export. If you find anything you need to change, remember to set a key frame BEFORE leaving Anim mode. Once you have it ready for export, go to File > Export > Sims2 AniMesh ANIM Export. (You will probably have to scroll down the list to find it). A box should come up asking for a file save, give it a name you can recognize and save it somewhere easy for you to find later. Mine is named “DefencePoseCast” and saved to Desktop.

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 6

Another box will pop up, like the one below. Make changes as needed so that it matches the settings I have:

-

The length is how long the animation will last, in milliseconds. (1000ms = 1 second). I don’t need it very long since it’s just a pose for a screenshot, so I think 3 seconds will be long enough. Change ANIM Type to Body Animation, since that’s technically what it is, and change Locomotion type to “pose” since the sim is just posing, and not actually moving. Blend Name and Add Events can be left blank. Once you have everything set, click Export.

Step 5. Setting up the package Now it’s time to add the animation to our file, and set up a pie menu that will make the sim do the action. Open your cloned object from earlier, and first off, give it a new GUID. (I assume you know how to do this by now since you’ve gotten as far as custom animations) Once you have a new GUID, save the file. If you’ve made a custom mesh/texture, you can go ahead and import them into the GMDC and TXTR resources accordingly.

Step 6. Importing the pose In the “Resource List” window, click the button that has a blue folder with a yellow file in it.

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 7

An open file dialog will come up. Change the “Files of Type” to “Extracted File”, the 3rd option on the list. Find the file you exported and click Open. It should be added to your package as “---User Defined---(---)”. Select it in the Resource Tree, and then in the Resource List, and along the bottom tabs, switch the “Resource”. Next to the “Type” box, click the drop down menu and find “Animation Resource”. Select it and click “force Commit”. ---User Defined(---) should now switch to the name you exported it as, and it should be added to the “Animation Resource” list. Go into the Animation Resource list and choose your new file, and along the bottom switch tabs back to Plug In. Towards the top right of the Plug In view, click the text link for “fix TGI”. Commit your changes to the file and save. Now go to Tools > Object Tools > Fix Integrity. Don’t change anything, just click okay. This should make the “group” match the other animations in the file. In the filename of your new resource, copy everything except the “_anim”. Scroll through the resource tree and find Text Lists, and select “a2o”. It should be instance number 0x00000081. On the left side of the Plug In view, click the “Add” button. In the string box along the top, paste in the name you copied earlier. Commit and save.

-

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 8

Step 7. Importing the Semi Globals Now go to the Global Data and look at the Semi Global file, and remember what the name is. For me its “PaintingGlobals” since I'm using a deco object. Go to Tools > Object Tools > Import SemiGlobals. In the drop down box, scroll through and find the name of the current Globals that we just looked up. Select it and click scan. A long list of resources should appear, at the bottom click “uncheck all”. Scroll down the list and manually check “Pie Menu Strings” and “Pie Menu Functions”.

Click Import. When asked if you want to save changes to the file, click yes.

Browse through the Resource Tree, and Select the Pie Menu Strings resource. Choose the Resource tab along the bottom of the SimPE window. In the “Group” box, type in 0xFFFFFFFFF, followed by “force commit” Under the Pie Menu Functions, you should have two files listed. One named “[Pie Menu Functions]” and one named “untitled tree table”. If you look at the “untitled tree table” you will see that it has a group number already. That’s how we know this is the one we imported. Select it, and while still in the Resource tab, change it’s group to 0xFFFFFFFF as well. Force Commit and save.

-

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 9

Step 8. Instructing the game to animate Now we need to add our BHAVs that instruct the game to make the sim do our pose. In the resource tree find the BHAVs, and in the Resource List choose the “init” file. Right click on it and choose clone. A duplicate of it should be created and will appear in italics. Select your new “init” and rename it. I'm renaming mine to “Interaction – Defense Pose”. Tick the “Special Options” button in your BHAV window and then click “delete to end” to clear it out.

Next to the “opCode” box, click the small button with a black arrow. The PSJE Resource Chooser should pop up. Along the top of the window, switch to “primitives” and find “Animate Sim”. Click Okay. The opcode should now be 0x006A. Down a little, towards the right of the operands box, click the button with the hammer and wrench to get the Pop Up Wizard.

-

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 10

Make the window match the settings I have shown below.

-

Change “IK Object” to “Stack Object ID”. Leave the box next to it alone, it should save 0x0000. Below that, click the drop down button and choose “Adult Anims”. (Or whichever age group fits your animation). Uncheck ALL boxes at the bottom of the window. “Animation String” should become available. Click the double arrow and choose the entry to your custom animation. Change event tree scope to “Private” and change “Priority” to “medium”. Once you have everything set, click okay. Your BHAV entry should now say something like “[prim 0x006A] Animate Sim (animation: "DefenceCastPose" [AdultAnims:0x06 (Private)]”. Find the fourth operand box (Directly under the “True Target” drop down box) and type in 20, the default animation speed. Set True Target and False Target to return true and return false respectively.

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 11

With your BHAV still selected, switch to the Resource tab at the bottom and change “instance” to the next highest number than all the other BHAVs. For my file that will take 0x00001002 to 0x00001004. Force commit, go back to Plug In view and do a regular Commit, and save.

Finished action BHAV.

Now have to make a “guardian” BHAV to check the sims age. If the sim isn’t the correct age, it will hide the pie menu option. Right click on your new BHAV and clone it. Rename it to have “ – TEST” at the end of the name. Click the small arrow next to the Opcode box, and this time look under the “Global” tab for “Age – Am I adult?” (or whatever age your animation is for) and click Okay. Change both True Target and False Target to “return true”. Commit. Go to the resource tab along the bottom of the screen and change the Group number to the next highest number again, which will now be 0x00001005 for me. Force Commit and save. Go to Tools > Object Tools > Fix Integrity. Don’t change anything, just click okay.

-

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 12

Step 9. Making the pie menu options In the Pie Menu Strings, Click the add button on the left, and select it. In the “string” box go ahead and name it whatever you want the interaction to be called in the game. Mine will be named “Defensive Cast Pose”. Commit and save.

In the resource tree, go to Pie Menu Functions and choose “untitled tree table”. For a deco sculpture like I'm using, there should be one option, “View”. Click “Add” above that and it should duplicate the entry. In “Pie String ID”, click the drop down arrow and choose the Pie Menu String you just entered. Below that, in the Action BHAV, click the black arrow and the resource chooser should pop up again. Choose the “This Package” tab and find the main BHAV that you made earlier. Mine is “Interaction – Defense Pose”. Click okay. This instructs the game to run this BHAV when the action is chosen. For the Guardian BHAV, click the black arrow and under “This Package” choose the “ - TEST” BHAV we made. This checks to see if the sims age is compatible with the skeleton, if it’s not, it will hide the pie menu option. Under “flags”, uncheck everything except for “Adults”, “Elders”, and “Teens” since they all use the same skeleton. If you made your pose for a different age, you may have to check different ages instead.

That’s it, we’re done! Save your file into your Downloads folder and go test it!

(Special effect is a separate object, not part of the animation)

-

Sim poses and Animations

By Sim_man123, 28 April 2008

Page - 13

-

Adding additional poses to the file If you want to go back and add more poses to the file, simply go back to step one and follow the tutorial through again. However, you can skip Step 7 – Importing Semi Globals, because we already have them imported. Everything else will have to be done again though, including adding new BHAVs and setting up the pie menu. Try it a few times, it’s not too difficult ☺

Troubleshooting If for some reason your pose doesn’t work, there can be a few reasons why. If there is a problem with the pose itself, you most likely made an error while making the pose. (Like trying to move a rotation only bone, or vice-versa). If the pie menu option just doesn’t show up, you might have skipped that step to add it in. If the option doesn’t show up and your sim resets whenever you click/hover over your cloned item, there is probably an issue in the BHAV. (Setting the wrong true/false targets, for example.) If your whole game crashes, it might be the lack of “Fix Integrity” after adding/cloning parts of the file. I hope this wasn’t too difficult and you were able to follow it without much trouble ☺ If there is something you didn’t understand, or want explained better, feel free to contact me and I will try to help!