Team Fortress 2

Team Fortress 2

Not enough ratings
How to Add and Test Jigglebones on a Hat for the Workshop
By Mantis987
This guide intends to show the process for adding and testing jigglebones on a model for the tf2 workshop.

There aren't any up-to-date tutorials for adding jigglebones, so I decided to make a quick one. The process is pretty simple; it's just a pain if you have to figure it out all by yourself, which is what most people have had to do until now.
   
Award
Favorite
Favorited
Unfavorite
Adding the bones to the model
This guide aims to outline the process for adding jigglebones rather than showing exactly what to do with them. Because of this, I've attached a helpful video (not by me) that shows the basic idea of how jigglebones work.

This video explains how to add the bones you'll need to your model.


This is the basic idea for adding jigglebones, but it's easier to test them than it seems in the video.
It's best to test each jigglebone you add before adding the next to make tweaking them easier.

Info on jigglebones and the qc commands related to them can be found here: https://developer.valvesoftware.com/wiki/$jigglebone

Telling the game that the bones are jiggly
In the menu for publishing a cosmetic (the screen on which you select the model and textures), there's a button that says "EDIT QC". You should paste your jigglebone code at the bottom of the text.

This button:
Testing the Jigglebones
Method 1: TFMV
This is where it gets a bit weird.
The "PREVIEW" button on the same screen with the "EDIT QC" button won't actually show you the jigglebones.
Instead, there are two methods to test the jigglebones:

METHOD 1: TFMV/HLMV
This is much quicker than the other method and is therefore useful for quickly testing if the jigglebones are doing what you want. However, in the actual game the jigglebones usually move differently from how they move in HLMV (because the smooth movements of character animations are different from the violent, jerky motions you get when moving the model in HLMV), so it's important to also test the jigglebones out ingame (method 2).

You could use the HLMV like the video does, but it's much better to use the wonderful TFMV
https://steamcommunity.com/sharedfiles/filedetails/?id=158547475 which has a built-in functionality for loading workshop files. It essentially lets you easily pick what equipment and cosmetics to have on a character and then automatically opens HLMV with them all equipped.

To load your model using TFMV, you'll have to press "FINISH" on the upload cosmetic screen (the one in the image from earlier), which requires you to have a placeholder backpack icon (you'll also have to press "VERIFY" before being able to press "FINISH"). Once you press "FINISH", the item should appear in the "workshop" tab in TFMV.

From there, you can test the jigglebones out in HLMV (using TFMV) by moving your model around like in the video. If your model ever gets really distorted, press the "File" button at the top once or twice and it should reset its position.

Then, if you want to tweak the jigglebones, just press the "COSMETICS" button on the screen below (the screen you went back to when you pressed "FINISH") and it'll reopen the upload screen with all the things still inputted. From there, you can just tweak the qc and repeat the process, pressing finish and then testing it in TFMV.

Method 2: TF2's itemtest
The other method of seeing how jigglebones work is by using tf2's built-in itemtest feature. Since this takes a bit longer than using TFMV, I'd suggest only doing this once you're mostly done with the jigglebones and just want to tweak them a little. It's also a great way to record footage of the jigglebones in action.

To use itemtest, press the workshop button from the main menu and press "LOAD TEST MAP". Once you've spawned in the map, type "itemtest" into the console and press enter.

The itemtest screen:

Then:
  1. Select the class your model is for in the "TESTING CLASSES" panel
  2. Press "ADD" for the headgear or cosmetic, depending on what your item is
  3. Press "SELECT MODEL"
  4. Go through your files using the path
    tf \ models \ workshop \ player \ items \ [class the hat is for] \ [item name]
    and select the .mdl model there
  5. Press OK (you can mess around with some of the other things on that screen like putting an unusual effect on the hat)
  6. On the bot controls panel, uncheck "Auto add" and check "BLU team".
  7. Change the selection box to the class the cosmetic is for and press "ADD A"
  8. Press "APPLY TEST ITEMS"

Now you've spawned in a bot wearing the hat! You can spawn another bot by pressing "ADD A" again. The itemtest options for making the bot move are a little restrictive, so I'd suggest using console commands like "bot_command bot01 taunt" to make the bots move. I like to whack the bots with my melee, since it gives the jigglebones a bit of force!

That's about it for the process of using itemtest to test jigglebones. As always, experiment and mess around with all the options you have here!
Conclusion
Now that you know how to test your jigglebones, experiment! Change some of the values for your jigglebones and see what happens! Add new bones in weird places and attach different vertices to them! Getting a feel for how jigglebones work and what you can do with them will be very helpful for when you make things with jigglebones in the future.

Here's a pretty in-depth guide that helped me get a better understanding of how jigglebones work (as well as what you can do with them): Jiggleboned Flying Pets Tutorial by heinous
Again, this is very helpful for reference of the commands, and remember that you can only have 5 new bones in your model.

So have fun making hats and items!


Feel free to ask about anything or suggest things about the guide in the comments.
If you think other quick guides for less-documented things like making hats paintable would be helpful, tell me! I may make them in the future if it'd be useful.

General Hat-Making tutorials:
Updated guide by Deinol (author often answers questions in the comments, and I try to too)
More in-depth but older and no longer maintained guide by Helljumper (author no longer active; unlikely to get an answer in comments)
5 Comments
Mantis987  [author] Sep 18, 2021 @ 8:52am 
Ooh, I'm not really sure. I believe that you can have a part of a model be influenced by multiple jigglebones at once, but that's the best I can give you :/
You could always try testing it out with an example model like some random floating cubes
Bojack Horseman Obviously Sep 17, 2021 @ 7:47pm 
Hello again! I’m sorry, I hope it’s alright, but I have another question..

Can a part of an object have jigglebones, but also are able to have shape keys? Like for mine, I have a dog head with pointy ears, and I would like to make it so the ears are able to bend backwards, like when the dog is angry, but I also would like for the ears to jiggle a little when moving. I’ve been told that I can do the ear bending, but I just don’t know if jigglebones will be compatible with such movements. c:

Thank you again for reading, and I look forward to your response!
Bojack Horseman Obviously Sep 8, 2021 @ 2:20am 
You're very most welcome! :3
Fantastic stuff!! Thank you so very much!! I should be (hopefully) getting to the jigglebone portion soon for the item I'm making, can't wait to do it!
Mantis987  [author] Sep 6, 2021 @ 9:45am 
Thank you! :D
Using the same QC file is totally fine! Just make sure you move the bones of the cosmetic model (like "jigglebase" and such) along with the model itself (which in my experience can be very tedious, as I haven't found a way to move both the bones and the model at the same time...).
Bojack Horseman Obviously Sep 6, 2021 @ 12:13am 
Wonderful guide!! Thank you for making it! :D I have a little question here: If I wanted to have the same cosmetic be used for multiple classes, and I’ve tweaked the jigglebones to my liking using one class, would I be able to just copy and paste the same QC file information onto the other classes? Or would having them be moved around a bit to fit each class, like making it bigger, or moving it a little up or down for heavy, disrupt that? Thank you for your time in advance, I look forward to your reply! (: