[Tutorial] Fury_161's Complete Guide To Qc Magic

fury_l6lfury_l6l Join Date: 2003-12-27 Member: 24795Banned
<div class="IPBDescription">A guide to QC editing. *LONG!*</div> -Fury_161's Complete Guide To QC Editing-
-----------------------------------------
This guide will cover everything you need to know about the .qc file.
-----------------------------------------

Things you will need for proper qc editing:
-Milkshape 3D Modeler Version 1.6.5 or higher
-Studiomdl
-Notepad
-Jed's HLMV
-----------------------------------------

To start off, take a look at Panzer's guide to filetypes.
<a href='http://hl-improvement.com/forums/viewtopic.php?t=1021' target='_blank'>http://hl-improvement.com/forums/viewtopic.php?t=1021</a>

If you don't feel like it, I'll go over them now for you.
MDL - Your basic Half-Life model file, can be accompanied with texture files and animation files.
SMD - A Half-Life model reference file or animation file. They can be imported into MS3D with the import function.
QC - A file that comes along with a decompiled model (will be explained later) It carries all the neccisary information for the model to work.
MS3D - A saved model that can only be opened using Milkshape. MS3D files save ALL information in the model.
BMP - 256 Color bitmap image, it's a texture file for HL models.

-----------------------------------------

-To Begin-
Select the model you want to work with. Let's say it's the JaButin HGRUNT model . Make sure it is the one that I had modified. The HGRUNT is the human soldier found in

Half-Life, and Sven-Coop. Make sure you create a new directory for this model. Make a folder called "hgrunt" on your desktop, and copy and paste the hgrunt.mdl file into that

folder. Make sure you grab all its files. Sometimes attached to the model can be "hgrunt01.mdl, hgrunt02.mdl," and "hgruntT.mdl" The T file is the texture, while numbered

files usually store information. Once all the models are in the folder, open up Milkshape 1.6.5. Open the tools menu, and scroll down to Krastisto's HL Model Decompiler. Click

the "..." button and browse to your hgrunt folder on your desktop. Select "hgrunt.mdl" and decompile. You should now see a list of items adding up in the grey window. Once it

is done, click ok, and open your hgrunt folder. Make sure you right-click, and view in details (it makes things easier) and organize the files by type. You should see a bunch

of textures, (.bmp files) a whole lot of animation files and reference files (.smd) and last but not least, the .qc file. The qc should be right under the model files if you

organized your folder like I suggested. Right click it, and click "open with" For XP users, click "Select File From List" and select notepad. Notepad is the best tool to use

to edit .qc files. For 98 users, hold down shift and and right click, and click open with. Select notepad to open it with (always).

Now you have a .qc file opened up in notepad. It should look like this...









/*
==============================================================================

QC script generated by Half-Life MDL Decompiler v1.01
2002, Kratisto. Based on code from Valve's HL SDK.

hgrunt.qc
Original model name: hgrunt.mdl

==============================================================================
*/

$modelname "hgrunt.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0


$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

$eyeposition 0.000000 0.000000 73.000000

// reference meshes
$body body "hgrunt_body_ref"

$bodygroup heads
{
studio "hgrunt_head_mask_ref"
studio "hgrunt_head_grunt_ref"
studio "hgrunt_head_shotgun_ref"
studio "hgrunt_head_commander_ref"
}
$bodygroup weapons
{
studio "hgrunt_m4_ref"
studio "hgrunt_spas12_ref"
blank
}

// 2 skin families
$texturegroup skinfamilies
{
{ "soldier_hand_wht.bmp" "soldier_arm_wht.bmp" "soldier_head_grunt_wht.bmp" "soldier_head_commander_wht.bmp" }
{ "soldier_hand_blk.bmp" "soldier_arm_blk.bmp" "soldier_head_grunt_blk.bmp" "soldier_head_commander_blk.bmp" }
}

// 3 attachments
$attachment 0 "Bip01 R Hand" 32.000000 2.500000 8.500000
$attachment 1 "Bip01 R Hand" 0.000000 0.000000 0.000000
$attachment 2 "Bip01 Head" 0.000000 0.000000 0.000000

