[img]http://repo4dead.raptorred.com/tutorial/title.gif[/img] [size=150][color=#BF0000]GETTING A MODEL INTO L4D[/color][/size] 1. Decompiling the Original Models 2. Rigging and Saving the Model 3. The QC File 4. Compiling and Model Files 5. The VPK and Whitelist 6. Additional [color=#BF0000][u]1. Decompiling the Original Models[/u][/color] Firstly, download MDLDecompiler version 0.4.1, it seems to be the only version that works. You can get that here : [url]http://www.chaosincarnate.net/cannonfodder/mdldecompiler.php[/url] I assume you have extracted your gcf's already, if not, follow this tutorial : [url]http://www.fpsbanana.com/tuts/7355[/url] Or if you don't want to go through all the trouble of decompiling, here are the character models decompiled by samm5506. Thanks samm! [url]http://files.filefront.com/13892589/[/url] Unzip MDLDecompiler to "C:\Program Files\Valve\Steam\SteamApps\raptorred@planetavp.com\sourcesdk\bin\ep1\bin". It is easiest if you create a shortcut from it to your desktop or l4d tools location. Once you have done this, create a folder where you will want to decompile your models to. Find the model you wish to decompile from the files you extracted and copy the mdl, vvd, phy, and vtx to your new decompiled model folder. Make TWO copies of the vtx file and rename the endings to .dx90.vtx and .dx80.vtx (for example, survivor_namvet.dx90.vtx and survivor_namvet.dx80.vtx). [img]http://repo4dead.raptorred.com/tutorial/files1.gif[/img] Open the mdl file in either a hex editor, Notepad++ or EditPlus, find where it says "IDST1" [img]http://repo4dead.raptorred.com/tutorial/idst1.gif[/img] and change it to say "IDST," and then save it. [img]http://repo4dead.raptorred.com/tutorial/idst,.gif[/img] Now open up MDL Decompiler, browse to your mdl file and to you decompile folder, turn OFF steam access, and decompile. It should have now created a number of (somewhere around 10) new files in your decompiled model folder. [color=#BF0000][u]2. Rigging and Saving the Model[/u][/color] I'll start off by assuming you know how to make a model. You will need to get these .smd files so you can use the original skeletons. Load the file with the "reference_wrinkle.dmx.smd" ending for whichever character you are replacing into your favourite modeling program and rig up (connecting the mesh to the skeleton) your model using the "Skin" modifier. I would suggest moving the mesh to fit the skeleton rather than moving the skeleton at all as this messes up models in other games. [img]http://repo4dead.raptorred.com/tutorial/max.gif[/img] Export your .smd file to your working folder. This folder should contain a number of files : 1. the smd file, named whatever you like 2. a "phymodel.smd" 3. a .qc file, again named whatever you like. I will assume you know how to make a texture, if not, go check out one of the skinning tutorials. Place the .vtf and .vmt files you have in a folder C:\Program Files\Valve\Steam\SteamApps\common\left 4 dead\left4dead\materials\models\survivors\ then into a folder where you can keep track of it. I put mine into Bill's folder, namvet. C:\Program Files\Valve\Steam\SteamApps\common\left 4 dead\left4dead\materials\models\survivors\namvet\ This path is chosen in the .qc file (in the next section of the tutorial ) in any case. [img]http://repo4dead.raptorred.com/tutorial/files2.gif[/img] [color=#BF0000][u]3. The QC File[/u][/color] Open up the qc file that was created when you decompiled. Let's go over all the parts of it that need changing. Remove all the LOD information that is near the top. Leaving this in prevents the model from compiling. This is an example of what should be removed: [code]$lod 10 { replacemodel "NamVet_reference_wrinkle.dmx" "lod1_NamVet_reference_wrinkle.dmx" } $lod 15 { replacemodel "NamVet_reference_wrinkle.dmx" "lod2_NamVet_reference_wrinkle.dmx" } $lod 25 { replacemodel "NamVet_reference_wrinkle.dmx" "lod3_NamVet_reference_wrinkle.dmx" } $lod 40 { replacemodel "NamVet_reference_wrinkle.dmx" "lod4_NamVet_reference_wrinkle.dmx" } $shadowlod { replacemodel "NamVet_reference_wrinkle.dmx" "lod5_NamVet_reference_wrinkle.dmx" }[/code] Here is a working qc file as an example. [code] $cd "C:\Program Files\Valve\Steam\SteamApps\common\left 4 dead\left4dead\tools\Misc\nathan" $modelname "survivors/survivor_namvet.mdl" $model "Repo" "repo.smd" { mouth 0 "mouth" ValveBiped.Bip01_Head1 0.000 1.000 0.000 } $poseparameter body_pitch -90.00 90.00 360.00 $poseparameter body_yaw -90.00 90.00 360.00 $poseparameter head_pitch -90.00 90.00 360.00 $poseparameter head_yaw -90.00 90.00 360.00 $cdmaterials "models\survivors\NamVet\" $cdmaterials "models\survivors\" $cdmaterials "" $texturegroup skinfamilies { {"repo.vmt" } {"repoman_it.vmt" } } $attachment "eyes" "ValveBiped.Bip01_Head1" 3.56 -2.83 0.01 rotate 0.00 -89.37 -90.00 $attachment "mouth" "ValveBiped.Bip01_Head1" 0.80 -5.80 -0.15 rotate -0.00 -80.00 -90.00 $attachment "pistol" "ValveBiped.Bip01_R_Thigh" 3.31 0.69 -6.64 rotate -11.66 3.42 83.61 //$attachment "cigarette" "ValveBiped.Bip01_Head1" -0.09 -5.01 1.82 rotate -31.69 -89.37 0.00 $attachment "medkit" "ValveBiped.Bip01_Spine4" -1.27 -5.57 -1.31 rotate 5.03 77.16 0.00 $attachment "primary" "ValveBiped.Bip01_Spine4" 3.05 -4.91 -2.62 rotate -13.70 170.19 174.29 $attachment "attach_R_shoulderBladeAim" "ValveBiped.Bip01_Spine4" -10.54 -1.39 -5.08 rotate -90.00 -102.85 0.00 $attachment "attach_L_shoulderBladeAim" "ValveBiped.Bip01_Spine4" -10.54 -1.39 3.51 rotate -90.00 -102.85 0.00 $attachment "molotov" "ValveBiped.Bip01_Spine" -3.59 -2.79 7.97 rotate -63.44 -74.67 -101.41 $attachment "grenade" "ValveBiped.Bip01_Spine" -2.29 1.19 8.98 rotate -90.00 -175.23 0.00 $attachment "pills" "ValveBiped.Bip01_Spine" -2.96 0.71 -8.06 rotate -41.18 -88.48 -87.05 $attachment "lfoot" "ValveBiped.Bip01_L_Foot" 0.00 5.00 -0.00 rotate 0.00 0.00 0.00 $attachment "rfoot" "ValveBiped.Bip01_R_Foot" 0.00 5.00 -0.00 rotate -0.00 -0.00 -0.00 $attachment "muzzle_flash" "ValveBiped.Bip01_L_Hand" 0.00 0.00 0.00 rotate 0.00 0.00 0.00 $attachment "survivor_neck" "ValveBiped.Bip01_Neck1" 0.00 -0.00 0.00 rotate -0.00 0.00 -0.00 $attachment "forward" "ValveBiped.forward" 0.00 0.00 0.00 rotate 0.00 -0.00 -0.00 $attachment "bleedout" "ValveBiped.Bip01_Pelvis" 9.50 10.00 5.00 rotate -0.00 0.00 0.00 $attachment "survivor_light" "ValveBiped.Bip01_Spine2" 6.00 24.00 -0.00 rotate 0.00 -0.00 -0.00 $attachment "legL_B" "ValveBiped.attachment_bandage_legL" 0.00 0.00 0.00 rotate -90.00 -90.00 0.00 $attachment "armL_B" "ValveBiped.attachment_bandage_armL" 0.00 0.00 0.00 rotate -90.00 -90.00 0.00 $attachment "armL_T" "ValveBiped.attachment_armL_T" 0.00 0.00 0.00 rotate -90.00 -90.00 0.00 $attachment "armR_T" "ValveBiped.attachment_armR_T" 0.00 0.00 0.00 rotate -90.00 -90.00 0.00 $attachment "armL" "ValveBiped.Bip01_L_Forearm" 0.00 0.00 0.00 rotate -0.00 0.00 0.00 $attachment "legL" "ValveBiped.Bip01_L_Calf" 0.00 0.00 0.00 rotate -0.00 0.00 0.00 $attachment "thighL" "ValveBiped.Bip01_L_Thigh" 0.00 0.00 0.00 rotate -0.00 0.00 0.00 $attachment "spine" "ValveBiped.Bip01_Spine" 0.00 -0.00 0.00 rotate -90.00 -90.00 0.00 $includemodel "survivors/anim_namvet.mdl" $includemodel "survivors/gestures_namvet.mdl" $surfaceprop "flesh" $eyeposition -0.000 0.000 70.000 $illumposition -0.236 -0.077 36.138 $sequence Repo "Repo" fps 30.00 $sequence ragdoll "ragdoll" ACT_DIERAGDOLL 1 fps 30.00 $ikchain rhand ValveBiped.Bip01_R_Hand knee 0.707 0.707 0.000 $ikchain lhand ValveBiped.Bip01_L_Hand knee 0.707 0.707 0.000 $ikchain rfoot ValveBiped.Bip01_R_Foot knee 0.707 -0.707 0.000 $ikchain lfoot ValveBiped.Bip01_L_Foot knee 0.707 -0.707 0.000 $ikchain ikclip ValveBiped.weapon_bone_Clip knee 0.707 -0.707 0.000 $collisionjoints "phymodel.smd" { $mass 100.0 $inertia 10.00 $damping 0.05 $rotdamping 5.00 $rootbone "valvebiped.bip01_pelvis" $jointrotdamping "valvebiped.bip01_pelvis" 3.00 $jointmassbias "valvebiped.bip01_spine1" 8.00 $jointconstrain "valvebiped.bip01_spine1" x limit -10.00 10.00 0.00 $jointconstrain "valvebiped.bip01_spine1" y limit -16.00 16.00 0.00 $jointconstrain "valvebiped.bip01_spine1" z limit -20.00 30.00 0.00 $jointmassbias "valvebiped.bip01_spine2" 9.00 $jointconstrain "valvebiped.bip01_spine2" x limit -10.00 10.00 0.00 $jointconstrain "valvebiped.bip01_spine2" y limit -10.00 10.00 0.00 $jointconstrain "valvebiped.bip01_spine2" z limit -20.00 20.00 0.00 $jointmassbias "valvebiped.bip01_r_clavicle" 4.00 $jointrotdamping "valvebiped.bip01_r_clavicle" 6.00 $jointconstrain "valvebiped.bip01_r_clavicle" x limit -15.00 15.00 0.00 $jointconstrain "valvebiped.bip01_r_clavicle" y limit -10.00 10.00 0.00 $jointconstrain "valvebiped.bip01_r_clavicle" z limit -0.00 45.00 0.00 $jointmassbias "valvebiped.bip01_l_clavicle" 4.00 $jointrotdamping "valvebiped.bip01_l_clavicle" 6.00 $jointconstrain "valvebiped.bip01_l_clavicle" x limit -15.00 15.00 0.00 $jointconstrain "valvebiped.bip01_l_clavicle" y limit -10.00 10.00 0.00 $jointconstrain "valvebiped.bip01_l_clavicle" z limit -0.00 45.00 0.00 $jointmassbias "valvebiped.bip01_l_upperarm" 5.00 $jointrotdamping "valvebiped.bip01_l_upperarm" 2.00 $jointconstrain "valvebiped.bip01_l_upperarm" x limit -15.00 20.00 0.00 $jointconstrain "valvebiped.bip01_l_upperarm" y limit -40.00 32.00 0.00 $jointconstrain "valvebiped.bip01_l_upperarm" z limit -80.00 25.00 0.00 $jointmassbias "valvebiped.bip01_l_forearm" 4.00 $jointrotdamping "valvebiped.bip01_l_forearm" 4.00 $jointconstrain "valvebiped.bip01_l_forearm" x limit -40.00 15.00 0.00 $jointconstrain "valvebiped.bip01_l_forearm" y limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_l_forearm" z limit -120.00 10.00 0.00 $jointrotdamping "valvebiped.bip01_l_hand" 1.00 $jointconstrain "valvebiped.bip01_l_hand" x limit -25.00 25.00 0.00 $jointconstrain "valvebiped.bip01_l_hand" y limit -35.00 35.00 0.00 $jointconstrain "valvebiped.bip01_l_hand" z limit -50.00 50.00 0.00 $jointmassbias "valvebiped.bip01_r_upperarm" 5.00 $jointrotdamping "valvebiped.bip01_r_upperarm" 2.00 $jointconstrain "valvebiped.bip01_r_upperarm" x limit -15.00 20.00 0.00 $jointconstrain "valvebiped.bip01_r_upperarm" y limit -40.00 32.00 0.00 $jointconstrain "valvebiped.bip01_r_upperarm" z limit -80.00 25.00 0.00 $jointmassbias "valvebiped.bip01_r_forearm" 4.00 $jointrotdamping "valvebiped.bip01_r_forearm" 4.00 $jointconstrain "valvebiped.bip01_r_forearm" x limit -40.00 15.00 0.00 $jointconstrain "valvebiped.bip01_r_forearm" y limit 0.00 0.00 0.00 $jointconstrain "valvebiped.bip01_r_forearm" z limit -120.00 10.00 0.00 $jointrotdamping "valvebiped.bip01_r_hand" 1.00 $jointconstrain "valvebiped.bip01_r_hand" x limit -25.00 25.00 0.00 $jointconstrain "valvebiped.bip01_r_hand" y limit -35.00 35.00 0.00 $jointconstrain "valvebiped.bip01_r_hand" z limit -50.00 50.00 0.00 $jointmassbias "valvebiped.bip01_r_thigh" 7.00 $jointrotdamping "valvebiped.bip01_r_thigh" 7.00 $jointconstrain "valvebiped.bip01_r_thigh" x limit -25.00 25.00 0.00 $jointconstrain "valvebiped.bip01_r_thigh" y limit -10.00 15.00 0.00 $jointconstrain "valvebiped.bip01_r_thigh" z limit -55.00 25.00 0.00 $jointmassbias "valvebiped.bip01_r_calf" 4.00 $jointconstrain "valvebiped.bip01_r_calf" x limit -10.00 25.00 0.00 $jointconstrain "valvebiped.bip01_r_calf" y limit -5.00 5.00 0.00 $jointconstrain "valvebiped.bip01_r_calf" z limit -10.00 115.00 0.00 $jointrotdamping "valvebiped.bip01_r_foot" 2.00 $jointconstrain "valvebiped.bip01_r_foot" x limit -20.00 30.00 0.00 $jointconstrain "valvebiped.bip01_r_foot" y limit -30.00 20.00 0.00 $jointconstrain "valvebiped.bip01_r_foot" z limit -30.00 50.00 0.00 $jointmassbias "valvebiped.bip01_l_thigh" 7.00 $jointrotdamping "valvebiped.bip01_l_thigh" 7.00 $jointconstrain "valvebiped.bip01_l_thigh" x limit -25.00 25.00 0.00 $jointconstrain "valvebiped.bip01_l_thigh" y limit -10.00 15.00 0.00 $jointconstrain "valvebiped.bip01_l_thigh" z limit -55.00 25.00 0.00 $jointmassbias "valvebiped.bip01_l_calf" 4.00 $jointconstrain "valvebiped.bip01_l_calf" x limit -10.00 25.00 0.00 $jointconstrain "valvebiped.bip01_l_calf" y limit -5.00 5.00 0.00 $jointconstrain "valvebiped.bip01_l_calf" z limit -10.00 115.00 0.00 $jointrotdamping "valvebiped.bip01_l_foot" 2.00 $jointconstrain "valvebiped.bip01_l_foot" x limit -20.00 30.00 0.00 $jointconstrain "valvebiped.bip01_l_foot" y limit -30.00 20.00 0.00 $jointconstrain "valvebiped.bip01_l_foot" z limit -30.00 50.00 0.00 $jointmassbias "valvebiped.bip01_head1" 4.00 $jointrotdamping "valvebiped.bip01_head1" 3.00 $jointconstrain "valvebiped.bip01_head1" x limit -50.00 50.00 0.00 $jointconstrain "valvebiped.bip01_head1" y limit -20.00 20.00 0.00 $jointconstrain "valvebiped.bip01_head1" z limit -26.00 30.00 0.00 } [/code] [color=#8080FF]$cd "C:\Program Files\Valve\Steam\SteamApps\common\left 4 dead\left4dead\tools\Misc\nathan"[/color] This should point to the folder where your three files are. [color=#8080FF]$modelname "survivors/survivor_namvet.mdl"[/color] Leave this as the name of the character you want to replace. It won't overwrite the file unless you have it extracted to here, so back it up if you do and want to keep the original.. [color=#8080FF]$model "Repo" "repo.smd"[/color] Rename the first quoted part to whatever the smd is called, it will be used again for the sequence part as well. Rename the second quoted part to the exact name of your smd file. Apparently leaving this as the original (namvet, etc), will cause the model not to be compile for some reason. [color=#8080FF]$cdmaterials "models\survivors\NamVet\"[/color] Really you don't need to change this, this is just pointing to the folder UNDER THE MATERIALS FOLDER, where your textures for your model are going to go. If you plan to put them in the folder of the character you are replacing, leave namvet if you are replacing Bill, biker for Francis, manager for Louis or teenangst for Zoey. [color=#8080FF]$texturegroup skinfamilies { { "repo.vmt" } { "repoman_it.vmt" }[/color] This is the list of vmt files which point to the textures that your model uses. Now I'm not sure about the texture_it.vmt part.. as far as I can tell, it doesn't actually use this and I just left it in to be safe.. if anyone figures out different, please tell me. Change the name to whatever.vmt you want. If you have multiple textures, just combine them in the brackets, for example : [color=#8080FF]{ "repo.vmt" "repo1.vmt" }[/color] Most of the original player models have about four textures each. I put six textures in at one point as a test and that killed the character on load of the game for some.. odd.. reason. [color=#8080FF]$includemodel "survivors/anim_namvet.mdl" $includemodel "survivors/gestures_namvet.mdl"[/color] Again just replace "namvet" with whatever character you are replacing. Namvet for Bill, biker for Francis, manager for Louis and teenangst for Zoey. You probably should also have these extracted from the vpk and in the right folder under Models just in case. [color=#8080FF]$sequence Repo "Repo" fps 30.00[/color] Rename both instances of Repo here to the same name as your smd file. That should be just about all in the .qc file. The rest can generally be left, though you will probably want to keep the joint collision info from whichever character you used the skeleton from. [color=#BF0000][u]4. Compiling[/u][/color] Now compiling is the easy part. When you have your .qc file changed to what you want, drag it over to this folder, BUT DON"T DROP IT IN! C:\Program Files\Valve\Steam\SteamApps\common\left 4 dead\bin Drag it over top of StudioMDL.exe and drop it onto that exe. [img]http://repo4dead.raptorred.com/tutorial/studiomdl.gif[/img] A window should come up, run through a bunch of stuff, finish and disappear in a matter of seconds. [img]http://repo4dead.raptorred.com/tutorial/studiomdlrun.gif[/img] Check this folder to make sure your files have been created : C:\Program Files\Valve\Steam\SteamApps\common\left 4 dead\left4dead\models\survivors\ You should now have four new files in your survivors folder. [color=#BF0000][u]5. The VPK and Whitelist[/u][/color] I recommend always making a backup of your VPK, or any other files you are replacing. Open up "pak01_dir.vpk" from your main left4dead folder using either a Hex Editor, Notepad++ or EditPlus, search for the entry "survivor_" then whichever character you are replacing (survivor_namvet for example), and rename it to something else but WITH THE SAME NUMBER OF LETTERS as the original name. From what I've read, if you don't do this, you get a checksum error ingame. From what I can tell, also, it won't matter what you rename it to, since this forces the game to go looking for the original named .mdl file in the folder (survivor_namvet.mdl). There are four entries in the vpk to change, then save the vpk. [img]http://repo4dead.raptorred.com/tutorial/vpk.gif[/img] For skinning, most of the tutorials say to add a line to the whitelist. I removed that line from mine and tested and it made no difference, the model and skin still worked absolutely fine. [color=#BF0000][u]6. Additional[/u][/color] Now you should be ready to test ingame! Go into your menu, use the console and put in "sv_consistency 0" and go into a game and it should work. If it doesn't, open up the console and look for any errors that it gives you. This is really handy to point you in the right direction. If the game simply crashes, there are a number of things that can cause this , though the most likely is you corrupted tthe vpk using plain notepad or something. Back track over every step, make sure you didn't name something wrong or mess up the vpk file. If that still doesn't work, you can PM me or email me and I'll try to help you. If it works.... congrats! lol Have fun with your new model! [img]http://repo4dead.raptorred.com/tutorial/footer.gif[/img]