Garry's Mod

Garry's Mod

58 ratings
Bob's Guide : How to port l4d2 models into Gmod easily!
By 乃ㄖ乃爪卂匚 Ü
• A useful guide for players & creators who wants to port L4D2 models to Gmod but sadly there's no guide on internet.. so i decided to make it for y'all.!
I learned alot stuffs for this guide.. like months..! And ported alot of models.! •

★No L4D2 Required! ★
~ Spent a week for this guide! Like and awards would be really appreciated! ~
• Hope this helpful for you!•
4
   
Award
Favorite
Favorited
Unfavorite
**Note and things to know**
⚠ Read & follow all the instructions carefully or it won't work! ⚠
➤ So, This guide may be hard to follow or do for some starters but just to know that it's easier than you thinks..

➤ I tried my best to make the guide easy as possible so don't worry. sit back & relax.. Guide will becomes easier as you do this for alot of times.!

══════════════════════════════════════════
**Required tools & items**
★ First, You'll need these tools and templates.! ★

══════════════════════════════════════════

★ You'll need two diffrent versions of blender (for physic mesh & proportion)

Blender : Essential for most steps
Link : https://www.blender.org/ (Download the latest version).

Blender 2.79 : Essential for proportion trick
➤Link : https://www.blender.org/download/releases/2-79/

══════════════════════════════════════════

GCFScape : To extract vpk. files
Link : https://nemstools.github.io/pages/GCFScape-Download.html

══════════════════════════════════════════

Crowbar : For complie & decomplie
Link : https://steamproxy.net/groups/CrowbarTool

══════════════════════════════════════════

Notepad++ : To edit Qc. & Lua.
Link : https://notepad-plus-plus.org/downloads/

══════════════════════════════════════════

