Sven Co-op Playermodels

Introduction:

This guide is for creation of custom playermodels for Sven 5.X, I will provide the methods and the resources needed however this guide will not teach you how to 3D model or rig as that is a very broad topic. The prerequisite of this guide is the Modelling Mega thread as it will show you all the model limitations, methods of creating materials, and 3D model specific exporting:
GoldSrc Modelling Mega Tutorial Thread
For model texturing refer to this guide:
Model Texturing Resource Guide

Before you start, Playermodels have limits compared to NPC models:
-You *cannot* add new animations to the existing set or change the order of the sequences
-You cannot change the FPS of animations, they are locked
-You cannot have sequences with more frames than the originals or else they will play too fast and will cut-off
-You cannot change the hitbox set (nice try)
-You cannot have skin changes or changeable/swappable body meshes

Some features you can do:
-You can customize existing animations however *you must make them fit within the same frames as the original and be keyed to match the same FPS as the originals*
-You can add bones to the model as long as its parented off of existing and not inbetween existing bones (breaks hierarchy)
-You can have procedural mouth animations
-You can have color remapping

Your model should also at least have a decent amount of optimization, as direct source engine ports/MMD ports are horrible and inefficient for polycount and performance reasons. Please look up optimization guides and retopology if your model is heavy on polycount. You shouldn't be exceeding 9k poly.

Some optimization links: Blender (1) (2)(3)(4) 3dsmax (1)


THE METHOD:

Download the Compile-o-matic

1. Import one of the reference SMD meshes from the yourmodel folder into your 3D editor of choice.  I have two choices, basic and one with mouth bone. As mentioned before, program specific SMD importer/exporter info is in the first link. The MDL tutorial linked has info for 5 major 3D applications.

2. Delete the sphere mesh leaving only bones, then hard-weight rig your model to the skeleton. By hard-weight, I mean 100% influence per bone or 0.

3. Export to the example "yourmodel" folder, and remove the other "$bodygroup" lines and replace with your own SMD name. Change the model name $modelname lines.

4. Double click the "mymodel_compile.bat" and the model will compile.

5. First test in a model viewer. Model viewer links are in the tutorials page on my MDL guide.

6. Rename the folder to the same name as your model name.  Take a screenshot of your model then create a portrait 164X200 indexed BMP (be sure to have full pallete 256 colors, because going below 224 will activate portrait remapping which is only to be used with color remap models; see above linked on "color remapping") with same name in folder of MDL, and transfer to your players folder in the svencoop_addons dir.

7. Test in game. Some useful commands to see how you look:
thirdperson
cam_idealdist 128
cam_idealyaw 180
cam_idealpitch -30

If need to check mic-mouth animation feature use these as well:
move your mouse into position
voice_loopback 1
then push-to-talk into your mic

NOTE: If needed you can copy yourmodel folder and rename it and copy the compile bat and change the dir for different folders if you have multiple different player models.

NOTE #2: If you are needing custom animations you will have to make a copy of "anims.qc" and change your QC includemodel to point to that. Reminder that you cannot change anim order, your edits should just point the anims to your custom SMDs.


4.X to 5.X animation fixing

For old models that need updating

This requires crowbar.exe found here.

Create a copy of the "yourmodel" folder, rename it to your modelname and Decompile your pre-5.0 model with crowbar.exe into that folder (switch to "decompile tab, and navigate to that model) , check "format for stricter importers" UNCHECK "Bone animation SMD files"

*****HOWEVER Please check if your MDL has custom anims!!****** if the old playermodel does in fact has custom anims, don't uncheck "bone animation SMD files", Make a backup of the _ANIMATIONS folder and go through and find the custom ones and copy them over to the "_ANIMATIONS" subfolder and overwrite.

Open up the QC for your pre-5.0 model and copy the lines of code from the beginning of the file to the end of the $bodygroup lines and include $texrendermode if there are any. Make a duplicate of the "yourmodel.qc" file and rename it to your model.

Then open that QC and paste over the header lines for the model with the ones you copied to replace it. Change the modelname.

Switch to crowbar Compile tab and load that QC and compile with, set the output directory to the working folder of your model. When done checking the model with HLMV as before. If needed make a new portrait, or just keep the old portrait. Also if you lack a portrait the dimensions are 164X200 8bit indexed BMP that has to be the same name as your .mdl

As before when done move/copy your playermodel folder to svencoop_addons player folder.


Return to Tutorials