Provides a config to specify which VScript files to override.
You can replace the whole script or search and replace specific strings.
Supports RegEx matching for filenames and for matching strings within the VScripts.
Currently supports: CS:GO and L4D2. Can be extended to other games which use VScripts. Please request if required.
Some games or maps will have embedded and possibly encrypted scripts preventing any reasonable method to modify them. This plugin makes that happen.
"Peace-Maker" - Fixing dHooks SetParamString.
"Lux" - Testing
"Dragokas" - Testing
"Mr. Man" - Testing
Requires "z" - ADMFLAG_ROOT flag
sm_vs_dump // Dumps all found VScripts from the servers /scripts/vscripts/ file system to /scripts/vscripts/vscripts_dump/. Automatically decodes if required.
sm_vs_encrypt // Usage: sm_vs_encrpt <filename.nut>. Encode the specified script, must be inside the servers /scripts/vscripts/ folder, include the extension.
sm_vs_file // Usage: sm_vs_file <filename>. Extracts the specified VScript from the Valve file system to the servers /scripts/vscripts/vscripts_dump/ folder. Automatically decodes if required.
sm_vs_list // Show data config tree of modified scripts for the current map.
sm_vs_reload // Reloads the data config. This also replaces files in the override folder.
Plugin data config saved to \addons\sourcemod\data\vscripts_override.cfg.
Here is an example demonstrating various features and techniques.
// When a script is replaced they are saved to your servers /scripts/vscripts/vscripts_overrides/ folder.
// Do not save files there, they will be overwritten.
// The extension ".nut" or ".nuc" shouldn't be added to any keyvalue data.
// This is an example script with comments on the features provided, delete the sections you don't need.
// For L4D2 I recommend keeping the "jukebox_dlc1", "jukebox_main" and "helms_deep" sections.
// /* CS:GO + ANY: delete the // on this line to comment out everything and start from fresh.
// All maps
// L4D2: No more jukebox debug spam!
// Find and replace the string literally, you must always escape any quotes or backslashes: " with \" and \ with \\
// Strings must be less than 8192 characters. Use the file "override" keyvalue for anything longer.
"DBG <- ::JUKEBOX_DEBUG <- true" "DBG <- ::JUKEBOX_DEBUG <- false"
// Map name to activate on. Supports RegEx matching. For RegEx testing use: https://regex101.com/ or any similar site.
// This matches "c1m1_" to "c99m99_" for example, all Valve maps in L4D2.
// VScript filename to override, searches the Valve file system and gamedir.
// This matches the script "some_vscript_file".
// The "override" key is reserved for replacing the whole VScript file with a custom one, if both files exist.
// The specified value must point to a filename in your servers /scripts/vscripts/vscripts_custom/ folder.
// The file is copied to the your servers /scripts/vscripts/vscripts_override/ folder.
// Can still use other keys to find and replace strings within the override file.
"some_random_var = false;" "some_random_var = true;"
// L4D2: This map created by a megalomaniac. It used to execute the "KillServer" command when detecting MetaMod or SourceMod.
// Why block the communities plugins? We will always reverse.
// Script name will be matched with RegEx.
// 1=RegEx match script name. 2=RegEx search string for replacement. 3=Use RegEx for both. Delete line to not use RegEx.
// Replace all string occurrences
// These were removed from the latest versions of the map, however kept here in-case they return.
"metamod_version" "metamod_working" // Makes the Helms Deep VScript search for the wrong cvar
"sourcemod_version" "sourcemod_working" // Preventing the VScript from executing KillServer command.
// RegEx replace all matched SteamIDs with Gabe's SteamID.
"(STEAM_[0-5]:[0-1]:[0-9]+)" "STEAM_1:0:11101" // Your donators can fuck off too.