I'm trying to create a custom model for Team Fortress 2, in this case a very simple cylinder to replace the pyro's axe, just so I can learn the process. I've already made a hat for the workshop, so I have the basic process down. I've looked up endless amounts of tutorials, but none seem to successfully answer my question - in Blender, how do I rig my cylinder-axe so that ingame, when the pyro swings my cylinder follows?
I've decompiled the fireaxe, modeled my own replacement, then rigged my cylinder to the weapon_bone. That didn't work; the weapon floats around the pyro's head and never moves when he attacks. Next I tried importing in the entire pyro model, making my cylinder, and then rigging to the weapon_bone. Same result.
Basically, I'm making an item, and rigging it to the weapon_bone like all tutorials I've looked at say to do, but it doesn't work. Any help would be appreciated!
Replies
EDIT: After a bit more reading it looks like I'm gonna need to learn how to make my own .qc's and .vmt's. I think my hat worked because in itemtest I can automatically bind to bip_head, but otherwise (correct me if I'm wrong) I simply need to adjust my .qc file a bit to indicate the bone.
I've managed to put my custom shotgun model into TF2, but I can only see it from first person - on other characters it appears as the stock shotgun. Below is a screenshot, my .qc, and my .vmt.
As you can see, I copied the decompiled shotgun's .vmt and .qc files and modified them to suit my needs, so I suspect I failed to make a certain change which is resulting in the stock shotgun being used for the world model. Any help would be much appreciated!
pyro_shotty.qc pyro_shotty.vmt
Though I can see nothing in your qc file that suggests it would work any differently.
Also, something interesting: in itemtest, when I choose for my cusotm shotgun to "replace" the default shotgun, it turns out like in the picture. But when I choose the reserve shooter, my custom model appears, only the shotgun shell is floating randomly (the rigging difference I mentioned).
So I guess I know how to fix the problem (using the reserve shooter not the stock shotgun), although it bugs me to not know why it fixes it.
EDIT: Can you help me understand the difference between c_models, v_models, and w_models?
If you want to know about the code, then I have no idea. I've never tried replacing a weapon that wasn't a c_model.
To get a general idea of the process, how would you replace a weapon that was a c_model? I rigged to the c_model's armature, copied its .qc and .vmt, and edited ithem to my needs. Am I missing a step?
EDIT: Something interesting, according to http://wiki.teamfortress.com/wiki/Team_Fortress_Wiki:3D_Models/Weapons the shotgun uses a w_model. Perhaps since I am supplying a c_model, when I replace the item in itemtest it supplies the default shotgun's w_model for the world model.
Though that may not be the case either, I replaced the pyro's fire ax and it showed my model as I taunted.
You may need to ask someone of the Steam forums or maybe FPS Banana. I've never made a weapon that wasn't melee yet.
EDIT: Seems to work fine if I "replace" the reserve shooter in itemtest. For the heavy, I replace the family business, for the engi, the frontier justice. As far as I can tell, there is some hard-coded setting for the stock shotgun to use its w_model, so in itemtest I can't tell it to use mine - it only uses my c_model for the viewmodel. Luckily, each class that uses shotguns has a non-stock shotgun, and these work fine for itemtesting.
I decided to post my results in case anyone else runs into this problem.