Using CMX and SKN files for our own meshes
Now we know how to create a mesh, and we know what BMP files, SKN files and CMX files are, we are ready to use them. If you have created a bodymesh of your own, here is your first problem: You have to name your file.
As we have seen meshes (or SKN files) are normally named something like xskin-B001fafit_01-PELVIS-BODY.skn. To make this mesh unique we must think of a unique filename. Of course we can change the "01" part to something like xskin-B001fafit_MyMesh-PELVIS-BODY.skn. That will make it unique all right, but we have to do more than that. We have to think about a new bodynumber.
Unfortunately there is no way to check if somebody else already have used your new bodynumber. Besides, for your FaFit body, there are only 999 possible numbers. (Not exactly true but I wont get in such detail at this point). Here is what you might do to minimize the risks.
When you decided how your mesh must be named, rename the file accordingly. For instance xskin-B123fafit_MyMesh-PELVIS-BODY.skn (However, I am not aware of any 123 bodynumber, it is just intended as an example not a suggestion)
After you have renamed the file open it in NotePad.exe:
Xskin-B123fafit_MyMesh-PELVIS-BODY.skn | Make sure you fill in the exact filename in the first row and a single "x" in the second row. Save the file and close it without further editting |
Xskin-B123fafit_MyMesh-PELVIS-BODY | |
X | |
19 | |
R_LEG | |
R_LEG1 | |
R_FOOT | |
R_TOE0 | |
PELVIS | |
L_LEG |
To make our new mesh working in the game we have to create a CMX file as well. The CMX is used to make the mesh appear properly in the game. Without the CMX file we cant display any skins on it, so lets create one from scratch. Open NotePad.exe and type exactly as followed:
Untitled |
// Character File. Copyright 1997, Maxis Inc. |
Version 300 |
0 |
1 |
B123FAFit_MyMesh |
0 |
0 |
1 |
PELVIS |
xskin-B123fafit_MyMesh-PELVIS-BODY |
0 |
0 |
0 |
Notice we have assigned our new mesh to the PELVIS of the Sim? When done save your file by choosing Save from the File menu and name your file "B123FaFit_MyMesh.cmx". Include the quotes (") to prevent NotePad.exe will add .txt to your filename.
Your mesh is ready to display any Sim with skins named like B123FaFitDrk_SkinName.bmp or B123FaFitLgt_AnotherSkin.bmp for instance.
When you find this all a bit of a lot of work, you can use BodyWarp to do the work for you. However, I can advise you to do some of your own, so you will understand how it is done. In BodyWarp open your mesh and save it as xskin-B123fafit_MyMesh-PELVIS-BODY.skn. In default configuration, BodyWarp will create the CMX file automatically.
Lets go one step further, imagine we have a cool mesh of a spectacle. Maxis released one in a skinpack for instance. It is called xskin-c032ma_warn-HEAD-NERDSPECS.skn. Lets open this mesh in NotePad.exe to check what it contains:
xskin-c032ma_warn-HEAD-NERDSPECS.skn | |
xskin-c032ma_warn-HEAD-NERDSPECS | SKN filename |
Dark | BMP filename |
1 | Number of Bodyparts |
HEAD | Bodypart |
52 | Number of vertrices |
2 3 0 | 3D data |
3 1 0 | |
4 5 2 | |
5 3 2 | Etcetera |
As you can see there are some interesting differences compared to normal meshes.
Lets say we want to attach this mesh to our new mesh, only not with the Dark.bmp skin but with our MyOwnSpecs.bmp skin. First thing we are gonna do is copy the mesh xskin-c032ma_warn-HEAD-NERDSPECS.skn. [Hint: select the mesh and press <Ctrl>C and <Ctrl>V, a file named Copy of xskin-c032ma_warn-HEAD-NERDSPECS.skn will appear.]. Rename the copied file to for instance MySpecs.skn. Yes thats right, we dont have to use that complex name Maxis used, we can keep it simple if we like.
Open the file in NotePad.exe and modify its content to:
MySpecs.skn | |
MySpecs | Make sure you fill in the correct filenames for both the mesh adn the BMP file. leave out the xtentions. |
MyOwnSpecs | |
1 | |
HEAD | |
52 | |
2 3 0 | |
3 1 0 | |
4 5 2 | |
5 3 2 | Etcetera |
Save the file and close it without further editing. As a final step we have to attach this mesh to our Sim. There are two ways to do this:
Now I know this sounds like a stupid question, after all it should appear on the head, doesnt it? So it is logical to attach the spectacles to the head. Well, yes and no. No matter on what part we will attach it, it will still appear in the right place. There is a difference though, since heads and bodies are used differently in the game.
Remember when you create a Sim in the game? You can choose a head and a body for your Sim. When done and moved your Sim to lot, you will never have a chance to change your Sims head. No matter what happens the Sims head will be the same. [Too bad, with Fionns new heads you just downloaded]. In contrary to that bodies will change all the times. When having a shower, taking a dip in the pool, going to bed or going to work, the body is changing. And above of all, if you are tired of that same outfit day in day out, you can buy yourself a wardrobe and change clothes until you get RSI from clicking your mouse.
If you consider attaching the spectacles to the head you have to create a new Sim to use it. It will appear on your Sim all the time, even when going to sleep. So the spectacles will be characteristic for your Sims look. An advantage is that the size can be optimized for just one headtype. This is why Maxis used the filename xskin-c032ma_warn-HEAD-NERDSPECS.skn it is optimized for the headmesh xskin-c032ma_warn-HEAD-HEAD.skn.
If you considering attaching the spectacles to the body. You will be able to use it on your existing Sims. This way the spectacles will be characteristic for a particular outfit. Keep in mind the spectacles will disappear when you change clothes for any reason. Personally I would attach it to the body if it is not needed to have it attached to your Sim all the time. Even when this will mean the spectacles wont fit each type of head.
While you are making up your mind lets continue attaching the spectacle to the bodymesh. Open the B123FaFit_MyMesh.cmx in NotePad.exe once again. Now we modify its contents as followed:
B123FAFit_MyMesh | |
// Character File. Copyright 1997, Maxis Inc. | |
Version 300 | |
0 | |
1 | |
B123FAFit_MyMesh | Name of CMX file |
0 | |
0 | |
2 | Number of meshes attached |
PELVIS | |
Xskin-B123fafit_MyMesh-PELVIS-BODY | Name of the Bodymesh |
0 | |
0 | |
HEAD | Bodypart to attach the second mesh |
MySpecs | Name of the second mesh |
0 | |
0 | |
0 |
Ready, we have created our own mesh used for B123FaFit skins and added spectacles to it with a MyOwnSpecs.bmp texture. Place all the files including spectacles meshes and skins in your Maxis\the Sims\GameData\Skins folder and start the game.