$Weightlist HipsUpperbodyReplace "valvebiped.Bip01_Pelvis" 1.0 "ValveBiped.Bip01_L_Thigh" 0.0 "ValveBiped.Bip01_R_Thigh" 0.0 $Weightlist UpperbodyReplace "valvebiped.Bip01_Spine" 1.0 $Weightlist HipsLowerbodyReplace "valvebiped.Bip01_Pelvis" 1.0 "ValveBiped.Bip01_Spine" 0.0 $Weightlist AllBones "valvebiped.Bip01_Pelvis" 1.0 $Weightlist UpperbodyBlend { "valvebiped.Bip01_Pelvis" 0.1 "ValveBiped.Bip01_L_Thigh" 0.0 "ValveBiped.Bip01_R_Thigh" 0.0 "ValveBiped.Bip01_Spine" 0.2 "ValveBiped.Bip01_Spine1" 0.4 "ValveBiped.Bip01_Spine2" 0.6 "ValveBiped.Bip01_Spine4" 1.0 } $Weightlist SlowerUpperbodyBlend { "valvebiped.Bip01_Pelvis" 0.0 "ValveBiped.Bip01_L_Thigh" 0.0 "ValveBiped.Bip01_R_Thigh" 0.0 "ValveBiped.Bip01_Spine" 0.1 "ValveBiped.Bip01_Spine1" 0.3 "ValveBiped.Bip01_Spine2" 0.4 "ValveBiped.Bip01_Spine4" 0.66 "ValveBiped.Bip01_R_Clavicle" 1.0 "ValveBiped.Bip01_L_Clavicle" 1.0 "ValveBiped.Bip01_Neck1" 1.0 } // // make a 2D 3x3 aim overlay by extracting out individual frames and finding their // difference from a neutral frame. // $definemacro makeaimlayer layername filename \\ $animation a_$layername$_neutral $filename$ frame 4 4 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_down_left $filename$ frame 0 0 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_down_center $filename$ frame 1 1 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_down_right $filename$ frame 2 2 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_mid_left $filename$ frame 3 3 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_mid_center $filename$ frame 4 4 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_mid_right $filename$ frame 5 5 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_up_left $filename$ frame 6 6 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_up_center $filename$ frame 7 7 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_up_right $filename$ frame 8 8 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $sequence $layername$ { \\ // a_$layername$_straight_up a_$layername$_straight_up a_$layername$_straight_up \\ a_$layername$_up_right a_$layername$_up_center a_$layername$_up_left \\ a_$layername$_mid_right a_$layername$_mid_center a_$layername$_mid_left \\ a_$layername$_down_right a_$layername$_down_center a_$layername$_down_left \\ blendref a_$layername$_neutral \\ blendcenter a_$layername$_mid_center \\ blendwidth 3 calcblend aim_yaw "anim_attachment_RH" ZR calcblend aim_pitch "anim_attachment_RH" YR \\ delta \\ iklock rfoot 1 0 iklock lfoot 1 0 \\ hidden \\ } \\ $continue $layername$ // // make a 2D 2x3 aim overlay by extracting out individual frames and finding their // difference from a neutral frame. // $definemacro makeaimlayerB layername filename \\ $animation a_$layername$_neutral $filename$ frame 1 1 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_mid_left $filename$ frame 0 0 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_mid_center $filename$ frame 1 1 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_mid_right $filename$ frame 2 2 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_up_left $filename$ frame 3 3 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_up_center $filename$ frame 4 4 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_up_right $filename$ frame 5 5 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $animation a_$layername$_straight_up $filename$ frame 6 6 subtract a_$layername$_neutral 0 weightlist HipsUpperbodyReplace \\ $sequence $layername$ { \\ a_$layername$_straight_up a_$layername$_straight_up a_$layername$_straight_up \\ a_$layername$_up_right a_$layername$_up_center a_$layername$_up_left \\ a_$layername$_mid_right a_$layername$_mid_center a_$layername$_mid_left \\ blendref a_$layername$_neutral \\ blendcenter a_$layername$_mid_center \\ blendwidth 3 calcblend aim_yaw "anim_attachment_RH" ZR calcblend aim_pitch "anim_attachment_RH" YR \\ delta \\ iklock rfoot 1 0 iklock lfoot 1 0 \\ hidden \\ } \\ $continue $layername$ // // make an idle animation from a single frame, add in aiming // $definemacro makeidle idlename filename frame aimlayer \\ $sequence $idlename$ $filename$ alignto reference frame $frame$ $frame$ numframes 30 loop ikrule "lhand" touch "ValveBiped.Bip01_R_Hand" addlayer $aimlayer$ \\ $continue $idlename$ // // make a running animation from a world space composite of an upper body animation // and a run animation, then blend them on top of a multiway walk and aiming // $definemacro makematchrun runname filename frame aimlayer \\ $animation a_$runname$_base $filename$ frame $frame$ $frame$ \\ $sequence $runname$_mod "..\hl2mp_ported_anims\RunN" { \\ LX LY rotateto 0 \\ alignto reference \\ weightlist UpperbodyBlend \\ worldspaceblend a_$runname$_base \\ weightlist HipsUpperbodyReplace \\ hidden \\ iklock lfoot 1 0 iklock rfoot 1 0 \\ } \\ $sequence $runname$ { \\ a_runS a_runSE a_runE a_runNE a_runN a_runNW a_runW a_runSW a_runS \\ blendwidth 9 blend move_yaw -180 180 \\ addlayer $runname$_mod \\ addlayer $aimlayer$ \\ } \\ $continue $runname$ // // make a running animation from an upper body animation blended on top of a // multiway run and aiming // $definemacro makerun runname filename frame aimlayer \\ $sequence $runname$_mod $filename$ { \\ LX LY rotateto 0 \\ startloop $frame$ \\ alignto reference \\ weightlist HipsUpperbodyReplace \\ hidden \\ loop \\ } \\ $sequence $runname$ { \\ a_runS a_runSE a_runE a_runNE a_runN a_runNW a_runW a_runSW a_runS \\ blendwidth 9 blend move_yaw -180 180 \\ addlayer $runname$_mod \\ addlayer $aimlayer$ \\ loop \\ } \\ $continue $runname$ // // make an idle animation from a single frame, add in aiming // $definemacro makecidle cidlename filename frame aimlayer \\ $sequence $cidlename$ $filename$ alignto reference frame $frame$ $frame$ numframes 30 loop ikrule "lhand" touch "ValveBiped.Bip01_R_Hand" addlayer $aimlayer$ \\ $continue $cidlename$ // // make an idle animation from a composite of a standing animation and a crouch animation, add in aiming // $definemacro makecidleB cidlename filename frame filenameB frameB aimlayer \\ $animation a_$cidlename$_base $filename$ frame $frame$ $frame$ \\ $sequence $cidlename$ $filenameB$ { \\ frame $frameB$ $frameB$ \\ alignto reference \\ weightlist UpperbodyBlend \\ worldspaceblend a_$cidlename$_base \\ weightlist AllBones \\ addlayer $aimlayer$ \\ ikrule "lhand" touch "ValveBiped.Bip01_R_Hand" \\ loop \\ } \\ $continue $cidlename$ // // make a crouched walking animation from a world spacecomposite of an upper body animation // and a crouch walkN animation, then blend them on top of a multiway walk and aiming // $definemacro makecwalk crouch_walkname filename frame aimlayer \\ $animation a_$crouch_walkname$_base $filename$ frame $frame$ $frame$ \\ $sequence $crouch_walkname$_mod "..\hl2mp_ported_anims\crouch_walkN" { \\ LX LY rotateto 0 \\ alignto reference \\ weightlist UpperbodyBlend \\ worldspaceblend a_$crouch_walkname$_base \\ weightlist HipsUpperbodyReplace \\ hidden \\ iklock lfoot 1 0 iklock rfoot 1 0 \\ } \\ $sequence $crouch_walkname$ { \\ a_crouch_walkS a_crouch_walkSE a_crouch_walkE a_crouch_walkNE a_crouch_walkN a_crouch_walkNW a_crouch_walkW a_crouch_walkSW a_crouch_walkS \\ blendwidth 9 blend move_yaw -180 180 \\ addlayer $crouch_walkname$_mod \\ addlayer $aimlayer$ \\ loop \\ } \\ $continue $crouch_walkname$ // // make a simple delta animation to add on to an upper body // $definemacro makerange rangename filename startframe \\ $animation a_$rangename$ $filename$ subtract a_$rangename$ $startframe$ weightlist HipsUpperbodyReplace \\ $sequence $rangename$ a_$rangename$ { \\ iklock lfoot 1 0 iklock rfoot 1 0 \\ delta \\ } \\ $continue $rangename$ // // make a jump animation from a composite of an upper body pose and the CS jump // $definemacro makejump jumpname filename frame \\ $animation a_$jumpname$ $filename$ frame $frame$ $frame$ weightlist SlowerUpperbodyBlend \\ $sequence $jumpname$ "..\hl2mp_ported_anims\CS_Jump" { \\ weightlist SlowerUpperbodyBlend \\ worldspaceblend a_$jumpname$ \\ weightlist AllBones \\ } \\ $continue $jumpname$ // // make a upper body replacement animation // $definemacro makereload reloadname filename \\ $sequence $reloadname$ $filename$ { \\ weightlist UpperbodyBlend \\ iklock lfoot 1 0 iklock rfoot 1 0 \\ } \\ $continue $reloadname$ // ================================================================ // 9-way blends $definemacro makematchrun_9way runname filename frame aimlayer idlefile idleframe \\ $animation a_$runname$_base $filename$ frame $frame$ $frame$ \\ $sequence $runname$_mod "..\hl2mp_ported_anims\RunN" { \\ LX LY rotateto 0 \\ alignto reference \\ weightlist UpperbodyBlend \\ worldspaceblend a_$runname$_base \\ weightlist UpperbodyReplace \\ hidden \\ iklock lfoot 1 0 iklock rfoot 1 0 \\ } \\ $sequence $runname$_static $idlefile$ frame $idleframe$ $idleframe$ alignto reference weightlist UpperbodyReplace hidden \\ $animation a_$runname$C $idlefile$ frame $idleframe$ $idleframe$ loop rotateto -180 alignto reference cmdlist lockfeet \\ $sequence $runname$ { \\ a_runSW a_runS a_runSE \\ a_runW a_$runname$C a_runE \\ a_runNW a_runN a_runNE \\ // a_runS a_runSE a_runE a_runNE a_runN a_runNW a_runW a_runSW a_runS blendwidth 3 blend move_y -1 1 blend move_x -1 1 \\ // blendwidth 9 blend move_yaw -180 180 blendlayer $runname$_static 0 0 0 0 local \\ blendlayer $runname$_mod -2 -2 -1 0 poseparameter move_x spline \\ blendlayer $runname$_mod 0 1 2 2 poseparameter move_x spline \\ blendlayer $runname$_mod -1 -1 -1 0 poseparameter move_y spline \\ blendlayer $runname$_mod 0 1 2 2 poseparameter move_y spline \\ addlayer $aimlayer$ \\ } \\ $continue $runname$ $definemacro makerun_9way runname filename frame aimlayer idlefile idleframe \\ $sequence $runname$_mod $filename$ { \\ LX LY rotateto 0 \\ startloop $frame$ \\ alignto reference \\ weightlist UpperbodyReplace \\ hidden \\ loop \\ } \\ $sequence $runname$_static $idlefile$ frame $idleframe$ $idleframe$ alignto reference weightlist UpperbodyReplace hidden \\ $animation a_$runname$C $idlefile$ frame $idleframe$ $idleframe$ loop rotateto -180 alignto reference cmdlist lockfeet \\ $sequence $runname$ { \\ a_runSW a_runS a_runSE \\ a_runW a_$runname$C a_runE \\ a_runNW a_runN a_runNE \\ // a_runS a_runSE a_runE a_runNE a_runN a_runNW a_runW a_runSW a_runS blendwidth 3 blend move_y -1 1 blend move_x -1 1 \\ // blendwidth 9 blend move_yaw -180 180 blendlayer $runname$_static 0 0 0 0 local \\ blendlayer $runname$_mod -1 -1 -1 0 poseparameter move_x spline \\ blendlayer $runname$_mod 0 1 2 2 poseparameter move_x spline \\ blendlayer $runname$_mod -1 -1 -1 0 poseparameter move_y spline \\ blendlayer $runname$_mod 0 1 2 2 poseparameter move_y spline \\ addlayer $aimlayer$ \\ loop \\ } \\ $continue $runname$ $definemacro makecwalk_9way crouch_walkname filename frame aimlayer idlefile idleframe \\ $animation a_$crouch_walkname$_base $filename$ frame $frame$ $frame$ \\ $sequence $crouch_walkname$_mod "..\hl2mp_ported_anims\crouch_walkN" { \\ LX LY rotateto 0 \\ alignto reference \\ weightlist UpperbodyBlend \\ worldspaceblend a_$crouch_walkname$_base \\ weightlist UpperbodyReplace \\ hidden \\ iklock lfoot 1 0 iklock rfoot 1 0 \\ } \\ $animation a_$crouch_walkname$C $idlefile$ frame $idleframe$ $idleframe$ loop rotateto -180 alignto reference cmdlist lockfeet \\ $sequence $crouch_walkname$ { \\ a_crouch_walkSW a_crouch_walkS a_crouch_walkSE \\ a_crouch_walkW a_$crouch_walkname$C a_crouch_walkE \\ a_crouch_walkNW a_crouch_walkN a_crouch_walkNE \\ // a_crouch_walkS a_crouch_walkSE a_crouch_walkE a_crouch_walkNE a_crouch_walkN a_crouch_walkNW a_crouch_walkW a_crouch_walkSW a_crouch_walkS blendwidth 3 blend move_y -1 1 blend move_x -1 1 \\ // blendwidth 9 blend move_yaw -180 180 addlayer $crouch_walkname$_mod \\ addlayer $aimlayer$ \\ loop \\ } \\ $continue $crouch_walkname$ // ================================================================ // Walks $definemacro makematchwalk_9way walkname filename frame aimlayer idlefile idleframe \\ $animation a_$walkname$_base $filename$ frame $frame$ $frame$ \\ $sequence $walkname$_mod "..\male_shared_anims\a_WalkN" { \\ LX LY rotateto 0 \\ alignto reference \\ weightlist UpperbodyBlend \\ worldspaceblend a_$walkname$_base \\ weightlist UpperbodyReplace \\ hidden \\ iklock lfoot 1 0 iklock rfoot 1 0 \\ } \\ $sequence $walkname$_static $idlefile$ frame $idleframe$ $idleframe$ alignto reference weightlist UpperbodyReplace hidden \\ $animation a_$walkname$C $idlefile$ frame $idleframe$ $idleframe$ loop rotateto -180 alignto reference cmdlist lockfeet \\ $sequence $walkname$ { \\ a_walkSW a_walkS a_walkSE \\ a_walkW a_$walkname$C a_walkE \\ a_walkNW a_walkN a_walkNE \\ blendwidth 3 blend move_y -1 1 blend move_x -1 1 \\ blendlayer $walkname$_static 0 0 0 0 local \\ blendlayer $walkname$_mod -2 -2 -1 0 poseparameter move_x spline \\ blendlayer $walkname$_mod 0 1 2 2 poseparameter move_x spline \\ blendlayer $walkname$_mod -1 -1 -1 0 poseparameter move_y spline \\ blendlayer $walkname$_mod 0 1 2 2 poseparameter move_y spline \\ addlayer $aimlayer$ \\ } \\ $continue $walkname$ $definemacro makewalk_9way walkname filename frame aimlayer idlefile idleframe \\ $sequence $walkname$_mod $filename$ { \\ LX LY rotateto 0 \\ startloop $frame$ \\ alignto reference \\ weightlist UpperbodyReplace \\ hidden \\ loop \\ } \\ $sequence $walkname$_static $filename$ frame 0 0 alignto reference weightlist UpperbodyReplace hidden \\ $animation a_$walkname$C $idlefile$ frame $idleframe$ $idleframe$ loop rotateto -180 alignto reference cmdlist lockfeet \\ $sequence $walkname$ { \\ a_walkSW a_walkS a_walkSE \\ a_walkW a_$walkname$C a_walkE \\ a_walkNW a_walkN a_walkNE \\ blendwidth 3 blend move_y -1 1 blend move_x -1 1 \\ blendlayer $walkname$_static 0 0 0 0 local \\ blendlayer $walkname$_mod -1 -1 -1 0 poseparameter move_x spline \\ blendlayer $walkname$_mod 0 1 2 2 poseparameter move_x spline \\ blendlayer $walkname$_mod -1 -1 -1 0 poseparameter move_y spline \\ blendlayer $walkname$_mod 0 1 2 2 poseparameter move_y spline \\ addlayer $aimlayer$ \\ loop \\ } \\ $continue $walkname$