Need help with .QC files

Samio

Newbie
Joined
Mar 20, 2005
Messages
53
Reaction score
0
Now I understand most of the part about importing models into cs but the part I really don't get is the .QC file. If I want to import a weapon into counter strike how do I know which commands to use? It's really the only part that I don't fully understand.

Ok, heres one thing I tried. I exported the smd and saved it in sourcesdk_content/cstrike/modelsrc/Remington870\rem870p.smd

Then I took the .qc file for the shotgun in half life 2 single player and changed what's in bold below. Then in cmd prompt I typed " cd "%sourcesdk%"
bin\studiomdl ..\sourcesdk_content\cstrike\modelsrc\rem870p.qc" and also tried " cd "%sourcesdk%"
bin\studiomdl ..\sourcesdk_content\cstrike\modelsrc\Remington870P\rem870pqc" But each gave me the same error.

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

View model shotgun

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

$modelname weapons/v_rem870p.mdl
$cdmaterials models\Weapons\V_hand models\Weapons\V_shotgun models\weapons\shell


// whole body
$body studio "Shotgun_reference.smd"

$origin 0 0 68

//Muzzle flash
$attachment "muzzle" "ValveBiped.Muzzle" 0 0 0 rotate -90 0 0 rigid

//Shell eject
$attachment 1 "ValveBiped.Eject" 0 0 0 rotate 180 0 0 rigid

//$hierarchy "ValveBiped.Pump" "ValveBiped.Gun"

$sequence idle01 "Idle01" loop fps 30 activity ACT_VM_IDLE 1 node 0
$sequence fire01 "Fire01" fps 30 snap activity ACT_VM_PRIMARYATTACK 1 { event AE_MUZZLEFLASH 0 "SHOTGUN MUZZLE" } node 2
$sequence altfire "Alt_fire01" fps 30 snap activity ACT_VM_SECONDARYATTACK 1 { event AE_MUZZLEFLASH 0 "SHOTGUN MUZZLE" } node 2
$sequence draw "Draw" fps 30 snap activity ACT_VM_DRAW 1 node 0
$sequence holster "Holster" fps 30 activity ACT_VM_HOLSTER 1 node 0
$sequence reload1 "Reload_start" fps 30 activity ACT_SHOTGUN_RELOAD_START 1 node 0
$sequence reload2 "Reload_load_shell" fps 30 activity ACT_VM_RELOAD 1 node 0
$sequence reload3 "Reload_finish" fps 30 activity ACT_SHOTGUN_RELOAD_FINISH 1 node 0
$sequence pump "Pump" fps 30 activity ACT_SHOTGUN_PUMP 1 { event 6001 5 "2" } node 0
$sequence dryfire "Dryfire" fps 30 activity ACT_VM_DRYFIRE 1 node 2

$sequence lowered "Non_threat_idle01" loop activity ACT_VM_IDLE_LOWERED 1 node 1
$sequence lowered_to_idle "Non_threat_to_idle01" activity ACT_VM_LOWERED_TO_IDLE 1 transition 1 0
$sequence idle_to_lowered "Idle01_to_non_threat" activity ACT_VM_IDLE_TO_LOWERED 1 transition 0 1

//$sequence sprint_idle "run" activity ACT_VM_SPRINT_IDLE 1 node 1

//$poseparameter movement 0 1

//$animation a_movement "move" subtract a_movement 0 fps 30
//$animation a_nothing "Idle01" subtract idle01 0 frames 0 1 fps 1.15

//$sequence movement_overlay { "a_movement" a_nothing blend "movement" 1 0 } delta autoplay

// ==========================
// Dummy sequences for NPCs
// ==========================

$sequence fire "shotgun_reference" frame 0 10 fps 5 activity ACT_RANGE_ATTACK_SHOTGUN 1 { event AE_MUZZLEFLASH 0 "SHOTGUN MUZZLE" } { event 6001 0 "3" } { event 3004 0 }

cmderror.jpg
 
its a lot more complicated than that to get proper working weapon models into the game. i havent yet fully accomplished it with the css arms. the only way iv managed to do it is by using a 1.6 weapon model and compiling it for source.

in your case, you basically have to decompile the hl2 shotgun, import the reference SMD, put your model in instead of the previous one and export it again. then you can use the shotgun QC.
it looks like your just making an smd of your model and trying to use the shotgun qc for it - this wont work.

another thing is that the whole model will be rotated in the decompile and you have to add the "rotate -90" command after each sequence in the QC. and yet, there will still be another problem, which is that the weapon joint will be in the wrong position in all of the sequences, and thats where iv got to.

i dont know how you are supposed to go about changing this without going though every single frame of every animation.
can anyone through any light on this? is there an easy to way move a joint a certain amount for every keyframe in 3ds max?

edit: and about the actual compiling, you can choose whether to use my programme or the way you are currently trying to do it. and to be perfectly honest i cant be bothered explaining it-its just too complicated.
 
Hrm..I guess it's more complicated than I thought. I remember your great program. I don't know why I didn't use that in the first place. I'll go check it out now.
 
i am hoping to write a tutorial on this exact topic, but i will need to do it myself first :)
just the damned joint in the wrong position throught EVERY frame in EVERY animation.

i would love to speak to an experienced 3ds max user to see if there is an easy way.
 
Oh! The joint problem is in 3ds max? You should be able to fix it by going to the top and go the Graph Editors>Curve Editor. I use to know alot about this when I attempted to learn animating but I took the path of modeling instead. Let me mess around with it a bit then I'll see if I get it.

I know of a new script though that can do this automatically and I've heard it works very well. I went to try it out but the site is down. It's called Animated Align. The latest version is 2.1 and a friend told me it works great. Google it and you'll find the site.
 
yeah i just noticed something which looked like a graph editor.
you'll have realised i dont normally use 3ds max - i use lightwave for modeling and unfortunately there is no lightwave smd importer.

i will have to play around with this graph tool to try and get it working. it seems that the joint which is out of position seems to have been rotated and moved and its not obvious where it should go.
 
this dosent crash on smd read, this crashes on qc read. make sure the folder in which the mdl is being placed is made cuz studiomdl is too stupid to make its own folders.
 
thereisaspoon said:
this dosent crash on smd read, this crashes on qc read. make sure the folder in which the mdl is being placed is made cuz studiomdl is too stupid to make its own folders.
yes. but the reason im telling him about his SMD is because it is just an export of his model, with no hands or anything, so it wont work as a weapon model.
 
Back
Top