Mod dosen't work

So recently i downloaded a knight model from a site and wanted to port it on gmod. I gave the model bones and some weight painting. Made the lua, materials and models folder and got the files in each of those folders. I made a addon.txt in the mod folder and copied it in the garrys mod addons folder. When i started the game to try the mod out it seemed that the model was not there. Not in the ragdoll section, not in the npc category and not in the playermodels list. I did the lua scripting for the npc and the playermodel. Can someone help me?

Try moving your files in the “garrysmod” folder instead of copying them in the “addons” folder.

Still dosen’t apear, any other sugestions?

Show me your lua for the playermodel

This is the playermodel lua
player_manager.AddValidModel( “Knight”, “models/knight.mdl” ) list.Set( “PlayerOptionsModel”, “Knight”, “models/knight.mdl” )

And this is the NPC lua
local Category = “Knight”

local NPC = { Name = “Knight”,
Class = “npc_citizen”,
Model = “models/knight.mdl”,
Health = “200”,
KeyValues = { citizentype = 4 },
Category = Category }

list.Set( “NPC”, “npc_knight”, NPC )

Hmm, can you show me your QC code from the model?

Ok sure, here is the qc text.

$ModelName “Knight.mdl”

$BodyGroup “Knight”
{
studio “knight_reference.smd”
}

$SurfaceProp “flesh”

$Contents “solid”

$EyePosition 0 0 70

$MaxEyeDeflection 90

$CDMaterials “models\knight”

$Attachment “eyes” “ValveBiped.Bip01_Head1” 3.67 -4.32 0 rotate 0 -80.1 -90
$Attachment “mouth” “ValveBiped.Bip01_Head1” 1 -6.5 0 rotate 0 -80 -90
$Attachment “chest” “ValveBiped.Bip01_Spine2” 5 4 0 rotate 0 90 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
$Attachment “anim_attachment_head” “ValveBiped.Bip01_Head1” 0 0 0 rotate -90 -90 0

$CBox 0 0 0 0 0 0

$BBox -14.234 -26.438 -2.684 8.223 26.342 73.343

// $HBoxSet “default”
// $HBox 1 “ValveBiped.Bip01_Head1” -1.25 -6.5 -3.19 8.25 3.5 3.31 “”
// $HBox 4 “ValveBiped.Bip01_L_UpperArm” 0 -2.75 -2.75 12.51 1.75 2.25 “”
// $HBox 4 “ValveBiped.Bip01_L_Forearm” 0 -2.19 -2.38 13 1.81 1.62 “”
// $HBox 4 “ValveBiped.Bip01_L_Hand” 0.06 -2 -1.5 4.06 1 2.5 “”
// $HBox 5 “ValveBiped.Bip01_R_UpperArm” 0 -3 -2.25 12.39 2 2.75 “”
// $HBox 5 “ValveBiped.Bip01_R_Forearm” -0.5 -2.2 -1.55 12.5 1.8 2.45 “”
// $HBox 5 “ValveBiped.Bip01_R_Hand” 0.06 -2 -2.5 4.06 1 1.5 “”
// $HBox 6 “ValveBiped.Bip01_L_Thigh” 0 -3.75 -3.25 17.85 3.75 3.25 “”
// $HBox 6 “ValveBiped.Bip01_L_Calf” 0 -3.51 -3.28 15.64 3.49 2.72 “”
// $HBox 6 “ValveBiped.Bip01_L_Foot” -1.07 -2 -2.84 5.04 5 2.16 “”
// $HBox 6 “ValveBiped.Bip01_L_Toe0” -0.5 -3 -2.19 2.5 0 2.46 “”
// $HBox 7 “ValveBiped.Bip01_R_Thigh” 0 -3.75 -3.25 17.85 3.75 3.25 “”
// $HBox 7 “ValveBiped.Bip01_R_Calf” 0 -3.51 -2.82 15.64 3.49 3.18 “”
// $HBox 7 “ValveBiped.Bip01_R_Foot” -1.06 -2.01 -2.28 5.05 4.99 2.72 “”
// $HBox 7 “ValveBiped.Bip01_R_Toe0” -0.5 -3 -2.6 2.5 0 2.1 “”
// $HBox 3 “ValveBiped.Bip01_Pelvis” -7.5 -5.5 -6 7.5 8.5 5 “”
// $HBox 2 “ValveBiped.Bip01_Spine2” -2.5 -2.5 -7 14.5 7.5 7 “”
// $SkipBoneInBBox

$Sequence “ragdoll” {
“knight_anims\ragdoll.smd”
activity “ACT_DIERAGDOLL” 1
fadein 0.2
fadeout 0.2
fps 30
}

$IncludeModel “humans/male_shared.mdl”
$IncludeModel “humans/male_ss.mdl”
$IncludeModel “humans/male_gestures.mdl”
$IncludeModel “humans/male_postures.mdl”