Template : Essential for most steps
★ (Contains Qc. Physic mesh & Source tool plugins ★

Link : https://drive.google.com/file/d/1fc3SannS-sG032sbfw-5T0nmAIw-owTh/view?usp=sharing

══════════════════════════════════════════

Model Complier Replacement : For heavy models with a lot of vertices
★ Useful for models with high verts and faster compiling.! ★

Link : https://drive.google.com/file/d/1nRyUViwiGUkb81viztA4gIaWu1lK3ezs/view

══════════════════════════════════════════

Proportion Trick : One of most important scripts.
➤Link : https://github.com/sksh70/proportion_trick_script

Make sure to download all of them! ⚠

══════════════════════════════════════════
**Preparing & Setting up**
★ Setting up "Crowbar,Blender & Some stuffs"★

Step 1: Open Crowbar.

Step 2: Go to "Set up games".

Step 3: You'll see like this.

══════════════════════════════════════════


to
══════════════════════════════════════════

Step 4: Choose the game "Garry's Mod" or add a new game and change the name to "Garry's Mod".

Step 5: Go ahead and set the require paths for specific items.

⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯

⏚ Engine : Source

⏚ Executable (exe.) : Your gmod exe.
☞ C:\Steam\steamapps\common\GarrysMod\hl2.exe

⏚ Gameinfo.txt : Gmod's info file.
☞ C:\Steam\steamapps\common\GarrysMod\garrysmod\gameinfo.txt

⏚ Complier / Viewer / Mapping & Packer : Essential tools for crowbar
☞ C:\Steam\steamapps\common\GarrysMod\bin\

⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯

Step 6: Go to "Complie" tab.

Step 7: Choose "Garry's Mod" on game that has the model complier.

Step 8: Now, We're done for crowbar.

══════════════════════════════════════════



══════════════════════════════════════════

★ Now, We'll be replacing the complier with custom one for heavy models with alot of vertices 'cause most of l4d2 models from workshop used alot of vertices but you don't have to if you don't want. ★

Step 1: Go to the "depend pack.7z"

Step 2: Extract it.

Step 3: Go into the folder, Copy all of the files & put them into bin folder.
☞ C:\Steam\steamapps\common\GarrysMod\bin\
ℹ [ Make a backup of your bin folder if you want to because it break the model viewer ]

Step 4: Now, We're done replacing the model complier with custom one.

══════════════════════════════════════════



══════════════════════════════════════════

★ And,The last one for blender source's tool plugin to upload smd. and model files ★

• First We'll go with latest blender.

⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯

⚠ Update : If you have blender blender 4.21 LTS which is latest version. You may be to follow these steps to import plugin. ⚠
➤ : Open the latest blender 4.21 LTS.
➤ : Click "Edit" and then "Preference".
➤ : Click "add-on" and click the arrow from right upper corner and click "Install from disk" and the browse inside template folder and install Blender source tools 3.3" plugin.
Skip to importing 2.79 if you're using 4.21 LTS.]

══════════════════════════════════════════



══════════════════════════════════════════

⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯

⚠ For older blender than blender 4. ⚠

Step 1: Extract the template zip. that i linked before.

Step 2: Open both blenders which is new version you got.

Step 3: Go to "Edit" from upper left corner.

Step 4: And Click "Preferences"

Step 5: Click "Add-on" and click "Install.."

Step 6: Browse inside the template find and you'll see two plugin zips.

⏚ (3.3 for latest version blender)
⏚ {2_10.2 for old blender which is 2.79}

Step 7: Choose "3.3" and press install add-on.

Step 8: Search "Source" and check the box "Blender source tool"

════════════════════════════════════════════



════════════════════════════════════════════

★ For the 2.79 blender, There'll be slightly diffrent steps. ★

Step 1: Click "File".

Step 2: Click "User preference" and head to "Add-ons"

Step 3: Click "Install Add-on from file" and browse into the template folder and choose 2_10.2 zip.

Step 4: Search "Source" from search and check the "Blender source tool" if not checked.
⏚ (make sure to check ☑ or plugins may not work!)

💡: Also go to "Edit" and click "Save startup file" so you won't need to import the plugin again!.

★Now, We're done set up.! ★
**Getting started**
★ Now, We're gonna start porting the model. But we need to find the model you want to port. So, Let's go to the L4D2 workshop and find a model you want to port.★

Step 1. Go to L4D2 Workshop.

Step 2. Find a model you want to port. (Please don't be r18 models..)

Step 3. I'll be using this model as the tutorial.

════════════════════════════════════════════

https://steamproxy.net/sharedfiles/filedetails/?id=3025441251
(YAKUZA!!!)

════════════════════════════════════════════

Step 4: Go to "steamworkshopdownloader.io."

Step 5: Paste the link and download the addon.

════════════════════════════════════════════



════════════════════════════════════════════

So, you'll get a vpk.file as you can see in the image.



════════════════════════════════════════════

Step 6: Open GCFScape that you downloaded before.

Step 7: Drag the vpk. file to GCFScape.

Step 8: And right click "root" and click "extract".

════════════════════════════════════════════



────────────────────────────────────────────

Step 9: Before doing anything next , You'll have to create four folders because this guide will use those folders..

➤ Extracted
➤ Decomplied
➤ Proportion
➤ Complied

⚠ Highly recommended ⚠



════════════════════════════════════════════

Step 10: Go to the "Extracted" Folder & You'll see "root" folder that you extracted before.

Step 11: Go into the folder and go into Models/Survivors/.

Step 12: You'll see some model files.

════════════════════════════════════════════



════════════════════════════════════════════

Step 13: Open "Crowbar".

Step 14: Go to "Decomplie" tab and you'll see "mdl. input:".

Step 15: Click browse & find the model mdl. file that is located in "Extracted" Folder.

Step 16: And then Output it to "Decomplied" folder that you made before.

Step 17: Click "Decomplie".

════════════════════════════════════════════

Example for U.



════════════════════════════════════════════

★ Now, We'll go into "Decomplied" Folder and you'll see some smd. & other stuffs..
And now we'll be heading into qc. editing ★
**Qc editing**
★We're getting into deeper. And this steps needed to be follow carefully or you'll get a bad result! ★

So,We're gonna edit the qc. from the model files we got from decompling..

Step 1: Go into the model files we got from decompling..

════════════════════════════════════════════



════════════════════════════════════════════

Step 2: Right-Click the qc. file.

Step 3: Open with "Notepad++ .

Step 4: First, You have to rename the character name as you want. To do that,You'll need to edit the "$modelname" line.

════════════════════════════════════════════

Example



════════════════════════════════════════════

Step 5: After editing, You have to scroll down and find a line named "$mostlyopaque"

Step 6: And you have to type "$maxverts 9999999" under the "$mostlyopaque" line. because it's a good place to add a new $ type lines..

════════════════════════════════════════════

❖ You might be asking why do i need to add it?, I'll explain, Some of workshop model will exceed the vertices limit, {Example as High-Vert Anime models mostly..} so vertices is limited by source engine and your model will be stretched out if you managed to complie it. Using the complier i gave will completely remove it. also this is the right place for modders that having model parts stretchy problem. That's all. ❖

────────────────────────────────────────────



════════════════════════════════════════════

Step 7: and then scroll down until you find "$hboxset" line and change "L4D2" to "default".
(Idk why i do this but i believe you'll need to)



════════════════════════════════════════════

Step 8: Now, We'll (Still..) scroll down until you finds these lines.



────────────────────────────────────────────

Step 9: Remove "$poseparameter" lines..
⚠ Sometimes random lines may appear on some models, so remove them as well ⚠

Step 10: After that, remove $ikrule "ikclip" line..

Step 11: and then, you have to remove everyline under "$ikautoplaylock".
★ Don't worry, I put correct qc. lines inside the template and we'll use it later.★

════════════════════════════════════════════



It'll looks like this after done

════════════════════════════════════════════

Step 12: And now , we'll have to go inside the template file.

Step 13: Extract it and go inside of folder named "qc" and open it with "Notepad++".

Step 14: Copy everything inside and paste under the "$ikautoplaylock" line.
★ Paste into your model's qc under $ikautoplaylock.. ★

════════════════════════════════════════════



────────────────────────────────────────────



════════════════════════════════════════════

★After that, Press file and then click save. Easy right?
Now,We're done editing the qc. and animations..★
**Qc. editing II**
Y'all told me that arms not holding hl2 weapons correctly.. Well, It's finally here.!

Step 1 : Open the qc. with "Notepad++" again.

Step 2 : Firstly, Scroll down and find the "$attachment" lines. "Replace" those lines with line shown below.

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

$attachment "eyes" "ValveBiped.Bip01_Head1" 2.63 -4.13 0.04 rotate 0 -80.1 -90
$attachment "mouth" "ValveBiped.Bip01_Head1" -0.2 -5.8 0 rotate 0 -80 -90
$attachment "chest" "ValveBiped.Bip01_Spine2" 4 4 0 rotate 0 95 90
$attachment "forward" "ValveBiped.forward" 0 0 0 rotate 0 0 0
$attachment "anim_attachment_RH" "ValveBiped.Anim_Attachment_RH" 0 0 0 rotate -90 -90 0
$attachment "anim_attachment_LH" "ValveBiped.Anim_Attachment_LH" 0 0 0 rotate -90 -90 0

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

Step 3 : Scroll down. There'll be "$definebones" lines. "Remove" the lines shown below.

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

$definebone "ValveBiped.attachment_bandage_legL"
$definebone "ValveBiped.attachment_bandage_legR"
$definebone "ValveBiped.weapon_bone"
$definebone "ValveBiped.weapon_bone_Clip"
$definebone "ValveBiped.weapon_bone_Clip_Bullets"
$definebone "ValveBiped.weapon_bolt"
$definebone "ValveBiped.weapon_bone_extra"
$definebone "ValveBiped.weapon_bolt_opposite"
$definebone "ValveBiped.weapon_charger"
$definebone "ValveBiped.attachment_armR_T"
$definebone "ValveBiped.Bip01_L_Finger02"
$definebone "ValveBiped.weapon_bone_Clip2"
$definebone "ValveBiped.weapon_bone_Clip2_Bullets"
$definebone "ValveBiped.weapon_bolt_l"
$definebone "ValveBiped.L_weapon_bone"
$definebone "ValveBiped.attachment_bandage_armL"
$definebone "ValveBiped.attachment_armL_T"

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

Step 4 : You're done with fixing but i forgot to mention one part. Scroll down, Find the $includemodel line. When you found. You can replace " f " with " m " if your character is a "male".
But you can leave it if your character is a "female". also for "female" with "male".
Example shown below. You can copy-paste it!.

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

$includemodel "f_anm.mdl"
$includemodel "f_anm.mdl"
$includemodel "f_gst.mdl"
$includemodel "f_pst.mdl"
$includemodel "f_shd.mdl"
$includemodel "f_ss.mdl"
$includemodel "humans/female_shared.mdl"
$includemodel "humans/female_ss.mdl"
$includemodel "humans/female_gestures.mdl"
$includemodel "humans/female_postures.mdl"

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

$includemodel "m_anm.mdl"
$includemodel "m_anm.mdl"
$includemodel "m_gst.mdl"
$includemodel "m_pst.mdl"
$includemodel "m_shd.mdl"
$includemodel "m_ss.mdl"
$includemodel "humans/male_shared.mdl"
$includemodel "humans/male_ss.mdl"
$includemodel "humans/male_gestures.mdl"
$includemodel "humans/male_postures.mdl"

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

That's all, Your arm not holding hl2 weapons will be fixed.!

**Proportion (Necesssery!)**
★ Now, We'll be doing proportion trick for model. But one thing, Follow all steps carefully or you'll completely destroy your model.. so please follow carefully. (Thanks.).. Also doing proportion trick in l4d2 models are easier than porting a random models from internet. idk why.. ★

★ Proportion trick section from this guide is very old, Use the method from my “VRC to Gmod” guide!

════════════════════════════════════════════

Updated steps : I forgot that you need to import the script first, First open the proportion folder and open the "proportion_trick_2.7_new.blend". And click "Save startup file" again so you won't need to import again.❖



────────────────────────────────────────────

Now, You may start to proportion steps..

Step 1: Open the old blender which is 2.79. It looks old but useful!.
❖ Some might be asking, why you use 2.79 to do proportion trick , doing proportion in 2.79 is more simple and easy to do than new blenders..❖



════════════════════════════════════════════

Step 2: And, We'll import the model by clicking "File" , "Import" and choose "Source engine smd. vta. etc."

Step 3: Choose "Make new armature" from "Bone blend mode".

Step 4: Choose your model's head.smd or any part you want to start from..
★Some models may only contains one smd. file and you only have to import it★

════════════════════════════════════════════



────────────────────────────────────────────



────────────────────────────────────────────



════════════════════════════════════════════

Step 5: When done, You have to import all other body parts. Which are cloths , Pants etc. (or other smd. files) but this time you have to change "Bone append mode" setting. "Make new armature" to "Append to target".. if you don't, your model's bones may duplicated or complicated! :C.
⏚ If it happened. Press Ctrl+Z to undo so you don't have to redo everything :D ⏚

════════════════════════════════════════════



This one.!

────────────────────────────────────────────

Step 6: After that, You have to click the orange stickman from right side which is named "yourmodelpart_skeleton" (yourmodelpart can be the name of the part you imported first)



────────────────────────────────────────────

Step 7: Now, Double-Click the skeleton name and rename it to "gg" (Only small letters).

Step 8: And then,click "Run script" while selected.
⏚ If it's not selected, click the stickman figure to select the sketelon. ⏚

════════════════════════════════════════════



────────────────────────────────────────────



════════════════════════════════════════════

Step 9: and skeleton armature will appear.. now you have to click "pose" from down-left corner and "apply" and then "Apply pose as rest pose".

Step 10: Then, Press "A" to select the bones and press space and type "clear pose constraints".

Step 11: And click "clear pose constraints".

════════════════════════════════════════════



════════════════════════════════════════════

Step 12: And then click "pose mode" and change to "object mode".

Step 13: Now, We have to change layer. To do that we have to click the little circles from down-section. Click the circle from left side.

════════════════════════════════════════════


────────────────────────────────────────────

Step 14: Then, Press "A" for two-times to deselect & reselect. And you have to select "proportion trick 2" from up-section.



════════════════════════════════════════════

Step 15: And run the script by clicking "Run script".

Step 16: Now, Press "A" and then press "Ctrl + L" and click "Modifiers".

Step 17: Lastly, Press "A" and then "Ctrl + A", Click "Location". (Also check "Rolation" & "Scale" from left-down side.

════════════════════════════════════════════



────────────────────────────────────────────

Step 18: Now, We'll export our model and proportion anims. To do that, Go to the "scene" tab.
Choose the "export path" to "Proportion" folder that you made before.
⏚ If you don't know where's scene tab, just check the image below ⏚

════════════════════════════════════════════



════════════════════════════════════════════

Step 19: Click "Export" and choose "scene export". (Must do "Scene export" or you won't get any proportion animation files.

Step 20 : After all, Go inside the exported folder from proportion trick and then copy the “anims” folder which includes “proportion.smd” and others.. paste it inside the original decomplied model folder. We won’t use the exported smd. exported from proportion trick.. or you’ll get a broken model face.

★ Now, We're done with proportion trick :D!. ★
**Physic mesh**
★This step is hard for beginners and you have to careful also! Just follow every steps carefully and it'll goes well.. ★
❖ Additional note : Some model may contains it own physic smd. If there's one inside you can skip this section :D.. ❖

★ Now, We'll be heading to new blender.★

Step 1: Open the new blender which's new version.

Step 2: And we'll import the physic mesh first. To do that, Click "File" and then "Import" and click "Source engine".
❖Just a reminder : If "Source engine option doesn't appear, You have to check ☑ the source-export tool addon if it's on or not. ❖

Step 3: Browse inside to the template folder and go inside the "Physic mesh" folder and import the "pm_physic.smd".
❖ In new blender, You don't have to do bone append mode to "Make new armature", New blender does automatically but you can do if you want to be sure.❖

Step 4: When imported, We have to delete the bones from the physic mesh. To do that, Click "pm_physic_skeleton" and press "Delete/Del" from your keyboard. Also delete "collection" as we don't need it.

════════════════════════════════════════════




────────────────────────────────────────────



────────────────────────────────────────────



════════════════════════════════════════════

Step 5: Now, We'll import our model parts. We'll import our model's head first or other body part if you like. Go inside "Decomplied" folder and import one model part you like with "Make new armature".

❖ Why we doesn't uses the parts inside "proportion"? because we only need anims, Not body parts. If we uses those parts, model's face will be stretchy. ❖

Step 6: When done, Import other parts with "Append to target".

Step 7: Now,We have to match the physic mesh with our model. As you can see in the image, The model is too big for physic mesh.

Step 8: Press "Shift + Z" to change to "Wireframe" mode so we can see clearly.

Step 9: Now click "pm_physics" from right side panel to select the physic mesh only and press "Tab" to change to "Edit mode". Or you can do the way shown on image below.

════════════════════════════════════════════



════════════════════════════════════════════

Step 10: Now,We have to resize the physic mesh until it fits but first you need to know the basic keys and shortcuts.

⏚ Basic controls ⏚
LMB : Select verts or parts
RMB : Move around
Middle mouse button : Spin around
A : Select everything
Shift + Mouse swipe : Select each verts with muti selectable
Ctrl + L : Select the linked verts (Combo : Select with mouse and press to select linked verts)
Use these tools as well. (Move, Scale , Rolate etc.)

────────────────────────────────────────────



════════════════════════════════════════════

Step 11: We'll start from arms. Swipe-select : "⏚ Shift+LMB" the arm and press "⏚ Ctrl + L" to select the linked verts.
⏚ While swiping, You don't need to select the whole arm, just select some small verts and press "Ctrl + L" and it'll goes fine. Also, Make sure to select only arm parts.⏚

Step 12: We'll move up to the model's arm position. Use Move tool while selected or press "⏚ G" to move and click to confirm.



════════════════════════════════════════════

⏚ When done, Use "Scale" or "Transform" tool if arm physic mesh is too short from model's arms ⏚
Usage : Swipe the blocks & select linked all while using tool to scale.

════════════════════════════════════════════



────────────────────────────────────────────

Step 13: After that, We'll do the body part and make the mesh fit.
⏚ Use the move tool and scale tool!

════════════════════════════════════════════



────────────────────────────────────────────



❖ Moving the body upper to fit ❖

────────────────────────────────────────────



❖ Transforming some parts to fit the physic mesh ❖

────────────────────────────────────────────



❖ Perfectly fitted! ❖

────────────────────────────────────────────

Step 14: When done, Press "Tab" to change back to "Object mode" and we'll delete the body parts because we don't need them anymore as we used it for reference.
⏚ Select parts from right-side panel ⏚

════════════════════════════════════════════



────────────────────────────────────────────

Step 15: After that, We have to apply the model skeleton for physic mesh. To do that,Select "pm_physics" from right side panel and then go to "Modifier" tab. and click "Object" and select the "yourmodelpart_skeleton".



⚠ You must do this or your physic mesh will not work! ⚠

════════════════════════════════════════════

Step 16: Press "A" to select everything (bones and physic mesh) and then we'll go to "scene" tab and click "Source engine export" and then select "SMD" and select the path to the "Decomplied" folder you created before and do "Scene export" to make sure.

════════════════════════════════════════════



────────────────────────────────────────────



════════════════════════════════════════════

★ Now,We're done with physic mesh. This seems hard but it'll be easy as you do this for alot of time or port other models. ★
**C_arms (Optional)**
Guide has some mistakes in this section and will be updated soon.

Love yall for using my guide..
**Compling & Lua.** (Final step!)
★ Finally,We're at final steps.Everything will goes well as you follows the steps carefully! ★

We'll complie the model now and see if any errors.

Step 1: First,Go inside the "Proportion" folder and copy the "anims" folder into the "Decomplied" folder.

Step 2: Now,Open the qc. file with crowbar.

Step 3: Choose your output path to "Complied" folder and click complie!.

════════════════════════════════════════════



⚠ Please take a visit to **Troubleshooting** if any errors shows up! ⚠

════════════════════════════════════════════

Step 4: When done, Copy the models we got from the "Complied" folder.

Step 5: Then, Go to "Extracted" folder and go inside the models/survivors/. And delete the original model files and paste the model files we got.

Step 6: Now,Go back until you finds models & materials located. Create a folder named "lua" and then create a folder named "autorun" inside the "lua" folder.

Step 7: Create a txt. document inside and name it whatever you want and change ".txt to .lua".

Step 8: open the lua. with "Notepad++" and we'll have to write some codes.
Go inside the template folder and go into the "pm lua" and you'll see a example lua. copy everything inside and paste into your lua.

════════════════════════════════════════════

★ To write lua for work. You'll have to replace some codes. ★

**Replace**
➜ *Category* to your desired category name. *You can change any*
➜ *Name* to your desired model name. etc. Kazuma. *You can change any name*
➜ *modelname* with your mdl. name. etc. Kazuma.mdl *You have to put exact mdl. name from your model folder, Wrong mdl. name will not work so check it's matched or not*
➜ *arm* with your model arm mdl. name. *check your model folder's weapon/arms/ folder,Wrong mdl name will not work just like modelmdl name.*

════════════════════════════════════════════

**Modelmdl location**



────────────────────────────────────────────

*C_arms location*


────────────────────────────────────────────

**Customize**
# Health = "450" *Change 450 to any amount you want*
# Numgrenades = "4" *Change 4 to any amount you want*

════════════════════════════════════════════

*Here a comparison of uncompleted lua & completed lua*

*Uncompleted*


────────────────────────────────────────────

*Completed*


════════════════════════════════════════════

★ Update ★
I made a mistake at c_arm location. Location is supposed to be
"models/weapons/arms/*arms*mdl." no "survivors" included in arm path. You'll see a example at completed one.

★ Now, Save the lua. ( Ctrl + S).
We're done porting a model from l4d2 workshop from gmod workshop!. ★
**Testing**
Now, We'll test our model if it's worked or not.

1.Rename the "root" to any name you want. Etc. "Kazuma PM & NPC".

2. Copy the folder to your gmod addon folder location.

⏚ : Go to steam, Right-Click gmod and manage, then browse local files.
And then go inside Garrysmod/garrysmod/addons and paste there.

════════════════════════════════════════════



════════════════════════════════════════════

3. Launch Gmod. and make sure you have this addon to spawn (Ragdoll) as our model is folder addon. But Npc will be at "NPC" Tab of your spawnmenu.
https://steamproxy.net/sharedfiles/filedetails/?id=104603291

4. Create any game. (Now, wait till it loaded.. also rip if you have 1000+ addons).

5. Now, We'll spawn ragdoll first to see if there's any physic errors like stretchy ragdolls.
You'll see your addon at "Addon - Legacy".

════════════════════════════════════════════



────────────────────────────────────────────

*Ragdoll is fine* kinda funny tho.



────────────────────────────────────────────

6. Now, Test the Npc. (Both friendly & hostile)

*NPC is fine too!*



────────────────────────────────────────────

7. Now, Try changing your PM to your ported model to see model is fine in PM and arms.

*PM is fine also*



────────────────────────────────────────────

*As well as arms*



⚠ If your c_arms are error texture, Please visit the **Troubleshooting** section. ⚠

════════════════════════════════════════════

Now, We're done! Congratulations!! If you have some problems. Move to next section for troubleshooting the common problems.
**Troubleshooting**
Well, You've got a problem. Ain't you?

════════════════════════════════════════════

**Common problems**
Access_Violation error in crowbar : Make sure model complier is replaced with custom one and make sure you have "$maxverts 9999999" inside of your model qc.

Can't open file "*survivor_anims* : make sure to copy the anims folder into main model's folder.

Stretchy model parts on model : same as upper solution.

Error model : Make sure you linked the model mdl name correctly. Mostly will be models/survivors/model.mdl.

Error model arms : Make sure you linked the arms mdl name correctly as well.

Error model arms II : rename arms with your desired name and put them inside the "survivirs" folder and update the lua with updated c_arms path.

T-Pose ragdoll : You forgot the most important step at physic mesh. You have to link model's skeleton with physic mesh. Check the physic mesh section for solution.

T-pose ragdoll II : If you're bored to do everything back, just copy a "phy." from a working ragdoll model and replace the phy. of your ported model. Make sure to rename correctly and replaced!.

Lua corrections : use "/" instead or "\" in lua code if you copied from path shown in file explorer.

════════════════════════════════════════════

**Rare problems**
Stretchy ragdolls : You'll have to copy a .phy from a model you want and rename it to your model's phy. same as T-pose ragdoll II solution.

Destroyed qc. & smd : It's a very rare problem that happens in some models. It only generates 1. Smd 2. Smd etc. It's crowbar's fault so we can't fix or try use a model complier from l4d2 to generate smd.

Incompatible model version : Overwrite it with mdl ver. "53" or "55". If it's not work with "57".

Purple or pink colour texture on model : You have to edit the vtf. files and remove "lightwarp" lines from every vtf. files.

════════════════════════════════════════════

Now, that's all of the problems i encountered in my whole l4d2 port career. Hope you fixed your problem and "Enjoy"!.
**Credits**
Credits as always.
Me - Writing guide & assets from template.
Crackal0 - Custom model complier
Deadwater2 - Tutorials for proportion trick and other stuffs.

If you're brave enough to upload to workshop.. make sure to give a credit to me.
That's all folks. Like & comment down if you encountered any problems I haven't encountered.
Also...

──────▄▀▄─────▄▀▄
─────▄█░░▀▀▀▀▀░░█▄
─▄▄──█░░░░░░░░░░░█──▄▄
█▄▄█─█░░▀░░┬░░▀░░█─█▄▄█

You can pet him if you want or feed him some points if you wish :D.!
Bye.

════════════════════════════════════════════
**Updates**
v.1.1 : Updated the model complier link & Proportion trick link bcuz' i gave the wrong link.

════════════════════════════════════════════

v2 : Reworked the whole guide and some fixes.
- Added more key binding on "basic controls"
- fixed mistaken words
- updated steps
- better view for screenshots
- more stylish
- more easier ig.

That's all i think, i spent 1.5 hrs on this update.. also thanks for 4 stars rating!!

════════════════════════════════════════════

v2.1 : Fixed a bugged texts inside "Physic mesh" section.. Sorry about that.

════════════════════════════════════════════

V2.2 : Added new section "Qc editing II" for fixing arm not holding hl2 weapons correctly!.

════════════════════════════════════════════

=New guide released!=

https://steamproxy.net/sharedfiles/filedetails/?id=3344203435

════════════════════════════════════════════

76 Comments
Vaelastrasz 11 Feb @ 5:17pm 
Do you have a mind to write port gmod to l4d2 guide ? I think.. only you can make useful guide about port...
乃ㄖ乃爪卂匚 Ü  [author] 12 Jan @ 10:48am 
You can still use the guide at your own risk.. but i don’t recommend if you’re at start..

Still working on rewritten versions.
乃ㄖ乃爪卂匚 Ü  [author] 31 Dec, 2024 @ 8:03pm 
I double announce this.. This guide is outdated. And here is planned guides.

https://imgur.com/a/SKd2CAi

They’ll release sooner but I can’t say how long they will takes.. bcuz im gonna put alot of informations and details this time..
Caligo 24 Dec, 2024 @ 6:31am 
oh for sure, appreciate the help!
乃ㄖ乃爪卂匚 Ü  [author] 24 Dec, 2024 @ 5:26am 
@Caligo As i announced, these guides may outdated now.. but you can go inside my another guide and do the newer proportion trick method.. method in this guide is very old now.

Scroll down to +*Proportion trick*+ section.

https://steamproxy.net/sharedfiles/filedetails/?id=3344203435

You’ll only need new blender.
Caligo 24 Dec, 2024 @ 5:16am 
I did everything you said to do and it worked up until i had to do the proportion 2, where it said "Traceback (most recent call last):
File "\Proportion Trick 2", line 106, in <module>
KeyError: 'bpy_prop_collection[key]: key "ValveBiped.attachment_bandage_legL" not found'
Error: Python script fail, look in the console for now..." so im not really sure what to do from here to be honest.
乃ㄖ乃爪卂匚 Ü  [author] 14 Dec, 2024 @ 9:18am 
Just to announce : Im currently busy doing my youtube video stuffs.. after that, Both guides will be rewritten with newer version.. bcuz these guides are outdated and it may not work from every models.. so you better wait or try your luck.
乃ㄖ乃爪卂匚 Ü  [author] 14 Dec, 2024 @ 9:17am 
Scroll down. Come to DM..
feekazoid 14 Dec, 2024 @ 9:03am 
hey im having a problem. i've finished porting a model and i tested it. However, every time i boot up with said model, it'll say "The current model doesn't have a sequences, please choose another model." and the playermodel itself will be T-Posing. What did i do wrong?