Easy weapon model changing: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 32: Line 32:


These models will be changed. Extract the other weapon model you have into the correct folders, and make sure they're where they need to be. Next look at the ".mdl" file for the weapons you had. My directories for the models are,
These models will be changed. Extract the other weapon model you have into the correct folders, and make sure they're where they need to be. Next look at the ".mdl" file for the weapons you had. My directories for the models are,


SourceMods\YOURMODSNAME\models\weapons\ar33
SourceMods\YOURMODSNAME\models\weapons\ar33


In the pistol's script. change the models/weapons/v_pistol line to the file name, but before you do it. Take off the the extra lines
In the pistol's script. change the models/weapons/v_pistol line to the file name, but before you do it. Take off the the extra lines
Line 40: Line 44:


or else the file won't work, now my script looks like this.
or else the file won't work, now my script looks like this.


"viewmodel" "models/weapons/ar33/v_ar33.mdl"
"viewmodel" "models/weapons/ar33/v_ar33.mdl"
"playermodel" "models/weapons/ar33/w_ar33.mdl"
"playermodel" "models/weapons/ar33/w_ar33.mdl"


You can edit the  
You can edit the  


"clip_size" "22"
"clip_size" "22"


to whatever number you want the amount of ammo to be stored in the pistol. A glock holds 18 bullets in it's clip. So if you have a glock model, set it to this
to whatever number you want the amount of ammo to be stored in the pistol. A glock holds 18 bullets in it's clip. So if you have a glock model, set it to this


"clip_size" "18"
"clip_size" "18"


I hope you found this tutorial easy, enjoy your model switching!
I hope you found this tutorial easy, enjoy your model switching!




P.S, if the weapon works out, and it's purple checkerd. Make sure you installed the Materials to the right folder.
P.S, if the weapon works out, and it's purple checkerd. Make sure you installed the Materials to the right folder. Or if the weapons model doesen't show up, and it's an error. Check if you mispelled anything in the scripts viewmodel and playermodel





Revision as of 08:02, 16 August 2009

Broom icon.png
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.

Welcome to this easy model changing tutorial for whatever mod you're mapping for, the first thing we will cover. Is that

A) You have the model you want to replace with

B) you know where to find the script

The first thing to do, is go to your scripts folder inside of your mod, and open up the name of the weapon you will be chaning.

C:\Program Files\Steam\steamapps\SourceMods\YOURMODNAME\scripts


For example, the file I will be using is the "Weapon_Pistol.txt" script. Inside the script you will find these lines...


The.txtfile.jpg




the first thing to look at is the lines in the .txt script for the weapon


"viewmodel" "models/weapons/v_pistol.mdl" "playermodel" "models/weapons/w_pistol.mdl"


These models will be changed. Extract the other weapon model you have into the correct folders, and make sure they're where they need to be. Next look at the ".mdl" file for the weapons you had. My directories for the models are,


SourceMods\YOURMODSNAME\models\weapons\ar33


In the pistol's script. change the models/weapons/v_pistol line to the file name, but before you do it. Take off the the extra lines

SourceMods\YOURMODSNAME\

or else the file won't work, now my script looks like this.



"viewmodel" "models/weapons/ar33/v_ar33.mdl" "playermodel" "models/weapons/ar33/w_ar33.mdl"



You can edit the



"clip_size" "22"



to whatever number you want the amount of ammo to be stored in the pistol. A glock holds 18 bullets in it's clip. So if you have a glock model, set it to this



"clip_size" "18"



I hope you found this tutorial easy, enjoy your model switching!


P.S, if the weapon works out, and it's purple checkerd. Make sure you installed the Materials to the right folder. Or if the weapons model doesen't show up, and it's an error. Check if you mispelled anything in the scripts viewmodel and playermodel


Any further edits will NOT be made by JG215

Created 8/16/09 eastern time 7:30 pm