Garry's Mod

Garry's Mod

Not enough ratings
Exporting wOS animations to your PAC model
By jznxie
If you're wondering how to use some of the wOS animations in PAC, either as a base/reference sequence in PAC or for use in multiplayer where wOS is not installed, this guide - and the process itself - is extremely simple to get as many animations as you want in your playermodel (within reasonable size limits!!!).

There is an extreme dearth of PAC guides out there, so I figured this might help people out with getting a grasp of some import-export fundamentals.
   
Award
Favorite
Favorited
Unfavorite
SETUP, OBTAINING MDLS
I am going to assume that, given all the playermodel guides out there, you at least understand how to use Crowbar at a very basic level. If not, there are extensive guides on how to use Crowbar's decompile tool - that's all that's necessary for now!

Download Crowbar: https://gtm.steamproxy.vip/groups/CrowbarTool (where it says "Download Crowbar")
Crowbar Guide: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2283219908

There are also videos if that suits your fancy.

You will be using Crowbar's decompile tool for extracting animations from wOS MDLs.
I'm using this for demonstration purposes: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3539161114&searchtext=wOS

Unfortunately, since steamworkshopdownloader.io has been taken down and Crowbar's own download tool decides when it wants to work or not, you might have to use the command line for downloading wOS (or other) animations. This is done with SteamCMD.

SteamCMD:
https://developer.valvesoftware.com/wiki/SteamCMD

Luckily, all you need to do is type "login anonymous" and "workshop_download_item 4000 (workshop id=xxx here, which is in the website navigation bar)" into SteamCMD to obtain whatever animations you choose to export to PAC.

After doing that you'd conventionally use gmad to decompile the "xxx.gma" file you receive, but I use "gmad-py" which is basically gmad but in Python for my stupid Linux machine. Copy and paste the gma file you downloaded IN THE SAME DIRECTORY AS GMAD-PY, run "python3 gmad.py" and paste the GMAD-PY DIRECTORY and then type "extract." This is what it will look like:


You'll now have a folder with "lua" and "models" inside of it - "models" is our primary concern as that contains our animations as MDL files.

Now, for the wOS addon I have listed here, I already downloaded and decompiled one of the contents of it to be used with this guide as an example.
They're located in this Google Drive folder: https://drive.google.com/drive/folders/1w6A3_sDWctRrYT60PJtE9UzTclCvHd9B?usp=drive_link

Once you have everything as imaged and all of your content downloaded, you can move on to decompilation so we can shove the animations in your character's animations folder! In this case, you want to decompile the set of animations that contain whatever it is you want - in my case I wanted to use the engineer conga thingamajig. You'd set the TF2 animation pack's mdl file as the MDL input to be decompiled in the directory you specify.

CROWBAR:
WHAT TO DO WITH THE DECOMPILED FILES (NEED CUSTOM PLAYERMODELS... for now)
In this guide, I'm also going to assume you performed a similar process for a playermodel you want to use... evil, right?

It's not that hard of a process, and most of the time, people tend to use custom playermodels on PAC anyway. This is exactly what we'll be focusing on - if you don't have a custom playermodel, getting this to work with stock/vanilla playermodels is above my head since I don't have access to the stock playermodels' MDLs or QC files beyond male_07 that was published on YouTube.

To get a custom playermodel if you don't have one already, the process is pretty straightforward, so in essence this is the answer to the much-repeated "how do I upload another playermodel to PAC without outfitter?" question echoed across multiplayer.

  • Perform the same SteamCMD download process you did for the animation pack for a public playermodel. Let's say it was this breen replacement:
    https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3475610378&searchtext=breen

    You'd do a "login anonymous" and then "workshop_download_item 3475610378."

  • Follow the gmad-py (or gmad, for the purists) instructions above to get to the gma's contents.

  • Take wherever you downloaded that folder and just remove the lua folder. You don't need it - nor does it, from experience, change anything if you hypothetically left it there - but just save some space.

  • Now shove "models" into a folder. You can use something called Peazip for this step, or WinRAR, or 7-zip... or anything. Just make sure the content is saved using a "store" option. I'm using Ark because why not.
    Peazip: https://peazip.github.io/
    This is what your "Compress to..." with your archive management whatever-it's-called software would generally look like.

  • Shove THAT into a cloud provider such as Dropbox, copy the link, and copy-paste that into an "Entity" part in PAC.
    You're done lol.

This is a LOT of steps. Good job, because you're going to decompile and use this playermodel for the wOS animations.
WHY DID WE DO THAT?
We are going to take your playermodel you just downloaded and decompile it JUST LIKE the animations earlier... you know what to do already, granted you read the above, so I believe in you that you'll get it right.

I'll guide you all through these steps using my own playermodel I made myself, minus the coat and tail, because who models full clothes for gmod anymore???

You'll see stuff like this, and depending on the author of your playermodel, it'll likely be in either a DMX or SMD format.


You see the "asiliria_anims" and "asiliria.qc" files? You'll have something similar yourself, I just have to use corrective animations because I am a bit taller than what Valve's default biped was designed for.

But, did you know that wOS animations, and most quality animations generally, work regardless of having corrective animations? It's simply amazing.

With that aside, you are going to look in wOS's animations folder, which is the only folder present when you decompile the animation pack you desire. You will need two VERY important things, which will be 1) the animation SMD in that folder; 2) the line corresponding to that SMD in your QC file.

I picked Engineer's Conga animation, so we're going to refer to the wOS_UAP_TF2_engineer_conga.smd file to paste into our playermodel's animation folder, and then we're going to find the line that corresponds to wOS_UAP_TF2_engineer_conga.smd in the QC file. A ctrl+f search will work fine in any text editor, even Notepad.


Paste this line below all of the junk you see in your QC file near where you may see other $sequences being defined. This is important, because Crowbar, when recompiling your model, will NOT KNOW to include this animation if left out!


You've done it! Now just recompile your model - it follows almost the same process as compiling, go figure. In my case, I just go back to my Creature/asiliria.qc file and compile it to where I keep all my compiled models in another Creature folder. When you compile from there, you'll do the same process of compressing to a "Store" zip folder and uploading that to Dropbox to put in PAC.

CALL THE ANIMATION IN PAC, SUCCESS!
Assuming you know what an event is, now that you have your compiled playermodel, you can use an event in PAC to start the wOS animation with an animation part. After you've done this you're all set!


You can add more animations following this procedure afterwards.

EXTRA: HOW WAS THIS DONE? (what is animation retargeting?)
2 Comments
HollyBlox 10 Aug @ 7:43pm 
Goated guide!
Timber 10 Aug @ 12:20am 
Damn