// 2 bone controllers
$controller 0 "Bip01 Head" XR -70.000000 70.000000
$controller mouth "Mouth" ZR 0.000000 20.000000

// 17 hit boxes
$hbox 3 "Bip01 Pelvis" -3.640000 -6.050000 -8.070000 6.340000 8.410000 8.300000
$hbox 6 "Bip01 L Thigh" 0.000000 -6.350000 -6.050000 16.309999 5.570000 3.840000
$hbox 6 "Bip01 L Calf" 0.000000 -5.190000 -4.440000 22.150000 5.680000 4.780000
$hbox 6 "Bip01 L Foot" -1.080000 -1.900000 -3.240000 3.230000 11.210000 2.860000
$hbox 7 "Bip01 R Thigh" 0.000000 -6.350000 -4.060000 16.309999 5.570000 5.820000
$hbox 7 "Bip01 R Calf" 0.000000 -5.190000 -5.010000 22.150000 5.680000 4.220000
$hbox 10 "Bip01 Spine1" -4.570000 -9.990000 -10.520000 11.490000 8.420000 10.750000
$hbox 10 "Bip01 Spine2" 0.000000 -10.510000 -11.440000 14.050000 9.260000 12.420000
$hbox 4 "Bip01 L UpperArm" -2.810000 -1.990000 -4.740000 12.060000 4.780000 3.500000
$hbox 4 "Bip01 L Forearm" 0.000000 -1.430000 -2.150000 10.210000 4.010000 2.980000
$hbox 4 "Bip01 L Hand" -0.270000 -2.650000 -2.750000 7.580000 1.890000 1.800000
$hbox 5 "Bip01 R UpperArm" -2.830000 -1.990000 -3.460000 12.030000 4.780000 4.780000
$hbox 5 "Bip01 R Forearm" 0.000000 -1.430000 -2.940000 10.190000 4.000000 2.180000
$hbox 5 "Bip01 R Hand" -0.160000 -2.040000 -1.790000 7.500000 2.400000 2.760000
$hbox 11 "Bip01 Head" 9.000000 -5.220000 -4.590000 15.150000 7.560000 6.010000
$hbox 11 "Bip01 Head" 1.700000 -5.220000 -4.590000 9.000000 1.000000 6.010000
$hbox 1 "Bip01 Head" 1.700000 1.000000 -4.590000 9.000000 7.560000 6.010000

// 86 animation sequences
$sequence "walk1" "walk1" LX fps 35 loop ACT_WALK 1
$sequence "run" "run" LX fps 40 loop ACT_RUN 1
$sequence "victorydance" "finger" fps 5 ACT_VICTORY_DANCE 1
$sequence "cower" "cower" fps 14 ACT_COWER 1
$sequence "smflinch" "smflinch" fps 20 ACT_SMALL_FLINCH 5
$sequence "leftlegsmflinch" "leftlegsmflinch" fps 22 ACT_FLINCH_LEFTLEG 1
$sequence "rightlegsmflinch" "rightlegsmflinch" fps 22 ACT_FLINCH_RIGHTLEG 1
$sequence "rightarmflinch" "rightarmflinch" fps 22 ACT_FLINCH_RIGHTARM 1
$sequence "leftarmflinch" "leftarmflinch" fps 22 ACT_FLINCH_LEFTARM 1
$sequence "launchgrenade" "launchgrenade" fps 30 ACT_RANGE_ATTACK2 1 { event 8 24 }
$sequence "throwgrenade" "throwgrenade" fps 30 ACT_RANGE_ATTACK2 1 { event 7 34 }
$sequence "idle1" "idle1" fps 4 loop ACT_IDLE 1
$sequence "idle2" "idle2" fps 4 loop ACT_IDLE 1
$sequence "combatidle" "combatidle" fps 20 loop ACT_IDLE_ANGRY 1
$sequence "frontkick" "frontkick" fps 35 ACT_MELEE_ATTACK1 1 { event 3 13 } { event 2010 13 }
$sequence "crouching_idle" "crouching_idle" fps 15 ACT_CROUCH 0
$sequence "crouching_wait" "crouching_wait" fps 15 ACT_CROUCH 0
$sequence "crouching_mp5" "crouching_mp5_blend1" "crouching_mp5_blend2" blend XR -45 45 fps 20 loop ACT_RANGE_ATTACK1 1 {
{ event 4 1 }
{ event 5001 1 "50" }
{ event 5001 1 "21" }
}
$sequence "standing_mp5" "standing_mp5_blend1" "standing_mp5_blend2" blend XR -45 45 fps 20 loop {
{ event 4 1 }
{ event 5001 1 "50" }
{ event 5001 1 "21" }
}
$sequence "reload_mp5" "reload_mp5" fps 36 ACT_RELOAD 1 {
{ event 2 41 }
{ event 1004 11 "items/cliprelease1.wav" }
{ event 1004 39 "items/clipinsert1.wav" }
}
$sequence "crouching_shotgun" "crouching_shotgun_blend1" "crouching_shotgun_blend2" blend XR -45 45 fps 15 ACT_RANGE_ATTACK1 1 {
{ event 4 1 }
{ event 5001 1 "51" }
{ event 1004 7 "weapons/scock1.wav" }
}
$sequence "standing_shotgun" "standing_shotgun_blend1" "standing_shotgun_blend2" blend XR -45 45 fps 15 {
{ event 4 1 }
{ event 5001 1 "51" }
{ event 1004 7 "weapons/scock1.wav" }
}
$sequence "reload_shotgun" "reload_shotgun" fps 36 ACT_RELOAD 1 {
{ event 2 41 }
{ event 1004 11 "weapons/reload1.wav" }
{ event 1004 29 "weapons/reload3.wav" }
{ event 1004 39 "weapons/reload1.wav" }
}
$sequence "advance_signal" "advance_signal" fps 25 ACT_SIGNAL1 1 { event 10 7 }
$sequence "flank_signal" "flank_signal" fps 19 ACT_SIGNAL2 1
$sequence "retreat_signal" "retreat_signal" fps 25 ACT_SIGNAL3 1
$sequence "drop_grenade" "drop_grenade" fps 40 ACT_SPECIAL_ATTACK1 1 { event 9 31 }
$sequence "limpingwalk" "limpingwalk" LX fps 30 loop ACT_WALK_HURT 1
$sequence "limpingrun" "limpingrun" LX fps 30 loop ACT_RUN_HURT 1
$sequence "180L" "180L" fps 12 ACT_TURN_LEFT 1
$sequence "180R" "180R" fps 12 ACT_TURN_RIGHT 1
$sequence "strafeleft" "strafeleft" LX LY fps 30 loop ACT_STRAFE_LEFT 1
$sequence "straferight" "straferight" LX LY fps 30 loop ACT_STRAFE_RIGHT 1
$sequence "dieback1" "dieback1" X fps 25 ACT_DIEBACKWARD 1 { event 11 5 } { event 2001 17 }
$sequence "dieforward" "dieforward" X fps 30 ACT_DIEFORWARD 1 { event 11 12 } { event 2001 19 }
$sequence "diesimple" "diesimple" X fps 15 ACT_DIESIMPLE 1 { event 11 3 } { event 2001 10 }
$sequence "diebackwards" "diebackwards" X fps 30 ACT_DIEBACKWARD 1 { event 11 6 } { event 2001 12 }
$sequence "dieheadshot" "dieheadshot" X fps 30 ACT_DIE_HEADSHOT 1 { event 11 1 } { event 2001 20 }
$sequence "diegutshot" "diegutshot" X fps 30 ACT_DIE_GUTSHOT 1 { event 11 0 } { event 2001 29 }
$sequence "barnacled1" "barnacled1" fps 20 ACT_BARNACLE_HIT 1
$sequence "barnacled2" "barnacled2" fps 25 loop ACT_BARNACLE_PULL 1 {
{ event 1008 1 "hgrunt/gr_die1.wav" }
{ event 4 9 }
{ event 5001 9 "50" }
{ event 5 11 }
{ event 5001 11 "50" }
{ event 1008 13 "hgrunt/gr_pain4.wav" }
{ event 6 13 }
{ event 5001 13 "50" }
{ event 5 15 }
{ event 5001 15 "50" }
{ event 6 23 }
{ event 5001 23 "50" }
{ event 4 24 }
{ event 5001 24 "50" }
{ event 1008 24 "hgrunt/gr_die2.wav" }
{ event 6 25 }
{ event 5001 25 "50" }
{ event 4 41 }
{ event 5001 41 "50" }
{ event 5 43 }
{ event 5001 43 "50" }
{ event 6 47 }
{ event 5001 47 "50" }
{ event 5 60 }
{ event 5001 60 "50" }
{ event 1008 62 "hgrunt/gr_die1.wav" }
{ event 4 62 }
{ event 5001 62 "50" }
{ event 5 64 }
{ event 5001 64 "50" }
{ event 6 67 }
{ event 5001 67 "50" }
{ event 4 68 }
{ event 5001 68 "50" }
}
$sequence "barnacled3" "barnacled3" fps 18 ACT_BARNACLE_CHOMP 1
$sequence "barnacled4" "barnacled4" fps 15 loop ACT_BARNACLE_CHEW 1
$sequence "dead_on_stomach" "dead_on_stomach" fps 10
$sequence "deadstomach" "deadstomach" fps 10
$sequence "deadside" "deadside" fps 10
$sequence "deadsitting" "deadsitting" fps 10
$sequence "repel_jump" "repel_jump" fps 22 ACT_HOVER 1
$sequence "repel_repel" "repel_repel" fps 18 loop ACT_GLIDE 1
$sequence "repel_shoot" "repel_shoot_blend1" "repel_shoot_blend2" blend XR -90 45 fps 18 loop ACT_FLY 1 {
{ event 4 0 }
{ event 5 2 }
{ event 6 4 }
{ event 5001 0 }
{ event 5001 2 }
{ event 5001 4 }
}
$sequence "repel_land" "repel_land" fps 20 ACT_LAND 1
$sequence "repel_die" "repel_die" fps 12
$sequence "dragholeidle" "dragholeidle" fps 10 loop
$sequence "draghole" "draghole" fps 5 { event 1000 1 } { event 1004 20 "debris/bustflesh1.wav" }
$sequence "bustwall" "bustwall" fps 20 { event 1000 1 }
$sequence "hoprail" "hoprail" fps 22
$sequence "converse1" "converse1" fps 14 loop
$sequence "converse2" "converse2" fps 14 loop
$sequence "startleleft" "startleleft" fps 12
$sequence "startleright" "startleright" fps 12
$sequence "divecover" "divecover" fps 22
$sequence "defuse" "defuse" fps 14 loop
$sequence "corner1" "corner1" fps 14 loop
$sequence "corner2" "corner2" fps 10 loop
$sequence "stone_toss" "stone_toss" fps 15
$sequence "cliffdie" "cliffdie" AX AY AZR fps 36 { event 1001 0 } { event 1000 0 }
$sequence "diveaside_idle" "diveaside_idle" fps 30 loop
$sequence "diveaside" "diveaside" AX AY AZR fps 30 {
{ event 4 0 }
{ event 5 2 }
{ event 6 4 }
{ event 4 14 }
{ event 5 16 }
{ event 6 18 }
}
$sequence "kneeldive_idle" "kneeldive_idle" fps 30 loop
$sequence "kneeldive" "kneeldive" AX AY AZR fps 30 {
{ event 4 0 }
{ event 5 2 }
{ event 6 4 }
{ event 4 14 }
{ event 5 16 }
{ event 6 18 }
}
$sequence "WM_button" "WM_button" AX AY AZR fps 30
$sequence "WM_moatjump" "WM_moatjump" AX AY AZR fps 30
$sequence "bustwindow" "bustwindow" fps 24 { event 1003 5 "break" }
$sequence "dragright" "dragright" LX fps 28 loop
$sequence "dragleft" "dragleft" LX fps 28 loop
$sequence "trackwave" "trackwave" fps 24 loop
$sequence "trackdive" "trackdive" fps 28 { event 1003 38 "switch" }
$sequence "flyback" "flyback" fps 25 { event 1003 29 "zap" } { event 1008 25 "weapons/electro4.wav" }
$sequence "impaled" "impaled" fps 10 { event 1000 1 }
$sequence "jumptracks" "jumptracks" fps 30
$sequence "pipetoss" "pipetoss" fps 30
$sequence "plunger" "plunger" fps 22
$sequence "soldier_dump" "soldier_dump" fps 28
$sequence "soldier_dump_idle" "soldier_dump_idle" fps 28 loop
$sequence "soldier_shoot_ahead" "soldier_shoot_ahead" fps 32 loop {
{ event 4 1 }
{ event 5 6 }
{ event 6 12 }
{ event 5001 1 "50" }
{ event 5001 6 "50" }
{ event 5001 12 "50" }
}
$sequence "soldier_kick" "soldier_kick" fps 35 { event 1003 13 "00xy_frontkick" }

