PDA

View Full Version : Tutorial: Creating a New Pet Using the Womrat Object


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

CrowsMan
4th May 2007, 4:52 AM
Thank you very much for this Klinny, this will be very helpful. :)

wiccadwitch
5th May 2007, 5:10 AM
If anyone sees this tonight I could use some help. I am trying to create a new pet but using the bird object and i cant find the bird itself. I found the cage easily enough but cant seem to find the bird. So if anyone knows where it is I would love it if you could tell me. Thanks! and thanks bunches to Kilinney for this tutorial it is really easy to follow!

okay I have another question this time I am wondering how one uses an already existing mesh instead of making one of. I am no mesher at all and so I plan on using already made meshes for my pet but cant figure out how to get the new mesh to show up after importing it . I am sure I am doing something really wrong...
I followed the directions all the way up to deleting the womrat. After doing that rather than make a mesh I tried importing one. However it didnt show up when I did that so I have to assume I did something wrong. I mean I kept the same file open just imported a new mesh into it....I dont know. If anyone can help I would appreciate it. Thanks!

IgnorantBliss
5th May 2007, 6:42 AM
The bird can be found under the Unknown category in Object Workshop. It has the same name as the cage.

wiccadwitch
5th May 2007, 6:45 AM
Ahhhh thank you for that!!

Tanasoo
17th May 2007, 7:48 PM
Thanks, I wanted to know how to do this for a while, but I was too lazy to figure it out! Is it possible to use the SMD format instead of importing the OBJ into MS3D and assigning the bone weights? I use 3Dx max, and don't own Milkshape...

Klinny
19th May 2007, 2:34 PM
I'm really not sure, Tanasoo. I don't use 3D Studio Max so I'm unsure of it's workings. There are probably other methods to do it.. but I just don't know what they are. You might want to try to find a tutorial on 3D Studio Max and object animation and see how others have done it.

Sorry I can't be more help to you!

Tanasoo
19th May 2007, 7:04 PM
It's fine, I'll just have to experiment a little, thanks for the reply :)

I'm thinking of writing a MS3D ASCII exporter for 3ds max, does anyone know where I can get some info on the innards of sed file type? I'm looking for a sdk or explanation of the Text based file, not the native MS3D file.

thane crous
12th Jul 2007, 2:18 PM
I just want to make some pets because i like pets i have got 3 dog Tricky,Misty and bonnie i have got 2 cats 10 birds 25 mice and some fish my gran has got a small farm with cows and i help them milk the cows and pigs chickens. I love animals i go away to a park that leeds in to another city 6 times a year and it is 1562 km. THANKS KURT HEAR.

makala896
12th Jul 2007, 9:11 PM
Amazing ^_^ clear explonation thanks again

makala896
12th Jul 2007, 10:45 PM
i use Wings 3d how do i delete the warmrat thingy on that ._. it wont let me do the joints

Klinny
12th Jul 2007, 11:19 PM
I've never used Wings 3D myself so I can't say how to go about deleting anything on it. However, I don't believe it has the capability of working with joints, so unfortunately I do not know if it is possible to create a new pet using Wings.

makala896
13th Jul 2007, 3:36 PM
hmm how do you download maya i keep trying to and it keeps coming up with different things ._. how do you delete the Warmrat on maya ._.

Klinny
13th Jul 2007, 11:51 PM
Well, you can't actually download Maya, (unless you're purchasing it from an online store, or downloading the Personal Learning Edition from their website, which I don't believe will allow you to export usable files). Regardless, it is not a free program; even buying an older version from an online store can be pretty pricey. It also cannot handle joints, at least not in a way that is usable to the Sims.

Milkshape 3D has a free trial which will last for 30 days, and after the trial runs out you will have to pay for it. This is also the only program I'm aware of that will import/export the joints properly.

PegasusDiana
15th Jul 2007, 3:57 AM
Thank you for the tutorial. I'll give it a try. I have a couple idea's for little critter's I'd like to see added to the game ;) Hopefully I'll be able to do it. I have your link saved so if I blow everything up I know where to come. lol

Oh and PS I tried to click on thanks and it keeps going to this user has not registered and has no profile to view. So I'll just give you an extra thank you here.

porkypine
1st May 2008, 5:18 AM
THANKYOU! I've been looking for instructions on how to extract the bird and I finally stumbled over this womrat tutorial.. It gives me the info I needed to clone the bird! THANKS!

Syddie
29th May 2008, 3:20 AM
I tried to follow and everything went swimmingly until I got to the GMDC. For some reason I am unable to locate this at all. Can you please help me with this? I don't know where to find it to make my mesh.

writerchick
7th Mar 2009, 8:07 AM
I was wondering how you can mesh dogs and cats. Specifically, when we adopted our dachshund and I wanted to make a sim version of her, I quickly realized EA didn't bother to do any kind of short-legged, long-bodied dog. So I started looking for dachshunds online, and found some rather sad, weird looking monstrosities. I looked over your tutorial and started following it. (I'm a newbie when it comes to CC creation, having just mastered recoloring/retexturing clothes, as well as playing with the alpha files; so my problem might simply be this tute is way over my head...)

But once I started, it seemed apparent that SimPE is basically to create objects, and I'm not sure dogs and cats fall into this category. As it is, I couldn't even find the GUID for any pet in the Object Workshop area...

So is there a way to mesh dogs and cats, or are we out of luck? Could you mesh a dog using your tute and the womrat? It obviously wouldn't show up in the Create-a-Pet area, but would that work? Or would that be impossible, since any other non-dog, non-cat pet has to have a custom cage that your sim buys...?

Sorry if this seems like a really stupid, newbie series of questions I'm raising, and thanks in advance for any response.