Raised This Month: $214 Target: $400
 53% 

[L4D2 & CS:GO] VScript File Replacer (1.10a) [10-Apr-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 03-04-2021 , 07:15   Re: [L4D2 & CS:GO] VScript File Replacer (1.9) [30-Sep-2020]
Reply With Quote #51

Quote:
Originally Posted by lemeshovich View Post
i think you mean sm_vs_list instead of sm_vs_listen and its output is in my previous post
I do mean sm_vs_listen, then exec the config and reload the map to see if the vscript is being executed and overwritten. I would also suggest using the new "vscript_replacer_debug" cvar with a value of "7" when testing it.


Quote:
Originally Posted by lemeshovich View Post
csgo is free for now
I think I bought it years ago but that's not the problem. I don't have space to install or time to setup a server to test etc.
__________________
Silvers is offline
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 03-05-2021 , 21:43   Re: [L4D2 & CS:GO] VScript File Replacer (1.10) [04-Mar-2021]
Reply With Quote #52

Your update works flawlessly!!!
I had problems with what I did,
Thanks for the update!!!
jeremyvillanueva is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 03-09-2021 , 02:28   Re: [L4D2 & CS:GO] VScript File Replacer (1.10) [04-Mar-2021]
Reply With Quote #53

In vscripts_override.cfg in this line:

Spoiler


Your example is poorly defined, because the Regex you defined has the range from c0m0 until c9m9 , then you forget to define the other maps as c10m1 or higher.

I think this Regex is better to take ( c1m1 until c9m5 ) or ( c10m1 until c99m5)

Example:

PHP Code:
"c[0-9]+m[0-9]+_.+"
    
{
        
"mapspawn"
        
{
            
"override"                                "mapspawn_custom"
        
}
    } 
Edit: I changed the Regex of my post, for the one of Silvers, since it is shorter and more functional.

Quote:
Originally Posted by Silvers View Post
Code:
c[0-9]+m[0-9]+_.+

Last edited by Tonblader; 03-09-2021 at 03:59.
Tonblader is offline
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Old 03-09-2021 , 03:38   Re: [L4D2 & CS:GO] VScript File Replacer (1.10) [04-Mar-2021]
Reply With Quote #54

Quote:
Originally Posted by Tonblader View Post
I think this Regex is better to take ( c1m1 until c9m5 ) or ( c10m1 until c99m5)
Thanks, this would be better:

Code:
c[0-9]+m[0-9]+_.+
to allow for c1m1 or c10m1 for example.
__________________
Silvers is offline
jeremyvillanueva
AlliedModders Donor
Join Date: Jan 2021
Location: dcord:Jeremy333#7632
Old 03-14-2021 , 15:35   Re: [L4D2 & CS:GO] VScript File Replacer (1.10) [04-Mar-2021]
Reply With Quote #55

Btw @Silvers,
I had disable the autogenerated message because
I was debugging and, you know, the console
mentions the error line of the vscript overrided with 4+ lines,
And sometimes I'm very clueless about the line to check for the error,
But, now I'm using your version, Thanks!
I've also posted my use of your plugin,
https://forums.alliedmods.net/showthread.php?p=2740475
I've a lot of thanks for you x)!!
jeremyvillanueva is offline
Shao
Senior Member
Join Date: Jan 2015
Old 06-21-2021 , 14:29   Re: [L4D2 & CS:GO] VScript File Replacer (1.10a) [10-Apr-2021]
Reply With Quote #56

I found it a little hard to understand, but eventually got it to work looking hard enough, thought I'd share here for those who run dynamic difficulty servers.

However is anything wrong with this config? Can it be improved anyhow? Also is RegEx absolutely the same as everything else? I thought that using \n would have been better but \s happens to be where I was wrong.

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
	".+"
	{
	
		".+"
		{
		"regex"				"3"
		
		"\scm_AggressiveSpecials\s=\s[0-9]"					"\tcm_AggressiveSpecials = 0"
		"\sShouldAllowSpecialsWithTank\s=\sfalse"				"\tShouldAllowSpecialsWithTank = true"
		"\sIgnoreNavThreatAreas\s=\s[0-9]"					"\tIgnoreNavThreatAreas = 0"
		"\sEscapeSpawnTanks\s=\sfalse"					"\tEscapeSpawnTanks = True"
		"\sCommonLimit\s=\s(100|[1-9]?[0-9])"					"\t//CommonLimit"
		"\scm_CommonLimit\s=\s(100|[1-9]?[0-9])"				"\t//cm_CommonLimit"
		"\sHordeEscapeCommonLimit\s=\s(100|[1-9]?[0-9])"			"\t//HordeEscapeCommonLimit"
		"\sDocksCommonLimit\s=\s(100|[1-9]?[0-9])"				"\t//DocksCommonLimit"
		"\sDocksMegaMobSize\s=\s(100|[1-9]?[0-9])"				"\t//DocksMegaMobSize"
		"\sJunkyardCommonLimit\s=\s(100|[1-9]?[0-9])"				"\t//JunkyardCommonLimit"
		"\sSmokerLimit\s=\s[0-9]"						"\t//SmokerLimit"
		"\sJockeyLimit\s=\s[0-9]"						"\t//JockeyLimit"
		"\sBoomerLimit\s=\s[0-9]"						"\t//BoomerLimit"
		"\sHunterLimit\s=\s[0-9]"						"\t//HunterLimit"
		"\sChargerLimit\s=\s[0-9]"						"\t//ChargerLimit"
		"\sSpitterLimit\s=\s[0-9]"						"\t//SpitterLimit"
		"\sTankLimit\s=\s[0-9]"						"\t//TankLimit"
		"\scm_TankLimit\s=\s[0-9]"						"\t//cm_TankLimit"
		"\sWitchLimit\s=\s[0-9]"						"\t//WitchLimit"
		"\scm_WitchLimit\s=\s[0-9]"						"\t//cm_WitchLimit"
		"\sProhibitBosses\s=\strue"						"\tProhibitBosses = false"
		"\sDisallowThreatType\s=\s(ZOMBIE_TANK|ZOMBIE_WITCH)"		"\t//DisallowThreatType"
		"\sMobMinSize\s=\s(100|[1-9]?[0-9])"					"\t//MobMinSize"
		"\sMobMaxSize\s=\s(100|[1-9]?[0-9])"					"\t//MobMaxSize"
		"\sMobSpawnSize\s=\s(100|[1-9]?[0-9])"				"\t//MobSpawnSize"
		"\sMaxSpecials\s=\s(100|[1-9]?[0-9])"					"\t//MaxSpecials"
		"\scm_MaxSpecials\s=\s(100|[1-9]?[0-9])"				"\t//cm_MaxSpecials"
		}
		"jukebox_dlc1"
		{
			"DBG <- ::JUKEBOX_DEBUG <- true"		"DBG <- ::JUKEBOX_DEBUG <- false"
		}
		"jukebox_main"
		{
			"DBG <- ::JUKEBOX_DEBUG <- true"		"DBG <- ::JUKEBOX_DEBUG <- false"
		}
	}
	
// */



	// 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.
	// Since the workshop addon is now private and a fixed map was released by the community this isn't required, but kept in case it returns.

	"helms_deep"
	{
		// How do you like your credit being removed?
		"chat_messages"
		{
			"SeriouS_Samurai"		"Team Chivalry"
		}

		// Survival script
		"survival"
		{
			// Prevent changing critical cvars:
			"Convars.SetValue( \"metamod_version"				"// Convars.SetValue( \"metamod_version"
			"Convars.SetValue( \"sourcemod_version"				"// Convars.SetValue( \"sourcemod_version"
			"Convars.SetValue( \"sm_basepath"					"// Convars.SetValue( \"sm_basepath"
			"Convars.SetValue( \"sm_reserve_maxadmins"			"// Convars.SetValue( \"sm_reserve_maxadmins"
			"Convars.SetValue( \"mm_pluginsfile"				"// Convars.SetValue( \"mm_pluginsfile"
			"Convars.SetValue( \"sm_corecfgfile"				"// Convars.SetValue( \"sm_corecfgfile"
			"Convars.SetValue( \"sv_allow_wait_command"			"// Convars.SetValue( \"sv_allow_wait_command"
			"Convars.SetValue( \"mm_basedir"					"// Convars.SetValue( \"mm_basedir"
			"Convars.SetValue( \"sm_reserve_kicktype"			"// Convars.SetValue( \"sm_reserve_kicktype"
			"Convars.SetValue( \"sv_consistency"				"// Convars.SetValue( \"sv_consistency"
			"Convars.SetValue( \"sv_password"					"// Convars.SetValue( \"sv_password"
			"Convars.SetValue( \"sv_steamgroup"					"// Convars.SetValue( \"sv_steamgroup"
			"Convars.SetValue( \"cl_downloadfilter"				"// Convars.SetValue( \"cl_downloadfilter"
			"Convars.SetValue( \"cl_allowdownload"				"// Convars.SetValue( \"cl_allowdownload"
			"Convars.SetValue( \"cl_allowupload"				"// Convars.SetValue( \"cl_allowupload"
			"Convars.SetValue( \"motd_enabled"					"// Convars.SetValue( \"motd_enabled"
			"Convars.SetValue( \"motd_intros"					"// Convars.SetValue( \"motd_intros"
			"Convars.SetValue( \"motdfile"						"// Convars.SetValue( \"motdfile"
			"Convars.SetValue( \"hostfile"						"// Convars.SetValue( \"hostfile"
			"Convars.SetValue( \"lservercfgfile"				"// Convars.SetValue( \"lservercfgfile"
			"Convars.SetValue( \"sv_banid_enabled"				"// Convars.SetValue( \"sv_banid_enabled"
			"Convars.SetValue( \"sv_lan"						"// Convars.SetValue( \"sv_lan"
			"Convars.SetValue( \"survivor_allow_crawling"		"// Convars.SetValue( \"survivor_allow_crawling"
			"Convars.SetValue( \"z_holiday_gift_drop_chance"	"// Convars.SetValue( \"z_holiday_gift_drop_chance"
			"Convars.SetValue( \"changelevel_inhibit"			"// Convars.SetValue( \"changelevel_inhibit"

			// This will block all cvar changes.
			// You can remove // at the start of the next line if you want to block all other cvar changes.
			// "Convars.SetValue"			"// Convars.SetValue"
		}

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

			// Gives everyone access to donator perks.
			"Utils.GetIDFromArray\(HelmsSteamIDs, player.GetSteamID\(\)\) != -1"			"1 == 1"

			// Stop forcing sv_cheats to 0.
			"function Notifications::OnServerCvarChanged::HelmsCvarChanged"			"function Wtf_Gtfo"

			// Bye. Don't bother trying to disable our stuff.
			"HelmsDisableAdminSystem\(\);"			""

			// Or not.
			// BLOCK CVAR CHANGES:

			// Prevent changing critical cvars:
			// The \ from "SetValue\("" is to escape the ( due to using regex matching. Also must escape the quote such as \"
			"Convars.SetValue\( \"metamod_version"				"// Convars.SetValue( \"metamod_version"
			"Convars.SetValue\( \"sourcemod_version"			"// Convars.SetValue( \"sourcemod_version"
			"Convars.SetValue\( \"sm_basepath"					"// Convars.SetValue( \"sm_basepath"
			"Convars.SetValue\( \"sm_reserve_maxadmins"			"// Convars.SetValue( \"sm_reserve_maxadmins"
			"Convars.SetValue\( \"mm_pluginsfile"				"// Convars.SetValue( \"mm_pluginsfile"
			"Convars.SetValue\( \"sm_corecfgfile"				"// Convars.SetValue( \"sm_corecfgfile"
			"Convars.SetValue\( \"sv_allow_wait_command"		"// Convars.SetValue( \"sv_allow_wait_command"
			"Convars.SetValue\( \"mm_basedir"					"// Convars.SetValue( \"mm_basedir"
			"Convars.SetValue\( \"sm_reserve_kicktype"			"// Convars.SetValue( \"sm_reserve_kicktype"
			"Convars.SetValue\( \"sv_consistency"				"// Convars.SetValue( \"sv_consistency"
			"Convars.SetValue\( \"sv_password"					"// Convars.SetValue( \"sv_password"
			"Convars.SetValue\( \"sv_steamgroup"				"// Convars.SetValue( \"sv_steamgroup"
			"Convars.SetValue\( \"cl_downloadfilter"			"// Convars.SetValue( \"cl_downloadfilter"
			"Convars.SetValue\( \"cl_allowdownload"				"// Convars.SetValue( \"cl_allowdownload"
			"Convars.SetValue\( \"cl_allowupload"				"// Convars.SetValue( \"cl_allowupload"
			"Convars.SetValue\( \"motd_enabled"					"// Convars.SetValue( \"motd_enabled"
			"Convars.SetValue\( \"motd_intros"					"// Convars.SetValue( \"motd_intros"
			"Convars.SetValue\( \"motdfile"						"// Convars.SetValue( \"motdfile"
			"Convars.SetValue\( \"hostfile"						"// Convars.SetValue( \"hostfile"
			"Convars.SetValue\( \"lservercfgfile"				"// Convars.SetValue( \"lservercfgfile"
			"Convars.SetValue\( \"sv_banid_enabled"				"// Convars.SetValue( \"sv_banid_enabled"
			"Convars.SetValue\( \"sv_lan"						"// Convars.SetValue( \"sv_lan"
			"Convars.SetValue\( \"survivor_allow_crawling"		"// Convars.SetValue( \"survivor_allow_crawling"
			"Convars.SetValue\( \"z_holiday_gift_drop_chance"	"// Convars.SetValue( \"z_holiday_gift_drop_chance"
			"Convars.SetValue\( \"changelevel_inhibit"			"// Convars.SetValue( \"changelevel_inhibit"

			// This will block all cvar changes.
			// You can remove // at the start of the next line if you want to block all other cvar changes.
			// "Convars.SetValue"			"// Convars.SetValue"
		}
	}
}
Attached Files
File Type: cfg vscripts_override.cfg (8.5 KB, 1 views)
Shao is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 06-21-2021 , 16:05   Re: [L4D2 & CS:GO] VScript File Replacer (1.10a) [10-Apr-2021]
Reply With Quote #57

In my case, I ended up rewriting the .nut files from scratch (yes, there are many files) and using the plugin to replace the file itself. (previous TLS). Regex works, unfortunately, some specific files may miss the pattern.
__________________
Marttt is offline
Shao
Senior Member
Join Date: Jan 2015
Old 06-26-2021 , 04:56   Re: [L4D2 & CS:GO] VScript File Replacer (1.10a) [10-Apr-2021]
Reply With Quote #58

So I've started getting rescue vehicles that arrives as soon as the final start, even thought it was working fine before. I still use the same .cfg as above. Any ideas?
Shao is offline
Reply


Thread Tools
Display Modes

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 20:44.


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