// End of QC file.


________________________________________________________________________________



.QC Code works a lot like C++ code. Anything with two // In front of it is completely ignored by the compiler. Anything with $ in front of it is very important. Notice that

each sequence file has a $ sign in front of it, and so do all the reference files. Now I will explain some simple commands.

$sequence - This means there is an animation to be added into the model. To add another animation to the .qc file, just add it to the end.
ACT - These are acts, directly tied in with the C++ code. ACT_IDLE would mean that that particular animation is an idle, and the code will play it while the grunt should be in

an idle state.
fps - frames per second. This determines how fast the animation is played. All the animations have a given fps rate. For custum animations, it is best to experiment with FPS

rates. It all depends on how fast or slow you want the animation to be played.
{event } - Events are also tied in with code. Certain events mean certain things will happen. Like a sound will get played, or a bullet will be fired.
"xxx" "xxx" - The first set of quotations don't really mean a whole lot, they just determine the name of an animation. The second however, are deathly important. They

determine which animation is used.
blend - blends mean that two animations blend in with each other. This is used for shooting animations. blend1 is the grunt shooting down, blend2 is the grunt shooting up.

They blend together ingame so that the grunt will be aiming at you while he fires.
L, X, Y, Z - These commands tell the animation not to move forward, backward, left, or right. They will move ingame, but the animation won't jump around.

