Garry's Mod

Garry's Mod

116 ratings
How to make custom BSMod KillMoves for ValveBiped models
By RandomPerson189
This tutorial will show you how to make custom BSMod KillMoves for ValveBiped models. A tutorial for non ValveBiped models such as Headcrabs will come later but it'll be very similar to this one.
2
2
   
Award
Favorite
Favorited
Unfavorite
Requirements

You can use Blender 2.8+ if you want but this tutorial will be for 2.79b and prior. The steps in this guide should still be similar regardless.
Step 1: Setting up
Download the Custom KillMove Template from here[github.com] as a zip file and extract it somewhere. Now make sure the decompiled models folder is there since we'll be using them in Step 2.
Step 2: Importing into Blender
Open Blender and then go to File > Import > Source Engine
Select the target's killmove model as shown below






This should show in Blender




















Now do the same for the player's killmove model except this time make sure the bone append mode is set to "Make New Armature"










And then move the player away from the target in whatever direction you want and rotate it any angle (usually facing at the target)















If you want to import a model for display then you can do that, select the player's killmove model in object mode and go to the import menu, make sure the bone append mode is set to "Append to target"










Now select whatever SMD/DMX model you want (don't import QC since it causes issues), for this tutorial we'll be using "models/humans/group01/male_07" as the player and "models/zombie/classic" as the target














Now repeat the process for the target model, unfortunately you can't move the headcrab on the default zombie model unless you make your own km model for it (I'll make a tutorial for that later)














If you don't know how to get the model SMDs then it's easy. Locate to your GarrysMod/sourceengine/hl2_misc_dir.vpk and open it with GCFScape[nemstools.github.io] I stated the model locations above so go to those directories and extract the model by selecting ALL files with it's name. Now you can decompile the MDL file with Crowbar. Go back to Blender and now you can import the SMD you decompiled.
Step 3: Animating
To animate the models in Blender, go into pose mode and rotate/move the bones. If you don't know how to animate in Blender; there's many tutorials out there that show you how to.

Alternatively you can use SFM to animate and then export the animations into Blender but that won't be explained in this tutorial, there are other tutorials online that show you how.

The custom killmove template already has some animations for the models so for this tutorial we'll be using those.













Keep in mind after the target's killmove animation, it dies and after the player's animation, they regain control. The player and target animation length can be different to eachother and that's fine.
Step: 4: Exporting animations
When you're done with the animation, select the player's killmove bones and go to the Scene menu as shown below



Now scroll down to the Source Engine export section (remember you need Blender Source tools if it isn't there)

Set the export path to the directory of your player killmove model and set the export format to either SMD or DMX (SMD is recommended)
















Select export and select the animation name







Now do the same for the target model (make sure to set the export path to the target killmove models directory now)

Navigate to the player and target killmove models directory and you'll see an 'anims' folder, move the animation SMD file from that folder to the already existing one that has the model name before anims and then delete the folder with just the name 'anims'.
Make sure the animation name is the same for the player and target so the BSMod addon knows to play them both in GMod.








Now we'll have to rename the model to our own to prevent conflicts with other custom killmove addons. Change uniquename to whatever name you want.







Now do the same with the target killmove model
Step 5: Referencing animation in QC file and compiling model
Open the QC file of the player and target killmove model in a text editor (Notepad++ recommended)

So before we reference the animations, we'll have to rename the model in the QC as well so do Ctrl+F and replace the template name with the name you set the QC file to












And now do the same in the target killmove model QC file












Scroll down to $sequence. Copy paste an existing one and rename the animation to your one. You can edit the properties of the sequence to change how the animation plays in game. Check out this for more info.







Now it's time to compile the models, open Crowbar, go to the Compile tab and set the QC input to the player killmove model QC file. Set the Output dropdown to "Work folder" and now browse to the models directory of the addon as shown below











You can see that the template models are there, make sure to delete them since they aren't needed
The directory is "\models\weapons" for the player killmove model
Now export the the target killmove model except this time output to the "\models" folder
Step 6: Modifying lua file for your animation
Open bsmod_customkillmove.lua in a text editor (Notepad++ recommended) and follow the comments, they will guide you.

Also something to note, in the distance from target, set that number to around the distance the player is from the target in Blender. You don't need to change the angle if you're making the player look at the target, the addon automatically does that. Only set a custom angle if you're not making the player look directly at the target.
Step 7: Testing in GMod
To test your custom killmove in GMod, locate the "Addon" folder and inside it is a folder called "BSMod Custom KillMove Template". Extract that to your "\steamapps\common\GarrysMod\garrysmod\addons" folder
End of tutorial
That's the end of the tutorial, if you have any problems feel free to add me so I can help.
178 Comments
RandomPerson189  [author] 16 Jul @ 3:40am 
you can retarget animations to the valvebiped skeleton, there should be tutorials online on how to do it in blender
ran through 15 Jul @ 10:04pm 
is there a way you can import existing animations to the valve biped skeleton or do you have to always animate from the ground up
Tye-Wynd 15 Aug, 2024 @ 9:47pm 
I can't animate, but I think it'd be funny if someone added the discombobulate meme as a killmove (https://youtu.be/B62ACxuq8Pw at approximately 0:32)
RandomPerson189  [author] 17 Apr, 2024 @ 12:29am 
yeah, as long as you have the correct version of blender source tools that works with the current blender version
JutterBox 14 Apr, 2024 @ 10:26am 
you can use blender from steam
GotnoJA 8 Dec, 2023 @ 3:08am 
(x86)\Steam\steamapps\common\Blender\4.0\scripts\modules\addon_utils.py", line 364, in enable
mod = importlib.import_module(module_name)
File "C:\Program Files (x86)\Steam\steamapps\common\Blender\4.0\python\lib\importlib\__init__.py", line 126, in import_module
GotnoJA 8 Dec, 2023 @ 3:08am 
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\gotno\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\io_scene_valvesource\__init__.py", line 51, in <module>
from bpy.app.handlers import scene_update_post
ImportError: cannot import name 'scene_update_post' from '<unknown module name>' (unknown location)
Skeleto 18 Nov, 2023 @ 3:37am 
Can you use Blender from steam?
Ando 12 Jul, 2023 @ 9:10pm 
I'm having a few problems with these steps
Gen. Al@n 26 Jun, 2023 @ 11:45am 
Blender is what I have to get better at but other than that not too difficult