Garry's Mod

Garry's Mod

47 ratings
How to Convert a Playermodel into a Npc
By "Malewife" McLovin
This guide will show you how to take any playermodel and turn it into an npc. Bare in mind, proportioned characters will not work, so yeah. Also, you will need some tools, mainly Crowbar and Notepad++.
   
Award
Favorite
Favorited
Unfavorite
Making the addon into it's original folders
Go to Steam/steamapps/common/GarrysMod/bin. Here you should find a .exe called "gmad". Send this .exe to your desktop as a shortcut.Then go to Steam/steamapps/common/GarrysMod/garrysmod/addons. There you should find all of your addons. Select the playermodel (addon) you want and copy it to the desktop. From there, drag the addon to gmad and it should convert the addon into folders.
(Not Mandatory) Renaming the folders
If you need to, rename the folders. For example: instead of models/player/someguy/playermodelnamehere.mdl, you could instead use models/npc/someguy/npcnamehere.mdl. This can prevent conflictions with the playermodel that still sits in your addons folder.
Decompiling the mdl to get the qc file
Launch Crowbar. If you don't have Crowbar, just search up "Crowbar" in the community hub. There should be a download link there. Anyway, once Crowbar is launched, make sure all settings are default, then proceed to browse for your addons folder. Once found, go to the playermodel (usually in a models/player/playermodelnamehere.mdl sort of line up in the folders) and click on it. Once done, click on the "Decomplie MDL" button. Boom! Done with decompiling! It should have created a new folder where the mdl sat called "decompiled 0.19".
Editing the qc
Go to the newly created "decompiled 0.19" file. There you should find a qc file. Open the qc file up with Notepad++. Scroll down til find a line along the lines of $includemodel "m_anm (or f_anm).mdl". Hopefully you still have this guide up because what you need to do is backspace all that info out and then copy and paste this in it's place: $includemodel "humans/male_shared.mdl"
$includemodel "humans/male_ss.mdl"
$includemodel "humans/male_gestures.mdl"
$includemodel "humans/male_postures.mdl". Bare in mind, those lines can also be female, just to let you know. Once done, save then compile the qc in Half Life 2. You can find your newly compiled model in steamapps/common/half-life 2/models. Take that mdl out and put it in the same place where your adoon's folder originally sat (in the models section of your addon, specifically where the mdl sits). Now your done, well not quite...
Creating a lua file
If i were you, i'd simply convert an addon that has a npc lua file then rename everything in it to fit your npc. Like the category it's in, what type of npc it is, how much health it has, etc and etc. If you don't understand, just comment in the comments section.
Well, I hope that helped.
I'm pretty sure this would work the same for npcs to playermodels. Instead of using those previous $incudemodels, you would use these: ($includemodel "m_anm.mdl"
$includemodel "m_gst.mdl"
$includemodel "m_pst.mdl"
$includemodel "m_shd.mdl"
$includemodel "m_ss.mdl"), or these: ($includemodel "f_anm.mdl"
$includemodel "f_gst.mdl"
$includemodel "f_pst.mdl"
$includemodel "f_shd.mdl"
$includemodel "f_ss.mdl").
29 Comments
CoriOri 25 Apr @ 5:54pm 
Knock that shit off with the Youtube link, damn.
cat robot 17 Jun, 2023 @ 10:51pm 
how do i compile the qc in half life two
dsaS 28 May, 2023 @ 9:44am 
mathewwwwwwwwwww 9 May, 2023 @ 1:01pm 
or you could just use the material tool and easy bonemerge tool :steamhappy:
cazrivs 1 Apr, 2022 @ 3:09am 
i tried using crowbar but it dosen't work and even i can't find a playermodel in the Addons Folder
Superbanner145 17 Dec, 2020 @ 3:08pm 
So for the LUA would you need to rename the MDL? or what?
Croissant 6 Jan, 2020 @ 4:22am 
Enemy NPCS still T-Pose when you walk up to them
Lazer Lancer 27 Jan, 2019 @ 4:54pm 
I don't understand how to make it into an Lua file, sent you a friend request, mind helping me out?
sp1c0m0de 22 Jun, 2018 @ 8:56pm 
Looking for someone willing to make me a model, will pay! I've been wanting to do this for a very long time! If interested please let me know! :D