Easy weapon model changing

From Valve Developer Community
Jump to: navigation, search

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 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:


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"


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.