Raised This Month: $12 Target: $400
 3% 

Server Startup Configuration


Post New Thread Reply   
 
Thread Tools Display Modes
Author
TFN|Nick
Senior Member
Join Date: Sep 2007
Plugin ID:
232
Plugin Version:
0.2.1
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    This is a tool that allows users to run a config file only on server startup
    Old 12-19-2007 , 16:02   Server Startup Configuration
    Reply With Quote #1

    Server Startup Configuration

    by
    -=( TFN | Pieface )=-


    Description
    This is a tool that allows users to run a config file only on server startup. This is useful if you want to setup all of your sourcemod files but may want to tweak settings later. Say for instance:

    "I use deathbeam and have setup my colours for teams as x,y,z but got complaints about it so i have disabled it. However when the server changes map and server.cfg is executed again all my settings are back to normal and i have to manually disable it again. So now our head admin has to disable it in the script so we can activate it later. This is a pain!"

    This plugin was designed to run only the one file on server startup so that i can change any settings and have them stay that way without having to execute a file manually after the server has restarted.

    Eh, i developed it for my server but i'm just posting it here so anyone who wants to can use it .

    IMPORTANT: This plugin has been tested on my CS:S server and works fine but there maybe kinks etc to be worked out. Therefore the plugin is still in BETA!

    CVars
    sm_startup_active <1|0> This enables/disables the plugin
    sm_startup_file MyConfig.cfg This is the full file path of your config
    sm_startup <1|0> This is a system CVar used to decide whether to execute the script or not. DO NOT CHANGE!!
    sm_startup_version Kinda speaks for itself really

    Installation
    Place the .smx file into the "plugin" folder and the .sp into your "scripting" folder. Put the following line into your server.cfg:

    sm_startup_file MyConfig.cfg*

    *This needs to be the full file path to your config file.

    Change Log
    0.1.x - initial versions, overly complicated and buggy.
    0.2.0 - recode of 0.1.x, easier to setup/change. (BETA)
    0.2.1 - tested and various bugs fixed. (BETA)
    0.2.2 - fixed a bug. File names where logging as numbers *n00b*

    Future Plans
    WarMode support
    AutoExec creation
    Admin Menu support

    Support
    I will support this plugin, but i will need the following details:
    • sourcemod version
    • metamod version
    • server type
    • plugin version
    • error logs/messages etc
    Attached Files
    File Type: sp Get Plugin or Get Source (server_startup.sp - 3180 views - 2.9 KB)
    File Type: smx server_startup.smx (1.8 KB, 1100 views)

    Last edited by TFN|Nick; 12-22-2007 at 08:33.
    TFN|Nick is offline
    Send a message via MSN to TFN|Nick
    FlyingMongoose
    Veteran Member
    Join Date: Mar 2004
    Old 12-19-2007 , 16:48   Re: Server Startup Configuration
    Reply With Quote #2

    isn't this exactly what autoexec.cfg and placing exec [filepathfromcfgfolder] in it does?
    __________________
    Please do NOT PM for support.

    Only ask for support in plugin threads.

    TunedChaos.com - Precision Tuned Game Servers
    FlyingMongoose is offline
    TFN|Nick
    Senior Member
    Join Date: Sep 2007
    Old 12-19-2007 , 16:51   Re: Server Startup Configuration
    Reply With Quote #3

    I tried that but it executed before the plugins had loaded and so the values wheren't set. And i did look for alternatives first but there was nothing so i took the DIY approach

    EDIT: and, like i said in the post, i made it for myself and i'm just sharing it ;)

    Last edited by TFN|Nick; 12-19-2007 at 16:53.
    TFN|Nick is offline
    Send a message via MSN to TFN|Nick
    komat
    Member
    Join Date: Apr 2004
    Old 12-20-2007 , 00:05   Re: Server Startup Configuration
    Reply With Quote #4

    Quote:
    Originally Posted by TFN|Nick View Post
    I tried that but it executed before the plugins had loaded and so the values wheren't set. And i did look for alternatives first but there was nothing so i took the DIY approach

    EDIT: and, like i said in the post, i made it for myself and i'm just sharing it ;)
    i never had that problem
    all my config comamnds for hte plugins are in my server.cfg not autoexec.cfg
    komat is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 12-20-2007 , 00:17   Re: Server Startup Configuration
    Reply With Quote #5

    Plugins are loaded before the configs are, unless the plugin uses OnConfigsExecuted().
    bl4nk is offline
    TFN|Nick
    Senior Member
    Join Date: Sep 2007
    Old 12-20-2007 , 03:54   Re: Server Startup Configuration
    Reply With Quote #6

    @bl4nk: Well, i asked about this before. And it was suggested i use autoexec.cfg. So i did. I put all my settings in there and the server rebooted- no settings changed... and i left it that way for a month to see if it was just me, but it wasn't doing anything- so i made this to sort it out.

    @komat: i did that before, but if i wanted to say disable a plugin from working that was off by default i had to change it in server.cfg because it just kept reloading the same settings over and over again. It wasn't so bad if it was a plugin that was on by default because i didn't have to set that CVar, but things like awp punish and deathbeam where a pain if i wanted to make a change
    TFN|Nick is offline
    Send a message via MSN to TFN|Nick
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 12-20-2007 , 07:27   Re: Server Startup Configuration
    Reply With Quote #7

    Nothing really wrong with this plugin. It has limited usage, but does server a purpose in allowing a specific configuration to be controlled via CVAR. I could also see this being useful for a warmode.

    Ie, have all your normal plugins in this file, and the cvar on. Then to turn everything off and keep it off, set the cvar to 0 and change map.

    What you may want to consider is having both a "enable cfg" and "disable cfg". Then hook the "active" cvar for changes. When it changes to 0, exec the disable cfg, and when it changes to 1, exec the enabled cfg.

    Then you could use it with the default warmode_on and warmode_off CFGs included with SourceMod. You could also make a cvar for the filename of each Cvars.

    Just some ideas to add more range of functionality.
    __________________
    I'm a blast from the past!
    ferret is offline
    ottobohn
    Senior Member
    Join Date: Sep 2007
    Old 12-20-2007 , 10:53   Re: Server Startup Configuration
    Reply With Quote #8

    Could you go a step farther? Could you have it load up configs depending on maps like event scripts, mani mod, and metamods?

    I'd like to load one map, example: Dust2, and have a config loading specifically for it. If we go to Office, I want a config that pertains to that.

    /cfg/sourcemod/mapcfg/de_dust2.cfg will load up for dust2

    /cfg/sourcemod/mapcfg/cs_office.cfg will load up for what we need for office.

    Thanks!

    Otto
    ottobohn is offline
    ferret
    SourceMod Developer
    Join Date: Dec 2004
    Location: Atlanta, GA
    Old 12-20-2007 , 10:59   Re: Server Startup Configuration
    Reply With Quote #9

    That's going to be in base SourceMod soonish, I've already begun work on it.
    __________________
    I'm a blast from the past!
    ferret is offline
    TFN|Nick
    Senior Member
    Join Date: Sep 2007
    Old 12-20-2007 , 12:38   Re: Server Startup Configuration
    Reply With Quote #10

    @ferret: Thanks for the approval. I designed the plugin originally to do this but it became overly complicated for my liking. However, I have some ideas on how to make this easier and will see what i can cook up tonight along the lines of your recommendations.

    @otto: What ferret said
    TFN|Nick is offline
    Send a message via MSN to TFN|Nick
    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 16:58.


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