Replies: 2 comments 3 replies
-
The server will persist the config file back to the disk when it needs to persist new changes. This means that if we add new items, it will always be updated with current state of the world. This is an intentional design decision. For the vast majority of users, this means that the config file is always updated with the latest changes and is accurate. Users familiar with *nix are often accustomed to managing lots of config files in a *nix like way, amounting to a pile of different files with different rights and choices. I disagree with this philosophy: we want to be as user friendly as possible.
Doing this would complicate the process of installing TShock, and I don't see that changing. Imagine we ship a
It's probably "sorted" by the order of the mapped class that's serialized to the disk. We tend to group related things together. It attempts to be grouped by logical function. If you like sorting it alphabetically for the purposes of editing, you can do that quite easily when you load the file in an editor. |
Beta Was this translation helpful? Give feedback.
-
Merged in #2020 Thanks all for reviewing! |
Beta Was this translation helpful? Give feedback.
-
I wanted to get some background on the design of the config.json. Since it doesn't ship with the current version of Tshock and instead gets auto-generated at server launch time, we aren't able to see the contents until after the server is launched for the first time. That also means the server has write permissions rather than just read permissions, even though it's not really necessary from what I've seen. The server never updates the JSON based on user-input settings in the console, does it?
Specifically regarding the title of this topic, I was bothered by the seemingly random order of the items in the config.json and used a JSON sorting tool to order them alphabetically. I found it easier to locate and manage the different settings I wanted to edit that way. However, upon server restart (or even just the
/reload
command) the JSON went back to its previous order.config.json
sorted?config.json
in the build ZIP rather than having it autogenerate?Beta Was this translation helpful? Give feedback.
All reactions