Don't Starve Together

Don't Starve Together

Moderator Commands [fork]
Muche  [developer] 17 Apr, 2016 @ 5:08am
Permission system
Current permission system consists of two files: permissions.txt (defines ranks and permissions of those ranks) and ranks.txt (defines players' ranks).
The files are stored under Your_DST_Installation/data/. Although it is possible to edit these files while the server is running, it is not recommended to do so.
They are created automatically if not found.


permissions.txt
Defines ranks and permissions of those ranks.

Here is a default permissions file as a reference:
admin: [Admin] all mod: [Moderator] kick ban unban drop reset teleport portal back resetworld rollback invisible user: [User]

The ranks are partially hierarchical, meaning a rank has only listed permissions, not including permissions of ranks stated elsewhere, but some commands can be executed only on people of lower rank.
The highest rank is specified first, followed by lower ranks.

Syntax or permissions.txt
your_rank_name: [Pretty name you want to appear in chat] some_permission some_other_permission next_rank: [another pretty name] ...

The rank name ("your_rank_name") before the colon (":") is used with /setrank and in ranks.txt. It cannot have spaces in it and should consist of lowercase letters only.
The "pretty name" in brackets ("[]") that appears after the colon is what appears in chat when you promote someone to that rank. It can have spaces and can contain basically any character.
Each permission must be on a separate line, and it will associate with the group name above it.

Any whitespaces (tabs, spaces, etc.) before or after lines will be stripped, along with newlines. So, that means this is also a valid permissions file:
admin: [Admin] all mod: [Moderator] kick ban unban drop reset teleport back resetworld rollback invisible user: [User]

You can add any new rank you wish, so this is also a valid permissions file:
admin: [Admin] all srmod: [Senior Mod] kick ban drop reset teleport resetworld rollback jrmod: [Junior Mod] kick ban user: [User]

The only two ranks you must keep are user and admin. So that means this is not a valid permissions file:
mod: [Moderator] kick ban drop reset teleport resetworld rollback

If it's determined that the permissions file is invalid, its contents is replaced with the default one. Thus it's recommended to keep a copy of the file somewhere safe if you're not sure whether the changes being made will result in a valid contents.


ranks.txt
Defines ranks of players.
Example:
KU_fakeuser mod (Fake user) KU_fakeuse2 srmod (Fake user 2) KU_fakeuse3 jrmod (Fake user 3)

Syntax of ranks.txt
Each line defines the rank of one player. Admins listed here are ignored and listed users will be removed if found.
Admins are handled by the game itself by editing adminlist.txt (see your client_log or server_log for location from where it is being tried to load; for hosted worlds without caves under Windows it's usually Documents\Klei\DoNotStarveTogether\client_save\adminlist.txt; you'll have to create it if there isn't one).
userid rank comment
There is exactly one space between userid and rank, and one space between rank and comment.
Userid is the userid of the player, has the form of KU_xxxxxxxx, where x is an alphanumeric character, dash or underscore.
Rank is the rank, has to be one of ranks specified in permissions.txt.
Comment is anything, by default it contains the name of the player for convenience.


List of permissions
all - Gives all current and future permissions.

setrank - Allows /setrank command.

extinguish - Allows /extinguish and its aliases, automatically extinguishes fires around freezed player.
freeze - Allows /freeze command.
drop - Allows /drop command, automatically drops items of a kicked or banned player.
clear - Allows /clear command.
kick - Allows /modkick command.
ban - Allows /modban command.
unban - Allows /unban command.
reset - Allows /reset command.
kill - Allows /kill command.
resurrect - Allows /resurrect command.

teleport - Allows /teleport command.
teleporthere - Allows /teleporthere command and its aliases.
portal - Allows /portal command.
back - Allows /back command.

announce - Allows /announce command.
resetworld - Allows /resetworld command.
rollback - Allows /modrollback command.
setportal - Allows /setportal command.

spawn - Allows /spawn command.
give - Allows /give command.

godmode - Allows /godmode command.
invisible - Allows /invisible command.
speed - Allows /speed command.
silent - Prevents commands from announcing who issued them.

List of permissions handled by other mods
modifyowner - (Modify Ownership) Allows modifying ownership.
Last edited by Muche; 13 Jun, 2016 @ 5:53pm
< >
Showing 1-3 of 3 comments
Morsis 8 Aug, 2016 @ 5:44pm 
HOW DO YOU GET TO THESE FILES?!?!?!?!?!?!?
Muche  [developer] 9 Aug, 2016 @ 1:43am 
@That Lizard,
The files are stored under Your_DST_Installation/data/.
Чаpли 5 Oct, 2016 @ 1:06am 
some strange with permission system.... file ranks.txt become empty in random time. even I add moderator in game, or in file directly. :(
< >
Showing 1-3 of 3 comments
Per page: 1530 50