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

Map Configs


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Liam
SourceMod Developer
Join Date: Jan 2008
Location: Atlanta, GA
Plugin ID:
318
Plugin Version:
1.2
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Handles loading and unloading map cvars.
    Old 03-19-2008 , 12:38   Map Configs
    Reply With Quote #1

    Map Configs Plugin
    ------------------

    This plugin handles the loading and unloading of map config files.

    This is beneficial and more helpful than the stock config file loader as you do not have to worry about making sure all of your values are reset back to default for the next map.

    The config files should be placed in %sourcemod%/configs/maps, and the formatting for these are straight forward: one cvar per line, and they can be any format needed.

    If you have any questions, feel free to reply to this thread or find me in #sourcemod on irc.gamesurge.net.

    This plugin requires the latest 1.0.2 snapshot of SourceMod.

    Changelog
    -1.0 - Original Release
    -1.1 - Updated to use OnAutoConfigsBuffered( )
    -1.2 - Updated to correct issues with OnAutoConfigsBuffered( )

    Enjoy!
    -Liam
    Attached Files
    File Type: zip mapconfigs.zip (6.6 KB, 5397 views)

    Last edited by Liam; 06-21-2008 at 12:26.
    Liam is offline
    Rebell
    Veteran Member
    Join Date: Nov 2004
    Location: GERMANY
    Old 03-19-2008 , 13:34   Re: Map Configs
    Reply With Quote #2

    Its similar to manis map config, right ?

    Nice...
    __________________
    Rebell is offline
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 03-19-2008 , 14:05   Re: Map Configs
    Reply With Quote #3

    Yep, similar, which is why I wrote it.

    I hate huge server.cfg files. -.-
    Liam is offline
    LocutusH
    Senior Member
    Join Date: Dec 2007
    Location: Hungary
    Old 03-20-2008 , 06:25   Re: Map Configs
    Reply With Quote #4

    This: http://forums.alliedmods.net/showthread.php?t=57779

    Does the same, and its working perfect.

    (dunno why it is unapproved, the unapproval reason is bullshit)
    __________________
    LocutusH is offline
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 03-20-2008 , 07:44   Re: Map Configs
    Reply With Quote #5

    Actually, no. It doesn't do the same thing.

    That plugin (http://forums.alliedmods.net/showthread.php?t=57779) does nothing but 'exec <mapcfg>'.

    My plugin tracks what cvars were loaded and then makes sure they are reset to default values on map end.

    While this isn't overly more complex, it is a difference.
    Liam is offline
    BAILOPAN
    Join Date: Jan 2004
    Old 05-20-2008 , 22:18   Re: Map Configs
    Reply With Quote #6

    Your plugin has a race condition. OnConfigsExecuted() guarantees that all configs have finished executing. But you're issuing an "exec" command inside OnConfigsExecuted(), and the changes won't necessarily be mirrored in plugins which rely on this guarantee (such as reservedslots).

    I've added a forward to the 1.1 branch to help mitigate this problem, you can read about it here. This change will make it into 1.0.2 or so. I won't unapprove this plugin until a stable release has the new feature and this plugin has had time to update after that.

    Note: "fixing" by using OnMapStart() is not a good idea since it occurs before sourcemod.cfg gets executed.
    __________________
    egg
    BAILOPAN is offline
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 05-21-2008 , 01:42   Re: Map Configs
    Reply With Quote #7

    So I need to change that to update using OnAutoConfigsBuffered() ?

    Will be happy to update that as soon as 1.0.2 is updated for it.

    Thanks for the info Bailopan.
    Liam is offline
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 06-09-2008 , 16:05   Re: Map Configs
    Reply With Quote #8

    This has been updated to reflect OnAutoConfigsBuffered( );

    Requires latest snapshop of the 1.0.2 branch of SM.
    Liam is offline
    Liam
    SourceMod Developer
    Join Date: Jan 2008
    Location: Atlanta, GA
    Old 06-20-2008 , 23:55   Re: Map Configs
    Reply With Quote #9

    Updated to version 1.2
    Liam is offline
    dann
    Senior Member
    Join Date: Nov 2007
    Old 06-21-2008 , 10:05   Re: Map Configs
    Reply With Quote #10

    i just updated to sourcemod 1.0.3.2265 and tried your plugin. it seems to work on changing server varibles(mp_timelimit etc), but doesn't seem to be changing the sourcemod varibles any longer. I turn off my afk manager and reserved slots on certain maps, but the stay active now. it seems like map configs are being executed before the sourcemod configs or something(im just guessing).

    thanks and hopefully you can get this updated soon.
    dann 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 03:41.


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