Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
Learn How To Script
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts
File Size
Posted
231.470 KB
5 Oct, 2020 @ 3:35am
1 Change Note ( view )

Subscribe to download
Learn How To Script

Description
Warning, this does nothing by simply subscribing. Please read the description.

Tired of asking people to change weapon stats for you? Want specific melee weapons to spawn in official campaigns? Then i'm going to teach you today how to do all of this yourself without needing someone elses help by following the easy steps below.

1. First off you will need the following 2 programs.

- Left 4 Dead 2 Authoring Tools from steam.
- GCFScape https://developer.valvesoftware.com/wiki/GCFScape .

2. Subscribe to this addon and launch Left 4 dead 2, wait for it to download.

3. Exit left 4 dead 2, and go to your addons / workshop folder. The path should look like :

" Steam > steamapps > common > Left 4 Dead 2 > left4dead2 > addons > workshop "

3. Look around for this addon's image and match the numbers on the picture to a vpk file in the folder.

4. Open the vpk using GCFScape, and extract the contents onto your desktop. It should give you a folder named root.

5. Inside that folder I've prepackaged the most commonly edited game scripts with their respective folders. Remember it's important to keep the proper folder paths, or the game will not recognize the changes you've made.

6. Delete any .txt files you don't want to edit. Leave the ones you do in their respective folders.

7. Open the script you wish to edit with a text editor and look around. Weapon scripts are pretty self explanatory, you should know what everything does by simply reading it except for the few below i'll list.

Cycle time : the fire rate used by the weapon. For reference the smg fires at 0.0625 , the m16 is 0.0875 , the ak47 is 0.13 , and the military sniper is 0.25. Make any of the guns fire as fast as or slow as you want, increase or decrease their accuracy, give them more or less penetration, you could even make the m16 fire shotgun shells by increasing the bullet count and adding the 2 lines

"PelletScatterPitch" "4.0"
"PelletScatterYaw" "8.5"

Mission files dictate the melee spawn list. Add or remove any melee weapons you want, add custom melee weapons to the official campaigns by seperating them in the list with ;
I've already included my mission fixes so with these they automatically spawn all the offical melee weapons in official campaigns minus the riot shield and re enable female boomers in the campaigns that were missing them.

For editing melee weapon scripts, you can increase the swing speeds, and how long the swing lasts to count traces for dealing damage. You can even change the damage types to make your melee weapons light infected on fire or knock off heads, it's all up to you.

8. Once you're done, open the addon.txt file and rename it whatever you'd like so you know what it does. Rename the folder named root to the same name.

9. Go into your left 4 dead 2 bin folder and find vpk.exe. I recommend making a short cut to this on your desk top.

10. Drag the folder you just renamed in step 8 onto the vpk.exe shortcut and it should repackage the folder into a vpk.

11. Drag the vpk into your left 4 dead 2 addons folder or server addons folder and your good to go. All the edits you made will be active whenever you host a local, custom , or private server.

12. Disable this addon in your addons list while in game.

Feel free to ask any questions below, i'll do what I can to help out.

------------------------------------------------------------------------------------------------------



------------------------------------------------------------------------------------------------------

Must be ran on a local / private / custom server to function. If friends are having issues joining you, type the following in your console.

sv_consistency 0
sv_pure 0
11 Comments
Loser  [author] 12 Jul, 2021 @ 9:22am 
If you are coming here from True Weapon RNG, same program requirements and majority of steps above. Only difference being you'll be matching vpk numbers to the True Weapon RNG picture instead of this addon. Remember to un comment the risky weapons you wish to enable for each game mode you'd like them in. If you're going to enable grenades, be sure to un comment local grenades at the top as well.
Loser  [author] 8 Oct, 2020 @ 12:24am 
@AlfredENeuman thank you for the support. Hopefully you found something new or interesting.
AlfredENeuman 7 Oct, 2020 @ 8:12pm 
I gave this a thumbs up and I think it is great you did this (and why didn't somebody else do it sooner?) Even though I'm already a script modder with 41 to my credit I'm going to look this over anyway- you are never too old to learn something new and maybe I will.
Loser  [author] 6 Oct, 2020 @ 11:51pm 
@Woke Up Like This, yes you can. Just follow the the instructions above. The same set of steps apply to any weapon, melee and mission file scripts on the workshop.
Woke Up Like This 6 Oct, 2020 @ 5:23pm 
Is it possible to change the stats of scripts which i have already downloaded (weapon addon scripts downloaded from workshop)
Loser  [author] 5 Oct, 2020 @ 11:16pm 
Folder path is scripts > vscripts
Loser  [author] 5 Oct, 2020 @ 11:16pm 
@サエル Saeru Yes but you would need a vscript to do that.

You'll have to do this for each individual gamemode that you want like coop, realism, survival, etc. Make a text file and name it coop. Change the file extention from .txt to .nut, open it and copy paste this below.

DirectorOptions <-
{

DefaultItems =
[
"weapon_tonfa"
]

function GetDefaultItem( idx )
{
if ( idx < DefaultItems.len() )
{
return DefaultItems[idx];
}
return 0;
}
}
Saeru 5 Oct, 2020 @ 1:22pm 
is it possible to change the starting (or default) pistol with other weapon? like tonfa(nightstick).
Loser  [author] 5 Oct, 2020 @ 5:51am 
You're welcome. Enjoy.
Woke Up Like This 5 Oct, 2020 @ 5:34am 
Cheers for this. Ive always wondered how people changed the stats of weapons. Cheers :)