Garry's Mod

Garry's Mod

64 ratings
Writing a QCI
By Red Fruit
Ever wondered how weapons retain their original animations with the added c_hands, that's called using a QCI. Today I'll be writing as simple as I can. The basics to creating/using a QCI. Keep in mind I'm going off the basis that you already have the QC file done and the animations/model extracted as well
2
   
Award
Favorite
Favorited
Unfavorite
Define your Bones
When starting off with your QCI file, you'll first need to define your bones. This option can be seen in Crowbar when you are starting to compile something. I'll be using my RS2 M16 as a reference. Something to note real quick is you don't have to place the c_arm's smd file into the weapon's smd file.


Check Definebones and Create QCI file when compiling your weapon. Then press compile, once done. A new QCI file should've been created in the folder the weapon's SMD is located in. Open it and this is what it should look like. Use your 3D Model editor of choice to check and see if anything bones are missing.

If your Armbones are missing, then export the arms as a model of it's own and do the Definebones Process on it as well.


Copy and paste this information into the weapons QC file, it should look very similar to this photo


Next, create a new QCI file (or delete everything in your current one). This one will be your c_hands rig. The next example will be a QCI file but fully filled out.


Your c_hands QCI file is going to be placing the Valvebones over the original bones. I have a template file that you can use by using this link. Remember to remove the space.

http :/www.mediafire.com/file/0vvfbif632th99w/QCITemplate.qci/file

Yeah, it's gonna be a bit tedious but should be easy overall. Once your done with the rigging process, in your weapons QC file. Place $Include "Name of QCI file.qci" in your weapons QC file.

Remember to remove all instances of $Bonemerge " " in the weapons QC file. As it'll cause issues with the QCI.


That should be it, compile it as normal now and view it in HLMV.
HLMV
Now that you've compiled your weapon, now you'll need to make sure everything is alright. First you'll need to load in the weapon model.


Then you'll need to load in the c_arms afterwards. I've already done this step before but I'm showing you what you'll do.


If your c_arms are all fucked up, that means you'll have to edit the rotations. generally 180 degrees. Keep in mind for the left arm and the right arm you'll have to use a negative number.

Basically if the left arm has a rotation of 45 degrees. then the right arm will have a rotation of -45 degrees, vice versa.

As you can see here, I've had to edit the rotations quite a lot sometimes


Sometimes $scale is needed, an example can be seen here



Basically that's it. If I'm missing any part of the process. Please message me about it. But do keep in mind I'm going off the mindset that you're already well in tuned about the whole weapon modding process.
19 Comments
Ajiliffe Jan 30 @ 5:09am 
i have no idea what im doing, im just tryna continue this addon that the original author stopped updating: https://steamcommunity.com/sharedfiles/filedetails/?id=2992227159
Ajiliffe Jan 30 @ 5:08am 
how do i do that with the counter strike source guns? the cs hands have too many $definebones than in the example
аБИБАс Oct 22, 2024 @ 5:10am 
is this a guide on how to make C_hands support on a weapon model? Right?
Red Fruit  [author] Oct 17, 2023 @ 12:09pm 
Sent you an friend invite for DM
VoidLeak Oct 17, 2023 @ 11:57am 
Anyway I could somehow show you?
VoidLeak Oct 17, 2023 @ 11:56am 
It's all kinda clumped together in a square kind of.
Red Fruit  [author] Oct 17, 2023 @ 11:42am 
Does it look halfway correct or some sort of spaghetti nightmare?
VoidLeak Oct 17, 2023 @ 11:06am 
Do I have to physically move a valvepiped c_arm set to match the original skeleton, then export it and take those positions? I copied the position of every original bone and pasted each one to the similar bone of the valve piped skeleton. Looked very messed up. I'm sure I did this wrong.
patrickkane1997 Oct 11, 2023 @ 4:54am 
автор вообще токсикоман
brekiy Jun 28, 2023 @ 11:46am 
I have a QCI that maps the bones properly, yet when checking the viewmodel in HLMV the weapon's scale is too small in comparison to the hands. When I use the scale modifier the hands match better, but then the arm bones stretch out way too far. If you have an idea of what's going on or time to discuss it let me know.