diff --git a/TShockAPI/Permissions.cs b/TShockAPI/Permissions.cs index fb79bdca..9933b95b 100644 --- a/TShockAPI/Permissions.cs +++ b/TShockAPI/Permissions.cs @@ -200,7 +200,7 @@ namespace TShockAPI c => c.Name + (c.Names.Count > 1 ? "({0})".SFormat(string.Join(" ", c.Names.ToArray(), 1, c.Names.Count - 1)) : "")); - sb.AppendLine("## {0} ".SFormat(name)); + sb.AppendLine("## {0} ".SFormat(name)); sb.AppendLine("**Description:** {0} ".SFormat(desc)); sb.AppendLine("**Commands:** {0} ".SFormat(strs.Count() > 0 ? string.Join(" ", strs) : "None")); sb.AppendLine(); diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index c9e9f598..4a80bb77 100644 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -48,5 +48,5 @@ using System.Runtime.InteropServices; // Build Number // MMdd of the build -[assembly: AssemblyVersion("3.7.0.0209")] -[assembly: AssemblyFileVersion("3.7.0.0209")] +[assembly: AssemblyVersion("3.7.0.0225")] +[assembly: AssemblyFileVersion("3.7.0.0225")] diff --git a/docs/generate.bat b/docs/generate.bat new file mode 100644 index 00000000..b5bfc3d0 --- /dev/null +++ b/docs/generate.bat @@ -0,0 +1,6 @@ +@echo off +:main +echo Generating Pandoc docs +cd src +for %%F in (*.md) do pandoc %%F > %%F.html +pause \ No newline at end of file diff --git a/docs/readme.md b/docs/readme.md new file mode 100644 index 00000000..7f29d689 --- /dev/null +++ b/docs/readme.md @@ -0,0 +1,15 @@ +# Building + +1. Install [Pandoc](http://johnmacfarlane.net/pandoc). +2. cd to docs/src +3. pandoc index.md -o ../index.html +4. pandoc permissions.md -o ../permissions.html + +# Adding stuff + +1. Everything is [Markdown](http://daringfireball.net/projects/markdown/) +2. If you add a new page, include [Markdown-CSS](https://github.com/clownfart/Markdown-CSS) for best results. + +# Demo + +You can access the docs at the [TShock Github Page](http://tshock.github.com/). \ No newline at end of file diff --git a/docs/src/config.md b/docs/src/config.md new file mode 100644 index 00000000..af47422d --- /dev/null +++ b/docs/src/config.md @@ -0,0 +1,110 @@ + + +# The config file + +[Back to index](index.md.html) + +---- + +Each TShock installation automatically generates a configuration file which can edit basic settings when the server starts. + +The file "config.json" is located in the *tshock* folder, in the same directory as TerrariaServer.exe. + +Being a JSON file, it is extremely critical that you edit the file in a standard text editor. Use [Notepad++](http://notepad-plus-plus.org/) to edit your file, or another text editor used for programming. Before restarting TShock, check the syntax of your file using [JSONLint](http://jsonlint.com/), and verify that it contains no errors. + +An example configuration file is below. + + { + "InvasionMultiplier": 1, + "DefaultMaximumSpawns": 0, + "DefaultSpawnRate": 600, + "ServerPort": 7777, + "EnableWhitelist": false, + "InfiniteInvasion": false, + "PvPMode": "normal", + "SpawnProtection": true, + "SpawnProtectionRadius": 5, + "MaxSlots": 8, + "RangeChecks": true, + "DisableBuild": false, + "SuperAdminChatRGB": [ + 255.0, + 0.0, + 0.0 + ], + "SuperAdminChatPrefix": "(Admin) ", + "SuperAdminChatSuffix": "", + "BackupInterval": 0, + "BackupKeepFor": 60, + "RememberLeavePos": false, + "HardcoreOnly": false, + "MediumcoreOnly": false, + "KickOnMediumcoreDeath": false, + "BanOnMediumcoreDeath": false, + "AutoSave": true, + "MaximumLoginAttempts": 3, + "RconPassword": "", + "RconPort": 7777, + "ServerName": "", + "MasterServer": "127.0.0.1", + "StorageType": "sqlite", + "MySqlHost": "localhost:3306", + "MySqlDbName": "", + "MySqlUsername": "", + "MySqlPassword": "", + "MediumcoreBanReason": "Death results in a ban", + "MediumcoreKickReason": "Death results in a kick", + "EnableDNSHostResolution": false, + "EnableIPBans": true, + "EnableBanOnUsernames": false, + "DefaultRegistrationGroupName": "default", + "DefaultGuestGroupName": "guest", + "DisableSpewLogs": true, + "HashAlgorithm": "sha512", + "BufferPackets": true, + "ServerFullReason": "Server is full", + "ServerFullNoReservedReason": "Server is full. No reserved slots open.", + "SaveWorldOnCrash": true, + "EnableGeoIP": false, + "EnableTokenEndpointAuthentication": false, + "ServerNickname": "TShock Server", + "RestApiEnabled": false, + "RestApiPort": 7878, + "DisableTombstones": true, + "DisplayIPToAdmins": false, + "EnableInsecureTileFixes": true, + "KickProxyUsers": true, + "DisableHardmode": false, + "DisableDungeonGuardian": false, + "ServerSideInventory": false, + "ServerSideInventorySave": 15, + "LogonDiscardThreshold": 250, + "DisablePlayerCountReporting": false, + "DisableClownBombs": false, + "DisableSnowBalls": false, + "ChatFormat": "{1}{2}{3}: {4}", + "ForceTime": "normal", + "TileKillThreshold": 60, + "TilePlaceThreshold": 20, + "TileLiquidThreshold": 15, + "ProjectileThreshold": 50, + "ProjIgnoreShrapnel": true, + "RequireLogin": true, + "DisableInvisPvP": false, + "MaxRangeForDisabled": 10, + "ServerPassword": "", + "RegionProtectChests": false, + "DisableLoginBeforeJoin": false, + "AllowRegisterAnyUsername": false, + "AllowLoginAnyUsername": true, + "MaxDamage": 175, + "MaxProjDamage": 175, + "IgnoreProjUpdate": false, + "IgnoreProjKill": false, + "IgnoreNoClip": false, + "AllowIce": true + } + +In this file, if you wanted to change the maximum players to 64, you would edit that the file so that the line referring to max players looked like so: + + "MaxSlots": 64, \ No newline at end of file diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 00000000..4c7dd880 --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,43 @@ + + +# TShock Downloaded Documentation + +*Created for TShock version: 3.5.x.x* + +*Last updated: 2/25/2012* + +---- + +## Preface + +Welcome to the official TShock for Terraria downloaded documentation. This guide will walk through the installation and basic configuration of your newly downloaded TShock server, and should provide a basic knowledge as to how to get help from outside resources if needed. + +## Resources + +* [The Confluence wiki](http://develop.tshock.co:8080/) contains the most up to date information compiled by the community members. If your question isn't answered here, you might find it there. +* [The forums](http://tshock.co/xf/) provide an excellent place to ask other TShock users and developers questions. Please refrain from making posts about questions that may be answered here, however. +* [Our Github page](http://github.com/TShock/TShock) is where you'll be able to find the source code and the bug tracker. +* [IRC](irc://irc.shankshock.com/terraria) is our IRC channel, if you prefer that medium for support. +* Lastly, we can be found in the "Nyx" channel on the Teamspeak 3 server: ts3.shankshock.com, port 9987. + +---- + +## Table of contents + +1. [Installation & basic usage](install.md.html) +2. [Permissions](perms.md.html) +3. [The config file](config.md.html) +4. [Credits](#Credits) + +---- + +## Credits + +TShock wouldn't be possible without: + +* [Xenon Servers](http://xns.cc/) +* [Kerplunc Gaming](http://kerpluncgaming.com/) +* [Multiplay UK](http://multiplay.co.uk/) +* [Atlassian](http://www.atlassian.com/) +* [Github](http://github.com/) +* You :) \ No newline at end of file diff --git a/docs/src/install.md b/docs/src/install.md new file mode 100644 index 00000000..99d0a349 --- /dev/null +++ b/docs/src/install.md @@ -0,0 +1,35 @@ + + +# Install instructions & basic usage + +[Back to index](index.md.html) + +---- + +1. Assuming you've extracted TShock, you're done as far as files go. Run the TerrariaServer.exe file in the folder you've extracted TShock into. +2. Check to verify that the server window states that some version of TerrariaShock is now running. If this is not the case, stop. Re-download all files and extract them to a new folder, being sure to keep the file structure in tact. +3. Select a world and port to start the server. *TShock now uses its configuration file to control the number of players on the server. You can edit this value in the configuration file, discussed later. If you are generating a new world, you may experience a significantly longer time as the world creates itself. This is normal. +4. Once the server is finished starting, you will be greeted with TShock's main console window. You will see a message in yellow that states "*To become superadmin, join the game and type /auth*" preceding a series of numbers. This set of numbers we will refer to as the "authcode" in succeeding steps. +5. Connect to the server. Your IP address is 127.0.0.1, and the port will by default be on what you entered in the server console. +6. Immediately chat the following: "**/auth [authcode]**". Replace [authcode] with the code given in the server console. Example: /auth 123456. +7. Next, we will create a user account that you can login to. In the game, chat the command "**/user add [username]:[password] superadmin**". Replace [username] and [password] respectively with your appropriate details. You should be able to remeber your password, and it shouldn't be easily guessed. From now on, the phrase "run the command" is synonymous with "chat in the game chat box". In addition, where brackets ([]) are, we will assume you will replace those brackets with information that you have created. +8. Assuming the last step was a success, login. Run the command "**/login [username] [password]**". +9. To finalize installation, run the command "**/auth-verify**". This will disable the authcode, enable any previously disabled functionality, and allow the server to be used in production. + +---- + +### Basic Usage + +Now that TShock is running, you may be interested in a few other features prior to playing Terraria. + +* You can add admins through two methods. If the user is already registered, you can use "**/user group [username] [group-to-change-to]**". By default, TShock comes with the "vip" group, the "trustedadmin" group, and the "newadmin" group. If the user has yet to register, you can use "**/user add [username]:[password] [group]**" to generate an account with elevated permissions for them. +* When you join the server and already have an account, the server will ask for your account password, even if the server has no password setup. In the event that you set a password on the server, unregistered users will be required to enter it. Users that already have an account must enter their own password. +* If a user wishes to change accounts but retain their group, a config option exists that will allow you to allow users to login to accounts with any username. + +---- + +## Closing remarks + +Thanks for downloading TShock. Your continued support helps make TShock what it is today. We wouldn't be here without you. + +From everyone at TShock, thank-you. \ No newline at end of file diff --git a/docs/src/permissions.md b/docs/src/permissions.md new file mode 100644 index 00000000..49242fa9 --- /dev/null +++ b/docs/src/permissions.md @@ -0,0 +1,248 @@ + + +# Permission Nodes + +These are the permissions that TShock currently supports, with associated commands. [Back to permissions](perms.md.html) + +---- + +## allowclientsideworldedit +**Description:** Allow unrestricted Send Tile Square usage, for client side world editing +**Commands:** None + +## annoy +**Description:** None +**Commands:** /annoy + +## ban +**Description:** User can ban others +**Commands:** /ban /banip /unban /unbanip + +## buff +**Description:** User can buff self +**Commands:** /buff + +## buffplayer +**Description:** User can buff other players +**Commands:** /gbuff(/buffplayer) + +## butcher +**Description:** User can kill all enemy npcs +**Commands:** /butcher + +## bypassinventorychecks +**Description:** Bypass Server Side Inventory checks +**Commands:** None + +## canbuild +**Description:** Required to be able to build (modify tiles and liquid) +**Commands:** None + +## canchangepassword +**Description:** User can change password in game +**Commands:** /password + +## canlogin +**Description:** User can login in game +**Commands:** /login + +## canpartychat +**Description:** User can use party chat in game +**Commands:** /p + +## canregister +**Description:** User can register account in game +**Commands:** /register + +## cantalkinthird +**Description:** User can talk in third person +**Commands:** /me + +## causeevents +**Description:** None +**Commands:** /dropmeteor /star /genore /fullmoon /bloodmoon /invade + +## cfg +**Description:** User can edit sevrer configurations +**Commands:** /setspawn /reload /serverpassword /save /settle /maxspawns /spawnrate /broadcast(/bc /say) /stats /world + +## clearitems +**Description:** User can clear item drops. +**Commands:** /clear(/clearitems) + +## converthardmode +**Description:** User can convert hallow into corruption and vice-versa +**Commands:** /convertcorruption /converthallow /removespecial + +## editspawn +**Description:** Allows you to edit the spawn +**Commands:** /antibuild /protectspawn + +## grow +**Description:** None +**Commands:** /grow + +## hardmode +**Description:** User can change hardmode state. +**Commands:** /hardmode /stophardmode(/disablehardmode) + +## heal +**Description:** None +**Commands:** /heal + +## ignoredamagecap +**Description:** Prevents your actions from being ignored if damage is too high +**Commands:** None + +## ignorekilltiledetection +**Description:** Prevents you from being reverted by kill tile abuse detection +**Commands:** None + +## ignoreliquidsetdetection +**Description:** Prevents you from being disabled by liquid set abuse detection +**Commands:** None + +## ignorenoclipdetection +**Description:** Prevents you from being reverted by no clip detection +**Commands:** None + +## ignoreplacetiledetection +**Description:** Prevents you from being reverted by place tile abuse detection +**Commands:** None + +## ignoreprojectiledetection +**Description:** Prevents you from being disabled by liquid set abuse detection +**Commands:** None + +## ignorestackhackdetection +**Description:** Prevents you from being disabled by stack hack detection +**Commands:** None + +## ignorestathackdetection +**Description:** Prevents you from being kicked by hacked health detection +**Commands:** None + +## immunetoban +**Description:** Prevents you from being banned +**Commands:** None + +## immunetokick +**Description:** Prevents you from being kicked +**Commands:** None + +## item +**Description:** User can spawn items +**Commands:** /item(/i) /give(/g) + +## kick +**Description:** User can kick others +**Commands:** /kick + +## kill +**Description:** None +**Commands:** /kill + +## logs +**Description:** Specific log messages are sent to users with this permission +**Commands:** /displaylogs + +## maintenance +**Description:** User is notified when an update is available +**Commands:** /clearbans /off(/exit) /restart /off-nosave(/exit-nosave) /checkupdates + +## managegroup +**Description:** User can manage groups +**Commands:** /addgroup /delgroup /modgroup /group + +## manageitem +**Description:** User can manage item bans +**Commands:** /additem(/banitem) /delitem(/unbanitem) /listitems(/listbanneditems) /additemgroup /delitemgroup + +## manageregion +**Description:** User can edit regions +**Commands:** /region /debugreg + +## managewarp +**Description:** User can manage warps +**Commands:** /setwarp /delwarp /hidewarp + +## movenpc +**Description:** User can change the homes of NPCs. +**Commands:** None + +## mute +**Description:** User can mute and unmute users +**Commands:** /mute(/unmute) + +## pvpfun +**Description:** None +**Commands:** /slap + +## reservedslot +**Description:** Allows you to bypass the max slots for up to 5 slots above your max +**Commands:** None + +## rootonly +**Description:** Meant for super admins only +**Commands:** /user /userinfo(/ui) /auth-verify + +## seeids +**Description:** User can see the id of players with /who +**Commands:** None + +## spawnboss +**Description:** User can spawn bosses +**Commands:** /eater /eye /king /skeletron /wof(/wallofflesh) /twins /destroyer /skeletronp(/prime) /hardcore + +## spawnmob +**Description:** User can spawn npcs +**Commands:** /spawnmob(/sm) + +## startinvasion +**Description:** User can start invasions (Goblin/Snow Legion) using items +**Commands:** None + +## summonboss +**Description:** User can summon bosses using items +**Commands:** None + +## time +**Description:** None +**Commands:** /time + +## tp +**Description:** User can teleport +**Commands:** /home /spawn /tp + +## tpall +**Description:** Users can tp to anyone +**Commands:** None + +## tpallow +**Description:** Users can stop people from TPing to them +**Commands:** /tpallow + +## tphere +**Description:** User can teleport people to them +**Commands:** /tphere /sendwarp(/sw) + +## tphide +**Description:** Users can tp to people without showing a notice +**Commands:** None + +## usebanneditem +**Description:** Allows you to use banned items +**Commands:** None + +## warp +**Description:** User can use warps +**Commands:** /warp + +## whisper +**Description:** User can whisper to others +**Commands:** /whisper(/w /tell) /reply(/r) + +## whitelist +**Description:** User can modify the whitelist +**Commands:** /whitelist + diff --git a/docs/src/perms.md b/docs/src/perms.md new file mode 100644 index 00000000..c51fdde0 --- /dev/null +++ b/docs/src/perms.md @@ -0,0 +1,17 @@ + + +# Permissions + +[Back to index](index.md.html) + +## Permissions + +Like Bukkit and other administrative modifications, TShock supports adding groups and permissions. In the current implementation, you can only edit groups ingame, adding and removing them isn't supported *yet*. + +## Adding permissions: + +To add a permission to a given group, use the command "**/modgroup [add|del] [group] [permission]**". Example: */modgroup add trustedadmin tpall*. + +## Permission nodes: + +[A list of permission nodes can be found here.](permissions.md.html) \ No newline at end of file diff --git a/release-docs/changes.txt b/release-docs/changes.txt deleted file mode 100644 index 0b4503ce..00000000 --- a/release-docs/changes.txt +++ /dev/null @@ -1,128 +0,0 @@ -For the full list of changes, please take a look at GitHub: -https://github.com/TShock/TShock/commits/master -From now on, all release notes aren't put here. It's too much to track, but new features will be tossed here. - -Changes in API release 3: - - Added support for SQLite - - Added support for MySQL - - Added /user command, supports adding users via in game command - - Added database editor for editing the MySQL + SQLite DB systems - - Fixed /region list and /warp list - - Fixed Jexius's font exploit - - Added /annoy - - Added canbuild permission - - Fixed mysterious chair rotation system - - Added /ip to retrieve a player's IPv4 address - - Removed /buff - - Added command line paramater -worldpath, which changes the location where Terraria checks for worlds - - Fixed save world race conditions - - Added /login - - Fixed an instance where NPC.maxSpawns was incorrectly referenced in favor of NPC.defaultMaxSpawns - - Chests are ignored from kill tile abuse - - Added /reply (/r) to reply to a /whisper - - Fixed /broadcast spacing - - User names and passwords are now accepted. Passwords are hashed with SHA512 - - Added MaximumLoginAttempts to configuration - - Added /tphere * and /tphere all - - Added /auth-verify to verify and turn off the auth code system - - Added the ability to Log/notify admins when commands are executed. - - Added a new Configuration Flag called "DisableBuild". - - Added command to toggle anti-build. - - Added -ip commandline - - Fixed hair exploit - - Added /rules, reads from ./tshock/rules.txt - - Added AdminChatPrefix configuration option. - - Added ForceKillAll to kick all players. - - Added support to spawn all types of slimes (have to use the full exact name) - - Added /king to spawn king slime. - - Adds protected regions. Use /region help ingame for extra help - - Added warps to tshock, edited some region commands - - Added the ability to ban specific items for being in inventory when joining server - - Added /setspawn command,Sets the spawn point of the server - - Added HardcoreOnly - - Sandgun and Dirt Rod no longer triggers a Impossible to place block. - - Added /displaylogs. Toggles log output to player who executed the command. - - Added -configpath command line parameter to set config path. - - Added broadcasting on map saves - - Added /tphere * and /tphere all - -Still Lots More To Add! :) - -Changes in API release 2.0.0.0: - - Added update checker. - -Changes in API release 1.8.0.0: - - Added permissions system for managing different levels of admins - -- Added one time auth system for new permissions. When you start the server and load the map, you get a one time auth code. Use /auth to become superadmin. - - Check the wiki on Github for more information on Permissions. - - Fixed BanExplosives not doing anything. - - All ban lists have been consolidated into one file, where reasons, IPs, and player names are stored together. - - Fixed spawnrate and max spawns - -Changes in API release 1.6.0.0: - - Added spawn protection - - Fixed numerous bugs - - Added a few commands - -Changes in API release 1.5.0.1: - - Fixed cheat detection - -Changes in API release 1.5.0.0: - - Added /time - - Added /kill - - Fixed /item - - Added /slap [dmg] - - Added broadcast event for kill tile abuse - - Fixed teleport somewhat - - More cheat detection - - Extended new cheat protection to mana - - Update player exploit patched - - Fixed /spawn - - Made /invasion a toggle - -Changes in API release 1.4.0.0: - - The configuration file is now located at config.json - - Something else. - -Changes in API release 1.3.0.1: - - Re-coded the entire command system - - Re-coded the help command - - Implemented what seems to be the most recurring blacklist ever - -Changes in API release 1.3.0.0: - - Added /maxspawns - - Added /spawnrate - - Resetup the configuration file to read spawn rate information. - - Patched the ability for clients to spawn NPCs - - Patched the ability for clients to rewrite the server through SendSection - - Make sure to use this Terraria.exe for the server: (http://dl.dropbox.com/u/29760911/Terraria.exe) - -- Allows spawn rates to be changed - -Changes in API release 1.2.0.1: - - New update system - -Changes in API release 1.2: - - Added /butcher - - Added /heal - - /spawnmob now takes another argument for the amount - - /item now adds items to the inventory directly - - This update credit to Deathmax - -Changes in API release 1.1: - - Added /tp - - Added /tphere - - Added /spawnmob - - Added /item - - Fixed /spawn - - Updated /help - - Everything in this update credit to Deathmax, High, and Shank - -Changes in API release 0.1: - - Added /save to save the world - - Added /spawn to teleport to spawn - - Added broken teleport stuff - - Major re-write of the anti-tnt code (now uses a blacklist instead of a whitelist) - - Fixed server crashing bug of the anti-tnt code - - Made the anti-tnt code decrease the threshold instantaniously - - Re added the update checker. \ No newline at end of file diff --git a/release-docs/documentation.txt b/release-docs/documentation.txt deleted file mode 100644 index ebee2aa4..00000000 --- a/release-docs/documentation.txt +++ /dev/null @@ -1,3 +0,0 @@ -Documentation, NPC lists, Spawn lists, and more can be found on GitHub at: - -https://github.com/TShock/TShock/wiki \ No newline at end of file diff --git a/release-docs/installation.txt b/release-docs/installation.txt deleted file mode 100644 index 26b88e24..00000000 --- a/release-docs/installation.txt +++ /dev/null @@ -1,3 +0,0 @@ -For installation instructions, please refer to: - -https://github.com/TShock/TShock/wiki/Installation-instructions \ No newline at end of file