[L4D & L4D2] Game Mode Config Loader 1.6
4 Attachment(s)
This plugin will execute a config file based on the current game play mode. Because I like Versus tweaked for a higher difficulty than a coop game, I use this to do that, but leave coop up to the lobby settings. Also, the survivor mode, I think, shouldn't have any adjustments made to it. This plugin gives me that ability.
Notes Left 4 Dead will change the game type automatically when someone hosts a lobby for a specific game type and then ends up connecting to your server. The z_difficulty CVAR used to determine the difficulty for co-op uses the values Easy, Normal, Hard, Impossible. While the UI in the game uses Easy, Normal, Advanced, Expert. I set the names of the config files (default) to match the z_difficulty CVAR value, while the description of the coop - difficulty script CVARs matches the UI text. If a game mode is selected which is not used by the hardcoded cfg files (see the cvars) it will automatically look for a .cfg file that matches the game mode text. To figure this out, configure your lobby as desired, start the game in the server then check the hidden mp_gamemode cvar for the value. Then create a .cfg file with the same file name as cvar value. Version History 1.8:
CVARs gamemode_config_ver - Version of this plugin. gamemode_resetconvars - Resets the console vars () before executing the config gamemode_config_coop - CFG file to execute when game mode is coop - Default: coop.cfg gamemode_config_versus - CFG file to execute when game mode is versus - Default: versus.cfg gamemode_config_teamversus - CFG file to execute when game mode is teamversus. - Default teamversus.cfg gamemode_config_survival - CFG file to execute when game mode is survival - Default survival.cfg gamemode_config_realism - CFG file to execute when game mode is realism. - Default realism.cfg gamemode_config_scavenge - CFG file to execute when game mode is scavenge. - Default scavenge.cfg gamemode_config_teamscavenge - CFG file to execute when game mode is teamscavenge. - Default teamscavenge.cfg gamemode_config_coop_easy - CFG file to execute when game mode is coop and the difficulty is Easy. - Default: coop_easy.cfg gamemode_config_coop_normal - CFG file to execute when game mode is coop and the difficulty is Normal. - Default: coop_normal.cfg gamemode_config_coop_hard - CFG file to execute when game mode is coop and the difficulty is Advanced. - Default: coop_hard.cfg gamemode_config_coop_impossible - CFG file to execute when game mode is coop and the difficulty is Expert. - Default: coop_impossible.cfg The values are used by the plugin to call the exec console command: exec [value]. Thanks to DJ Tsunami for getting me started. :) |
Re: [L4D] Game Mode Config Loader
this plugin works well on my server!
good job! :up: |
Re: [L4D] Game Mode Config Loader
Nicely done. But, are you sure it's "survivor"? I'm looking at an L4D server right now and it clearly says "survival".
Edit: also, line 26 shouldn't be there. |
Re: [L4D] Game Mode Config Loader
How does it work?
So i mean does it integrate into the admin menu or something, where i can change the game mode? Or what? |
Re: [L4D] Game Mode Config Loader
All this does is execute a cfg file with commands or cvars when the map starts, depending on the current game mode. L4D decides what the current game mode is, you can't change it.
|
Re: [L4D] Game Mode Config Loader
Doh! My dislexia is getting the best of me. I think I had survival and I said wait! it's survivor! .. arg. I'll fix that in a few mins :)
edit: Done! I just thought of something too. Now that I can have different configs for each game mode, I can also change the motdfile cvar to a specific motd file for each type. Very nice! |
Re: [L4D] Game Mode Config Loader
Thanks for Plugins, I will dev an improve version of this.
|
Re: [L4D] Game Mode Config Loader
Do the CFGs go in the left4dead/cfg/sourcemod directory?
|
Re: [L4D] Game Mode Config Loader
No just the left4dead\cfg folder. Really any location that the normal console exec [filename] would find the file.
One thing I'm going to do (perhaps today) is have it also execute a difficulty config for coop mode. Since the lobby can set easy normal hard expert, these configs would run when it was coop and right after the coop.cfg runs. |
Re: [L4D] Game Mode Config Loader
:( It seems the server is caching the motd content for the clients. So if you change motdfile after server has started and someone has connected, it doesn't seem to load the new page content :(
|
Re: [L4D] Game Mode Config Loader
Quote:
This plugin enables u to load different configs but motd and host file changes arent a part of it me gueses |
Re: [L4D] Game Mode Config Loader
The motdfile cvar specified which file to use as MOTD, you can change that cvar with this plugin.
|
Re: [L4D] Game Mode Config Loader
yeah, you can change the var with those configs loaded by the plugin. I think that the server reads the MOTD at map change, and since this fires at map start, it doesn't respect the change.
|
Re: [L4D] Game Mode Config Loader
good addition to the plugin - to add hook event convar change mp_gamemode and z_difficulty
for example: Code:
public OnPluginStart() for example: Code:
... |
Re: [L4D] Game Mode Config Loader
Are you sure the game respects the convar changes? I've changed the game type from coop to versus before, and it doesn't let infected players spawn. I think you need to start on the level with those settings, which is what the lobby system is for. I'll add this into my script if you can verify that when you change difficulty from easy to expert mid-level, it will work. For example, on expert, the regular zombies only need to hit you four times to take you down.
|
Re: [L4D] Game Mode Config Loader
Thanks so much for this plugin, it was exactly what I was looking for :)
couple questions though... first, can I set a folder? for example: gamemode_config_coop sourcemod/coop.cfg and second, do you know when the file is executed? Specifically, after server.cfg? I have the contents of warmode_on in my versus.cfg and off are in both coop and survival. could this possibly cause any problems? Warmode turns on and off all plugins, which could obviously cause some problems :/ |
Re: [L4D] Game Mode Config Loader
Quote:
Strange that you have a this question :) Such difficulty can change at the voting of players and more than once for the map! Then from the plug-in your version there is no sense, because it will check the difficulty only when loading the next map. 2ColdnessCalms path for config file - %gamepath%\cfg config file is executed at map start (in Thraka version) or at map start and at convar mp_gamemode or z_difficulty change event (in my version) |
Re: [L4D] Game Mode Config Loader
I'll work on migrating your changes into the release Dionys.
Coldness, specifically I didn't configure it to execute a path for scripts. It's really just calling the console command exec directly. So wherever the Source engine and L4D specficially are going to look for files to execute when you call "exec" normally, is where your scripts need to be. |
Re: [L4D] Game Mode Config Loader
hmm
FileExists(sConfigName) always will be false need FormatEx(ConfigFile, sizeof(ConfigFile), "cfg\\%s", sConfigName); FileExists(ConfigFile) I think there is no point to argue :) I showed variant which have long been working on my server |
Re: [L4D] Game Mode Config Loader
must add
gamemode_config_coop "coop.cfg" gamemode_config_versus "versus.cfg" gamemode_config_survival "survival.cfg" in server.cfg? and create 3 cfg's with coop versus survival? |
Re: [L4D] Game Mode Config Loader
:oops: How to use this? i'm not a noob but i don't know what's wrong ,added the cvars to server.cfg ,created coop.cfg..etc . and how to use it ,starting the server in normal mode and exec a cfg?
This is the first plugin that I don't know how to use it :/ A complete guide please? |
Re: [L4D] Game Mode Config Loader
The config that applies (for example, a coop game on advanced diff) will exec automatically at map start (so coop.cfg and hard_coop.cfg or whatever will both exec, nothing else) You do not need to do anything manually.
|
Re: [L4D] Game Mode Config Loader
Quote:
Ok,i just need to paste the smx in /plugins/ folder , and create coop.cfg,versus.cfg,survival.cfg in /cfg/ folder and ready? |
Re: [L4D] Game Mode Config Loader
Yep that is all. I just updated the plugin to re-execute the cfg files if the cvar's change in middle of gameplay.
The CFG folder being referenced, is the game's cfg folder which is located in left4dead\cfg... |
Re: [L4D] Game Mode Config Loader
Very nice plugin, I don't know what I can put in these configs files, but it will be pretty useful.
Can we use the ability to activate another plugin in these files ? |
Re: [L4D] Game Mode Config Loader
For me this plugin work at 100%. I have set in this mode:
1) Edit a L4D_COOP.cfg and put where your server.cfg is located and write this into the L4D_COOP.cfg. // //Evil Boomer Config //email: [email protected] // exec extra/BoomerSmokerHunter_Coop.cfg exec extra/TankWitchZombie_Coop.cfg exec extra/AmmoReviveVarie_Coop.cfg exec extra/SuperVersus_Coop.cfg //exec extra/upgbot_Coop.cfg // 2) Into Server.cfg put this lines: // //Evil Boomer Config //email: [email protected] // exec extra/BoomerSmokerHunter.cfg exec extra/TankWitchZombie.cfg exec extra/AmmoReviveVarie.cfg exec extra/SuperVersus.cfg //exec extra/upgbot.cfg // gamemode_config_coop_easy L4D_Coop.cfg gamemode_config_coop_normal L4D_Coop.cfg gamemode_config_coop_hard L4D_Coop.cfg gamemode_config_coop_impossible L4D_Coop.cfg // 3) Create a subfolder extra now and put the other configs you have create with a lot of cvars. When you server is started execute the extra/blabla.cfg (I use it for Versus) but if gamemode is coop the blaba_coop.cfg is execute. For a little example into my TankWitchZombie.cfg i have tank set to 7000, in TankWitchZombie_coop.cfg i have tank set to 8000 and in Advanced mode is x2 = Tank to 16000. 4) gamemode_config_coop_easy L4D_Coop.cfg gamemode_config_coop_normal L4D_Coop.cfg gamemode_config_coop_hard L4D_Coop.cfg gamemode_config_coop_impossible L4D_Coop.cfg About this.... i tell to plugin to execute always L4D_Coop.cfg for all difficult, if you want can create this: gamemode_config_coop_easy L4D_Coop_easy.cfg gamemode_config_coop_normal L4D_Coop_normal.cfg gamemode_config_coop_hard L4D_Coop_hard.cfg gamemode_config_coop_impossible L4D_Coop_impossible.cfg But remember you need also put into Extra SubFolder BoomerSmokerHunter_Coop_Easy.cfg BoomerSmokerHunter_Coop_Normal.cfg etcetc etcetc 5) exec extra/BoomerSmokerHunter.cfg (extra subfolder is located into /cfg of server, the same dir where you have server.cfg and put L4D_Coop.cfg, you need only create a subfolder Extra and put all configs. Because too many chaos if you add ALL in the same folder (IMHO). 6) Important, if you use plugin like SuperVersus, InfectedBots or another plugin have a /sourcemod/personalconfigfile, you need work-around this, into /sourcemod/personalconfig you put // before all personalcvar of plugin. And replicated this into one config file like my SuperVersus.cfg, you can edit easily the difference in Versus, Coop_Easy, Coop_Normal etcetc (remember to use SuperVersus_Coop.cfg for CoopMode) Example: (In COOP i have different setting) // //SuperVersus // sm_cvar sv_visiblemaxplayers 16 sm_cvar l4d_maxplayers 16 sm_cvar z_max_player_zombies 8 (this into SuperVersus_COOP is 12) sm_cvar l4d_XtraHP 1 sm_cvar l4d_survivor_limit 8 sm_cvar l4d_infected_limit 8 sm_cvar l4d_killreservation 1 sm_cvar l4d_supertank 0 sm_cvar l4d_tank_hpmulti "0.01" // // Limits // sm_cvar z_minion_limit 8 //3 sm_cvar z_exploding_limit 1 //1 (this into SuperVersus_COOP is 4) sm_cvar z_gas_limit 2 //1 (this into SuperVersus_COOP is 3) sm_cvar z_hunter_limit 5 //1 sm_cvar z_versus_boomer_limit 1 //1 sm_cvar z_versus_smoker_limit 2 //1 // // Infected Bots 1.7.2 // sm_cvar l4d_infectedbots_allow_boomer 1 sm_cvar l4d_infectedbots_allow_hunter 1 sm_cvar l4d_infectedbots_allow_smoker 1 sm_cvar l4d_infectedbots_enabled_on_coop 1 sm_cvar l4d_infectedbots_director_spawn 0 sm_cvar l4d_infectedbots_max_player_zombies 8 (this into SuperVersus_COOP is 12) sm_cvar l4d_infectedbots_normalize_spawntime 0 sm_cvar l4d_infectedbots_spawn_time 20 sm_cvar l4d_infectedbots_showhud 1 sm_cvar l4d_versus_hunter_limit 5 sm_cvar l4d_vsinfectedbots_version "1.7.2" |
Re: [L4D] Game Mode Config Loader
Sure. You can unload a plugin or whatever. Whatever u could normal command from the console, you could do in the cfg files.
Now how do I get approved? |
Re: [L4D] Game Mode Config Loader
is there a way to use this plugin to get back to having Versus on advanced mode?...or does anyone have a set of cvars that would up the difficulty for Versus???
|
Re: [L4D] Game Mode Config Loader
This topic has a list of the cvars: http://forums.alliedmods.net/showthread.php?t=95889 There are a bunch of hidden CVAR values, which are listed here: http://forums.alliedmods.net/showthread.php?t=81010
What you want to look for are cvars that have the word "expert" in them. VS mode uses the ones with the name "normal". If you set your config to set the values of the "normal" ones to the value of "expert" you will have duplicated the expert settings into versus. (Use the keyword EXPERT to easily find the settings of hard, normal, and easy) For example, how long it takes the tank to burn to death when he is on fire: tank_burn_duration_expert 40 tank_burn_duration_hard 35 tank_burn_duration_normal 30 tank_burn_duration_vs 30 Normal is 30 while hard is 35. But you'll also notice there is a specific versus value, _vs. Some values have versus versions, others do not. If they do not, then the server is using the value from the _normal version. In your searches, look for the keywords: _versus versus_ _vs vs_ to find those specific versus values. |
Re: [L4D] Game Mode Config Loader
Quote:
|
Re: [L4D 1&2] Game Mode Config Loader
I found a better place which has more cvars: http://paste2.org/p/104807 or http://www.l4dmaps.com/l4d_cvar.php
I found this one: z_hit_from_behind_factor Damage multiplier if zombie hits Survivor from behind You may want to look at survivors health modifications... I donno how the game itself does it. |
Re: [L4D] Game Mode Config Loader
Plugin does not work for me, nothing changes from my default server.cfg when the gamemode changes.
I have coop.cfg , versus.cfg and survival.cfg in the left4dead/cfg folder, and the plugin in the plugins folder. |
Re: [L4D] Game Mode Config Loader
I'll contact you through PM and investigate.
|
Re: [L4D] Game Mode Config Loader
VS difficulty used to be change-able using the commands:
z_difficulty_locked 0 z_difficulty <difficulty> I'm not sure if that still works but it's worth a try. |
Re: [L4D] Game Mode Config Loader
Hi. This is not working for me. I have tried it on two servers. I put the plugin /l4d/left4dead/addons/sourcemod/plugins (with my other plugings) and created the cfg files and put them here /l4d/left4dead/cfg. I tested using coop at normal. I put specific different cvars in server.cfg, gamemode_config_coop.cfg and gamemode_config_coop_normal.cfg. The only cvar that worked was the server.cfg. Can someone please assist?
Thank you. Alicia |
Re: [L4D] Game Mode Config Loader
Quote:
|
Re: [L4D] Game Mode Config Loader
Quote:
|
Re: [L4D] Game Mode Config Loader
Plugin does not exec the coop.cfg on advance or normal, works on easy and expert. is there a fix for that
|
Re: [L4D] Game Mode Config Loader
Since the last update, I cannot change the z_difficulty cvar at all. It always stays on NORMAL. Even when I vote in-game in coop mode to change to any difficulty and it always stays on NORMAL.
|
Re: [L4D] Game Mode Config Loader
Downtown1's extension was locking me to normal difficulty, I removed that extension and retested. It runs the correct cfg's for me.
Double check your file names. |
All times are GMT -4. The time now is 11:14. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.