Natural Selection 2

Natural Selection 2

Tạo và khám phá các màn chơi cũng và bản mod mới
Tìm kiếm các bản đồ và bản mod hay nhất được tạo bởi cộng đồng. Bạn đã sẵn sàng để tạo sản phẩm cho riêng mình chưa? Bắt đầu từ đây để tìm hiểu cách sử dụng những công cụ mà nhà phát triển đã dùng.
Vitdom 1 23 Thg12, 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.
Lần sửa cuối bởi Vitdom; 23 Thg12, 2018 @ 2:46pm
< >
Đang hiển thị 1-1 trong 1 bình luận
Ghoul  [nhà phát triển] 36 2 Thg01, 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
Lần sửa cuối bởi Ghoul; 2 Thg01, 2019 @ 5:25am
< >
Đang hiển thị 1-1 trong 1 bình luận
Mỗi trang: 1530 50