VScript File Replacer VScript文件替换器 游戏性拓展 通用内容 开发者相关

我不当学长 管理员组 2022-11-20 567

插件介绍

  • 提供用于指定要覆盖的 VScript 文件的配置。
  • 您可以替换整个脚本或搜索并替换特定字符串。
  • 支持文件名的正则表达式匹配和 VScripts 中的字符串匹配。
  • 目前支持:CS:GO、L4D2 和 NMRiH。可以扩展到其他使用VScripts的游戏。如有需要,请提出要求。
  • 某些游戏或地图将嵌入并可能加密脚本,从而阻止任何合理的方法来修改它们。这个插件使这成为现实。
  • 这个插件基本上是开发者才会用到,一般腐竹有需要的要自己研究

关于什么是VScripts,可以看官方介绍:

相关插件:


管理员命令:

  • 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:

在服务器的 \cfg\sourcemod\ 文件夹下保存 vscript_replacer.cfg文件

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 

配置方法:

插件的data config 存放在 \addons\sourcemod\data\vscripts_override.cfg.

下面是一些特性举例:

PHP Code:
// When a script is matched and modified 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 names below.

// 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.
"vscript_replacer"
{
    
// /* CS:GO + ANY: delete the // on this line to comment out everything and start from fresh.
    // All maps
    
".+"
    
{
        
// Matches all script names.
        // ".+"
        // {
            // 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.
            // "regex"                    "1"
        // }

        // L4D2: No more jukebox debug spam!
        
"jukebox_dlc1"
        
{
            
// 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"
        
}
        
"jukebox_main"
        
{
            
"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.
    
"c[0-9]m[0-9]_.+"
    
{
        
// VScript filename to override, searches the Valve file system and gamedir.
        // This matches the script "some_vscript_file".
        
"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.
            // Any script using a custom override will take priority when the script name is also matched using RegEx.
            
"override"                                "my_vscript_file"

            
// Can still use other keys to find and replace strings within the override file. Even when matched with RegEx.
            
"some_random_var = false;"                "some_random_var = true;"
        
}
    }

    
// L4D2: This map was stolen by a megalomaniac. It used to execute the "KillServer" command when detecting MetaMod or SourceMod.
    // Why block the communities plugins? We will always reverse.
    
"helms_deep"
    
{
            
// Main script
        
"helms_deep_.+_survival"
        
{
            
// Matches the script name and strings with RegEx.
            
"regex"            "3"

            
// Replace all string occurrences:

            // 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.
        
}
    }

插件依赖

  • SourceMod 1.11+

安装方法:

  • 将压缩包文件解压到服务器的 \addons\sourcemod\ 目录下.

下载地址:

参考:

上传的附件:

CSGO插件分享-申明 1、本网站名称:CSGO插件分享-中文站  网址:https://bbs.csgocn.net
2、本站的宗旨在于为CSGO玩家提供一个插件分享的中文资源平台,多数插件来源于SourceMod论坛,并配以中文介绍和安装教程。
3、欢迎有能力的朋友共享有趣的CSGO插件资源。
4、本站资源大多为百度网盘,如发现链接失效,可以点: 这里进行反馈,我们会第一时间更新。
最新回复 (0)
返回