Upgrading Counter-Strike models for CS 1.6 or CZ
Revision: 9-10-08

I recently acquired Counter-Strike: Condition Zero and was, as most veteran CS were, appalled by the models that were used--the same tired ones from the original CS with a skin tone like a sun-burned asian covered with cheese. So, naturally, being the seasoned PC gamer that I am, I copied my models that I'd downloaded for the mod version of CS 1.5 to the cstrike\models\players folder in Condition Zero. I started playing a match with bots and quickly noticed an oddity continued to occur with my CS 1.5 models; they weren't dying--at least not in the typical sense where you would expect them to be dead when you apply a bullet to their skull. Instead, they floated around in the dummy pose such as in the screenshot to the right. As you can imagine, this is extremely annoying and can affect your game when you can't determine if a player is dead or not. I'm Snake, though...and I find solutions. If you also have this problem with older custom models in new versions of HL mods (particularly CS), I'll detail how to fix them in the following guide.



Getting Started...

First, you will need a few things. One being that you do need some skill and knowledge with the computer and Half-life for some of the steps. Modeling by nature is a complex practice, even if we're only cutting the surface of it by upgrading its structure. Of course, you will also need some programs to assist you, as this guide won't help you without them. Go ahead and download/install these programs and continue reading when you're ready:

So things don't get complicated, we need to set up a directory structure in which to convert the models we plan to upgrade. If we don't do this, things will definitely get screwed up as we convert more models. You'll see why momentarily. Your directory structure should look like this with each model in its own folder and all the model folders in an upper-level folder.



Now fire up Milkshape. You'll have 30 days to use it without buying, but that should be enough time to upgrade all your favorite models. You'll see the standard views for editing in 3D and the like, but for right now, we just need to decompile the old model. Go to the Tools menu and down to Kratisto's HL MDL Decompiler. If you don't have that, you could try the built-in decompiler.



Locate your model and uncheck "Sequence SMDs". This will extract all the model specific parts, geometry and textures, but not the skeletal animations. You should see some bitmap, qc, and smd files in the folder where your model is.



We'll need a base model from CZ (or CS 1.6) in which to steal the skeletal animations (sequences) from. So, head to your cstrike\models\player folder and grab one. Create a new folder with your other models to be decompiled and paste the model from CZ there. Go back to Milkshape to decompile the CZ model like before but this time check only "QC Script" and "Sequence SMDs". It'll chug away for a moment creating the many sequences and then you should have several hundred smd files and a qc file in with your CZ model.

Now you will have a choice to make. Depending on the amount of time you want to spend, we can upgrade the skeletal animations for our old model in two ways. One is using my tool to compare the CZ and old CS model skeletons and change the skeletal animations according to their differences. The other way is using Milkshape to map the new CZ skeleton to the old CS model which will use the new (superior) skeletal animations. The first method could take roughly five minutes; the second will definitely take more than an hour.

"Time to choose."


Short Method...

"Wisely done, Mr. Freeman. I will see you up ahead."

We'll start by loading my tool, CSCZMDLconv.exe. It's rather straight forward, but I'll still walk you through the steps. You'll notice that the only button enabled is the "Grab Old Bones" one, so go ahead and click that. Go to the folder with your new CZ model and select one of the smd files; it doesn't matter which one, they all have the same bones. Some bones will appear in the list at the bottom of the app. "Grab New Bones" is now available, so click that. This time, find the reference smd file of the model in which you're upgrading. Because I'm upgrading the Nina Guns model, I choose the ninaguns.smd file. You should see something similar to the next screenshot. It's okay if the number of the bones don't match up between the old and new skeletons. If they did match up, then your model should already be compatible with CZ.



