DAK Server Admin Mod

1235727

Comments

  • ZekZek Join Date: 2002-11-10 Member: 7962Members, NS1 Playtester, Constellation, Reinforced - Shadow
    edited November 2012
    Hmm, it seems like the workshop DAK mod might be broken right now? If I install it through the web admin and change the map, it breaks the web admin and causes consistency errors on connect. I had to restart and uninstall to fix it.
  • itspreachitspreach Join Date: 2012-10-30 Member: 164638Members
    edited November 2012
    Regarding reserved slots again... is it intended that the server could potentially never fill? For example:

    I have 2 slots reserved. 2 admins join and the server is now full. 2 pugs leave. Now the server locks itself because it thinks it has to save the last 2 slots for reserved even though I already have 2 reserved players currently on...

    I guess I was hoping that the reserved slots would be "consumed" as players on the list joined.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Yea currently the reserve slots plugin doesnt check how many reserve players are on currently, mainly because I wanted to allow the server to fill with reserve slot players, i guess I can work something in with that I just need to make sure it doesnt effect other calculations.

    The current workshop build should work, but I realized something that might be causing some issues for people with the required build field, which I am going to publish an update to fix in a sec, along with fixing the mapcycle per map defined mods issue, and to fix any issues with config updates and old config files.
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    Is he saying he only wants to allow 2 reserved slot players in at a time?
  • itspreachitspreach Join Date: 2012-10-30 Member: 164638Members
    edited November 2012
    Yep but only if the server is full...basically if there are 2 reserved slots in use, I don't want pugs not to be able to join if the server is not full
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    But that is how it should already work. The reserved slot should only be kicking non reserved slot players when someone with a reserved slot joins if the server is full to make room.

    The reserved slot is not an actual slot on the server. An example: "if you have reserved slot, it's like being a vip. the bouncer will kick someone out to let you enter. " (club is at max capacity for fire code)
  • itspreachitspreach Join Date: 2012-10-30 Member: 164638Members
    <!--quoteo(post=2027293:date=Nov 17 2012, 04:20 PM:name=ZEROibis)--><div class='quotetop'>QUOTE (ZEROibis @ Nov 17 2012, 04:20 PM) <a href="index.php?act=findpost&pid=2027293"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->But that is how it should already work. The reserved slot should only be kicking non reserved slot players when someone with a reserved slot joins if the server is full to make room.

    The reserved slot is not an actual slot on the server. An example: "if you have reserved slot, it's like being a vip. the bouncer will kick someone out to let you enter. " (club is at max capacity for fire code)<!--QuoteEnd--></div><!--QuoteEEnd-->

    Well it doesn't work like that. And as far as I can tell, it doesn't kick anyone either. From my testing, it simply puts a pw on the server when the server reaches limit minus reserved slot #. And it doesn't cross reference the reservedplayer.json file either. I've tested people joining simply by knowing the pw, but not being in the reserved player list.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    edited November 2012
    I typed this up for details on how the system is supposed to work currently - Let me know if its not working like this:

    kMaximumSlots - 19 - needs to match your current maximum players on the server, basically the -limit.
    kMinimumSlots - 1 - is the amount of slots that are always left open, should usually be left at 1 (0 would make it so no one could join once your reserve slots are full, any higher is kinda wasteful).
    kReservedSlots - 3 - is the number of actual reserve slots plus kMinimumSlots (2 + 1).

    Currently the plugin will let the server fill up to kMaximumSlots - kReservedSlots, default being 16 players. Once that number is reached, a password is set and any new player that joins that doesnt have a reserve slot will be kicked after they fully join (this is the part that sucks). kReservedSlots - kMinimumSlots more players would be able to join that do have reserve slots, leaving kMinimumSlots always available. If another person with a reserve slot joined after those slots were full (18/19 in the default example), then it would start kicking players without a reserve slot (automatically determined based on score excluding commanders). The password is removed once the playercount drops below kMaximumSlots - kReservedSlots.
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    edited November 2012
    Is there any setting configuration which allows us to have no "extra slots" and instead always kick when the server is full to allow for reserved slots? I assume for this you would set kReservedSlots to 1 for example:

    Server 19 slots
    kMaximumSlots - 19
    kMinimumSlots - 1
    kReservedSlots - 1

    Results in 18/19 max players even if no players have reserved slot. If player with reserved slot joins and server is 18/19 then non reserved slot player is kicked to make room based on conditions to minimize impact to game.
  • itspreachitspreach Join Date: 2012-10-30 Member: 164638Members
    Dragon it doesn't really work like that because once the server reaches the point of locking, new players can't join anyways because the server is password protected, thus a kick is never invoked. The problem arises like zero is saying, the server isn't allowed to fill so oftentimes the teams will remain unbalanced.

    Ideally, at least for how I imagine this working, I would be able to set the number of reserve slots(2), the server fills up to limit(16) - reserved slots(2) = (14) two admins joins, the server is now at (16), 3 pugs leave, the server is now at 13, and 3 pugs are allowed to join.

    Right now, only 1 pug would be allowed to join in this scenario because the server locks as soon as the server hits (14) again.
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    Well my point was more that the maximum number of playable slots on the server should remain a constant. Non reserved slot players should be kicked when reserved slot players join when the server is full. What your trying to do is a bit different but I do see the issue your having as well.

    Personally I still think it is best for them to work the same way they do in CS, CS:S CS:GO, TF2 and NS1. That is where you have an unplayable slot (ie slot 19 for a 18 slot server or slot 21 for a 20 slot server) that is used to establish the connection to allow reserved slot players to enter the full server kicking those who do not have one.

    I still feel the password part is more trouble than it is worth and I hope there is an option to disable it. Over time players will learn that servers with odd slots have reserved slots and the last one will not let them in unless they have one, just like how it is for a lot of other popular online games.
  • itspreachitspreach Join Date: 2012-10-30 Member: 164638Members
    Not that my suggestion is any easier to implement, but I don't think the mod would be able to initiate a kick from the server browser.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Well the idea was so that reserve slot players could join initially without anyone being kicked, but yes the options are there to configure so that if you wanted it to only leave 1 extra slot, setting it as 1 and 1 *should* work, although I havent explicitly tested that.

    Now I guess i could also configure it so that if you decide to leave extra slots always available for reserve players, that it could account for that when new players join/setting the password. That would require some changes to the plugin, thats not somethign you can turn on currently.

    For the password if you set the reserve password to "" it should effectively disable it.
  • s095s095 Join Date: 2012-11-18 Member: 172209Members
    I am a server operator and i am wondering how to make some reserved slots with DAK MOD on my server...

    how can i enable the reserved slots function? i can't find it at DAKConfig.json
  • itspreachitspreach Join Date: 2012-10-30 Member: 164638Members
    edited November 2012
    <!--quoteo(post=2027664:date=Nov 18 2012, 12:07 AM:name=s095)--><div class='quotetop'>QUOTE (s095 @ Nov 18 2012, 12:07 AM) <a href="index.php?act=findpost&pid=2027664"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I am a server operator and i am wondering how to make some reserved slots with DAK MOD on my server...

    how can i enable the reserved slots function? i can't find it at DAKConfig.json<!--QuoteEnd--></div><!--QuoteEEnd-->


    It's not included by default, you have to add it to the plugin list in dak config then restart the server (or change map?)

    "kPluginsList": [ "afkkick", "reservedslots", ..........
  • s095s095 Join Date: 2012-11-18 Member: 172209Members
    <!--quoteo(post=2027679:date=Nov 18 2012, 03:28 PM:name=itspreach)--><div class='quotetop'>QUOTE (itspreach @ Nov 18 2012, 03:28 PM) <a href="index.php?act=findpost&pid=2027679"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It's not included by default, you have to add it to the plugin list in dak config then restart the server (or change map?)

    "kPluginsList": [ "afkkick", "reservedslots", ..........<!--QuoteEnd--></div><!--QuoteEEnd-->

    after that, what should i do for adding those command line provided form <a href="https://github.com/xToken/DAK" target="_blank">https://github.com/xToken/DAK</a>?
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Once you add the plugin to the list and restart the server once, you will also need to enable it in the config file, the kEnabled boolean under Reserve Slots. At some point I will most likely remove those as they are kind of redundant with the plugin loading system (i added that part later).

    For Reserve slots, when I publish the new version (probably Monday), it will change how it works slighty:

    "kReservedSlots": This is the amount of slots that will be reserved for reserve slot players. Note, setting this to 0 does not disable reserve slots, it will only make it so that no slots are left open for reserveslot players.
    "kMaximumSlots": This is the server's maximum number of slots.
    "kMinimumSlots": This is the amount of slots the server will always keep free (unless completely full of reserve slot players). Should most likely always be 1.

    The main change here is that you no longer need to add the kMinimumSlots to the kReservedSlots. kReservedSlots will be the number of slots that are always left open on your server for reserve slot players. Say you setup a 19 slot server with 2 reserve slots, that will allow 16 players to join that do not have reserve slots. Then, a password is set (if configured), and anyone that did join without a reserve slot would be kicked. The other change here is now that if 2 reserve slot players did join, and a couple non reserve slot players left, the server would unlock and more non-reserve slot players could join (back up to 18/19 if those 2 reserve slot players stay on). Once at 18/19, any reserve slot player that connects would cause a non-reserve slot player to be kicked.

    Now if you set kReservedSlots to 0, your server can fill to 18/19 (in default example). From there, it works as above with the server being locked (if configured), and any reserve slot players joining causing a non-reserve slot player to be kicked.

    For granting reserve slots, you can configure the ReservedPlayers.json file, an example file is included in the Readme. You can also grant your admins or setup a group that has access to the sv_hasreserve command, which also grants a reserve slot (thats all it does).

    Hopefully this should cover any questions regarding this, and also fit anyones specific needs. Let me know if there are any issues with it, or if something should function differently.

    Beyond the reserve slot changes, I also created and added a messages plugin which can display periodic messages to all connected players.

    Also, working with ZEROibis i created a system which will query a user configured URL for a list of current admins. This URL is queried on map change, and on client connect. There are some delays to prevent excessive queries, which are configurable along with the URL. These options will being under DAKLoader in DAKConfig.json:
    "ServerAdmin": {
    "kQueryURL": This is the URL that DAK will query for a list of admins.
    "kMapChangeDelay": This is the number of minutes after a map change that a new query will not run during.
    "kUpdateDelay": This is the number of seconds after a client connect that a new query will not run.
    },

    To fully use this, you will want to make sure that whatever groups are created are correctly defined in your ServerAdmin.json file. Also note that the group names are case sensitive, so say you used Root, Admin and Clan, you'd want options like below (as an example).

    "Clan": {
    "commands": [ "sv_reset", "sv_ban" ],
    "type": "allowed"
    },
    "Admin": {
    "commands": [ ],
    "type": "disallowed"
    },
    "Root": {
    "commands": [ ],
    "type": "disallowed"
    }
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members
    Okay xDragon, took me a while to get back to you - mainly because i have been testing left and right.
    So, it is true, logging was the cause of the chokes. I have closed all servers, turned on server 1 with logging - chokes.
    Turned off logging (left DAK on), re-started server 1 - works fine, no choking. Started 2nd server with logging - chokes again. Closed server 2 (server 1 still running with DAK) and re-started server 2 without logging (DAK enabled) - works fine. Mainly took longer because after server reboots (i do them late at night) it's hard to re-fill the server at 2 AM!

    Tested all the plugins as well, they work great. For anyone getting errors, you must be installing it wrong. The instructions are clear, and with a little bit of research you can figure it out. And the post right above is easy to follow.

    xDragon, if you need any help with testing the plugin please let me know. I'll be happy to start a 3rd server just for it.

    And thanks in advance for the periodic messages and URL admin lookup.
    Is it possible to add the same thing for reserved player lookup?

    I mean i can technically create a group like this:

    "Reserved": {
    "commands": [ ],
    "type": "allowed"
    }

    But if it can access a specific URL for reserved as well it should be easier.

    Also, regarding these files, is DAK able to ignore headers in a file? I'd be most likely using php to auto-generate the files, and it hates me when i try to output without headers... (planning on integrating it with phpbb3 where it reads certain groups and automatically generates admin/reserved slots for the players - and when users register, i'm planning on adding a field for steamid/nssteamid so it works). This would have a lot of uses (easy user management, allow user to change steamid, instant add or remove admin/reserved slots, direct link to forums, etc.)

    Now that i think about it, even periodic messages would be awesome if pulled from an URL as an option!

    Thanks xDragon!
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    edited November 2012
    I guess that if your running multiple servers on the same box it may also be increasing the choke put on the disk by the logging, especially late round when its re-writing the entire log file each time because append doesnt work (this is really irritating), for each server.

    I might try adding some delays to the log re-writing so that it hopefully doesnt get spam re-written, which should hopefully reduce choking/hitching, but honestly any solution is pretty crappy compared to append just getting fixed.

    Now the URL pull would allow you to setup something like what your looking for, you would just generate a page with php, and DAK would read that URL to get the latest list of admins and reserve slots. Since your managing the reserve slots outside of the ReservedPlayers.json file, it is easiest to just setup a Reserve group that is only allowed the sv_hasreserve command, which grants them a reserve slot (thats all that command does).

    <a href="http://ns2cmod.com/ns2admin.html" target="_blank">http://ns2cmod.com/ns2admin.html</a> is a sample of what the page you would want to generate should look like.
  • TechnIckSTechnIckS Join Date: 2007-01-14 Member: 59616Members
    edited November 2012
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
    <meta http-Equiv="Cache-Control" Content="no-cache">
    <meta http-Equiv="Pragma" Content="no-cache">
    <meta http-Equiv="Expires" Content="0">
    <style type="text/css"></style>
    </head>
    <body>
    <div id="username"> dragon </div> <div id="steamid"> 5176141 </div> <div id="group"> Root </div>
    </body>
    <div id="username"> user2 </div> <div id="steamid"> 1111111 </div> <div id="group"> reserved </div>
    <!--c2--></div><!--ec2-->


    OK so it does ignore the header. Thats good.

    So you basically repeat the div for each additional person like this?


    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><div id="username"> dragon </div> <div id="steamid"> 5176141 </div> <div id="group"> Root </div>
    <div id="username"> user2 </div> <div id="steamid"> 5116141 </div> <div id="group"> othergrp </div>
    <!--c2--></div><!--ec2-->
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Yep, just make sure that the </body> is at the end of all your users.
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    I tested the latest build and it is not generating the ServerAdmin.json when I set the url for kQueryURL.

    Also as group settings are kept in that same file will not the group restrictions be overwritten each time the ServerAdmin.json file is recreated with the changed admin list? It might be a good idea to split group setting off to a separate file.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    I currently doesnt save the ServerAdmin.json file with the admins obtained from the web URL, mainly so that the groups and any hard-coded admins could be configured that would always be available. I could modify it easily to save the config file also (would be like a line or two).

    Did you try to see if you had admin access based on just using the webURL with some groups defined?
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    Ok, I was testing based on if they file was being changed b/c I can not actually join the test server due to "invalid data" error.

    I think I need to do something to my local game client to be able to join a server with a non workshop build. How do I make the changes to my client to toggle back and forth between the workshop version and the current test build.

    This way I can get in the test server and verity everything is working.

    Also I would recommend having it actually generate an admin file to use as backup in the event that the admin webpage is not accessible.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Yea i had considered the backup file, which is the route i will most likely go.

    For joining the server, try creating a folder called dak on the same level as your NS2 folder, and place the DAK files in there (lua folder and game_setup.xml directly inside the DAK folder). Then run your server with -game dak and clear the consistencycheck.json file temporarily (or remove game_setup and *.lua).
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    edited November 2012
    Still get same error here is what I have set


    I placed the files from the zip that I used on the server in my local game here:
    G:\Steam\steamapps\common\natural selection 2\DAK

    ConsistencyConfig.json (did not see a consistencycheck.json)
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->{
      "check": [ ]
    }<!--c2--></div><!--ec2-->

    start.bat
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Server.exe -name "Test" -game dak -map ns2_refinery -limit 5 -webadmin -config_path D:\game_servers\Current_Servers\ns2\cfg<!--c2--></div><!--ec2-->
    Also tired -game DAK to test for case sensitive error.


    I can see in the console long on the client it is still trying to load from the workshop.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    edited November 2012
    Hmm by chance do you have the mod active on your client?

    And also can you see if the server is loading DAK correctly?
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    edited November 2012
    Yea I see the error could not initialize game at ns2/DAK when using -game DAK

    Let me try a fix

    Tried to create DAK in the ns2 directory in the server which contains the files from the zip but it still gives error on startup:

    Error: Couldn't initialize game at D:/game_servers/Current_Servers/ns2/DAK
  • ZEROibisZEROibis Join Date: 2009-10-30 Member: 69176Members, Constellation
    edited November 2012
    Something I just thought of which would make things a lot easier to test and I am going to recommend that combat mod and even NS2C try it as well: test workshop build. This way it is very easy for clients and servers to test our the latest experimental build without needing to change a bunch of stuff.

    So for DAK there would be a workshop item called "DAK -Test Branch" or something like that.
  • MendaspMendasp I touch maps in inappropriate places Valencia, Spain Join Date: 2002-07-05 Member: 884Members, NS1 Playtester, Contributor, Constellation, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow, WC 2013 - Shadow, Retired Community Developer
    <!--quoteo(post=2029318:date=Nov 20 2012, 01:03 AM:name=ZEROibis)--><div class='quotetop'>QUOTE (ZEROibis @ Nov 20 2012, 01:03 AM) <a href="index.php?act=findpost&pid=2029318"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->the latest excremental build<!--QuoteEnd--></div><!--QuoteEEnd-->
    I lol'd.
Sign In or Register to comment.