Left 4 Dead 2

Left 4 Dead 2

View Stats:
Greetings, where can I find some tutorials in modding L4D2 scripts?
I've been inspired a lot of best script modders, special mentioned: devlos, MANACAT, Shadowsyn, smilzo, and etc. And I appreciate for contributing them in changing the game into a renewable and breathtaking experience and gameplay. So where can I start? Any guides that is reccomended for a dummies like me? Let me know, thanks! :health:
Originally posted by Everice:
you can find all of vscript functions here https://developer.valvesoftware.com/wiki/Left_4_Dead_2/Script_Functions

this is where you can find most of in-game events. this website is old and there are some missing game events. if you want to get every func events you can extract gameevents.res in pak01_dir
https://wiki.alliedmods.net/Left_4_dead_2_events

this is where you can find director scripts that used in director table
https://developer.valvesoftware.com/wiki/L4D2_Director_Scripts

this is example of vscript writing
https://developer.valvesoftware.com/wiki/L4D2_Vscript_Examples

for mod template you can use any of vscript mod. to open vpk file you'll need programe GCFScape. extract everything inside vpk file to your newly created folder. you can name it anything such as MyFirstVscript. then open scripts/vscripts you should see vscript files with .nut extension, open it with any text program Notepad++ is recommended for newbie friendly with clean UI
you can find GCFScape and Notepad++ from google.
< >
Showing 1-6 of 6 comments
The author of this thread has indicated that this post answers the original topic.
Everice Jan 20, 2024 @ 10:05pm 
you can find all of vscript functions here https://developer.valvesoftware.com/wiki/Left_4_Dead_2/Script_Functions

this is where you can find most of in-game events. this website is old and there are some missing game events. if you want to get every func events you can extract gameevents.res in pak01_dir
https://wiki.alliedmods.net/Left_4_dead_2_events

this is where you can find director scripts that used in director table
https://developer.valvesoftware.com/wiki/L4D2_Director_Scripts

this is example of vscript writing
https://developer.valvesoftware.com/wiki/L4D2_Vscript_Examples

for mod template you can use any of vscript mod. to open vpk file you'll need programe GCFScape. extract everything inside vpk file to your newly created folder. you can name it anything such as MyFirstVscript. then open scripts/vscripts you should see vscript files with .nut extension, open it with any text program Notepad++ is recommended for newbie friendly with clean UI
you can find GCFScape and Notepad++ from google.
kurochama Jan 20, 2024 @ 10:38pm 
The easier learning references you can find would be by learning from mods' scripts to see how each function of L4D2 script functions works. Some vscript mods have simple scripts, so you can use them to learn the basic (like how to check survivor's health, set survivor's health, ammo, weapon etc) before going further to more complicated scripts (alliedmods could be considered as more complicated ones as it usually uses different naming for script functions but actually they have similar effects if you already get the grasp of the basic L4D2 script functions). So, you can collect your references first, & learn from the simplest ones. You'll have some trials & errors, but it wouldn't take long until you learn the simplest ones.
Last edited by kurochama; Jan 20, 2024 @ 10:38pm
devlos Feb 10, 2024 @ 6:50am 
I started experimenting with code , basic vscript files and other pieces.
My first guide i ever read over was the VSLIB developer guide my Rayman trying to understand the basic hierachy and idea off coding as a beginner.

One off my first mentors understanding code was Everice even who commented above.

Now if you want to learn yourself , you can do so trying to understand basic vscript files and code , just experiment a bit and eventually by trial and error you will find out exactly what is wrong.

VSLIB Library
https://steamcommunity.com/workshop/filedetails/?id=2402581049

Guides VSlib:
https://www.gamemaps.com/guide/16
https://www.gamemaps.com/guide/24

Edit: Feel free to add me , in case you need help.
Last edited by devlos; Feb 10, 2024 @ 6:52am
Interneted Feb 12, 2024 @ 8:22pm 
Thought I would share my experience here too, since I started doing VScripts a few months ago.

