I recommend using his! It is more organized and stays up to date with any changes valve makes to it's game. Happy Modding! :D
[b]ITS FIXED :D!!!!!! Thanks to Tribalizer for the fix! Ill add his fix to the end of the tut.[/b]
Custom L4D2 Character Step By Step tutorial
For a L4D character you can use this tutorial:
I used the above tutorial to get my L4D2 character to work. Except for L4D2 you don't edit the main files you just put a final VPK in the addons folder.
Trying to get a custom character model into l4d2 as one of the team huh? This took me a few days to figure this out and it is knowledge wasted if I only use it to create one character for myself... so here we go.
Stuff you need:
First you need to own l4d2. Ok open up steam and go to the tools tab. Install Source SDK, Source SDK Base, and Source SDK Base - Orange Box. (not sure if having SDK Base - Orange Box is required for this.) Install the L4D2 Add-on Support and the Authoring Tools. Once this is all downloaded go to "C:\Program Files (x86)\Steam\steamapps\common\left 4 dead 2\bin\ " and make a shortcut on your desktop to the "vpk.exe" in this folder.
To do this you probably already know you need a 3d program for starters. I have been using 3ds max for years n it works for me and it works for this process. I have also used XSI for a few months on a modeling job... not bad.
Ok now we need some plugins and programs... get the "SMD import" and the "SMD export" plugin and "GUI StudioMDL" from:
Download the MDLdecompiler VERSION 0.4.1!!!!!!!!!!!!!!! from:
I was having problems getting version 0.5 to work so stick with version 0.4.1. I downloaded Cannonfodder's studio compiler also but it didn't work for me.(user error I guess)
Starting to get a little confused ok take a look at this guy:
[L4D2] Killing Floor Survivor/Player Replacement
He made the vpk add-on for the game that got me interested in doing this... ok moving on...
Go download and install the "VTFEdit" tool: http://nemesis.thewavelength.net/index.php?c=178
Go download and install the "GCFScape" tool: http://nemesis.thewavelength.net/index.php?p=26
Now go to "http://notepad-plus.sourceforge.net/uk/site.htm" and download Notepad++. Its loacted in the downloads section and download the "Binary files" install be happy about it.
I'm not really in the mood for creating a character from scratch so lets borrow one from garrysmod.org.
I'm thinking Garrus from ME2 would be cool. Now you don't need to start with a premade character you can start from scratch but I'm lazy.
Ok so lets setup our folder for an easy way of editing it.
My main folder for this project will be named "garrus mechanic replacement" but you can name it whatever. Inside there make a text document and title it "addoninfo" paste this text with instead of my username and website... yours duy in the txt doc:
addontitle "replacement for Ellis in L4D2"
addontagline "replacement for Ellis in L4D2"
addonDescription "replacement for Ellis in L4D2"
addonContent_prop 0 //This Add-on provides new props,
addonContent_Prefab 0 //Provides new prefabs
addonContent_BackgroundMovie 0 //Provides a replacement for the background movie.
addonContent_Survivor "Nick" //Provides a new survivor model. 0=false, 1=true, String in quotes if replaces specific single character, i.e. "Francis"
addonContent_BossInfected 0 //Provides a new boss infected model. Break these out?
addonContent_CommonInfected 0 //Provides a new common infected model
addonContent_WeaponModel 0 //Provides a new appearance to existing weapons, but does not change their function
addonContent_weapon 0 //provides new weapons or new zombie killing functionality, i.e. guns, explosives, booby traps, hot tar,
addonContent_Skin 0 //0 if no new skin textures for existing models. 1 if multiple skin pack. String in quotes if specific single skin
addonContent_Spray 0 //Provides new sprays.
addonContent_Map 0 //Add-on provides a standalone map
Ok now save that and close it.
Now add the folders "materials" and "models".
In the models folder add a folder named "survivors".
In the materials folder add the folder tree "models"\"survivors"\"mechanic".
Ok lets get the garrus model into 3dsmax :) To get the smd plugins to work in max put them in your plugins folder. Mine is here: "C:\Program Files\Autodesk\3ds Max 2010\plugins" FYI I use windows 7 and max 2010 so messing with anything not in the Program Files (86x) to work is unexpected.
Go to the downloaded "me2models\ME2Models\models\slash\garrus" Here you will see a garrus.mdl file. Open the mdl file in Notepad++. The fist line should read "IDST0" change it to "IDST," save and close notepad++.
Pray this will freakin decompile correctly ok. Take your mdldecompiler and move the executable to "C:\Program Files (x86)\Steam\steamapps\da1barker\sourcesdk\bin\orangebox\bin" and or " C:\Program Files (x86)\Steam\steamapps\da1barker\sourcesdk\bin\ep1\bin" Now open your mdldecompiler and uncheck Use Steam File Access. In Choose Model file grab your garrus.mdl and in the output put it in the same folder. This part of the process is usually a roadblock. If you get an error ask here. Sometimes the mdldecompiler is not in the mood to do a good job at giving you your files. Run it again and check results if needed.
Now back in the folder it should have spewed out a few .smd files and a .qc file. Ok open up max and try to import the Garrus.smd. You don't need to check anything the default settings should be fine. Wow awesome import! Wish the rig would work for this... o well. Trash everything except the main mesh.
Don't worry if your new to this cuz there is this guy named mariokart64n and he is epic. Here is his tutorial thread: http://www.facepunch.com/showthread.php?t=542906
The Rigging your model tutorial he posted is awesome. But we need our l4d2 rig to get started on it so save your max file for now and lets move on.
Whew ok now we need to get a character out of L4D2 and into 3ds max or whatever to replace their Character Mesh with ours and weight our character to their rig.
Now using GCFScape go to your "C:\Program Files (x86)\Steam\steamapps\common\left 4 dead 2\left4dead2" folder and open the pak01_dir. Go to "models\survivors\" and select all the mechanic files should be 6 total. Right click and extract to your working models folder. Close GCFscape and go back to your files. Make 3 copies of the .vtx file and rename the endings to .dx90.vtx and .dx80.vtx and .sw.vtx. You must make these or it will not decompile all the way.
Again we are going to open up both .mdl files in Notepad++ and change the beginning to "IDST,". And again we are going to decompile them using the mdldecompiler in your bin folder. :D
Open up max and import your mechanic_model_merged.dmx.smd. Now we need to get your character skinned to the l4d2 rig. Position your model as best you can to the bones. Throw on the skin modifier and ad all the bones except these:
Time to get the materials on this guy. Apply a Multi/Sub-Object material and discard the old one in max. Go back to your me2models folder and copy the garrus materials folder and put it in your working materials folder. Here you will have .vtm and .vtf files. Take your vtf files into VTFedit and export them as .tga files. Save them with the same name as their former vtf file names. Apply your .tga files to garrus... looks awesome ok make sure garrus and his rig are standing on the origin at xyz 0,0,0.
Now add all the bones EXCEPT these:
Now go through the bones you added and edit their envelopes to pull very slightly on the mesh. For example the weapon bones should have 2 or 3 verts selected on their inner hand at a pull of about .25. Doing the rigging this way I have found that it fixes the issue with characters holding axes and bats.
Now it's time to export this file as a .smd. Save your max file and close max.
Now we are at the home stretch. Now copy the .smd file you made and paste it 4 times in that folder. Name them phymodel.smd, garrus_idle.smd, garrus_phys.SMD, and garrusref.SMD.
Now I'm not sure why but to compile this back to a mdl file we need these files in the l4d2 folder. So in common\left 4 dead 2\left4dead2\ make a folder named tools\misc\garrus and throw all your non texture files in there.
Now time to edit our .qc file. The one we got when we mdldecompiled the mechanic... well the first time I tried this my qc file never decompiled from the mdl correctly so I was stuck.
The way to edit the qc file is best explained here:
Since I am lazy I'm just going to show you mine. :D
$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
Ok so now we want to compile this .qc file using GUIStudioMDL! This guy should also be in your bin folder. Open it up and you will need to direct it to the studiodml and the gameconfig files. They should both be in your bin folder. For Target Mod hit the Add button and navigate to the L4D2 folder and hit the gameinfo txt doc. Load your .qc and compile! Didn't work first time it timed out... retry... it worked! now go to " C:\Program Files (x86)\Steam\steamapps\common\left 4 dead 2\left4dead2\models\survivors" and grab all the survivor_mechanic files that are not .pre files and put them back in the garrus mechanic replacement folder in the models section. Remove any other modeling files from that folder but save them for backup.
In the garrus mechanic replacement folder go back to your textures and remove the .tga files from the folder. Save for backup somewhere else just not here.
Now we need to fix the .vmt files to point to the correct folder. Open the .vmt files in Notepad++ and change models/slash/garrus/blahblahblah to models/survivors/mechanic/blahblahblah.
Drag the garrus mechanic replacement folder onto the vpk shortcut to make a .vpk addon for l4d2. Put it in your l4d2 steam addons folder. If steam is on exit and reopen steam and jump into a single player camp for testing.
If you have a different mod working with the same character there may be a conflict of interest and the game will only display one of the addons.
So l4d2 crashed... Turns out the ellis files decompiled incorrectly. Do over?
Needs to start with plain mesh on ellis rig n try to get that to work
So you want custom portraits for your character for the lobby, in game mug shot, and the incap survivor portrait. Well lets add that to our character addon. In the garrus mechanic replacement folder in materials make a folder named " VGUI". Now lets jump back into GCFScape and open back up the pak01_dir. In here go to materials/vgui/ and grab the s_panel_lobby_mechanic.vmt and .vtf, the s_panel_mechanic.vmt and .vtf, and the s_panel_mechanic_incap.vmt and vtf. and export them to the vgui folder you made. Open the vtf files in VTFEdit and export them as tgas to edit in photoshop or whatever. Make sure that when you edit the incap image that you export it back out at a 32 bit targa to keep the alpha channel. Over write the original vtf files with your new images and your done. You can drag the garrus mechanic replacement folder onto the vpk shortcut to make a .vpk addon for l4d2.
currently not working -> So you want custom names for your survivors. Well this is a little tricky. "If you have a different mod working with the same character there may be a conflict of interest and the game will only display one of the addons." This applies to this part especially. Make a new folder outside your garrus folder and name it New Names. Inside make a folder named "resource". Now lets jump back into GCFScape and open back up the pak01_dir. In here go inside the resource folder and select " l4d360ui_english.txt" and export it to your resource folder. Open the txt file and go down to "L4D360UI_Mechanic" "Ellis" change ellis to garrus and save the file. That's it! You can drag the New Names folder onto the vpk shortcut to make a .vpk addon for l4d2. Edit this addon for changing the names of other players in your game.
FYI: Using this tutorial you will NOT have to edit the pak01_dir.vpk or whitelist.cfg
4 years ago:
Is this still the way to go when making character mods? I would like to give it a try and the mention of Gary's Mods gives me hope for my next question. Would we be able to use character models from the Program called XNALara?
I've been following this tutorial to try and import Snow Villers from FFXIII to replace Nick, and the farthest I've gotten is the part where you jump from importing the Ellis file into 3DS Max to you saying "make sure you match up the bones."
What am I supposed to do inbetween? Is this some character rigging stuff that you've gotta have much more experience 3DS Max to use?
Am I just going about this like an idiot and missing the point completely?
I've literally hit a dead end here, and could any help I could get right now.
5 years ago:EDIT
I figured out what my problem was, it was Blender. For future reference to everyone, YOU CANNOT USE BLENDER. You might be able to attach each bone like you need to, but there is not a script or addon in existance yet that exports an SMD correctly. As far as I can see, 3DS Max is our only option.
Anyway, I am at the end processes, making a QC file, and compiling it. I think I have a correct QC file made for this, but the compiler won't do anything. It says its creating the command line for it, and it just sits there. I have waited for over an hour for it, and checked the process as well, which showed that it was doing absolutely nothing. Can someone help me?
6 years ago:
i know you don usualy respond to comments but i wouldent ask unless i really need help!
The SMD importer and exporter plugins wont work?
When i load up 3Ds max it says invalid or something like that and then when it 3ds max i go to plugins and load all the plugins needed but i still cant import my hunter.mdl file?
PLEASE HELP ME!
6 years ago:
is there a way to like import skins from other valve games or mods ??i would like to have neotokyo skins :D if there a way easier that creating xD the skins tell me plz :D and i should give u a cookie :D