Source SDK

Source SDK

77 ratings
Swapping a single animation without recompiling all animations
By мяFunreal
Have you ever wanted to edit a single animation in a model but you did not want to recompile all animations?
   
Award
Favorite
Favorited
Unfavorite
Foreword
Sometimes you want to edit one or just a few animations of a model which has a lot of animations.
For example when i fixed Zoey's "The Passing" outro animation. I would have needed to recompile a ton of animations, which was too bothersome.

So i found a way to do it without a hassle.
The modding
First of all, you need to copy the original model that has the animations you want and rename it. If it also has an ani file, rename that one too. Animations are shared across both files.


Then you need to decompile the original model and use the "declaresequence" option in crowbar


You will get a declaresequence qci file. This file will tell the compiler "use every declared animation of the $includemodel in the order they are listed


Then open the declaresequence qci file and find the sequence you want to replace. In my case "use_ammopack".


Comment out the $declaresequence line of the animation you want to replace, then add a $sequence underneath the commented out declaresequence so you can compile your own new $sequence.
This will load all animations of the includemodel, except the one you commented out and add your own animation, then continue using the original animations.


Then simply add the $includemodel line of the renamed original model (only mdl if you got mdl and ani) along with an $include line for the declaresequence file to your qc file.
7 Comments
the wisdom 31 Dec, 2020 @ 1:56pm 
m_anm.mdl is impossible to compile, it's too huge for Crowbar so this'll help. Thanks.
мяFunreal  [author] 17 Mar, 2020 @ 12:05pm 
you could join the Dead 4 Mods discord server to ask for more help.
https://discord.gg/4qtmzBP
F13: Halloween Build 17 Mar, 2020 @ 11:17am 
well i ask because i know nothing about that kind of work thanks for the reply :)
мяFunreal  [author] 16 Mar, 2020 @ 1:43pm 
that unfortunately requires quite a lot more work.
you need to re-arrange the sequences to match whatever order louis uses by using declaresequence and might even need to apply the proportion trick because the general armature shape between zoey and louid are not the same.
there's two tutorials you could cross reference to get this to work.

https://sites.google.com/site/zeqmacaw/tutorials/Convert-a-Survivor-Mod-to-a-Different-Survivor
https://sites.google.com/site/zeqmacaw/tutorials/proportion-trick
F13: Halloween Build 16 Mar, 2020 @ 12:02pm 
i need help i just want Zoeys animations on louis
or other survivors
Steinaar 6 Jul, 2019 @ 12:07pm 
well done
jahpeg 4 Jul, 2019 @ 2:53pm 
today i found god