Configuration - Scavenger3/TSDocs GitHub Wiki
After you have installed TSDocs, ensured you have restarted the server and you are now ready to configure TSDocs.
I suggest you use JSONLint to check your json files.
The following can all be edited in tshock/TSDocs/Config.json
###Reloading:
At any time you can reload the Config.json into the server by typing /tsdocs
ingame.
###commands
This is where you define which commands shows which file to you players.
All files defined here in, should also be in the TSDocs/ directory.
Example:
"commands": [
{
"name": "Rules",
"command": "/rules",
"file": "rules.txt",
"groups": {
"vip": "vip-rules.txt"
}
},
{
"name": "Help",
"command": "/help",
"file": "help.txt",
"groups": {
"admin": "admin-help.txt",
"trustedadmin": "tadmin-help.txt"
}
}
],
-
"name":
is the name of the command, this will be shown in the pagination header under %commandname -
"command":
this is the actual command that the player types. -
"file":
is the default file that will be shown to everyone, unless specified in"groups":
-
"groups":
is where you can define custom files for each group, in this example for Rules, everyone will be shown rules.txt except for people in the vip group, which will be shown vip-rules.txt - The format for groups is:
"<group name>": "<file>"
###motd_enabled
This allows the user to enable/disable the MOTD functionality of TSDocs.
Disabling this will mean TShock shows its motd.txt located at tshock/motd.txt
Default: "motd_enabled": true
true = enabled, false = disabled.
###motd
Here we determine which files are shown when a player joins the server.
Example:
"motd": {
"file": "motd.txt",
"groups": {
"guest": "guest-motd.txt",
"admin": "admin-motd.txt"
}
},
-
"file":
is the default MOTD that will be shown to everyone, unless specified in"groups":
-
"groups":
is where you can define custom MOTDs for each group, in this example, the guest group will be shown guest-motd.txt, and the admin group will be shown admin-motd.txt - the format for groups is:
"<group name>": "<file>"
###pagination_header_format
If your txt file is greater than 7 lines, TSDocs automatically places a header at the top of message for Pagination.
Default:
"pagination_header_format": "%150,255,150%%commandname - Page %current of %count | %command <page>"
Variables include:
-
%RRR,GGG,BBB%
- changes the colour of the specified line (in RGB format [0-255]) must be at the begining of the line. -
%commandname
- Shows the name of the command being used. -
%current
- The current page the player is on. -
%count
- How many pages are in the txt file. -
%command
- The command, including the /
for example use with the Rules command, this will show:
Rules - Page 1 of 2 | /rules <page>
###news_file
This determines which file is shown when using %news.
Default: "news_file": "news.txt"
###news_lines
This determines how many lines to show when using %news.
Default: "news_lines": 1
###disclude_from_playerswg
Players in the groups specified here will not be shown when using %playerswg.
Default:
"disclude_from_playerswg": [
"superadmin"
]