Raised This Month: $32 Target: $400
 8% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
SourceMod Plugin Approver
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
SourceMod Plugin Approver
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, 51 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
NeoTM
AlliedModders Donor
Join Date: Feb 2013
Location: Britain
Old 08-11-2021 , 04:57   Re: [L4D2 & CS:GO] VScript File Replacer (1.10a) [10-Apr-2021]
Reply With Quote #59

Is a guy like me, who did not have knowledge in coding at all and also is not english, have a chance to use this plugin to change the size of the "z_mob_spawn_finale_size" of the l4d1 campaign?

Because i use the "Automatic Difficult Balance Base On Intensity" to have bigger hordes but in all the l4d1 campaign, the size of the mob never get over 20 which make the final too easy for a good team and the tank will never spawn if our intensity stay lower than the minimum setting of this plugin.

I had a very good setting wich spawned very big hordes but stop quickly if we start to have big troubles.
But i was forced to change the settings because when players are too good, no tank spawn.
And now in lot of narrow area, the intensity is always higher and there is no zombies except the wanderers which make the game really too easy and far from what i want in tern of hordes size.

And i really want to keep this auto balance plugin because it regulate pretty well the flow of zombies depending of the skills of the players.

I start to look at the description of the plugin here but it look a bit complicated and seems to require knowledge in coding.

Is it the case or can i get into it without needing to learn lot of coding stuf?
__________________
82.66.75.218:27015 - Walk In Dead Nightmare
82.66.75.218:27016 - Walk In Dead Rampage
82.66.75.218:27017 - Walk In Dead Vanilla
NeoTM is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 08-11-2021 , 06:27   Re: [L4D2 & CS:GO] VScript File Replacer (1.10a) [10-Apr-2021]
Reply With Quote #60

This plugin does not work on L4D1.

Seems like "z_mob_spawn_finale_size" is a cvar, so do "sm_cvar z_mob_spawn_finale_size 60" or whatever in server.cfg.
__________________
Silvers is offline
Reply



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 07:33.


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