$IKChain “rhand” “ValveBiped.Bip01_R_Hand” knee 0.707 0.707 0
$IKChain “lhand” “ValveBiped.Bip01_L_Hand” knee 0.707 0.707 0
$IKChain “rfoot” “ValveBiped.Bip01_R_Foot” knee 0.707 -0.707 0
$IKChain “lfoot” “ValveBiped.Bip01_L_Foot” knee 0.707 -0.707 0

$CollisionJoints “knight_physics.smd”
{
$mass 0
$inertia 10
$damping 0.01
$rotdamping 1.5

$jointconstrain "ValveBiped.Bip01_Spine2" x limit -48 48 0
$jointconstrain "ValveBiped.Bip01_Spine2" y limit -25 25 0
$jointconstrain "ValveBiped.Bip01_Spine2" z limit -25 50 0

$jointconstrain "ValveBiped.Bip01_R_UpperArm" x limit -39 39 0
$jointconstrain "ValveBiped.Bip01_R_UpperArm" y limit -79 95 0
$jointconstrain "ValveBiped.Bip01_R_UpperArm" z limit -93 23 0

$jointconstrain "ValveBiped.Bip01_L_UpperArm" x limit -30 30 0
$jointconstrain "ValveBiped.Bip01_L_UpperArm" y limit -95 84 0
$jointconstrain "ValveBiped.Bip01_L_UpperArm" z limit -86 26 0

$jointconstrain "ValveBiped.Bip01_L_Forearm" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Forearm" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Forearm" z limit -149 4 0

$jointconstrain "ValveBiped.Bip01_L_Hand" x limit -37 37 0
$jointconstrain "ValveBiped.Bip01_L_Hand" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Hand" z limit -57 59 0

$jointconstrain "ValveBiped.Bip01_R_Forearm" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Forearm" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Forearm" z limit -149 4 0

$jointconstrain "ValveBiped.Bip01_R_Hand" x limit -60 60 0
$jointconstrain "ValveBiped.Bip01_R_Hand" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Hand" z limit -57 70 0

$jointconstrain "ValveBiped.Bip01_R_Thigh" x limit -12 12 0
$jointconstrain "ValveBiped.Bip01_R_Thigh" y limit -8 75 0
$jointconstrain "ValveBiped.Bip01_R_Thigh" z limit -97 32 0

$jointconstrain "ValveBiped.Bip01_R_Calf" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Calf" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Calf" z limit -12 126 0

$jointconstrain "ValveBiped.Bip01_Head1" x limit -20 20 0
$jointconstrain "ValveBiped.Bip01_Head1" y limit -25 25 0
$jointconstrain "ValveBiped.Bip01_Head1" z limit -13 30 0

$jointconstrain "ValveBiped.Bip01_L_Thigh" x limit -12 12 0
$jointconstrain "ValveBiped.Bip01_L_Thigh" y limit -73 6 0
$jointconstrain "ValveBiped.Bip01_L_Thigh" z limit -93 30 0

$jointconstrain "ValveBiped.Bip01_L_Calf" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Calf" y limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Calf" z limit -8 126 0

$jointconstrain "ValveBiped.Bip01_L_Foot" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_L_Foot" y limit -19 19 0
$jointconstrain "ValveBiped.Bip01_L_Foot" z limit -15 35 0

$jointconstrain "ValveBiped.Bip01_R_Foot" x limit 0 0 0
$jointconstrain "ValveBiped.Bip01_R_Foot" y limit -25 6 0
$jointconstrain "ValveBiped.Bip01_R_Foot" z limit -15 35 0

}

$CollisionText
{
animatedfriction
{
“animfrictionmin” “1.000000”
“animfrictionmax” “400.000000”
“animfrictiontimein” “0.500000”
“animfrictiontimeout” “0.300000”
“animfrictiontimehold” “0.000000”
}
editparams
{
“rootname” “valvebiped.bip01_pelvis”
“totalmass” “90.000000”
“jointmerge” “ValveBiped.Bip01_Pelvis,ValveBiped.Bip01_Spine1”
}
}

Remove all $includemodel lines and add

$includemodel “m_anm.mdl”

compile the QC code, put the model files in garrysmod/models

If you don’t mind, could you upload the files?

Here:

  • addon.txt is unnecessary

  • The model is not rigged properly

  • There aren’t any textures in the materials folder

  • The collision model should match the original model

  • You’ll need to use CaptainBigButt proportion method so the playemodel proportion won’t fucked up or stretched in-game

Some useful links:

http://forum.facepunch.com/showthread.php?t=1439159
http://forum.facepunch.com/showthread.php?t=1411683
http://forum.facepunch.com/showthread.php?t=1412147

Thanks, it seems it works now!