Raised This Month: $89 Target: $400
 22% 

Extended Map configs


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Milo|
Member
Join Date: Jan 2009
Location: Netherlands
Plugin ID:
769
Plugin Version:
1.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    87 
    Plugin Description:
    Allows you to have separate configfiles for each map/gametype/etc.
    Old 02-12-2009 , 13:07   Extended Map configs
    Reply With Quote #1

    Summary

    This plugin is an improved version of valve's map-specific configuration files. It allows you have configfiles which only get loaded on all CTF maps, configs for 1 specific map, etc.


    Supported games

    The game should work on nearly every game using the source or orangebox engine, which would include:
    • Team Fortress 2
    • Counter-strike : Source
    • Day of Defeat : Source
    • Left 4 Dead
    • Insurgency
    • Garry's Mod

    Commands and CVars:
    • extendedmapconfig_version - Shows the version of this plugin.

    Installation:
    1. Copy extendedmapconfig.smx to the Sourcemod plugins directory (default: <gamedir>/addons/sourcemod/plugins/)
    2. Change the map on your server (or restart it) to force the plugin to load.
    3. Empty configfiles for each installed map and gametype will automaticly be created (if possible and if they didn't already exist), you might want to add map- or gametype-specific cvars in here just as you would in the server.cfg

    Usage (directory structure):


    Inside your mod's cfg/ directory, a new directory called mapconfig/ will be created. This directory holds 3 subdirectories:

    mapconfig/general/
    This directory contains 1 file, named all.cfg which will be executed for any map.
    mapconfig/gametype/
    This directory holds a configfile for each gametype. For Team Fortress 2 and Counter-strike:source, a few will be automaticly created. A gametype is usually the "prefix" of the map. In CS:S the map de_dust2 has the de prefix, meaning it is a defusemap. In TF2 the map ctf_2fort has the ctf prefix meaning it is a capture the flag map.

    The file ctf.cfg will thus be executed for every map starting with ctf_.
    mapconfig/maps/
    This directory holds a configfile for every map you have. They should have been automaticly created for every installed map. This is very similar to valve's build-in mapconfig system. The file de_dust.cfg will be executed for the map called de_dust.
    You can safely create additional configfiles for new maps and/or gametypes, the plugin will automaticly try to load the appropriate ones after every mapchange.


    Notes:
    • The configfiles are loaded on every mapchange, similar to the server.cfg file.
    • The configfiles are loaded after the game is done loading the usual configfiles (such as server.cfg). Because of this, any setting you put in these files, will overrule the settings preset in server.cfg
    • The configfiles are loaded in this order: first the all.cfg file, then the file for the appropriate gametype (if any), then the map's own configfile.
    • I am aware that part of this plugin dublicates the mapconfig system by valve. It is my personal opinion that mine is slightly more superior because it puts the configfiles in an organised directorystructure.
    • This plugin will not stop the "normal" mapconfigs from working, you could safely use both (although there is hardly ever a reason to).
    • The plugin automaticly creates gametype entries for TF2 and CS:S but not for other mods. If you like this plugin and want your mod to have automaticly created gametypes too, contact me and send me a list of which that should be. In the meantime you can obviously just create the files yourself.

    Version history
    • Version 1.0 (initial release)
      • Initial version
      • Tested in Team Fortress 2
    Attached Files
    File Type: sp Get Plugin or Get Source (extendedmapconfig.sp - 2499 views - 5.9 KB)
    File Type: smx extendedmapconfig.smx (3.8 KB, 1887 views)
    Milo| is offline
    Chris-_-
    SourceMod Donor
    Join Date: Oct 2008
    Old 02-12-2009 , 13:35   Re: Extended Map configs
    Reply With Quote #2

    You scare me, i was looking for this 1 day ago >.>
    Chris-_- is offline
    danielsumi
    Member
    Join Date: Feb 2009
    Old 02-13-2009 , 12:05   Re: Extended Map configs
    Reply With Quote #3

    Works very nice indeed!

    I'm just having a single issue... whenever my server enters in hibernation mode (left 4 dead, it does when everyone leaves the server) all the settings seems to be reverted to defaults... the only workaround is to either: manually reboot the server, manually change the map... or wait the current map to finish, so the next one will be loaded with my custom settings again... if you could fix it i would be very VERY greatful

    Last edited by danielsumi; 02-13-2009 at 12:07.
    danielsumi is offline
    Milo|
    Member
    Join Date: Jan 2009
    Location: Netherlands
    Old 02-13-2009 , 21:31   Re: Extended Map configs
    Reply With Quote #4

    I don't play L4D myself, so i'm not sure how exactly that hibernation stuff works.

    I do have access to a L4D server, but without the game itself it's hard to test plugins in it. I'll have a look at it tomorrow and see if i can fix it.

    I noticed the game is 50% off this weekend in the Steam Store btw, might even buy the game.

    Either way, expect an update here in a day orso or find me on #sourcemod irc if you want progress updates.
    __________________
    A few small plugins i released for the general public:
    Milo| is offline
    Milo|
    Member
    Join Date: Jan 2009
    Location: Netherlands
    Old 02-15-2009 , 16:08   Re: Extended Map configs
    Reply With Quote #5

    Alright, i made an attempt at supporting left4dead's hibernation feature.

    Try this (alpha)version danielsumi, and let me know if it works out.

    It detects wether or not you are using the L4D mod, and ifso attempts to hook the server_spawn event which seems to be firing after coming out of hibernation. If this event fires, the plugin will load all appropriate config files, just as if it does after each mapchange on other mods.
    Attached Files
    File Type: smx extendedmapconfig.smx (4.2 KB, 277 views)
    File Type: sp Get Plugin or Get Source (extendedmapconfig.sp - 974 views - 6.5 KB)
    __________________
    A few small plugins i released for the general public:
    Milo| is offline
    danielsumi
    Member
    Join Date: Feb 2009
    Old 02-15-2009 , 23:22   Re: Extended Map configs
    Reply With Quote #6

    allright, i will give it a try and feedback u asap
    danielsumi is offline
    danielsumi
    Member
    Join Date: Feb 2009
    Old 02-15-2009 , 23:30   Re: Extended Map configs
    Reply With Quote #7

    hmmm not quite yet, still reseting the settings.

    but hey, its not such a big deal, i can live with that, overall, great job anyway
    danielsumi is offline
    Milo|
    Member
    Join Date: Jan 2009
    Location: Netherlands
    Old 02-16-2009 , 00:11   Re: Extended Map configs
    Reply With Quote #8

    Hmmm ok, i'll have to play around with it a bit more then.

    Maybe you could tell me though, how exactly is it resetting the settings?
    - are these the settings you have in the extended mapconfigs?
    - are they being reset to the default value, or to whatever you had in server.cfg or something ?

    Anyway, i have the game itself now too, so i'll probably be playing around with it a bit, maybe i can find a solution.
    __________________
    A few small plugins i released for the general public:
    Milo| is offline
    danielsumi
    Member
    Join Date: Feb 2009
    Old 02-16-2009 , 03:35   Re: Extended Map configs
    Reply With Quote #9

    From what i observed:

    It turns all cheat-flagged cvars to default values after someone joins the server trough console or server browser and them leave it.

    When the server see that no one is in-game anymore, the hibernation mode takes over and it revert the map to the beginning, and also set the cvars to default values.

    As i said, its not such a big deal because it seems that whenever players join trough lobby system (the main system to join a game in l4d), the server is forced to change the map before players join the game, so all the settings are... uh... set to whatever values are listed on your /mapconfig/ folder.

    Last edited by danielsumi; 02-16-2009 at 03:41.
    danielsumi is offline
    dagan69
    New Member
    Join Date: Feb 2009
    Old 02-16-2009 , 07:31   Re: Extended Map configs
    Reply With Quote #10

    Nice job, but i have a problem with plugin ... No error, pluging starting without problem, the subdirectories were creating, and the 'map'.cfg were creating in cfg/mapconfig/maps.
    But when i modify the file,nothing has changed. I tested by stopping the plugin and it's the same thing.
    I'm on the play DoD: S with sourcemod v1.1.0

    Do I have missed a step I can modify files 'map'.cfg ?
    The aim is to restrict weapons by maps.

    Thx ^^
    dagan69 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 02:47.


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