Easy weapon model changing

From Valve Developer Community
Jump to: navigation, search
Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Dead End - Icon.png
This article has no Wikipedia icon links to other VDC articles. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
Icon-broom.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.
Icon-broom.png
This article or section should be converted to third person to conform to wiki standards.

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 used in this tutorial is the "Weapon_Pistol.txt" script. Inside the script you will find the following lines:

The.txtfile.jpg

The first thing to look at is the lines in the script for the weapon model:

	"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. For example, the directory for the models used in this tutorial is:

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. Do not include the SourceMods\YOURMODSNAME\ portion of the directory path, or the file won't work. Now the script should look like this.

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

You can edit the "clip_size" value to whatever amount of ammo you want to be stored in the pistol. For example, a Glock 17 holds 17 rounds in its magazine. So if you have a Glock 17 model, set it to this:

"clip_size"			"17"

Troubleshooting

If the model is changed, but it's purple checkered in game, make sure the materials for the model were installed to the right folder. If the weapons model doesn't show up, check if you misspelled anything in the script's viewmodel and playermodel.