I started by looking at ChimiChamo's old simple VScript add-ons, it wasn't that hard to understand since I got some similar logic functions familiarity in other programming languages.

Then I discovered VSLib and list of script functions in VDC.
https://developer.valvesoftware.com/wiki/Left_4_Dead_2/Script_Functions
And got into trial-and-error spree with those functions, originally I wanted to use VSLib for my add-ons, then I realized it uses so many functions and enables scripted mode which can only be allowed once in all VScripts, so I try to avoid it as much as I can, though it allows multiple scripted mode scripts to be run at the same time. I mostly use it only for finding documentation on unfamiliar functions.

And that's what I did until today and discover a lot of possibilities in VScript. Huge thanks to devlos for being one of my mentor which is the guy above me.

As for my suggestion, if you don't have any knowledge in logic programming, I would suggest familiarize yourself with those logic functions such as if statements, variables, data types, loops, classes and more. After that, you can try to understand Squirrel's syntax, which is the language that squirrel uses.
This playlist explains them really well.
https://www.youtube.com/watch?v=nN976yuV8iQ&list=PLTsWR3-f6-rCamvtaQreqm7fyCJDMEQGO

After that, try unpacking other people's simple add-on to see what they do, like ChimiChamo's older add-ons. And try look for the function that they use in the VDC.
https://developer.valvesoftware.com/wiki/Left_4_Dead_2/Script_Functions
Then just familiarize yourself with other functions in the VDC. You can check for errors in the console too.

Other than Notepad++, you can also try Visual Studio Code with extensions to make coding a lot easier but it really depends on you.

Hope that it helped you and good luck!
Last edited by Interneted; Feb 12, 2024 @ 8:39pm
ChimiChamo Feb 16, 2024 @ 2:42pm 
Originally posted by Interneted:
Thought I would share my experience here too, since I started doing VScripts a few months ago.

I started by looking at ChimiChamo's old simple VScript add-ons, it wasn't that hard to understand since I got some similar logic functions familiarity in other programming languages.

Then I discovered VSLib and list of script functions in VDC.
https://developer.valvesoftware.com/wiki/Left_4_Dead_2/Script_Functions
And got into trial-and-error spree with those functions, originally I wanted to use VSLib for my add-ons, then I realized it uses so many functions and enables scripted mode which can only be allowed once in all VScripts, so I try to avoid it as much as I can, though it allows multiple scripted mode scripts to be run at the same time. I mostly use it only for finding documentation on unfamiliar functions.

And that's what I did until today and discover a lot of possibilities in VScript. Huge thanks to devlos for being one of my mentor which is the guy above me.

As for my suggestion, if you don't have any knowledge in logic programming, I would suggest familiarize yourself with those logic functions such as if statements, variables, data types, loops, classes and more. After that, you can try to understand Squirrel's syntax, which is the language that squirrel uses.
This playlist explains them really well.
https://www.youtube.com/watch?v=nN976yuV8iQ&list=PLTsWR3-f6-rCamvtaQreqm7fyCJDMEQGO

After that, try unpacking other people's simple add-on to see what they do, like ChimiChamo's older add-ons. And try look for the function that they use in the VDC.
https://developer.valvesoftware.com/wiki/Left_4_Dead_2/Script_Functions
Then just familiarize yourself with other functions in the VDC. You can check for errors in the console too.

Other than Notepad++, you can also try Visual Studio Code with extensions to make coding a lot easier but it really depends on you.

Hope that it helped you and good luck!
what would you do without me
Interneted Feb 17, 2024 @ 5:35pm 
Originally posted by ChimiChamo:
what would you do without me
Who even are you, peasant.
Last edited by Interneted; Feb 23, 2024 @ 4:56pm
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Jan 20, 2024 @ 8:12pm
Posts: 6