[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 :(
|
All times are GMT -4. The time now is 18:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.