Left 4 Dead 2 Guide

VSLib Developer Guide - Helpful Addons

Sharing is temporarily disabled

Left 4 Dead 2 Guide

Here are some things that Neil created to aid with scripting. These are especially useful if you do not have Visual Studio installed. None of them are necessary for VSLib but are provided for your convenience!

Notepad++ L4D2 VScript Syntax Highlighter

If you have or use Notepad++, then Neil's syntax config may help you. What a lot of people do is use the Lua or C++ highlighter because there is no Squirrel highlighter, but that usually leaves out some colors, resulting in ugly highlighting. The solution: add Squirrel highlighting support to Notepad++: download Neil's config here and drop it into C:\Users\YOUR_USER\AppData\Roaming\Notepad++\

Squirrel Syntax Checker (@TODO not finished yet)

Neil coded a small executable that will print Squirrel syntax errors into the output window in Notepad++. This is useful to check if you have any compile-time errors quickly without needing to re-load the entire map or start L4D2. Download the file and place it somewhere. In Notepad++, go to Run > Run... (or press F5) and type this:
"<path to vslibcomp.exe>" "$(FULL_CURRENT_PATH)"
Replace the <path to vslibcomp.exe> with the full path to the file you just downloaded. Do not remove the quotes-- the quotes are important. That's it. Just hit Run and watch your script compile. Any errors will output to the Notepad++ console or display stand-alone in a separate console window. You can also hit Save and it will show up as a shortcut in the Run menu.

You may be wondering why it's useful, as all you have to do is load the map to find out scripting errors. Well, every time you change the script, you need to reload the map. If you have missing semicolons or parentheses, then that's just a waste of time because you need to fix it and reload all over again. This program will only compile and check the syntax-- it won't run the game. That makes it much faster. Note that this won't check for run-time errors-- it only checks for syntax errors like missing brackets or whatever.

Starting your L4D2 mutation from Notepad++

To start the game right from Notepad++, go to the Run menu and click Run (or press F5). Enter the following:

"C:\Program Files (x86)\Steam\SteamApps\common\Left 4 Dead 2\left4dead2.exe" -dev 3 -console -toconsole -sw +map "c1m2_streets MutationName"

Replace the bold red text with the name of your mutation. Lastly, hit Save and give it a shortcut key if you want. Now, whenever you want to test your script, all you have to do is go to the Run menu and click on your shortcut.

Conclusions

Now you're all set up and ready to write your first mutation. Read on.

Tagged

Community Tags

  • VSLib

Guide Credits

You may like

  • Mod
    Anti-Trolls System
    N/A

    This mod made to prevent those team killers(aka Trolls) from killing all teammates and abuse vote system >>This mod is using vscripts. so it can not be used together with any other mods of mine or Vscripts driven mods. Such as Admin Syst...

    7,623
  • Mod
    Brutal Apocalypse
    N/A

    THIS MOD IS USING A VSLIBs scripts. So it might be collided some Vslibs/Vscripts mods THIS MOD DOES NOT WORK ON CUSTOM CAMPAIGNS. ⋙WARNING!!!!⋘ This mod makes the game much more difficult. if you're easy to upset or play serious, you mig...

    22,484
  • Mod
    Guns+ and SI+
    N/A

    it's a vscripts mod. so, can't be used together with mods that alternate gameplay directly(such as Admin System) but works fine with Weapon Script mods since i didn't use weapon script files Works only on Local Host and Singleplay. Does...

    29,683
  • Mod
    Insanity Worlds
    N/A

    This is a vscripts driven mod Note that this mod doesn't work on any Custom Maps or Official Servers This mod is not mutation. it can runs on every game mode _____________________________________________________________________________...

    14,404
  • Mod
    Augmented Bots
    N/A

    This mod makes bots pretty stronger than vanilla bots Can not use together with other vscripts mods such as Rectus' Custom weapons, Admin System or any other mods of mine Mod Features - Cs weapons are unlocked - Bots have 150 shield po...

    26,471

Feedback

Be the first to post a comment!