Custom Walking animation not working for custom model.

I was porting an overwatch model, and it had its own animations from the game. I was able to port the overwatch walking animation into gmod, but when I turned the model into a reskined npc_citizen, the animation is not played and the npc doesn’t move. Here is the compiler code:


// Created by Crowbar 0.36.0.0

$ModelName "Overwatch/Mei/mei.mdl"

$animblocksize 32

$Model "studio" "head.smd" {

	/*flexfile "mei_reference.vta" 
	{
		defaultflex frame 0
		flex "open" frame 1
		flex "close" frame 2
		flex "teeth" frame 3
		flex "lsmile" frame 4
		flex "rsmile" frame 5
		flex "lfrown" frame 6
		flex "rfrown" frame 7
		flex "lgrin" frame 8
		flex "rgrin" frame 9
		flex "lsneer" frame 10
		flex "rsneer" frame 11
		flex "tongueout" frame 12
		flex "tonguedown" frame 13
		flex "leyeclose" frame 14
		flex "reyeclose" frame 15
		flex "leyewide" frame 16
		flex "reyewide" frame 17
		flex "lbrowraise" frame 18
		flex "rbrowraise" frame 19
		flex "lbrowdown" frame 20
		flex "rbrowdown" frame 21
		flex "lbrowangry" frame 22
		flex "rbrowangry" frame 23
		flex "lbrowsad" frame 24
		flex "rbrowsad" frame 25
		flex "lbrowstraight" frame 26
		flex "rbrowstraight" frame 27
	}

	flexcontroller phoneme range 0 1 open
	flexcontroller phoneme range 0 1 close
	flexcontroller phoneme range 0 1 teeth
	flexcontroller phoneme range 0 1 lsmile
	flexcontroller phoneme range 0 1 rsmile
	flexcontroller phoneme range 0 1 lfrown
	flexcontroller phoneme range 0 1 rfrown
	flexcontroller phoneme range 0 1 lgrin
	flexcontroller phoneme range 0 1 rgrin
	flexcontroller phoneme range 0 1 lsneer
	flexcontroller phoneme range 0 1 rsneer
	flexcontroller phoneme range 0 1 tongueout
	flexcontroller phoneme range 0 1 tonguedown
	flexcontroller phoneme range 0 1 leyeclose
	flexcontroller phoneme range 0 1 reyeclose
	flexcontroller phoneme range 0 1 leyewide
	flexcontroller phoneme range 0 1 reyewide
	flexcontroller phoneme range 0 1 lbrowraise
	flexcontroller phoneme range 0 1 rbrowraise
	flexcontroller phoneme range 0 1 lbrowdown
	flexcontroller phoneme range 0 1 rbrowdown
	flexcontroller phoneme range 0 1 lbrowangry
	flexcontroller phoneme range 0 1 rbrowangry
	flexcontroller phoneme range 0 1 lbrowsad
	flexcontroller phoneme range 0 1 rbrowsad
	flexcontroller phoneme range 0 1 lbrowstraight
	flexcontroller phoneme range 0 1 rbrowstraight
	flexcontroller phoneme range 0 1 blank

	localvar blank
	%open = open
	%close = close
	%teeth = teeth
	%lsmile = lsmile
	%rsmile = rsmile
	%lfrown = lfrown
	%rfrown = rfrown
	%lgrin = lgrin
	%rgrin = rgrin
	%lsneer = lsneer
	%rsneer = rsneer
	%tongueout = tongueout
	%tonguedown = tonguedown
	%leyeclose = leyeclose
	%reyeclose = reyeclose
	%leyewide = leyewide
	%reyewide = reyewide
	%lbrowraise = lbrowraise
	%rbrowraise = rbrowraise
	%lbrowdown = lbrowdown
	%rbrowdown = rbrowdown
	%lbrowangry = lbrowangry
	%rbrowangry = rbrowangry
	%lbrowsad = lbrowsad
	%rbrowsad = rbrowsad
	%lbrowstraight = lbrowstraight
	%rbrowstraight = rbrowstraight
	%blank = blank*/
}