This covers all the animation articles. Now for hitboxes. A hitbox determines what part of the model you can actually hit ingame, and what its property is.

// 17 hit boxes
$hbox 3 "Bip01 Pelvis" -3.640000 -6.050000 -8.070000 6.340000 8.410000 8.300000
$hbox 6 "Bip01 L Thigh" 0.000000 -6.350000 -6.050000 16.309999 5.570000 3.840000
$hbox 6 "Bip01 L Calf" 0.000000 -5.190000 -4.440000 22.150000 5.680000 4.780000
$hbox 6 "Bip01 L Foot" -1.080000 -1.900000 -3.240000 3.230000 11.210000 2.860000
$hbox 7 "Bip01 R Thigh" 0.000000 -6.350000 -4.060000 16.309999 5.570000 5.820000
$hbox 7 "Bip01 R Calf" 0.000000 -5.190000 -5.010000 22.150000 5.680000 4.220000
$hbox 10 "Bip01 Spine1" -4.570000 -9.990000 -10.520000 11.490000 8.420000 10.750000
$hbox 10 "Bip01 Spine2" 0.000000 -10.510000 -11.440000 14.050000 9.260000 12.420000
$hbox 4 "Bip01 L UpperArm" -2.810000 -1.990000 -4.740000 12.060000 4.780000 3.500000
$hbox 4 "Bip01 L Forearm" 0.000000 -1.430000 -2.150000 10.210000 4.010000 2.980000
$hbox 4 "Bip01 L Hand" -0.270000 -2.650000 -2.750000 7.580000 1.890000 1.800000
$hbox 5 "Bip01 R UpperArm" -2.830000 -1.990000 -3.460000 12.030000 4.780000 4.780000
$hbox 5 "Bip01 R Forearm" 0.000000 -1.430000 -2.940000 10.190000 4.000000 2.180000
$hbox 5 "Bip01 R Hand" -0.160000 -2.040000 -1.790000 7.500000 2.400000 2.760000
$hbox 11 "Bip01 Head" 9.000000 -5.220000 -4.590000 15.150000 7.560000 6.010000
$hbox 11 "Bip01 Head" 1.700000 -5.220000 -4.590000 9.000000 1.000000 6.010000
$hbox 1 "Bip01 Head" 1.700000 1.000000 -4.590000 9.000000 7.560000 6.010000

