Raised This Month: $51 Target: $400
 12% 

[L4D2/CS:GO/TF2/NMRiH] VScript File Replacer (1.17) [28-Jan-2024]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
6676
Plugin Version:
1.17
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    54 
    Plugin Description:
    Replaces any VScript file with a custom one. Modify lines or the whole file.
    Old 08-09-2019 , 19:00   [L4D2/CS:GO/TF2/NMRiH] VScript File Replacer (1.17) [28-Jan-2024]
    Reply With Quote #1

    About:
    • 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.
    • Some games or maps will have embedded and possibly encrypted scripts preventing any reasonable method to modify them. This plugin makes that happen.



    Supported Games:
    • CS:GO
    • L4D2
    • NMRiH
    • TF2
    • Can be extended to other games which use VScripts. Please request if required.



    Related Plugins:


    Thanks:
    • "Peace-Maker" - Fixing dHooks SetParamString.
    • "Lux" - Testing
    • "Dragokas" - Testing
    • "Mr. Man" - Testing



    Admin Commands:
    • Requires "z" - ADMFLAG_ROOT flag
    PHP Code:
    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_exec       // Usage: sm_vs_exec <filename>. Executes a VScript file. This is a wrapper to the script_execute command. Can recompile plugin to use logic_script instead.
    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_listen     // Toggle printing to server console the names of scripts being executed.
    sm_vs_reload     // Reloads the data config. This also replaces files in the override folder. 


    ConVars:

    Saved to vscript_replacer.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // 0=Off. 1=Print to server. 2=Print to chat. 4=Verbose logging. Add numbers together.
    vscript_replacer_debug "0"

    // VScript File Replacer plugin version.
    vscript_replacer_version 



    Forward for developers:
    Spoiler




    Config:
    • Plugin data config saved to \addons\sourcemod\data\vscripts_override.cfg.

      Here is an example demonstrating various features and techniques.
      Spoiler



    Changes:
    Code:
    1.17 (28-Jan-2024)
        - Fixed memory leak caused by clearing StringMap/ArrayList data instead of deleting.
    
    1.16 (10-Mar-2023)
        - Changed command "sm_vs_dump" to display the number of scripts dumped.
        - Fixed error when no VScript files or directories exist. Thanks to "Sreaper" for reporting.
    
    1.15 (20-Dec-2022)
        - Added support for Team Fortress 2.
        - GameData file and plugin updated.
    
    1.14 (15-Oct-2022)
        - Added an include file for other plugins to require this plugin.
        - Added registering the plugin library as "vscript_replacer" for plugins to detect.
    
    1.13 (15-Jul-2022)
        - Increased buffer size. Thanks to "Psyk0tik" for reporting.
    
    1.12 (03-Jun-2022)
        - Added support for "NMRiH" game. Thanks to "Dysphie" for the signatures.
        - GameData file and plugin updated.
    
    1.11 (07-Oct-2021)
        - Fixed compile errors on SourcecMod version 1.11. Thanks to "Hajitek Majitek" for reporting.
        - Thanks to "asherkin" for helping fix.
    
    1.10a (10-Apr-2021)
        - Minor change to "vscript_replacer.cfg" for demonstrating regex in map names. Thanks to "Tonblader" for reporting.
    
    1.10 (04-Mar-2021)
        - Added ConVar "vscript_replacer_debug" to enable debugging with options for verbose debugging and printing to chat or server.
        - ConVar config is saved as "vscript_replacer.cfg" filename in your servers standard "cfg/sourcemods" folder.
    
    1.9 (30-Sep-2020)
        - Increased MAX_BUFFER size to support largest known VScript file sizes.
    
    1.8 (20-Jul-2020)
        - Fixed overrides not working. Not sure why this went undetected for so long.
    
    1.7 (10-May-2020)
        - Various changes to tidy up code.
        - Various optimizations and fixes.
    
    1.6 (05-May-2020)
        - Added forward "OnVScriptExecuted" to notify plugins when a script is executed (allows blocking or changing).
        - Changed script names to be case insensitive.
        - Fixed leaking handle when searching through directories.
        - Various small changes.
    
    1.5 (03-Feb-2020)
        - Fixed previous update breaking support for scripts within folders. Thanks to "Marttt" for reporting.
    
    1.4 (27-Jan-2020)
        - Updated "data/vscript_replacer.cfg" with Helms Deep new additions.
    
    1.4 (22-Jan-2020)
        - Added RegEx support for matching multiple script names.
        - Updated "data/vscript_replacer.cfg" to fix Helms Deep patches. All working now.
    
    1.3 (18-Jan-2020)
        - Changed command "sm_vs_exec" to use a logic_script instead, due to script_execute requiring sv_cheats.
        - Fixed not loading scripts where the filename is matched using regex. Thanks to "dustinandband" for reporting.
        - Fixed error when reporting duplicate keys in config.
        - Updated "data/vscript_replacer.cfg" to fix Helms Deep patches and added various critical cvars being changed.
    
    1.2 (16-Jan-2020)
        - Added command "sm_vs_exec" to execute a VScript file. This is a wrapper to the function "script_execute".
        - Fixed not using the specified "override" filename. Thanks to "xZk" for reporting.
    
    1.1b (11-Nov-2019)
        - Edited "data/vscripts_override.cfg" data config adding more Helms Deep fixes.
        - No plugin changes.
    
    1.1 (01-Nov-2019)
        - Added command "sm_vs_listen" to print to server console the names of scripts being executed.
        - Fixed command "sm_vs_dump" from copying files from the dump folder.
    
    1.0 (10-Aug-2019)
        - Initial release.


    Requirements:

    Installation:
    1. Download the .zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder.
    Attached Files
    File Type: zip vscript_replacer.zip (35.3 KB, 106 views)
    __________________

    Last edited by Silvers; 01-28-2024 at 02:35.
    Silvers is offline
     



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 08:46.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode