Contagion

Contagion

Not enough ratings
HOWTO: Compiling Custom weapons for Contagion
By Wuffesan
This guide will help you through how to make your own custom weapons for Contagion. For this guide, you will need Crowbar, and also an modeling program.
   
Award
Favorite
Favorited
Unfavorite
Getting started
Obsolete Guide
As of 2019, of December, Contagion now ships with a folder called "contagion_sdk", which contains all view model source files (SMD) to compile for Contagion.

Before we begin, you will need 2 programs, a modeling software and Crowbar. And make sure that modeling software have support for .SMD or if it got 3rd party support for it.

For this guide, I am using FragMOTION[www.fragmosoft.com], so don't be alarmed if everything is not the same.

Minimum Requirements
  • Understanding of basic animation
  • Understanding of your own modeling software
  • Understanding of VPK's
The Files
With Crowbar, you can decompile the Contagion models easily, but you need to setup the compiler for Contagion. Here is an image how it might/should look like:

Now, for example, lets decompile v_ar15, or v_sig, now if you check on its folder, you should see a folder called decompile

Now lets head to the folder and open up the .qc file, here we will see a fully-ish working QC file, but there is a problem. If you re-compile the weapon with the QC, it will act strangely, and not work properly. And here is the way to fix it, which you should do to all weapons you decompile. Find $sequence "ironsight" and then make sure it looks something like this:
$sequence "ironsight" { "a_idle_delta" "a_ironsight" fps 30 subtract "a_idle_pose" 0 loop delta autoplay hidden blendwidth 2 blend "ironsight_pose" 0 1 }
But we are not done yet with the QC, we still need to fix another row. Now lets find $animation "a_ironsight" and make sure the subtract "a_idle_pose" 0 is not commented out.

And now comes the hard part, fixing the animations.
The broken animations
2 animations will always be broken, which is the delta, and the ironsight. sometimes it might be 3, which is the "out of ammo" animation. But the fix is very simple. You open a_idle animation and a_idle_delta, and override the delta with a_idle and call it a_idle_delta_new to make sure you don't screw things up. then on the QC, makes sure it reads like this after you have done the first fix.
$animation "a_idle_delta" "v_ar15_anims\a_idle_delta_new.smd" { fps 30 loop }

But now comes the tricky part, the ironsight. But lets do the QC part first, lets do the same thing we did with delta, but here we also add subtract "a_idle_pose" 0, because else the delta will flip out.
$animation "a_ironsight" "v_ar15_anims\a_idle_aim.smd" { fps 30 subtract "a_idle_pose" 0 }

You can notice I made a_idle_aim, because its basically an "aim" animation. Make sure you look from 0, 0, 0 (X,Y,Z). and place the animation so the sights go right trough 0, 0, 0

This is experimental, so its up to you to fix that part yourself. But from this point, you can compile and test your weapon in-game w/o any issues.
6 Comments
Mapledpa 20 Jan, 2015 @ 1:11pm 
wow i though it was a more complex problem. thanks
Wuffesan  [author] 20 Jan, 2015 @ 12:23pm 
all materials is under materials_dir.vpk, and has nothing to do with creating a weapon :)
Mapledpa 20 Jan, 2015 @ 11:09am 
hey i'm trying to change the texture of a weapon because i don't like it but i can't find the v_models, when i go to "C:\Program Files (x86)\Steam\SteamApps\common\Contagion\contagion\materials"
and then when you should go to "weapons" folder to find the v_models and w_models there's just one folder named "models", inside it another folder called "extras" and some vtf files inside "extras" folder but neither the weapons,playermodel,etc models are there. Any ideas? it would be nice to have an extra help. Thanks for reading this
Blendoskeleton 5 Dec, 2014 @ 9:17pm 
Well that is awesome to hear.
(ѦØѦ)titanplatine 25 Nov, 2014 @ 12:44pm 
nice guide can't wait to see the one with survivors have a nice day :)
Wuffesan  [author] 21 May, 2014 @ 1:51pm 
@Stark
Will do survivors soon, and I believe its easy as L4D/L4D2.