Natural Selection 2

Natural Selection 2

设计、发掘新的地图与模组
查找由社区制作的最佳地图与模组。准备好创建属于您自己的了吗?由此开始学习如何使用开发者用来开发游戏的工具。
Vitdom 1 2018 年 12 月 23 日 下午 2:44
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.
最后由 Vitdom 编辑于; 2018 年 12 月 23 日 下午 2:46
< >
正在显示第 1 - 1 条,共 1 条留言
Ghoul  [开发者] 36 2019 年 1 月 2 日 上午 5:22 
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
最后由 Ghoul 编辑于; 2019 年 1 月 2 日 上午 5:25
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50