___________________________________________________________________

Each hitbox is assigned to bones, and given dimensions as well. If there are no hitboxes, they will be automatically generated upon compilation of a model.

$hbox - this is just a hitbox.
the number after $hbox - this number determines the property of the hitbox. I have yet to put together a full list of what each number does. Here's what I have so far...

1 - The face. Does 3x normal damage.
2 - Unknown <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->
3 - The pelvis, or **** area. Eek, I think this only does normal damage.
4 - These are the left arm hit boxes. (Shoulder to elbow, elbow to hand, hand to fingers)
5 - These are the right arm hitboxes. ( " )
6 - Left leg hit boxes. (Thigh to knee, knee to foot, foot to toe)
7 - Right leg hit boxes. ( " )
8 - An interesting hit box... Apparently it makes it explosive. (The opfor engineer's gas canister)
9 - Unknown <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->
10 - Bullet proof hit boxes. Used for barney helmets.
11 - Bullet proof hit boxes. Used for hgrunt helmets.

___________________________________________________________________

That about wraps up the hitboxes. Now we move on to references. References (or just refs) are used to tell the model which .smd templates to use. What the actual model will

be. Here is what the ref lines look like.

___________________________________________________________________

// reference meshes
$body body "hgrunt_body_ref"

$bodygroup heads
{
studio "hgrunt_head_mask_ref"
studio "hgrunt_head_grunt_ref"
studio "hgrunt_head_shotgun_ref"
studio "hgrunt_head_commander_ref"
}
$bodygroup weapons
{
studio "hgrunt_m4_ref"
studio "hgrunt_spas12_ref"
blank
}

___________________________________________________________________

Remember, // is ignored. They are just there to make things easier for the creator. There are sevral commands that need to be known here.

$body body - The main model, the one that doesn't change.
$bodygroup - The way to separate groups of refs from each other. You don't want heads and guns in the same group.
studio - this is the title for submodels, it is needed before every submodel reference file.
blank - it's just blank, its the third grunt weapon submodel for when the grunt drops his gun.


These are skin families, a real messy subject. I'll only briefly mention them.

// 2 skin families
$texturegroup skinfamilies
{
{ "soldier_hand_wht.bmp" "soldier_arm_wht.bmp" "soldier_head_grunt_wht.bmp" "soldier_head_commander_wht.bmp" }
{ "soldier_hand_blk.bmp" "soldier_arm_blk.bmp" "soldier_head_grunt_blk.bmp" "soldier_head_commander_blk.bmp" }
}

This pretty much allows for different textures to be swapped. Like for White and black soldiers, and so on.

___________________________________________________________________

Last but not least, the fine details. These lines determine the size of the model, the name of the compiled model, and the eye position.


___________________________________________________________________

*/

$modelname "hgrunt.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0


$bbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
$cbox 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000

$eyeposition 0.000000 0.000000 73.000000

___________________________________________________________________

Needed terms:

$modelname - self explantory, name must be in quotes.
$cd ".\" - Dunno, never touched it.
$cdtexture ".\" - Not a freakin' clue.
$scale 1.0 - size of the model, can be scaled up or down.
$eyeposition - where the model's line of sight is.

$bbox, $cbox, two commands that are rarely used. I don't remember ever seeings these commands filled out. Sorry, I don't know what they're used for.

___________________________________________________________________

Now we have covered all the basics. You now know what everything in the qc file is. Now that we're done with vocab and terms, we can actually get to the part of teaching you

what to do with all this nonsense.

Let's say you think that the grunts don't shoot fast enough, they don't run fast enough, but they walk too fast. And let's say you want to add some extra run animations to him

as well, to be picked at random which will be used. Oh and let's decide you want a fancy sound when the grunt throws a grenade. Sounds easy right? You bet your **** it is.

Let's start with the shooting ordeal. Find the lines in the qc where the grunt is shooting.

$sequence "crouching_mp5" "crouching_mp5_blend1" "crouching_mp5_blend2" blend XR -45 45 fps 20 loop ACT_RANGE_ATTACK1 1 {
{ event 4 1 }
{ event 5001 1 "50" }
{ event 5001 1 "21" }
}
$sequence "standing_mp5" "standing_mp5_blend1" "standing_mp5_blend2" blend XR -45 45 fps 20 loop {
{ event 4 1 }
{ event 5001 1 "50" }
{ event 5001 1 "21" }
}
$sequence "reload_mp5" "reload_mp5" fps 36 ACT_RELOAD 1 {
{ event 2 41 }
{ event 1004 11 "items/cliprelease1.wav" }
{ event 1004 39 "items/clipinsert1.wav" }
}
$sequence "crouching_shotgun" "crouching_shotgun_blend1" "crouching_shotgun_blend2" blend XR -45 45 fps 15 ACT_RANGE_ATTACK1 1 {
{ event 4 1 }
{ event 5001 1 "51" }
{ event 1004 7 "weapons/scock1.wav" }
}
$sequence "standing_shotgun" "standing_shotgun_blend1" "standing_shotgun_blend2" blend XR -45 45 fps 15 {
{ event 4 1 }
{ event 5001 1 "51" }
{ event 1004 7 "weapons/scock1.wav" }

Right. So what you've learned about FPS, you know what to do, right? Change the fps rate in all the shooting animations to 25 higher. You're done. That was it. Rinse and

repeat for the run animation. Just increase the fps number, and they will run faster. For the walk animation, find the line, and change the fps to be lower. Easy. Anyone can

do this, right?

You wanted an extra run animation too, right? Let's say you have an animation called "combat_run" and it has 50 frames in it. Find your current run line.

$sequence "run" "run" LX fps 40 loop ACT_RUN 1

Now copy and paste the entire line so you have this.

$sequence "run" "run" LX fps 40 loop ACT_RUN 1
$sequence "run" "run" LX fps 40 loop ACT_RUN 1

Now change the second line. Make sure you don't type over any other line besides the copied run line. Change it to this.

$sequence "run" "run" LX fps 40 loop ACT_RUN 1
$sequence "combat_running_yay" "combat_run" LX fps 47 loop ACT_RUN 1

That's it. Now it will randomly choose which animation to play. How bout that grenade sound? You always wanted a cool sound, eh? Find your throwgrenade line.

$sequence "throwgrenade" "throwgrenade" fps 30 ACT_RANGE_ATTACK2 1 { event 7 34 }

Now, at the end of the line, add this:

{ event 1004 20 "xxx/xxx.wav" }

So your total line should look like this.

$sequence "throwgrenade" "throwgrenade" fps 30 ACT_RANGE_ATTACK2 1 { event 7 34 } { event 1004 20 "xxx/xxx.wav" }

The XXX means what you want the sound to be. The first XXX is the folder, (already inside the sound folder) and the second XXX is for the actual wav file.

That's it. Pick your sound, recompile and presto.

___________________________________________________________________


Let's say you want to add some different refs, eh? Let's say the smd file you have instead of the main body is called "my_l337_body.smd" You've got it, and its textures copied

and pasted into your hgrunt folder, right? Make sure it uses the same skeleton as all the animations, otherwise it won't work at all. Find your reference lines.

// reference meshes
$body body "hgrunt_body_ref"

$bodygroup heads
{
studio "hgrunt_head_mask_ref"
studio "hgrunt_head_grunt_ref"
studio "hgrunt_head_shotgun_ref"
studio "hgrunt_head_commander_ref"
}
$bodygroup weapons
{
studio "hgrunt_m4_ref"
studio "hgrunt_spas12_ref"
blank
}

Now what we're looking at is only the first 2 lines.

// reference meshes
$body body "hgrunt_body_ref"

Now change "hgrunt_body_ref" to "my_l337_body" Tada, you're done. It works the exact same way for weapons.

___________________________________________________________________

Compiling Models.

This part is really easy. Right-click the .qc file and open with studiomdl.exe A dos promt window should pop up. It will compile your model for you. Tada. IF anything was

supposed to be transparent in the model, open it with Jed's HLMV and set those textures to be additve or transparent. That's it for compilation.

___________________________________________________________________


That's it, that's qc editing in a nutshell. I really hope this helps people that have no idea what they are doing with .qc files.

Comments

Sign In or Register to comment.