$BodyGroup "Tank"
{
	studio "tank.smd"
	blank
}
$bodygroup "Tube"
{
	blank
	studio "tube.smd"
}
$bodygroup "Tank Cover"
{
	studio "tank_cover.smd"
	blank
}
$BodyGroup "Glasses"
{
	studio "glasses.smd"
	blank
}
$BodyGroup "Hairpin"
{
	studio "hairpin.smd"
	blank
}
$BodyGroup "Hair"
{
	studio "hair.smd"
	blank
}
$bodygroup "Body"
{
	studio "body.smd"
}
$bodygroup "Fur"
{
	studio "fur.smd"
	blank
}
$bodygroup "Eyes"
{
	studio "eyes.smd"
	blank
}

$includemodel "overwatch/mei/mei_anims.mdl"

$SurfaceProp "flesh"

$Contents "solid"

$EyePosition 0 0 70

$MaxEyeDeflection 90

$CDMaterials "models\brewstersmodels\overwatch\mei\"

$TextureGroup "skinfamilies"
{
	{ "body"  "fur"  }
	{ "body2" "fur"  }
	{ "body3" "fur"  }
	{ "body4" "fur"  }
	{ "body5" "fur"  }
	{ "body6" "fur2" }
	{ "body7" "fur"  }
}

$Attachment "eyes" "bone_0011" 0.03 3.86 3.58 rotate -90 -90 0
$Attachment "mouth" "bone_0011" 0.8 -5.8 -0.15 rotate 0 -80 -90

$CBox 0 0 0 0 0 0

$BBox -16.509 -40.65 -1.391 9.649 22.094 65.044

$jigglebone "bone_00CF"
{
	is_flexible
	{
		length 100
		yaw_stiffness 100
		yaw_damping 5
		pitch_stiffness 100
		pitch_damping 5
		allow_length_flex 
		along_stiffness 100
		along_damping 5
		tip_mass 200

	}
}
$jigglebone "bone_00D0"
{
	is_flexible
	{
		length 100
		yaw_stiffness 100
		yaw_damping 5
		pitch_stiffness 100
		pitch_damping 5
		allow_length_flex 
		along_stiffness 100
		along_damping 5
		tip_mass 200

	}
}
$jigglebone "bone_00D1"
{
	is_flexible
	{
		length 100
		yaw_stiffness 100
		yaw_damping 5
		pitch_stiffness 100
		pitch_damping 5
		allow_length_flex 
		along_stiffness 100
		along_damping 5
		tip_mass 200

	}
}

$Sequence "ragdoll" {
	"anims\ragdoll.smd"
	activity "ACT_DIERAGDOLL" 1
	fps 30
	loop
}
$sequence "idle" {
	"anims/idle.smd"
	activity "ACT_IDLE" 1
	fps 30
	loop 
}

$Sequence "walk_all" {
	"anims/a_WalkS.smd"
	"anims/a_WalkSE.smd"
	"anims/a_WalkE.smd"
	"anims/a_WalkNE.smd"
	"anims/a_WalkN.smd"
	"anims/a_WalkNW.smd"
	"anims/a_WalkW.smd"
	"anims/a_WalkSW.smd"
	"anims/a_WalkS.smd"
	activity "ACT_WALK" 1
	blend "move_yaw" -180 180
	blendwidth 9
	{ event 6006 0 "NPC_Citizen" }
	{ event 6007 0 "NPC_Citizen" }
	fadein 0.2
	fadeout 0.2
	node "walking"
	fps 20
	loop
}

$Sequence "walk_all_moderate" {
	"anims/a_WalkS.smd"
	"anims/a_WalkSE.smd"
	"anims/a_WalkE.smd"
	"anims/a_WalkNE.smd"
	"anims/a_WalkN.smd"
	"anims/a_WalkNW.smd"
	"anims/a_WalkW.smd"
	"anims/a_WalkSW.smd"
	"anims/a_WalkS.smd"
	activity "ACT_WALK" 1
	blend "move_yaw" -180 180
	blendwidth 9
	{ event 6006 0 "NPC_Citizen" }
	{ event 6007 0 "NPC_Citizen" }
	fadein 0.2
	fadeout 0.2
	node "walking"
	fps 20
	loop
}

