Natural Selection 2

Natural Selection 2

Create and discover new maps and mods
Find the best maps and mods made by the community. Ready to create your own? Start here to learn how to use the same content tools that the developers used.
Vitdom 1 23 Dec, 2018 @ 2:44pm
A bug in NS2 breaks my server mod
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=109062003
I've found an old bug that breaks mod usage of server configuration settings, in
...\Natural Selection 2\core\lua\ConfigFileUtility.lua:52 local function removekeys(config, defaultConfig)
which updates the ServerConfig.json file. Disabling this function solves the issue.

Every time the ServerConfig.json is loaded by the server, it strips away any custom settings and mods which depend on them stop working.
Last edited by Vitdom; 23 Dec, 2018 @ 2:46pm
< >
Showing 1-1 of 1 comments
Ghoul  [developer] 36 2 Jan, 2019 @ 5:22am 
Hi,

that's not really a bug but a feature to ensure that the ServerConfig.json doesn't contain unused parameter. In the past we had server operators wondering about various config parameters which were either no longer used or added by mods.

Thus it's not considered good practise for mods to add parameters to the ServerConfig.json but recommended to use a seperate config file.

But if you really want to add parameters to it you can by overwriting LoadConfigFile and adding your mod's parameters to the defaultConfig table when the server config is loaded.

Last but not least you should have a look at Shine's ping tracker plugin which basically offers the same features as your mod. See https://github.com/Person8880/Shine/wiki/Ping-Tracker
Last edited by Ghoul; 2 Jan, 2019 @ 5:25am
< >
Showing 1-1 of 1 comments
Per page: 1530 50