At this point, we load the sequence SMDs we want to convert from the CZ model. My app is supposed to handle multiple file selections and conversion, so go ahead and select all the smd files in the folder with the CZ model. It'll show how many files will be converted--should be over 600. The app will also make a guess to where the converted files will go, but you'll probably want to change that path to where your old CS model is (don't forget the ending slash). Go ahead and click convert now. The conversion process will take a minute or so depending on your CPU speed. When the progress indicator displays "Done", you can close the app and continue.

Now we need to edit the QC file. This task is simple enough, just some copying and pasting. Open the new CZ model folder and then open the QC file there with notepad. Select everything starting with "// 111 animation sequence(s)" down to the end of the file and copy it. Close the QC file. Open the old CS model folder and then its QC file in notepad. Select the same stuff as before and paste over it. Save the QC file. We're done with the QC editing.



Time to compile the model back together. Copy studiomdl.exe to your CS model's folder. Open a command prompt (run "cmd") and change the directory to where you just copied studiomdl if necessary (using the "cd" command). Then, type "studiomdl arctic.qc" or the name of your model's QC file. You could alternatively use a batch file or drag the QC file to studiomdl.exe. As long as there aren't any errors compiling, you should have a CZ or CS 1.6 compatible mdl file now. I'd recommend downloading HL Model Viewer from the same site as Milkshape to make sure the model looks and moves correctly.



Now, some playtesting. Don't forget to copy your upgraded mdl file to the appropriate folder in cstrike\models\player.



A few notes about using this method: If you're feeling a little more savvy, you can just convert the shield or necessary missing sequences and make the additions to the QC file. There are two reasons that I can think of that you might want to try this. One being that, although I personally have been pleased with the conversion results, I would think that the model's original author did a more precise job of mapping the old skeleton to the model and would not account for the differences in the new skeleton. Also, the model may have originally had some animation modifications that you would lose when converting from a standard model's animations. Although, if you're just looking for a quick way to fix the death animation of your model and not worry about accuracy, then this method should suit you just fine.



Long Method...

"Well, it looks like we won't be working together. No regrets, Mr. Freeman."

In this method, we'll be doing roughly the same thing as in the other method, but instead of adapting the new model sequences to our old model, we'll be updating the old model to take advantage of the new skeleton. We'll be editing in 3D in Milkshape, and although it's only selecting vertexes and rotating the view around, if you think that'll be too much, then the other method should suit. There's little to gain from updating the skeleton of your old model: You'll be able to see their fingers move when arming the bomb, and they'll be a bit more realistic moving and limber when dying.

Start by copying all the smd files from the base CZ model to the old CS model's folder, overwriting any sequences that are already there. Start up Milkshape. We're gonna need the geometry from the old model in order to assign the new skeleton's bones to the vertexes, so go to the File menu and Import>Half-life SMD. Select your old model's reference smd. In my case, it's ninaguns.smd. In the next box, unselect "Skeleton" and "Rename Bones" and click OK. You should see the model standing with arms spread in three wireframe angles and in 3D.



Now we import the new skeleton. Decompile the new CZ model again, selecting only "Reference SMDs". Go to File>Import>Half-life SMD and select the reference smd we just decompiled. In the box, only select "Skeleton". You should now see your model and the blue skeleton inside of it.



Let's practice moving around in the views. You do this primarily with the mouse. You zoom with the mouse wheel and move the view by holding the middle mouse button and dragging. In the 3D view, you can also click to rotate the view around the axis. Locate a specific detail on the model and practice zooming in on that detail and looking at it from different angles. You can turn the skeleton off in the "Joints" tab on the right.



While you're in the joints tab, let's play with the bones a little. When you select one of the bone joints in the list and the skeleton is turned on, you'll see that joint in red and all the bones attached to it in green. If you click "SelAssigned", you'll obviously notice that none of the vertexes are assigned to any of the bone joints. Our task is to fix this. Now I could tell you specifically which vertexes to assign to which bone joints, but that would take me hours and I would fall asleep somewhere around Left Finger11, anyways. There's a better way, though. Open another instance of Milkshape. Import the base CZ model again in this new instance, but this time select both "Triangles" and "Skeleton". Go to the joints tab and select a joint and then click "SelAssigned". You should see some vertexes turn red in the views. You probably see what I'm getting at now. We're going to use the CZ model as our guide when assigning vertexes.



Now we learn about selecting vertexes. Go to the model tab and click select. Make sure vertex is selected at the bottom. You can select vertexes either manually or by dragging a box around several vertexes. Drag a box around a part of the model in the front view. Then, deselect the option to "Ignore Backfaces" and select that same area. You'll notice that the vertexes on the back half of the model are now selected. Sometimes having this option on can be useful, but usually, I leave it off. If you want to add vertexes to currently selected ones, just hold shift. If you use the right-mouse button, you can deselect vertexes. To select in the 3D view, first switch it to wireframe by right-clicking in the view. Then, hold alt while selecting as you do in the other views.

I'll start off with the first bone joint, but then you're on your own for the other 50. First, we take a look at the CZ model. Bip01 as you notice, has no vertexes assigned to it, so go on to the Pelvis. Take a look in all the different views and try to get an idea of where on the body these vertexes are. With Pelvis, it looks like this dude's cock, balls, and around to the butt crack. Now I go back to better territory on Nina. With backface selection on and Pelvis selected, I drag a box around her goody region. Then, I rotate around in 3D to make sure I'm pleased with the selection. I noticed that more than her tight butt crack was selected, so I determine which view would best suit to remove the excess vertexes. I choose the 3D view and execute the removal by manually right-clicking the bad vertexes (hold alt and shift to keep your other selected vertexes). Then I click assign to finalize the selection.



The next few joints are fairly easy. As you continue selecting and assigning, don't forget to make use of the "SelUnassigned" button. Clicking this will tell you which vertexes on the entire model are not assigned and help determine where to extend your coverage between the vertexes for different joints. If you didn't realize already, you'll need to assign every vertex on the model to a joint. Keep going down the list in order until the end. Skipping around will just complicate things and you may forget which joints you skipped over. The arms are probably the most complex to assign vertexes on. The side view can't be use to select, so make use of the top-down view. Try to notice where the vertexes are located in relation to their assigned joint on the CZ model. The legs are much easier in the side view. Select in that view then deselect the leg you don't want in the front view. Don't forget to save the model as a ms3d file often in case you goof or lock or something. Happy assigning.

When not one vertex is left unassigned, save and import a sequence SMD file (I like to use run.smd) based on the new CZ skeleton. Click "Anim" and play to see if the model moves naturally. Assuming you took your time and didn't move the skeleton accidentally, it should be fine. Go to File>Export>Half-life SMD and select the old model's Reference SMD; in my case, ninaguns.smd. Now we need to edit the QC file. This task is simple enough, just some copying and pasting. Open the new CZ model folder and then open the QC file there with notepad. Select everything starting with "// 2 attachment(s)" down to the end of the file and copy it. Close the QC file. Open the old CS model folder and then its QC file in notepad. Select the same stuff as before and paste over it. Save the QC file. We're done with the QC editing.



Time to compile the model back together. Copy studiomdl.exe to your CS model's folder. Open a command prompt and change the directory to where you just copied studiomdl if necessary. Then, type "studiomdl arctic.qc" or the name of your model's QC file. You could alternatively use a batch file or drag the QC file to studiomdl.exe. As long as there aren't any error compiling, you should have a CZ or CS 1.6 compatible mdl file now. I'd recommend downloading HL Model Viewer from the same site as Milkshape to make sure the model looks and moves correctly.



Now, some playtesting. Don't forget to copy your upgraded mdl file to the appropriate folder in cstrike\models\player.



Final Notes...

If you made it this far down the page, you've either finished the upgrade successfully or had an error and couldn't continue. If you're happy with the results, send your praise to slserpent on AIM or continue looking around this site as it has some int tidbits that you, as a fellow gamer, may enjoy.

For the ones that have errors, I may also be able to help you if you kindly contact me on AIM. You can also Email me, if you prefer. You may also try searching around on Google as that's how I came up with enough answers to write this guide. Your problem may have been caused by a confusion when reading my guide. So to clarify things, when I talk about a CZ model, I mean a model that either came from Condition Zero or CS 1.6 (but I don't have it, so I don't know--if you're tried it and it works, lemme know). When I talk about a old model or a CS model, I mean the model you're trying to upgrade that doesn't work well in CZ or CS 1.6. Maybe if you start over from scratch and make sure you know which model I'm talking about, the upgrade will work correctly.

If you had any errors when running my program, CSCZMDLconv.exe, you either didn't use it correctly, you don't have the required VB files, or your model is abnormal. In the first case, follow my instructions more closely. If the app returns an error when you first run it, you need MSCOMCTL.OCX and the VB6 runtime files. You can do a search for these on Google or filesearching.com. The app was designed with version 6.00.8862 of MSCOMCTL.OCX, but any version 6 or over should work fine. In the last case, if you think you have a rare model structure or error with my app, contact me on AIM.

If Milkshape gives you an error, look it up in the chumbalumsoft forums. Remember not to use Milkshape to compile the model, as it doesn't work with the new CZ models. I've also read about another issue with the models appearing to run backwards funny, but I can't clarify as I've never noticed it. If you do see this occurance, the solution is said to be decompiling the upgraded model, then compiling it right back. May be a problem with the compiler/decompiler?

One last thing: If you look at your model in HLMV after compiling, and the legs are up inside the body or it looks like a primitive lifeform, you probably selected the wrong reference smd when loading the bones in my converter. Yes, I did this once, too, so don't feel bad. It does look rather funny, though...like Frankenstein's frog monster got runover.