$Sequence "run_all" {
	"anims/a_WalkS"
	"anims/a_WalkSE.smd"
	"anims/a_WalkE"
	"anims/a_WalkNE"
	"anims/a_WalkN"
	"anims/a_WalkNW"
	"anims/a_WalkW"
	"anims/a_WalkSW.smd"
	"anims/a_WalkS"
	activity "ACT_RUN" 1
	blend "move_yaw" -180 180
	blendwidth 9
	{ event 6004 0 "NPC_Citizen" }
	{ event 6005 0 "NPC_Citizen" }
	fadein 0.2
	fadeout 0.2
	node "running"
	fps 24
	loop
}

$collisionjoints physics.smd {

	$mass 200.0
	$inertia 10.00
	$damping 0.00
	$rotdamping 4.00
	$rootbone "body"

	$jointconstrain "bone_005f" x limit -25.00 50.00 0.00
	$jointconstrain "bone_005f" y limit -100.00 20.00 0.00
	$jointconstrain "bone_005f" z limit -10.00 10.00 0.00

	$jointconstrain "bone_0063" x limit 0.00 0.00 0.00
	$jointconstrain "bone_0063" y limit 0.00 120.00 0.00
	$jointconstrain "bone_0063" z limit 0.00 0.00 0.00

	$jointconstrain "bone_0055" x limit -25.00 50.00 0.00
	$jointconstrain "bone_0055" y limit -100.00 20.00 0.00
	$jointconstrain "bone_0055" z limit -10.00 10.00 0.00

	$jointconstrain "bone_0059" x limit 0.00 0.00 0.00
	$jointconstrain "bone_0059" y limit 0.00 120.00 0.00
	$jointconstrain "bone_0059" z limit 0.00 0.00 0.00

	$jointconstrain "bone_005a" x limit 0.00 0.00 0.00
	$jointconstrain "bone_005a" y limit -10.00 10.00 0.00
	$jointconstrain "bone_005a" z limit 0.00 0.00 0.00

	$jointconstrain "bone_0003" x limit -10.00 10.00 0.00
	$jointconstrain "bone_0003" y limit -10.00 10.00 0.00
	$jointconstrain "bone_0003" z limit -10.00 10.00 0.00

	$jointconstrain "bone_0036" x limit -120.00 90.00 0.00
	$jointconstrain "bone_0036" y limit -180.00 180.00 0.00
	$jointconstrain "bone_0036" z limit -120.00 20.00 0.00

	$jointconstrain "bone_0037" x limit -80.00 20.00 0.00
	$jointconstrain "bone_0037" y limit -120.00 0.00 0.00
	$jointconstrain "bone_0037" z limit 0.00 0.00 0.00

	$jointconstrain "bone_003a" x limit -60.00 60.00 0.00
	$jointconstrain "bone_003a" y limit -20.00 20.00 0.00
	$jointconstrain "bone_003a" z limit -50.00 50.00 0.00

	$jointconstrain "bone_000d" x limit -120.00 90.00 0.00
	$jointconstrain "bone_000d" y limit -180.00 180.00 0.00
	$jointconstrain "bone_000d" z limit -20.00 120.00 0.00

	$jointconstrain "bone_000e" x limit -80.00 20.00 0.00
	$jointconstrain "bone_000e" y limit -120.00 0.00 0.00
	$jointconstrain "bone_000e" z limit 0.00 0.00 0.00

	$jointconstrain "bone_001c" x limit -80.00 80.00 0.00
	$jointconstrain "bone_001c" y limit -50.00 50.00 0.00
	$jointconstrain "bone_001c" z limit -60.00 60.00 0.00

	$jointconstrain "bone_0010" x limit -70.00 70.00 0.00
	$jointconstrain "bone_0010" y limit -60.00 60.00 0.00
	$jointconstrain "bone_0010" z limit -70.00 70.00 0.00

	$jointconstrain "bone_0064" x limit 0.00 0.00 0.00
	$jointconstrain "bone_0064" y limit -10.00 10.00 0.00
	$jointconstrain "bone_0064" z limit 0.00 0.00 0.00
}

The root bone (which should be an origin bone below the model or the pelvis bone)has to move in the animation for the npc to actually move. If the root bone already is moving in the walking/running animation, then just add LX and/or LY to the $sequence parameters

Decompile the citizen animations. There’s a specific activity you need to use for the model to display correctly

activity “ACT_WALK” 1

Change that into whatever the citizen uses.

Thanks! The root bone movement worked!