DAK Server Admin Mod
xDragon
Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
Figure ill post this here finally, as quite a few people are using it and there is somewhat of a need to update the plugins now, plus it has somewhat reached a state where id like to start taking feedback/requests.
The reason for this update is to hopefully resolve an issue with the NS2Stats system, where the round is possibly restarting to quickly..
The files can be found on the duplex link below, ask any questions you may have and ill try my best to answer. Some options have changed, i would look over the readme file and the config files to verify your stuff is still valid.
Editing this to avoid any confusion, link in next post is more valid than what was here.
Also mod is now on steam workshop, and can be checked out here - <a href="http://steamcommunity.com/sharedfiles/filedetails/?id=99938680" target="_blank">http://steamcommunity.com/sharedfiles/file...ls/?id=99938680</a>
The reason for this update is to hopefully resolve an issue with the NS2Stats system, where the round is possibly restarting to quickly..
The files can be found on the duplex link below, ask any questions you may have and ill try my best to answer. Some options have changed, i would look over the readme file and the config files to verify your stuff is still valid.
Editing this to avoid any confusion, link in next post is more valid than what was here.
Also mod is now on steam workshop, and can be checked out here - <a href="http://steamcommunity.com/sharedfiles/filedetails/?id=99938680" target="_blank">http://steamcommunity.com/sharedfiles/file...ls/?id=99938680</a>
Comments
Also added is a surrender vote plugin for both teams.
<a href="https://github.com/xToken/DAK" target="_blank">https://github.com/xToken/DAK</a>
I can issue the command in the server console with success (like sv:changemap).
DAK doesn't create new logs either.
The console output seems normal.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->C:\ns2server>Server.exe -file "c:\ns2server\server.xml"
Changing settings file to: c:\ns2server\server.xml
Press Tab to open the console window
Press Ctrl-C to exit
--------------------------------------------------------------------------------
Build 220
Starting Natural Selection 2
Failed to load Steam Service
ServiceStart: failed to start
ServiceStart: failed to start
Setting breakpad minidump AppID = 4920
Connected to Steam servers
Loading config://ServerConfig.json
Loading config://ServerAdmin.json
Loading config://BannedPlayers.json
Loading config://MapCycle.json
Loading config://DAKServerAdmin.json
Loading config://BannedPlayers.json
Loading 'maps/ns2_tram.level'
Error: Couldn't open file 'models/props/refinery/refinery_fan128_blades.animatio
n_graph'
Error: Couldn't open file 'models/effects/halo_blue.model'
Error: Couldn't open file 'models/effects/halo_rounded_blue.model'
Error: Couldn't open file 'models/props/refinery/refinery_shipping_hologram_anim
ated.animation_graph'
Error: Couldn't open file ''
Finished loading 'maps/ns2_tram.level'
Disconnected from Steam servers
Connected to Steam servers
Disconnected from Steam servers
Connected to Steam servers<!--c2--></div><!--ec2-->
It should echo back Loading DAK settings if it loads the config file correctly, can you check that the DAKConfig.json file is in the correct place and is valid?
Afaik, UWE changed the config path from %APPDATA%\Natural Selection 2\config to just %APPDATA%\Natural Selection 2\
Maybe that is the issue?
Afaik, UWE changed the config path from %APPDATA%\Natural Selection 2\config to just %APPDATA%\Natural Selection 2\
Maybe that is the issue?<!--QuoteEnd--></div><!--QuoteEEnd-->
That did it, thanks
With 221, this has changed somewhat. The best way IMO to load this if you wish to use Consistency Checks is to add the following line to ConsistencyConfig.json
"ignore": [ "lua/Server.lua" ]
This will have Server.lua not checked (which shouldnt matter IMO as clients shouldnt load that anyways regardless even when trying to exploit the game). This allows DAK to be loaded there.
You will want to replace line 26 in Server.lua, Script.Load("lua/ServerAdminCommands.lua"), with Script.Load("lua/DAKLoader.lua")
If you wish to enable chat logging/processing for commands, you will want to edit line 71 in Server.lua, adding in
DAKChatLogging(message, playerName, steamId, teamNumber, teamOnly)
Also updated a few other plugins to resolve issues with commands changed in B221.
Link remains the same at <a href="https://github.com/xToken/DAK" target="_blank">https://github.com/xToken/DAK</a>
First, without any changes in default installation I got this error message in console, and I cant connect to the server:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Date: 09/29/12
Time: 17:21:15
--------------------------------------------------------------
Steam initialized
Build 221
Connected to Steam servers
Loading config://DAKServerAdmin.json
Loading DAK configuration.
Loading DAK settings.
Loading config://BannedPlayers.json
Script Error #1: lua/DAKLoader.lua:377: Base class undefined
Call stack:
#1: [C]:-1
#2: lua/DAKLoader.lua:377
settings = {groups= {admin_group= {commands= { }, type="disallowed" }, clan_group= {commands= {1="sv_kick", 2="sv_say" }, type="allowed" }, mod_group= {commands= {1="sv_ban", 2="sv_reset" }, type="disallowed" } }, users= {Gody= {groups= {1="admin_group" }, id=34583831 }, Onty= {groups= {1="admin_group" }, id=24990216 }, Walsa= {groups= {1="admin_group" }, id=28152187 }, mickie= {groups= {1="admin_group" }, id=40788109 }, sven= {groups= {1="admin_group" }, id=45462551 } } }
DAKConfigFileName = "config://DAKConfig.json"
DAKSettingsFileName = "config://DAKSettings.json"
DAKServerAdminFileName = "config://DAKServerAdmin.json"
DelayedClientConnect = { }
lastserverupdate = 0
DAKRevision = 1.6
LoadServerAdminSettings = function
DisableAllPlugins = function
LoadDAKConfig = function
LoadDAKSettings = function
DAKOnClientConnected = function
DAKOnClientDisconnected = function
DAKUpdateServer = function
Loading 'maps/ns2_tram.level'
Finished loading 'maps/ns2_tram.level'<!--c2--></div><!--ec2-->
Changing "_GamerulesExtensions": false to true in DAKconfig.json got me this:
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Date: 09/29/12
Time: 17:21:47
--------------------------------------------------------------
Steam initialized
Build 221
Connected to Steam servers
Loading config://DAKServerAdmin.json
Loading DAK configuration.
Loading DAK settings.
Loading config://BannedPlayers.json
EnhancedLogging Loading Complete
Loading Reserve slot players.
ReserveSlot Loading Complete
VoteRandom Loading Complete
AFKKicker Loading Complete
Loading config://MapCycle.json
MapVote Loading Complete
VoteSurrender Loading Complete
ServerMOTD Loading Complete
Loading 'maps/ns2_tram.level'
Finished loading 'maps/ns2_tram.level'
Script Error #1: lua/VoteSurrender.lua:43: attempt to call global 'GetGamerules' (a nil value)
Call stack:
#1: lua/VoteSurrender.lua:43
#2: (tail call):-1
#3: lua/DAKLoader.lua:342
deltaTime = 0.033999871462584
(for index) = 5
(for limit) = 6
(for step) = 1
i = 5
Script Error #2: lua/VoteSurrender.lua:43: attempt to call global 'GetGamerules' (a nil value)
Call stack:
#1: lua/VoteSurrender.lua:43
#2: (tail call):-1
#3: lua/DAKLoader.lua:342
deltaTime = 0.032997664064169
(for index) = 5
(for limit) = 6
(for step) = 1
i = 5
Script Error #3: lua/VoteSurrender.lua:43: attempt to call global 'GetGamerules' (a nil value)
Call stack:
#1: lua/VoteSurrender.lua:43
#2: (tail call):-1
#3: lua/DAKLoader.lua:342
deltaTime = 0.032999008893967
(for index) = 5
(for limit) = 6
(for step) = 1
i = 5<!--c2--></div><!--ec2-->
setting "_VoteSurrender" to false, got the server up an running but when trying to connect I get "Invalid Data" in the client and in the server log.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Date: 09/29/12
Time: 17:22:09
--------------------------------------------------------------
Steam initialized
Build 221
Connected to Steam servers
Loading config://DAKServerAdmin.json
Loading DAK configuration.
Loading DAK settings.
Loading config://BannedPlayers.json
EnhancedLogging Loading Complete
Loading Reserve slot players.
ReserveSlot Loading Complete
VoteRandom Loading Complete
AFKKicker Loading Complete
Loading config://MapCycle.json
MapVote Loading Complete
ServerMOTD Loading Complete
Loading 'maps/ns2_tram.level'
Finished loading 'maps/ns2_tram.level'
Client connecting (168.226.144.65)
Client disconnected (168.226.144.65) Invalid data<!--c2--></div><!--ec2-->
The server works fine vanilla.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->C:\ns2server>Server.exe -file "c:\ns2server\server.xml"
Changing settings file to: c:\ns2server\server.xml
Press Tab to open the console window
Press Ctrl-C to exit
Setting breakpad minidump AppID = 4920
Steam_SetMinidumpSteamID: Caching Steam ID: 76561197960265728 [API loaded no]
Steam initialized
Build 221
Connected to Steam servers
Loading config://ServerConfig.json
Loading config://ServerAdmin.json
Loading config://DAKServerAdmin.json
Loading DAK configuration.
Loading DAK settings.
Loading config://BannedPlayers.json
EnhancedLogging Loading Complete
Loading Reserve slot players.
ReserveSlot Loading Complete
VoteRandom Loading Complete
AFKKicker Loading Complete
Loading config://MapCycle.json
MapVote Loading Complete
VoteSurrender Loading Complete
ServerMOTD Loading Complete
Loading config://MapCycle.json
Loading config://ConsistencyConfig.json
Hashed 1 game_setup.xml files for consistency
Hashed 648 *.lua files for consistency
Hashed 31 *.fx files for consistency
Hashed 13 *.screenfx files for consistency
Hashed 58 *.surface_shader files for consistency
Hashed 3 *.fxh files for consistency
Hashed 2 *.render_setup files for consistency
Hashed 2 *.shader_template files for consistency
Skipped 1 lua/Server.lua files for consistency
Loading 'maps/ns2_tram.level'
Error: Couldn't open file 'models/props/refinery/refinery_fan128_blades.animatio
n_graph'
Error: Couldn't open file 'models/effects/halo_blue.model'
Error: Couldn't open file 'models/effects/halo_rounded_blue.model'
Error: Couldn't open file 'models/props/refinery/refinery_shipping_hologram_anim
ated.animation_graph'
Error: Couldn't open file ''
Finished loading 'maps/ns2_tram.level'
Client connecting (168.226.144.65)
Client disconnected (168.226.144.65) Client and server differ<!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><game>
<name>ns2</name>
<description>Natural Selection 2</description>
<client>lua/Client.lua</client>
<server>lua/Server.lua</server>
<soundinfo>sound/NS2.soundinfo</soundinfo>
</game><!--c2--></div><!--ec2-->
I had changed the ignore line to look like this
"ignore": ["game_setup.xml", "lua/Server.lua" ]
in ConsistencyConfig.json, and I can connect to the server and issue dak commands.
Any clues?
I've updated the wiki to reflect this. Thanks!
I've updated the wiki to reflect this. Thanks!<!--QuoteEnd--></div><!--QuoteEEnd-->
Can I just say, that i've seen you make many posts about changing the wiki and I really appreciate the time you take to keep it updated. Thank you :)
Or alternatively disconnect from the server after round end and join back in when a new one has started. You preserve your pres.
All right, I'll try to look into it again. Just never seen it happen in vanilla and the devs outright rejected the bug report about it earlier.
Basically if you want to repro this join a game and build up your pres, and wait for the round to end and everyone to return to the readyroom. Then wait for the game to reset in the readyroom, and join your team during the countdown period.
I have also updated this to support 222 on workshop, which should also fix voterandom incorrectly warning people and surrender being broke (for real i hope this time).
Confirmed on Vanilla also, sorry for the unhelpful misdirection.