Klinny
2nd May 2007, 4:19 AM
I've been getting a few questions from people interested in how to go about creating new pets via the womrat object, so I decided to create this handy-dandy little tutorial. For the sake of convenience, I will be using my "Mini Piggy" as an example. Also, I will not be explaining how to edit the food box yet, but will be soon.
Please note that this tutorial will not explain how to mesh, texture or create shadows, (there are other tutorials for that), but simply the steps involved in creating your brand new pet. Also note that I am using SimPE Version 6.0; if you have a different version there will be some differences.
Required:
SimPE
Milkshape 3D
Sims 2 Pets Expansion Pack
General Understanding/Knowledge of Object Creation
Step 1: Cloning the Objects
There are 2 objects you must clone in order to create your pet: the Womrat and the Womrat Cage.
First of all, open up SimPE. We will need to make sure that objects from the Pets EP appear in your Object Workshop Catalogue, so click Extra at the top of the screen and select "Preferences". Then, scroll down and select "FileTable" from the side menu. Deselect every box at the top except for "Include Original" and "Include Pets". (This will also ensure that only the Base Game and Pets will be needed to use your object, should you choose to upload your item).
http://i81.photobucket.com/albums/j230/Klinny/tutpic1.jpg
Next, select Tools => PJSE => Refresh File Table. After doing this, restart SimPE. Open up the Object Workshop, select "Start" and wait for the catalogue to load. We will be cloning the womrat cage first, which can be found under General => Pets => FMCU 3000. Select this and click Next, and then select "Clone" from the drop-down menu. After writing your Catalogue Description, click Finish and save your file.
We are only going to do one thing with this mesh at the moment, and that's update the GUID. To do this, select Object Data in the Resource Tree, and then "Pet - Contained Pet - Mammal Cage" from the Resource List, (it will be the only option there). Click on "get GUID" and register your new GUID. Then, check the "update all MMATs" box and click the Update button.
Save your package and open up Object Workshop again. This time, we will be cloning the actual womrat itself. It can be found in the catalogue under Unknown => FMCU 3000. Select this and click Next. Clone this object like before and save your new package.
The very first thing we're going to do is update the GUID like we did with the cage object. This time though, write it down. You will need it later. (Don't forget to update and commit).
Step 2: Creating a New Mesh for your Pet
For now we will only be creating the pet; the cage will be put aside until after you've successfully created a working mesh for your new animal. Open up the GMDC, (Geometric Data Container) for this mesh. In the cGeometryDataContainer you will see one mesh named "surface". We're going to export this now.
Do NOT save this as an .obj file; the joints will not be retained if you do so. Instead, we're going to select "Milkshape 3D ASCII Exporter" from the drop-down list and save it as a .txt file instead.
http://i81.photobucket.com/albums/j230/Klinny/tutpic2.jpg
Open up Milkshape 3D and select File => Import => Milkshape 3D ASCII and open the mesh you've just exported. You should see a womrat mesh surrounded by blue lines. The blue lines are good, they mean you've successfully retained the joints.
What we're going to do now is delete the womrat. Choose "Model" at the side. Click the "Select" button, and where it says "Select Options" at the bottom, click "Group". Click on the womrat mesh and simply delete it. You may now create your new mesh. (If the blue lines are distracting or bothering you while you create, select "Joints" at the side and uncheck the "Show skeleton" box).
Tip: If you use another program other than Milkshape 3D, (for example, I use Maya), you may do that as well. You can create the mesh in Maya, (or whichever program you prefer), save the mesh as an .obj file, and import the .obj file into Milkshape 3D after you delete the womrat mesh.
After you've created your mesh, it's time to assign the joints! (The best part..) You will want to open the womrat mesh in another window as referance, by the way, to see which joints go where.
Select "Joints" at the side. You will see a long list of joints, (don't worry, we won't be assigning them all!). Select the very last joint in the list, it should be called "l_upear0". This is the "left ear" of your animal. Making sure the "l_upear0" joint is still selected, switch to "Model" and click "Select". In the Select Options, switch from Group to Vertex. Now, select all the vertices of your animal's left ear, (and nothing else!). Once you're done, switch back to "Joints" and click Assign.
http://i81.photobucket.com/albums/j230/Klinny/tutpic3.jpg
You will now have to do the same for each joint. To tell which vertices must be assigned to which joint, open up the womrat mesh in another window. Select "Joints" at the side and click any joint in the list. Then click "SelAssign". This will select all the vertices assigned to that joint for you. By selecting "head" in the womrat window, for example, all the vertices for the womrat's head will become selected and you can roughly base your own mesh on that reference. Many joints do not have vertices assigned to them, though, and if they don't then you can simply ignore them. For example, select "l_earbase_trans" in your womrat mesh and click SelAssign. You will notice that no vertices became highlighted. This means that when assigning joints to your new animal, you can skip this particular joint.
There are some things to remember when assigning these joints. First off, you do not have to assign a joint just because the womrat had the same particular joint assigned. For example, the womrat has vertices assigned to the "r_upperarm" joint, but my pig does not. This is because my pig doesn't have an upper arm, so it does not need that joint. Just be careful with what joints you choose to leave out. Second, every single vertex on your animal must be assigned to a joint. Otherwise, your animal will appear in the game with holes in it. To check if each vertex has been assigned, select "Joints" and check the "Draw vertices with bone colors" box. Each vertex that is assigned will be colored. Also, if you switch to "Smooth Shaded" in one of the views, the entire mesh will become colored.
http://i81.photobucket.com/albums/j230/Klinny/tutpic4.jpg
The mesh will have white spots on it if the vertices in that area are not assigned to a joint.
http://i81.photobucket.com/albums/j230/Klinny/tutpic5.jpg
When you're done, select File => Export => Milkshape 3D ASCII and save your file. (If you've imported your mesh as an .obj previously you will have to regroup first, via the "Groups" tab at the top).
In SimPE, open the GMDC again and make sure the cGeometryDataContainer tab is selected. Import your new mesh. You should see it being added to the list, under "surface". It may be called something like "regroup 05". Now, switch to Groups. Select "surface" and click delete. Then select your newly imported mesh and rename it to "surface". Commit and Save.
Step 3: Getting your New Pet into the Game
Now what we're going to do is get the new animal into the game. To do that, we must edit two lines of BHAV code in your cage mesh.
Open the package file of your womrat cage. Open up the BHAV, (Behavior Function). You will see a long list of behaviors in the Resource List. Scroll down until you see something names "CT - T[0] - Make Pet". Click this.
You should see two lines of code here. Click on the first one entitled "Create New Object Instance". You may notice the GUID "0xB14FF6B3" after the name. That is the GUID to the original womrat mesh. Ot basically tells the game which mesh to summon when you stock the game. We're going to edit this.
With the "Create New Object Instance" code selected, you should see a box at the right labeled Operands.
http://i81.photobucket.com/albums/j230/Klinny/tutpic6.jpg
This is what we will be editing. There are four groupings of letters/numbers that we will be changing: (B3, F6, 4F, B1). This is the information that tells the game which GUID to use. You may notice that the letters/numbers are out of order, that is because they must be written backwards, in groups of two. I'll show you what I mean:
The new GUID I registered for my piggy was: 0x00336D1C.
Take away the "0x" and you're left with: 00336D1C
Break these into groups of two like so: 00 33 6D 1C
Then re-arrange the order of the groups from last to first like this: 1C 6D 33 00
Now replace the B3 F6 4F B1 with 1C 6D 33 00, (obviously your GUID will be different). Click Commit File.
http://i81.photobucket.com/albums/j230/Klinny/tutpic7.jpg
Go back to the Resource List and find something called "CT - Verify Cage Has Pet". Click this. The second line of code will be named "Test Object Type". Select this and edit the GUID just like before. Commit File and Save.
Make sure both the cage and pet package files are located in your Downloads folder. Then start up the game. If done correctly, a new womrat cage should appear in your catalogue with a custom symbol. Buy the cage and stock it. Your new pet mesh should appear in the womrat cage, (it will have the womrat textures). If it moves and doesn't have holes in it, the joints have been successfully assigned.
Have your Sim play with the animal. If it disappears when the pet is returned to the cage, the GUIDs have not updated correctly and you must double-check them.
You may also take this time to make sure the original womrat object has not been overwritten. If all this works, you may continue to the next step.
Step 4: Creating a New Mesh for your Cage
Open up your cage mesh in SimPE and open the GMDC. There will be two options here to select. One will have only one mesh in the cGeometryDataContainer called "groundshadow". This is just the shadow and can be ignored for now. The other will have four meshes in the cGeometryDataContainer, called "surface", "glass", "accessorypetfoodboxmammal_box" and "surface". These are as following:
surface: The actual base of your cage. This is the mesh with animation.
glass: Glass parts of the cage. This can be deleted if your cage has no glass parts.
accessorypetfoodboxmammal_box: This is a womrat food box mesh that you can see on the shelf of the cage. It can be deleted. Or edited. Whichever.
surface: This is the mesh that is displayed after you feed your pet, it will appear in the food dish. You can delete this too, or you can edit it if you'd like.
You can tell the two surface meshes apart by their sizes; the base has 1304 faces and the food mesh has 4.
We will be creating this mesh exactly the same way as we did with the pet mesh; by exporting it as a .txt file and editing it in Milkshape. Since I have already explained how to do this, we're going to skip to the joint assigning...
....Okay, so after you've created your new mesh, it's time to assign the joints, (again). This one is much simpler than before. You will re-assign each joint just like you did with the animal mesh. They are pretty straightforward, but I'll list which does what anyways:
topdoor_rot - The top-part of the door. This is not the part that animates, just the area above of the actual door. For my pig-cage, I assigned the wooden bar just above the door to this.
frontdoor_rot - The actual door of your cage. This is the part that will swing open.
foodtray_rot - The food tray..
foodtray_trans - This does not need to be assigned. Ignore.
wheel_rot - The spinning wheel that your pet runs inside of.
root_rot - Every vertex that is not assigned to something else will be assigned to this. The leftovers, if you would.
containedpetmammalcage - This does not need to be assigned. Ignore.
Make sure every vertex is assigned to a joint and export. Open up SimPE again and import into the GMDC. Delete the old cage base and rename your newly imported mesh to "surface". Commit and Save.
Tip: If you've made objects before, you might be used to clicking the "Add to Bounding Mesh" option in the Groups tab. DO NOT CLICK THIS. At no point should you click this during the creation of this object. EVER. Don't click it. I can't stress this enough. No clicky. No. Just don't. It will crash your game.
Anyways, now it's time to test your object in the game. Test it profusely. If it works, you can proceed to tweak, create textures, edit shadows and add non-animation bits to the cage, (like glass parts).
Another Tip: The "glass" mesh uses the same texture as the "surface", meaning you will only have to create one texture for the both of them, (assuming you've included glass parts on your cage). So be careful with your mapping.
So yes, those are the steps in creating your very own custom pet. I'll explain how to create your own custom food box for it a little later as well. I hope you've found this helpful, and if you create something cool with this tutorial be sure to let me know!
~ Klinny
----------
Tutorials:Creating a New Pet Using the Womrat Object
Please note that this tutorial will not explain how to mesh, texture or create shadows, (there are other tutorials for that), but simply the steps involved in creating your brand new pet. Also note that I am using SimPE Version 6.0; if you have a different version there will be some differences.
Required:
SimPE
Milkshape 3D
Sims 2 Pets Expansion Pack
General Understanding/Knowledge of Object Creation
Step 1: Cloning the Objects
There are 2 objects you must clone in order to create your pet: the Womrat and the Womrat Cage.
First of all, open up SimPE. We will need to make sure that objects from the Pets EP appear in your Object Workshop Catalogue, so click Extra at the top of the screen and select "Preferences". Then, scroll down and select "FileTable" from the side menu. Deselect every box at the top except for "Include Original" and "Include Pets". (This will also ensure that only the Base Game and Pets will be needed to use your object, should you choose to upload your item).
http://i81.photobucket.com/albums/j230/Klinny/tutpic1.jpg
Next, select Tools => PJSE => Refresh File Table. After doing this, restart SimPE. Open up the Object Workshop, select "Start" and wait for the catalogue to load. We will be cloning the womrat cage first, which can be found under General => Pets => FMCU 3000. Select this and click Next, and then select "Clone" from the drop-down menu. After writing your Catalogue Description, click Finish and save your file.
We are only going to do one thing with this mesh at the moment, and that's update the GUID. To do this, select Object Data in the Resource Tree, and then "Pet - Contained Pet - Mammal Cage" from the Resource List, (it will be the only option there). Click on "get GUID" and register your new GUID. Then, check the "update all MMATs" box and click the Update button.
Save your package and open up Object Workshop again. This time, we will be cloning the actual womrat itself. It can be found in the catalogue under Unknown => FMCU 3000. Select this and click Next. Clone this object like before and save your new package.
The very first thing we're going to do is update the GUID like we did with the cage object. This time though, write it down. You will need it later. (Don't forget to update and commit).
Step 2: Creating a New Mesh for your Pet
For now we will only be creating the pet; the cage will be put aside until after you've successfully created a working mesh for your new animal. Open up the GMDC, (Geometric Data Container) for this mesh. In the cGeometryDataContainer you will see one mesh named "surface". We're going to export this now.
Do NOT save this as an .obj file; the joints will not be retained if you do so. Instead, we're going to select "Milkshape 3D ASCII Exporter" from the drop-down list and save it as a .txt file instead.
http://i81.photobucket.com/albums/j230/Klinny/tutpic2.jpg
Open up Milkshape 3D and select File => Import => Milkshape 3D ASCII and open the mesh you've just exported. You should see a womrat mesh surrounded by blue lines. The blue lines are good, they mean you've successfully retained the joints.
What we're going to do now is delete the womrat. Choose "Model" at the side. Click the "Select" button, and where it says "Select Options" at the bottom, click "Group". Click on the womrat mesh and simply delete it. You may now create your new mesh. (If the blue lines are distracting or bothering you while you create, select "Joints" at the side and uncheck the "Show skeleton" box).
Tip: If you use another program other than Milkshape 3D, (for example, I use Maya), you may do that as well. You can create the mesh in Maya, (or whichever program you prefer), save the mesh as an .obj file, and import the .obj file into Milkshape 3D after you delete the womrat mesh.
After you've created your mesh, it's time to assign the joints! (The best part..) You will want to open the womrat mesh in another window as referance, by the way, to see which joints go where.
Select "Joints" at the side. You will see a long list of joints, (don't worry, we won't be assigning them all!). Select the very last joint in the list, it should be called "l_upear0". This is the "left ear" of your animal. Making sure the "l_upear0" joint is still selected, switch to "Model" and click "Select". In the Select Options, switch from Group to Vertex. Now, select all the vertices of your animal's left ear, (and nothing else!). Once you're done, switch back to "Joints" and click Assign.
http://i81.photobucket.com/albums/j230/Klinny/tutpic3.jpg
You will now have to do the same for each joint. To tell which vertices must be assigned to which joint, open up the womrat mesh in another window. Select "Joints" at the side and click any joint in the list. Then click "SelAssign". This will select all the vertices assigned to that joint for you. By selecting "head" in the womrat window, for example, all the vertices for the womrat's head will become selected and you can roughly base your own mesh on that reference. Many joints do not have vertices assigned to them, though, and if they don't then you can simply ignore them. For example, select "l_earbase_trans" in your womrat mesh and click SelAssign. You will notice that no vertices became highlighted. This means that when assigning joints to your new animal, you can skip this particular joint.
There are some things to remember when assigning these joints. First off, you do not have to assign a joint just because the womrat had the same particular joint assigned. For example, the womrat has vertices assigned to the "r_upperarm" joint, but my pig does not. This is because my pig doesn't have an upper arm, so it does not need that joint. Just be careful with what joints you choose to leave out. Second, every single vertex on your animal must be assigned to a joint. Otherwise, your animal will appear in the game with holes in it. To check if each vertex has been assigned, select "Joints" and check the "Draw vertices with bone colors" box. Each vertex that is assigned will be colored. Also, if you switch to "Smooth Shaded" in one of the views, the entire mesh will become colored.
http://i81.photobucket.com/albums/j230/Klinny/tutpic4.jpg
The mesh will have white spots on it if the vertices in that area are not assigned to a joint.
http://i81.photobucket.com/albums/j230/Klinny/tutpic5.jpg
When you're done, select File => Export => Milkshape 3D ASCII and save your file. (If you've imported your mesh as an .obj previously you will have to regroup first, via the "Groups" tab at the top).
In SimPE, open the GMDC again and make sure the cGeometryDataContainer tab is selected. Import your new mesh. You should see it being added to the list, under "surface". It may be called something like "regroup 05". Now, switch to Groups. Select "surface" and click delete. Then select your newly imported mesh and rename it to "surface". Commit and Save.
Step 3: Getting your New Pet into the Game
Now what we're going to do is get the new animal into the game. To do that, we must edit two lines of BHAV code in your cage mesh.
Open the package file of your womrat cage. Open up the BHAV, (Behavior Function). You will see a long list of behaviors in the Resource List. Scroll down until you see something names "CT - T[0] - Make Pet". Click this.
You should see two lines of code here. Click on the first one entitled "Create New Object Instance". You may notice the GUID "0xB14FF6B3" after the name. That is the GUID to the original womrat mesh. Ot basically tells the game which mesh to summon when you stock the game. We're going to edit this.
With the "Create New Object Instance" code selected, you should see a box at the right labeled Operands.
http://i81.photobucket.com/albums/j230/Klinny/tutpic6.jpg
This is what we will be editing. There are four groupings of letters/numbers that we will be changing: (B3, F6, 4F, B1). This is the information that tells the game which GUID to use. You may notice that the letters/numbers are out of order, that is because they must be written backwards, in groups of two. I'll show you what I mean:
The new GUID I registered for my piggy was: 0x00336D1C.
Take away the "0x" and you're left with: 00336D1C
Break these into groups of two like so: 00 33 6D 1C
Then re-arrange the order of the groups from last to first like this: 1C 6D 33 00
Now replace the B3 F6 4F B1 with 1C 6D 33 00, (obviously your GUID will be different). Click Commit File.
http://i81.photobucket.com/albums/j230/Klinny/tutpic7.jpg
Go back to the Resource List and find something called "CT - Verify Cage Has Pet". Click this. The second line of code will be named "Test Object Type". Select this and edit the GUID just like before. Commit File and Save.
Make sure both the cage and pet package files are located in your Downloads folder. Then start up the game. If done correctly, a new womrat cage should appear in your catalogue with a custom symbol. Buy the cage and stock it. Your new pet mesh should appear in the womrat cage, (it will have the womrat textures). If it moves and doesn't have holes in it, the joints have been successfully assigned.
Have your Sim play with the animal. If it disappears when the pet is returned to the cage, the GUIDs have not updated correctly and you must double-check them.
You may also take this time to make sure the original womrat object has not been overwritten. If all this works, you may continue to the next step.
Step 4: Creating a New Mesh for your Cage
Open up your cage mesh in SimPE and open the GMDC. There will be two options here to select. One will have only one mesh in the cGeometryDataContainer called "groundshadow". This is just the shadow and can be ignored for now. The other will have four meshes in the cGeometryDataContainer, called "surface", "glass", "accessorypetfoodboxmammal_box" and "surface". These are as following:
surface: The actual base of your cage. This is the mesh with animation.
glass: Glass parts of the cage. This can be deleted if your cage has no glass parts.
accessorypetfoodboxmammal_box: This is a womrat food box mesh that you can see on the shelf of the cage. It can be deleted. Or edited. Whichever.
surface: This is the mesh that is displayed after you feed your pet, it will appear in the food dish. You can delete this too, or you can edit it if you'd like.
You can tell the two surface meshes apart by their sizes; the base has 1304 faces and the food mesh has 4.
We will be creating this mesh exactly the same way as we did with the pet mesh; by exporting it as a .txt file and editing it in Milkshape. Since I have already explained how to do this, we're going to skip to the joint assigning...
....Okay, so after you've created your new mesh, it's time to assign the joints, (again). This one is much simpler than before. You will re-assign each joint just like you did with the animal mesh. They are pretty straightforward, but I'll list which does what anyways:
topdoor_rot - The top-part of the door. This is not the part that animates, just the area above of the actual door. For my pig-cage, I assigned the wooden bar just above the door to this.
frontdoor_rot - The actual door of your cage. This is the part that will swing open.
foodtray_rot - The food tray..
foodtray_trans - This does not need to be assigned. Ignore.
wheel_rot - The spinning wheel that your pet runs inside of.
root_rot - Every vertex that is not assigned to something else will be assigned to this. The leftovers, if you would.
containedpetmammalcage - This does not need to be assigned. Ignore.
Make sure every vertex is assigned to a joint and export. Open up SimPE again and import into the GMDC. Delete the old cage base and rename your newly imported mesh to "surface". Commit and Save.
Tip: If you've made objects before, you might be used to clicking the "Add to Bounding Mesh" option in the Groups tab. DO NOT CLICK THIS. At no point should you click this during the creation of this object. EVER. Don't click it. I can't stress this enough. No clicky. No. Just don't. It will crash your game.
Anyways, now it's time to test your object in the game. Test it profusely. If it works, you can proceed to tweak, create textures, edit shadows and add non-animation bits to the cage, (like glass parts).
Another Tip: The "glass" mesh uses the same texture as the "surface", meaning you will only have to create one texture for the both of them, (assuming you've included glass parts on your cage). So be careful with your mapping.
So yes, those are the steps in creating your very own custom pet. I'll explain how to create your own custom food box for it a little later as well. I hope you've found this helpful, and if you create something cool with this tutorial be sure to let me know!
~ Klinny
----------
Tutorials:Creating a New Pet Using the Womrat Object