Tutorial by MaRzY
This tutorial covers changing a weapons origins, and includes using the origin
feature found in Jed's Edited HLMV, which lets you set up your weapons
origins alot quicker and easyer then the old way of doing it blind so to speak,
meaning without the use of a graphical aid.
STEP 1
First you need to download the tools for the job, if you don't already have them.
Download compiler & decompiler
Then create a new folder, and copy the weapon model you wish to re-origin into this folder.
Example.
C:\Documents and Settings\Desktop\New Folder
Then unzip the compiler and decompiler zip file, and make a new folder and put the studiomdl.exe and mdldec12.exe in this folder.
Example.
C:\Program Files\compiler decompiler\
STEP2
Run
Jed's HLMV and in the menus go to file/load, and find your new folder with your
model, and load the model into HLMV, then under the menus go to
tools/configure tools.

This then opens a small box window, which you need to set the paths to your studiomdl.exe and mdldec12.exe. like this example picture shows.

We now need to decompile the model, so again under the menus go to tools/decompile.

This
will open a window where you can pick which model you would like to decompile,
so find your new folder which has your model in, and select it. This should
open a dos window that will be showing the progress of your model being decompiled.
When it's finished and the dos window has closed, you should now have
alot more files in your folder that will look similar to this image.

Next
click on the Weapon Origins tab, this should now of moved your view of the model
to that of the models current origins, but we wish to change these origins.
To do this all you need do is play around with the numbers in the boxes located
at the bottom left hand corner, origin X, origin Y and origin Z. Each time you
update
the numbers click on the Set Current button to update HLMV view to show your
new origins. Also remember you can use the subtract sybmbol - at the begining
of a
number to move the weapon in the opposite direction. You can also use a crosshair
and guide lines option to help you in setting up your origins, the outer guide
lines
represent the screen edges to where they would be to that ingame, and the centre
line is for helping to set up ironsight origins.

Play
around with the numbers until your happy, if your making ironsight weapons you
might have to tweak the values a little bit but at least you can get it
almost right first time by getting the initial values.
STEP 3
Now
you have your model setup in HLMV to how you want it to look ingame, we now
need to take are new numbers and add them to are QC file. To do this
we again turn to the tools menu and select tools/edit QC file, this will again
open a window where you can select a qc file, so find your new folder and select
the qc
file that was made when you decompiled your model. This will then open your
QC file in notpad ready for editing.

Next we need to add the $origin command to the QC file, which we will add under where it says $cliptotextures, like this example shows.
$modelname "v_sten.mdl"
$cd ".\"
$cdtexture ".\"
$scale 1.0
$cliptotextures
$origin
Now
cut and paste the numbers from top to bottom from Jed's HLMV into your qc file
on the same line you added the $origin command, like the
example below shows, making sure to leave a space between each number.
$origin 1.08000 -0.600000 -1.400000
Once you have made these changes to the QC file you can now save the QC file.
Ok
it's time to recompile the model, to do this just select from the menus tools/compile,
when the window opens select your edited qc file, again a dos window will open
showing the progress of your model being compiled.

Now
when it's finished compiling just cut and paste your recompiled model into your
Dod/models folder, but remember to back off your old one just incase your not
keen
on the new origins ingame.
Specail thanks goes
to Neil "Jed" Jedrzejewski for coding the outstanding feature of being
able to set up weapon origins in HLMV, along with many other great features.
Also
note that decompiling and compiling the same model will make the textures out
of line, and the more a model keeps getting decompiled and compiled the more
the textures become out of line. So to help those needing to know how to correct
this problem, i have put a breif guide together to help you, which you can find
here.
Brief guide about realigning textures