Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Then install the L4D2 Authoring Tools: https://developer.valvesoftware.com/wiki/Authoring_Tools/SDK_%28Left_4_Dead_2%29
Now, navigate to steamapps>common>Left 4 Dead 2>update and open pak01_dir.vpk with GFCScape. In GCFScape, open the scripts folder and find the script of the weapon you want, i.e. weapon_hunting_rifle.txt. You can either extract it (right click) or just open the file (double click) and copy the entire contents into a new text file. If you make a new file, make sure the name is exactly the same as the old one. Edit the stats of the weapon however you want. Most of the code is fairly self explanatory, just look for things like damage, spread (accuracy), clip size, bullets (number of projectiles), cycle time (fire rate), ect. Probably best to avoid touching stuff like viewmodels, texture data, sounds, ect.
Now to put your mod into the game. Create a folder and give it whatever name you want, something like "hunting rifle mod". Inside that folder, create a text file called addoninfo.txt and another folder called scripts. Place your modified weapon script inside the scripts folder. Note that you can place as many scripts as you want in the same mod by putting them all in the script folder, as long as you do not modify the same weapon twice. Now to fill out that addoninfo file you made. Format it like so, including quotation marks:
Finally, you need to pack your mod into a vpk. The authoring tools you downloaded earlier came with a file called vpk.exe, it is located inside Left 4 Dead 2>bin. You want to open your mod folder (in this example, "hunting rifle mod") with vpk.exe. The easiest way is to simply drag the folder onto vpk. After a moment, a vpk file with the same name as your mod should appear next to your mod folder. Place this new vpk inside Left 4 Dead 2>left4dead2>addons, and you're done.
If you want to modify your mod, the easiest way is to just delete the old one and make a new vpk with the changes. Also if you want your mod to actually affect the weapons, the mod must be enabled on the server's side. If you're playing offline, no problem. If you're playing with friends, whoever is hosting must have the mod.