Start to update documentation (#2728)
* Init docsify * Readme: fix build badge, remove contributors The "all contributors" section is woefully out of date and for many reasons, it's not something we're going to support. Going forward, we're going to try to find a different / better / more inclusive way of doing contributions in such a way that's meaningful to people. * Fix build badge again * Update experimental build download instructions * Remove note about Travis CI being available * Update install guide to use TShock.Server.exe. * ∆: minor changes to setup instructions? * Remove setup guide because it's out of date * Update non-dev readme with instructions on using tshock * Remove experimental downloads section from dev readme * Add a link to github to non-dev docs * Change example password * Update non-dev readme with more data * Move changelog to docs folder * Rehead installing tshock * Embed streamable video * Create CNAME * Update CNAME * Update index to be a little more cool * Rename homepage * Rename changelog to changelog * Document constileation and heaptile providers * More command line docs * Update developer readme * Augment the readme * Add nuget links * Add a space * What is the cost of lies? * Modernize cli docs * Document tile providers * Clarify provider slowness * Further doument tile providers * ∆: modify markdown output for permissions to add wikilinks * Remove AN
This commit is contained in:
parent
15077dbccc
commit
7eede03c38
10 changed files with 171 additions and 251 deletions
259
README.md
259
README.md
|
|
@ -4,10 +4,7 @@
|
||||||
<img src="https://ci.appveyor.com/api/projects/status/chhe61q227lqdlg1?svg=true" alt="AppVeyor Build Status">
|
<img src="https://ci.appveyor.com/api/projects/status/chhe61q227lqdlg1?svg=true" alt="AppVeyor Build Status">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/Pryaxis/TShock/actions">
|
<a href="https://github.com/Pryaxis/TShock/actions">
|
||||||
<img src="https://github.com/Pryaxis/TShock/actions/workflows/Build%20Server/badge.svg" alt="GitHub Actions Build Status">
|
<img src="https://github.com/Pryaxis/TShock/actions/workflows/build.yml/badge.svg" alt="GitHub Actions Build Status">
|
||||||
</a>
|
|
||||||
<a href="#contributors">
|
|
||||||
<img src="https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square" alt="All contributors">
|
|
||||||
</a>
|
</a>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<a href="https://github.com/Pryaxis/TShock/blob/general-devel/README_cn.md">查看中文版</a>
|
<a href="https://github.com/Pryaxis/TShock/blob/general-devel/README_cn.md">查看中文版</a>
|
||||||
|
|
@ -15,265 +12,41 @@
|
||||||
|
|
||||||
TShock is a toolbox for Terraria servers and communities. That toolbox is jam packed with anti-cheat tools, server-side characters, groups, permissions, item bans, tons of commands, and limitless potential. It's one of a kind.
|
TShock is a toolbox for Terraria servers and communities. That toolbox is jam packed with anti-cheat tools, server-side characters, groups, permissions, item bans, tons of commands, and limitless potential. It's one of a kind.
|
||||||
|
|
||||||
* Download: [official](https://github.com/TShock/TShock/releases) or [experimental](#experimental-downloads).
|
This is the readme for TShock developers and hackers. We're building out new [TShock documentation](https://ikebukuro.tshock.co/) for server operators and plugin developers, but this is a work-in-progress right now.
|
||||||
* Download: [plugins and tools](https://github.com/Pryaxis/plugins) that work with TShock, TSAPI, and Terraria.
|
|
||||||
* Read [the documentation](https://tshock.readme.io/) to quickly get up to speed.
|
|
||||||
* Join [Discord](https://discord.gg/Cav9nYX).
|
|
||||||
* Use the ancient [old forums](https://tshock.co/xf/index.php?resources/) to find old stuff.
|
|
||||||
* Talk on [GitHub discussions](https://github.com/Pryaxis/TShock/discussions) to ask for help, chat, and other things. This is the best way to get help if Discord isn't your thing.
|
|
||||||
* For news, follow [@Pryaxis](https://twitter.com/Pryaxis) on Twitter.
|
|
||||||
|
|
||||||
----
|
## Developing TShock
|
||||||
|
|
||||||
## Table of Contents
|
If you want to contribute to TShock by sending a pull request or customize it to suit your own sparkly desires, this is the best starting point. By the end of this, you'll be able to build TShock from source, start to finish. More than that, though, you'll know how to start on the path of becoming an expert TShock developer.
|
||||||
|
|
||||||
* [New to TShock?](#new-to-tshock)
|
This guide works assuming that you have the [.NET 6 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) installed and that you're familiar with the command line. If that doesn't describe you, you should be able to accomplish the same thing using Visual Studio 2022 or Visual Studio Code.
|
||||||
* [Experimental Downloads](#experimental-downloads)
|
|
||||||
* [Developer's Guide](#developers-guide)
|
|
||||||
* [Background](#background)
|
|
||||||
* [Building](#building)
|
|
||||||
* [On Windows](#on-windows)
|
|
||||||
* [The Terraria Server API](#the-terraria-server-api)
|
|
||||||
* [TShock](#tshock)
|
|
||||||
* [On macOS](#on-macos)
|
|
||||||
* [On Linux](#on-linux)
|
|
||||||
* [On Unix](#on-unix)
|
|
||||||
* [The Terraria Server API](#the-terraria-server-api-1)
|
|
||||||
* [TShock](#tshock-1)
|
|
||||||
* [Working with Terraria](#working-with-terraria)
|
|
||||||
* [Code of Conduct](#code-of-conduct)
|
|
||||||
|
|
||||||
## New to TShock?
|
1. Clone the repository: `git clone https://github.com/Pryaxis/TShock.git --recurse-submodules`
|
||||||
|
1. `cd TShock` to enter the repo.
|
||||||
|
1. `dotnet build`. No really, that will build things!
|
||||||
|
|
||||||
_These instructions assume Windows. If you're setting up on Linux or macOS, please refer to [the in-depth guide](https://tshock.readme.io/docs/getting-started) (and don't forget to install the *latest version* of `mono-complete` on Linux)._
|
If you want to run the `TShockLauncher` (which runs a server), run:
|
||||||
|
|
||||||
1. Download [the latest stable version](https://github.com/TShock/TShock/releases) and `unzip` the folder using your favorite unzip tool. Make sure that all of the files in the zip get into one folder. This is where your server will be stored. The file structure looks like this:
|
1. `dotnet run --project TShockLauncher`
|
||||||
|
|
||||||
|
To produce a packaged release (suitable for distribution), run:
|
||||||
|
|
||||||
GeoIP.dat
|
1. `cd TShockLauncher`
|
||||||
Newtonsoft.Json.dll
|
1. `dotnet publish -r win-x64 -f net6.0 -c Release -p:PublishSingleFile=true --self-contained false`
|
||||||
OTAPI.dll
|
|
||||||
ServerPlugins\
|
|
||||||
|------BCrypt.Net.dll
|
|
||||||
|------HttpServer.dll
|
|
||||||
|------Mono.Data.Sqlite.dll
|
|
||||||
|------MySql.Data.dll
|
|
||||||
|------TShockAPI.dll
|
|
||||||
TerrariaServer.exe
|
|
||||||
sqlite3.dll
|
|
||||||
|
|
||||||
|
Note that in this example, you'd be building for `win-x64`. You can build for `win-x64`, `osx-x64`, `linux-x64`, `linux-arm64`, `linux-arm`. Your release will be in the `TShockLauncher/bin/Release/net6.0/` folder under the architecture you specified.
|
||||||
1. Start `TerrariaServer.exe` and TShock will boot. Answer the startup questions, and you should be ready to roll. In the background, TShock made some folders for you. We'll come back to those later.
|
|
||||||
|
|
||||||
1. Startup Terraria. Connect to a `multiplayer` server via IP and enter `localhost` if you're doing this on your local computer. If you're doing it on another computer, you need its IP address.
|
|
||||||
|
|
||||||
1. Look at the server console for the _setup code_. Type `/setup [code]` (example: `/setup 12345`), then a space, then the code you see in the console in your game chat. Instead of chatting, you'll run a command on the server. This one makes you temporary admin. All commands are prefixed with `/` or `!` (to make them silent).
|
|
||||||
|
|
||||||
1. Use the in-game command `/user add [account name] [password] owner` (example: `/user add shank lovely-ashes owner`) to create an account. This gives you owner rights on your server, which you can configure more to your liking later.
|
|
||||||
|
|
||||||
1. Login to your newly created account with `/login [account name] [password]` (example: `/login shank grilled-cheese`). You should see a login success message.
|
|
||||||
|
|
||||||
1. Turn off the setup system with `/setup` and your server is setup for initial use. TShock also created several files inside a new `tshock` folder. These files include `config.json` (our big configuration file), `sscconfig.json` (the server side characters configuration file), and `tshock.sqlite`. Don't lose your `tshock.sqlite` or you'll have to re-setup TShock.
|
|
||||||
|
|
||||||
1. You can now [customize your configuration](https://tshock.readme.io/docs/config-settings), build groups, ban items, and install more plugins.
|
|
||||||
|
|
||||||
## Experimental Downloads
|
|
||||||
|
|
||||||
To download experimental versions of TShock, you have two real options: AppVeyor builds or GitHub builds. You can also get archived Travis CI builds. Fair warning though: experimental versions of TShock are point-in-time releases that are not technically supported by us. If you have to report an issue, please make it clear which commit or branch you downloaded your build from, which service, and the build number if applicable.
|
|
||||||
|
|
||||||
On [AppVeyor](https://ci.appveyor.com/project/hakusaro/tshock/), click on history, find the build you want, click on the commit message, and then click on the artifacts tab. You can download either the debug or the release build. AppVeyor only keeps builds back 6 months though.
|
|
||||||
|
|
||||||
On [GitHub](https://github.com/Pryaxis/TShock/), click on the actions tab, then click on "build server" on the commit or branch you want. If it was successful, you can download either the experimental release or debug artifacts.
|
|
||||||
|
|
||||||
These instructions are also available as a [video tutorial on Streamable](https://streamable.com/i9mfh9).
|
|
||||||
|
|
||||||
## Developer's Guide
|
|
||||||
|
|
||||||
Whether you want to contribute to TShock by sending a pull request, customize it to suit your own elvish desires, or want to build your own plugin, this is the best starting point. By the end of this, you'll be able to build TShock from source, start to finish. More than that, though, you'll know how to start on the path of becoming an expert TShock developer.
|
|
||||||
|
|
||||||
But first, you need some background.
|
|
||||||
|
|
||||||
### Background
|
|
||||||
|
|
||||||
Terraria is a C# application written on the .NET framework using the XNA game framework. TShock is a mod for Terraria's server, which is also written in C# on the .NET framework. Some might compare TShock to hMod in the Minecraft world (the precursor to Bukkit and its server, CraftBukkit). This is a good comparison to make in how the underlying build process works. When the project started, TShock was injected directly into the decompiled source code for Terraria. Unlike Minecraft, Terraria is not obfuscated, which means that many variable names and inner workings are sanely-named out of the box. Now, TShock uses advanced techniques to operate.
|
|
||||||
|
|
||||||
TShock is, first and foremost, a plugin written for the server variant of the Terraria API, an unofficial construct originally built by `bladecoding`. `TShock` has been colloquially used to refer to both the plugin as well as the server and plugin together. Similarly, the Terraria API's client version was abandoned long ago, and development of the `Server` API led to the abbreviation `TSAPI`, for `Terraria Server API`. The plugin `TShock` is executed by the [Terraria Server API](https://github.com/Pryaxis/TerrariaAPI-Server), which is in turn bound to the `Open Terraria API`, more commonly `OTAPI`. The [Open Terraria API](https://github.com/DeathCradle/Open-Terraria-API) is maintained by [DeathCradle](https://github.com/DeathCradle).
|
|
||||||
|
|
||||||
Now, the way that `TShock` runs on `TSAPI` through `OTAPI` can be summarized as the following:
|
|
||||||
|
|
||||||
1. The Open Terraria API deeply integrates with Terraria by modifying the official server's binary directly. This is done through rewriting the Terraria bytecode, the [CIL code](https://en.wikipedia.org/wiki/Common_Intermediate_Language), using a patching tool designed by DeathCradle and tools from the Mono project. For `TSAPI`, additional modifications are done to support TSAPI specific features. This done through the `TShock Mintaka Patcher`.
|
|
||||||
2. The `Terraria Server API` uses hooks provided by `OTAPI` to provide higher level hooks as well as legacy hooks for existing TSAPI applications.
|
|
||||||
3. `TShock` is executed by `TSAPI`, uses hooks provided by both `TSAPI` and `OTAPI`, and provides even higher level hooks and support tools to other `TSAPI` plugins.
|
|
||||||
|
|
||||||
With all of this in mind, the primary goal when compiling TShock is to remember that only the second and third layers are required to be interacted with. The first layer, `OTAPI`, is provided pre-compiled through NuGet. The second layer, `TSAPI`, is provided in the `TShock` repository through a git submodule. Its primary home is the [Terraria Server API repository](https://github.com/Pryaxis/TerrariaAPI-Server).
|
|
||||||
|
|
||||||
Let's get started.
|
|
||||||
|
|
||||||
### Building
|
|
||||||
|
|
||||||
You need to get the source code. Using git, [clone this repository](https://help.github.com/articles/cloning-a-repository/).
|
|
||||||
|
|
||||||
The next set of instructions are the technical details to setup both the Terraria Server API and TShock. More importantly, the Terraria API steps here are written under the assumption that you are building TShock primarily. Before you start, you need to **initialize the git submodules** and then **update them**. You need to use the following commands to do this.
|
|
||||||
|
|
||||||
$ git submodule init
|
|
||||||
$ git submodule update
|
|
||||||
|
|
||||||
If you're using [GitHub Desktop](https://desktop.github.com), you need to perform additional steps. After cloning the TShock repository, go to the `Repository` menu and select `Open in Command Prompt`. If you don't have Git (not GitHub Desktop) installed, you can follow the prompts to to install Git for your command line. Once Git is installed, use this same process to get to the command prompt. Then, run the above commands.
|
|
||||||
|
|
||||||
#### On Windows
|
|
||||||
|
|
||||||
On Windows, you need to install [Visual Studio Community Edition](https://www.visualstudio.com/downloads/) or a better (more expensive) version of Visual Studio.
|
|
||||||
|
|
||||||
##### The Terraria Server API
|
|
||||||
|
|
||||||
1. Open the `TShock.4.OTAPI.sln` solution in the `TerrariaServerAPI` folder.
|
|
||||||
|
|
||||||
1. Set the `TShock.Modifications.Bootstrapper` project as the StartUp project.
|
|
||||||
|
|
||||||
1. Build the solution in either debug or release mode, depending on your preference. NuGet will automatically fetch the appropriate packages as a result of its magical powers.
|
|
||||||
|
|
||||||
1. Hit the "Start" button in Visual Studio to run the `TShock Mintaka Bootstrapper`.
|
|
||||||
|
|
||||||
1. Watch the output window and make sure that a non-zero number of modifications ran. When it completes, you have successfully bootstrapped `TShock Mintaka`.
|
|
||||||
|
|
||||||
1. Set the `TerrariaServerAPI` project as the StartUp project.
|
|
||||||
|
|
||||||
1. Build the solution in either debug or release mode, depending on your preference.
|
|
||||||
|
|
||||||
1. Close `TShock.4.OTAPI.sln` in Visual Studio.
|
|
||||||
|
|
||||||
You need to re-run the patcher any time `OTAPI` updates. You need to rebuild `TerrariaServerAPI` any time that the submodule in `TShock` gets changed, if you're doing this from inside the TShock repo. You also need to update the submodules (`git submodule update`) if they're out of date on a pull too.
|
|
||||||
|
|
||||||
##### TShock
|
|
||||||
|
|
||||||
1. Open the `TShock.sln` solution in the root of the repository.
|
|
||||||
|
|
||||||
1. Build the solution. It should correctly download NuGet packages automatically and build against the aforementioned `TerrariaServerAPI` project you just built.
|
|
||||||
|
|
||||||
#### On macOS
|
|
||||||
|
|
||||||
1. Install [Homebrew](https://brew.sh) if you haven't already.
|
|
||||||
|
|
||||||
1. Install mono:
|
|
||||||
|
|
||||||
$ brew install mono
|
|
||||||
|
|
||||||
1. Verify that mono is available:
|
|
||||||
|
|
||||||
$ mono --version
|
|
||||||
|
|
||||||
Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Sun Sep 17 18:29:46 BST 2017)
|
|
||||||
...
|
|
||||||
|
|
||||||
1. Proceed to the [unix build steps](#on-unix) to continue.
|
|
||||||
|
|
||||||
#### On Linux
|
|
||||||
|
|
||||||
1. **DO NOT** just install mono from your package manager unless told to do so. If you do and it's out of date, you probably won't be able to successfully develop for TShock.
|
|
||||||
|
|
||||||
1. Follow the [official install instructions for mono](http://www.mono-project.com/download/). **DO** install `mono-complete` or you're missing components.
|
|
||||||
|
|
||||||
1. Proceed to the [unix build steps](#on-unix) to continue.
|
|
||||||
|
|
||||||
#### On Unix
|
|
||||||
|
|
||||||
1. You need to get NuGet. Download the latest `nuget.exe` from [NuGet](https://www.nuget.org/downloads).
|
|
||||||
|
|
||||||
1. Make a `~/bin` folder if you don't have one. Then, put `nuget.exe` inside it.
|
|
||||||
|
|
||||||
$ mkdir ~/bin/
|
|
||||||
$ cp ~/downloads/nuget.exe ~/bin/
|
|
||||||
|
|
||||||
1. Set an environment variable to store if you plan to build in debug or release.
|
|
||||||
|
|
||||||
$ export BUILD_MODE=Debug
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
$ export BUILD_MODE=Release
|
|
||||||
|
|
||||||
|
|
||||||
##### The Terraria Server API
|
|
||||||
|
|
||||||
1. Perform a NuGet restore in the directory above `TerrariaServerAPI`.
|
|
||||||
|
|
||||||
$ mono ~/bin/nuget.exe restore ./TerrariaServerAPI/
|
|
||||||
|
|
||||||
1. Build the `TShock.4.OTAPI.sln` solution the configuration you chose:
|
|
||||||
|
|
||||||
$ xbuild ./TerrariaServerAPI/TShock.4.OTAPI.sln /p:Configuration=$BUILD_MODE
|
|
||||||
|
|
||||||
1. Run the `TShock Mintaka Bootstrapper` with the TShock modifications. If you don't use `/bin/bash` as your primary shell, you might want to temporarily switch to it, or the bootstrapper may fail.
|
|
||||||
|
|
||||||
$ cd ./TerrariaServerAPI/TShock.Modifications.Bootstrapper/bin/$BUILD_MODE/
|
|
||||||
$ mono TShock.Modifications.Bootstrapper.exe -in=OTAPI.dll \
|
|
||||||
-mod=../../../TShock.Modifications.**/bin/$BUILD_MODE/TShock.Modifications.*.dll \
|
|
||||||
-o=Output/OTAPI.dll
|
|
||||||
|
|
||||||
1. Verify that non-zero modifications ran successfully. Then, build the Terraria Server API executable.
|
|
||||||
|
|
||||||
$ cd ../../../../
|
|
||||||
$ xbuild ./TerrariaServerAPI/TerrariaServerAPI/TerrariaServerAPI.csproj \
|
|
||||||
/p:Configuration=$BUILD_MODE
|
|
||||||
|
|
||||||
You need to re-run the patcher any time `OTAPI` updates. You need to rebuild `TerrariaServerAPI` any time that the submodule in `TShock` gets changed, if you're doing this from inside the TShock repo. You also need to update the submodules (`git submodule update`) if they're out of date on a pull too.
|
|
||||||
|
|
||||||
##### TShock
|
|
||||||
|
|
||||||
1. Perform a NuGet restore in the folder that contains `TShock.sln`.
|
|
||||||
|
|
||||||
$ mono ~/bin/nuget.exe restore
|
|
||||||
|
|
||||||
1. Build TShock in the `BUILD_MODE` you set earlier.
|
|
||||||
|
|
||||||
$ xbuild ./TShock.sln /p:Configuration=$BUILD_MODE
|
|
||||||
|
|
||||||
You're done!
|
|
||||||
|
|
||||||
### Working with Terraria
|
### Working with Terraria
|
||||||
|
|
||||||
Working with Terraria in TShock and in other Terraria Server API plugins is different from most other APIs. Due to the nature of how OTAPI works, you have direct access to all public fields in the `Terraria` namespace. This means that you can access Terraria member methods directly. TShock and other plugins do this quite often, mostly to modify the game world, send data, and receive data. Calls to `Main` are one such example of direct access to Terraria. This is the equivalent to `net.minecraft.server` (NMS) calls in CraftBukkit.
|
Working with Terraria in TShock and in other Terraria Server API plugins is different from most other APIs. Due to the nature of how OTAPI works, you have direct access to all public fields in the `Terraria` namespace. This means that you can access Terraria member methods directly. TShock and other plugins do this quite often, mostly to modify the game world, send data, and receive data. Calls to `Main` are one such example of direct access to Terraria. This is the equivalent to `net.minecraft.server` (NMS) calls in CraftBukkit.
|
||||||
|
|
||||||
You might find yourself wondering where these fields are. Pryaxis provides the decompiled [Sources](https://github.com/pryaxis/Sources) to Terraria's server, updated with each release. Note that these decompiled servers do not re-compile. The process of fixing the decompiles has proven to be nearly impossible in a reasonable timeframe with the modern Terraria Server.
|
You might find yourself wondering where these fields are. Pryaxis provides the decompiled [Sources](https://github.com/pryaxis/Sources) to Terraria's server, updated with each release. These sources are made available to developers of TShock. If you have submitted a pull request to TShock, reach out on Discord to get access. In lieu of this, you can download `ILSpy` and decompile Terraria or the server itself.
|
||||||
|
|
||||||
Finally, you may be interested in developing other Terraria Server API plugins. The [TShockResources](https://github.com/TShockResources) organization has several plugins you can look at and build on. TShock is itself a plugin, and most plugins are open source. This gives you ample room to figure out where to go next.
|
Finally, you may be interested in developing other Terraria Server API plugins. The [TShockResources](https://github.com/TShockResources) organization has several plugins you can look at and build on. TShock is itself a plugin, and most plugins are open source. This gives you ample room to figure out where to go next.
|
||||||
|
|
||||||
Need help? Join us on [Telegram](https://t.me/pryaxis) or [Discord](https://discord.gg/Cav9nYX).
|
Need help? Join us on [Discord](https://discord.gg/Cav9nYX).
|
||||||
|
|
||||||
## Code of Conduct
|
## Code of Conduct
|
||||||
|
|
||||||
> By participating in the TShock for Terraria community, all members will adhere to maintaining decorum with respect to all humans, in and out of the community. Members will not engage in discussion that inappropriately disparages or marginalizes any group of people or any individual. Members will not attempt to further or advance an agenda to the point of being overbearing or close minded (such as through spreading FUD). Members will not abuse services provided to them and will follow the guidance of community leaders on a situational basis about what abuse consists of. Members will adhere to United States and international law. If members notice a violation of this code of conduct, they will not engage but will instead contact the leadership team on either the forums or Discord.
|
> By participating in the TShock for Terraria community, all members will adhere to maintaining decorum with respect to all humans, in and out of the community. Members will not engage in discussion that inappropriately disparages or marginalizes any group of people or any individual. Members will not attempt to further or advance an agenda to the point of being overbearing or close minded (such as through spreading FUD). Members will not abuse services provided to them and will follow the guidance of community leaders on a situational basis about what abuse consists of. Members will adhere to United States and international law. If members notice a violation of this code of conduct, they will not engage but will instead contact the leadership team on either the forums or Discord.
|
||||||
|
|
||||||
> Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here).
|
> Do not attempt to circumvent or bypass the code of conduct by using clever logic or reasoning (e.g., insulting Facepunch members, because they weren't directly mentioned here).
|
||||||
|
|
||||||
## Contributors
|
|
||||||
Note: This list is out of date. All contributors [listed on the GitHub graph](https://github.com/Pryaxis/TShock/graphs/contributors) should be listed here.
|
|
||||||
|
|
||||||
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
|
||||||
<!-- prettier-ignore-start -->
|
|
||||||
<!-- markdownlint-disable -->
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td align="center"><a href="https://avikav.net"><img src="https://avatars2.githubusercontent.com/u/18518861?v=4" width="100px;" alt=""/><br /><sub><b>AviKav</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/issues?q=author%3AAviKav" title="Bug reports">🐛</a> <a href="https://github.com/Pryaxis/TShock/commits?author=AviKav" title="Tests">⚠️</a></td>
|
|
||||||
<td align="center"><a href="https://tshock.co"><img src="https://avatars0.githubusercontent.com/u/3332657?v=4" width="100px;" alt=""/><br /><sub><b>Rodrigo Rente</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=AxisKriel" title="Code">💻</a> <a href="#projectManagement-AxisKriel" title="Project Management">📆</a> <a href="https://github.com/Pryaxis/TShock/commits?author=AxisKriel" title="Tests">⚠️</a></td>
|
|
||||||
<td align="center"><a href="https://sgkoi.dev"><img src="https://avatars2.githubusercontent.com/u/9637711?v=4" width="100px;" alt=""/><br /><sub><b>Stargazing Koishi</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=sgkoishi" title="Code">💻</a> <a href="#infra-sgkoishi" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/AxeelAnder"><img src="https://avatars2.githubusercontent.com/u/25691207?v=4" width="100px;" alt=""/><br /><sub><b>Axeel</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=AxeelAnder" title="Documentation">📖</a> <a href="#projectManagement-AxeelAnder" title="Project Management">📆</a></td>
|
|
||||||
<td align="center"><a href="https://aurora-gaming.org/"><img src="https://avatars0.githubusercontent.com/u/58985873?v=4" width="100px;" alt=""/><br /><sub><b>Patrikkk</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Code">💻</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Documentation">📖</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Patrikkk" title="Tests">⚠️</a></td>
|
|
||||||
<td align="center"><a href="http://www.nathaneaston.com/"><img src="https://avatars2.githubusercontent.com/u/10368650?v=4" width="100px;" alt=""/><br /><sub><b>Nathan Easton</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=ndragon798" title="Code">💻</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/Ristellise"><img src="https://avatars2.githubusercontent.com/u/7894419?v=4" width="100px;" alt=""/><br /><sub><b>Shinon</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Tests">⚠️</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Code">💻</a> <a href="https://github.com/Pryaxis/TShock/commits?author=Ristellise" title="Documentation">📖</a></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td align="center"><a href="https://github.com/Retrograde-i486"><img src="https://avatars1.githubusercontent.com/u/65242258?v=4" width="100px;" alt=""/><br /><sub><b>Retrograde-i486</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=Retrograde-i486" title="Code">💻</a></td>
|
|
||||||
<td align="center"><a href="http://colinbohn.me"><img src="https://avatars0.githubusercontent.com/u/1351268?v=4" width="100px;" alt=""/><br /><sub><b>Colin Bohn</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=ColinBohn" title="Code">💻</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/mrshroomy"><img src="https://avatars0.githubusercontent.com/u/52048952?v=4" width="100px;" alt=""/><br /><sub><b>mrshroomy</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=mrshroomy" title="Tests">⚠️</a></td>
|
|
||||||
<td align="center"><a href="https://github.com/agentsparrow"><img src="https://avatars0.githubusercontent.com/u/16114336?v=4" width="100px;" alt=""/><br /><sub><b>agentsparrow</b></sub></a><br /><a href="https://github.com/Pryaxis/TShock/commits?author=agentsparrow" title="Tests">⚠️</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<!-- markdownlint-enable -->
|
|
||||||
<!-- prettier-ignore-end -->
|
|
||||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
|
||||||
|
|
||||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
|
||||||
|
|
|
||||||
|
|
@ -980,7 +980,9 @@ namespace TShockAPI
|
||||||
// Traverse to build group name list
|
// Traverse to build group name list
|
||||||
foreach (Group g in TShock.Groups.groups)
|
foreach (Group g in TShock.Groups.groups)
|
||||||
{
|
{
|
||||||
|
output.Append("[[");
|
||||||
output.Append(g.Name);
|
output.Append(g.Name);
|
||||||
|
output.Append("]]");
|
||||||
output.Append("|");
|
output.Append("|");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -995,9 +997,9 @@ namespace TShockAPI
|
||||||
|
|
||||||
foreach (var field in typeof(Permissions).GetFields().OrderBy(f => f.Name))
|
foreach (var field in typeof(Permissions).GetFields().OrderBy(f => f.Name))
|
||||||
{
|
{
|
||||||
output.Append("|");
|
output.Append("|[[");
|
||||||
output.Append((string) field.GetValue(null));
|
output.Append((string) field.GetValue(null));
|
||||||
output.Append("|");
|
output.Append("]]|");
|
||||||
|
|
||||||
foreach (Group g in TShock.Groups.groups)
|
foreach (Group g in TShock.Groups.groups)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
0
docs/.nojekyll
Normal file
0
docs/.nojekyll
Normal file
1
docs/CNAME
Normal file
1
docs/CNAME
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
ikebukuro.tshock.co
|
||||||
65
docs/README.md
Normal file
65
docs/README.md
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
<p align="center">
|
||||||
|
<img src="https://tshock.co/newlogo.png" alt="TShock for Terraria"><br />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
* Download: [official](https://github.com/TShock/TShock/releases) or [experimental](#experimental-downloads).
|
||||||
|
* Download: [plugins](https://github.com/topics/tshock-plugin) that work with TShock, [OTAPI](https://github.com/topics/otapi), TSAPI, and Terraria.
|
||||||
|
* Join [Discord](https://discord.gg/Cav9nYX).
|
||||||
|
* Talk on [GitHub discussions](https://github.com/Pryaxis/TShock/discussions) to ask for help, chat, and other things. This is the best way to get help if Discord isn't your thing.
|
||||||
|
* For news, follow [@Pryaxis](https://twitter.com/Pryaxis) on Twitter.
|
||||||
|
* Contribute changes and hack on the project [on GitHub](https://github.com/Pryaxis/TShock).
|
||||||
|
* Nuget packages for [TShock](https://www.nuget.org/packages/TShock/) and [TSAPI](https://www.nuget.org/packages/TSAPI/) are available.
|
||||||
|
|
||||||
|
----
|
||||||
|
|
||||||
|
## Installing TShock
|
||||||
|
|
||||||
|
TShock supports any system that .NET 6 supports, except for Apple Silicon. You should be able to run TShock on x86, x86_64, arm32, and arm64 on macOS, Windows, or Linux. TShock has also been used successfully on an unofficial port of TShock to FreeBSD using an unofficial version of .NET 6. Generally, TShock needs at least 1GB of memory, but alternative tile providers may be able to lower the minimum memory threshold.
|
||||||
|
|
||||||
|
1. If you're on Windows 10 or another operating system, install the [.NET Runtime version 6.x](https://dotnet.microsoft.com/en-us/download/dotnet/6.0) or the .NET SDK 6.x if you're intending to build and develop plugins. If you're on Windows 11 22H2 or later, you probably already have .NET 6 installed.
|
||||||
|
|
||||||
|
1. Download [the latest stable version](https://github.com/TShock/TShock/releases) and `unzip` the folder using your favorite unzip tool. Make sure that all of the files in the zip get into one folder. This is where your server will be stored. The file structure looks like this:
|
||||||
|
|
||||||
|
TShock.Server.exe
|
||||||
|
bin\
|
||||||
|
|------HttpServer.dll
|
||||||
|
|------ModFramework.dll
|
||||||
|
|------OTAPI.dll
|
||||||
|
|------OTAPI.Runtime.dll
|
||||||
|
|------TerrariaServer.dll
|
||||||
|
ServerPlugins\
|
||||||
|
|------TShockAPI.dll
|
||||||
|
|
||||||
|
1. Start `TShock.Server.exe` (or `TShock.Server` on other platforms) and TShock will boot, creating a folder called `tshock` to store its database and configuration files. Answer the startup questions, and you should be ready to roll. In the background, TShock made some folders for you. We'll come back to those later.
|
||||||
|
|
||||||
|
1. Startup Terraria. Connect to a `multiplayer` server via IP and enter `localhost` if you're doing this on your local computer. If you're doing it on another computer, you need its IP address.
|
||||||
|
|
||||||
|
1. Look at the server console for the _setup code_. Type `/setup [code]` (example: `/setup 12345`), then a space, then the code you see in the console in your game chat. Instead of chatting, you'll run a command on the server. This one makes you temporary admin. All commands are prefixed with `/` or `!` (to make them silent).
|
||||||
|
|
||||||
|
1. Use the in-game command `/user add [account name] [password] owner` (example: `/user add shank lovely-grilled-cheese owner`) to create an account. This gives you owner rights on your server, which you can configure more to your liking later.
|
||||||
|
|
||||||
|
1. Login to your newly created account with `/login [account name] [password]` (example: `/login shank grilled-cheese`). You should see a login success message.
|
||||||
|
|
||||||
|
1. Turn off the setup system with `/setup` and your server is setup for initial use. TShock also created several files inside a new `tshock` folder. These files include `config.json` (our big configuration file), `sscconfig.json` (the server side characters configuration file), and `tshock.sqlite`. Don't lose your `tshock.sqlite` or you'll have to re-setup TShock.
|
||||||
|
|
||||||
|
1. To install more plugins, add them to the `ServerPlugins` folder.
|
||||||
|
|
||||||
|
### Upgrading
|
||||||
|
|
||||||
|
To upgrade TShock 5 to future versions of TShock 5, simply download the latest release, extract the archive, and then merge all of the files in the release archive with your existing installation. The `tshock` folder contains user data, and any database changes will be automatically performed to bring your server up-to-date with the latest stuff from us.
|
||||||
|
|
||||||
|
#### Upgrading from TShock 4?
|
||||||
|
|
||||||
|
If you're upgrading from TShock 4, we suggest downloading the new release of TShock, copying the `tshock` configuration folder over (containing the `sqlitedb` file as well as the `json` configuration files, etc) to the new server, and starting the new server that way. This is because many files are removed and the existing files are no longer required from TShock 4. In addition, the new binary you need to run is called `TShock.Server.exe` or `TShock.Server`, not `TerrariaServer.exe`.
|
||||||
|
|
||||||
|
In addition, you no longer need to install `mono-complete` or `mono` on non-Windows operating systems.
|
||||||
|
|
||||||
|
## Experimental downloads
|
||||||
|
|
||||||
|
To download experimental versions of TShock, you have two real options: AppVeyor builds or GitHub builds. Fair warning though: experimental versions of TShock are point-in-time releases that are not technically supported by us. If you have to report an issue, please make it clear which commit or branch you downloaded your build from, which service, and the build number if applicable.
|
||||||
|
|
||||||
|
On [AppVeyor](https://ci.appveyor.com/project/hakusaro/tshock/), click on history, find the build you want, click on the commit message, and then click on the artifacts tab. You can download either the debug or the release build. AppVeyor only keeps builds back 6 months though, and there's a bandwidth limit.
|
||||||
|
|
||||||
|
On [GitHub](https://github.com/Pryaxis/TShock/), click on the actions tab, then click on "CI OTAPI3" on the commit or branch you want. If it was successful, you can download either the experimental release or debug artifacts. You must be signed into GitHub for the links to work.
|
||||||
|
|
||||||
|
<div style="width:100%;height:0px;position:relative;padding-bottom:83.333%;"><iframe src="https://streamable.com/e/qmi6gq?loop=0" frameborder="0" width="100%" height="100%" allowfullscreen style="width:100%;height:100%;position:absolute;left:0px;top:0px;overflow:hidden;"></iframe></div>
|
||||||
4
docs/_sidebar.md
Normal file
4
docs/_sidebar.md
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
* [☕️⚡️ TShock documentation home](/)
|
||||||
|
* [Changelog](/changelog.md)
|
||||||
|
* [Command line parameters](/command-line-parameters.md)
|
||||||
|
* [Tile providers](/tile-providers.md)
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
# TShock for Terraria
|
# TShock for Terraria
|
||||||
|
|
||||||
This is the rolling changelog for TShock for Terraria. Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large.
|
This is the rolling changelog for TShock for Terraria. Changes listed under "upcoming changes" are only available in experimental builds.
|
||||||
|
|
||||||
|
<!-- ## How to add a changelog entry
|
||||||
|
Use past tense when adding new entries; sign your name off when you add or change something. This should primarily be things like user changes, not necessarily codebase changes unless it's really relevant or large.
|
||||||
|
|
||||||
## How to add a changelog entry
|
|
||||||
* Put your entry in terms of what you changed in the past mood. For example: "Changed the world by adding new grommets."
|
* Put your entry in terms of what you changed in the past mood. For example: "Changed the world by adding new grommets."
|
||||||
* Not "fix" or "change".
|
* Not "fix" or "change".
|
||||||
* The entry must start with a verb.
|
* The entry must start with a verb.
|
||||||
|
|
@ -10,7 +12,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Write in complete sentences that are understandable by anyone who does not have experience programming, unless the change is related to programming.
|
* Write in complete sentences that are understandable by anyone who does not have experience programming, unless the change is related to programming.
|
||||||
* Do not insert tabs into this file, under any circumstances, ever.
|
* Do not insert tabs into this file, under any circumstances, ever.
|
||||||
* Do not forget to sign every line you change with your name. (@hakusaro)
|
* Do not forget to sign every line you change with your name. (@hakusaro)
|
||||||
* If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change.
|
* If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change. -->
|
||||||
|
|
||||||
## Upcoming changes
|
## Upcoming changes
|
||||||
* Reduced load/save console spam. (@SignatureBeef, @YehnBeep)
|
* Reduced load/save console spam. (@SignatureBeef, @YehnBeep)
|
||||||
|
|
@ -55,8 +57,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Check if the buff type being applied is within bounds.
|
* Check if the buff type being applied is within bounds.
|
||||||
* Introduce `AddPlayerBuffWhitelist` (replacing `WhitelistBuffMaxTime`), which allows us to specify the maximum amount of ticks a buff can be applied for, and if it can be applied without the target being in PvP.
|
* Introduce `AddPlayerBuffWhitelist` (replacing `WhitelistBuffMaxTime`), which allows us to specify the maximum amount of ticks a buff can be applied for, and if it can be applied without the target being in PvP.
|
||||||
* When rejecting from `OnPlayerBuff`, instead of sending a `PlayerAddBuff` packet with the rejected buff (essentially a no-op, as the sender implicitly applies the buff to the target, and causes desync as the buff was rejected), send a `PlayerBuff` to re-sync the target's buffs, without the buff we just rejected.
|
* When rejecting from `OnPlayerBuff`, instead of sending a `PlayerAddBuff` packet with the rejected buff (essentially a no-op, as the sender implicitly applies the buff to the target, and causes desync as the buff was rejected), send a `PlayerBuff` to re-sync the target's buffs, without the buff we just rejected.
|
||||||
* Added new tile provider. Use `-constileation` or `-c` to use it. Constileation is an alternative tile provider to Tiled and HeapTile. (@SignatureBeef) (AN: Someone please write a better changelog entry for this kthx.)
|
* Added new tile provider. Use `-constileation` or `-c` to use it. Constileation is an alternative tile provider to Tiled and HeapTile. (@SignatureBeef)
|
||||||
|
|
||||||
|
|
||||||
## TShock 4.5.18
|
## TShock 4.5.18
|
||||||
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@PotatoCider)
|
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@PotatoCider)
|
||||||
|
|
@ -559,7 +560,7 @@ Please note that the permissions previously tied to the removed commands are als
|
||||||
* Updated ServerBroadcast hook to provide a NetworkText object. (@tylerjwatson)
|
* Updated ServerBroadcast hook to provide a NetworkText object. (@tylerjwatson)
|
||||||
* Fixed levers and things not updating properly. (@deathcradle)
|
* Fixed levers and things not updating properly. (@deathcradle)
|
||||||
* Deprecated PacketTypes.ChatText. Chat is now handled using the NetTextModule and packet 82. (@QuiCM, @Hakusaro)
|
* Deprecated PacketTypes.ChatText. Chat is now handled using the NetTextModule and packet 82. (@QuiCM, @Hakusaro)
|
||||||
* Removed the -lang command-line flag from TShock. It is now a vanilla feature. (@Hakusaro)
|
* Removed the -lang command-line flag from TShock. It is now a vanilla feature. (@hakusaro)
|
||||||
|
|
||||||
## TShock 4.3.23
|
## TShock 4.3.23
|
||||||
* Added evil type option during world creation (@mistzzt)
|
* Added evil type option during world creation (@mistzzt)
|
||||||
35
docs/command-line-parameters.md
Normal file
35
docs/command-line-parameters.md
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
The following parameters can be added to TShock to alter the way a server initializes. Options set on the command line override any of their counterparts in the config file. These can be used either for personal use or in a GSP environment for easier hosting without hassle:
|
||||||
|
|
||||||
|
* `-ip` - Starts the server bound to a given IPv4 address. For example: `-ip 0.0.0.0` will bind all interfaces. In contrast, `-ip 127.0.0.1` will bind only `127.0.0.1`. If your interface has another IP address assigned to it, you should be able to bind that.
|
||||||
|
* `-port` - Starts the server bound to a given port. For example: `-port 7777` will use the default port for Terraria. `-port 25565` will use the Minecraft default port. Ports below 1000 usually require administrator or root privileges to bind on most operating systems.
|
||||||
|
* `-maxplayers`, or `-players` - Starts the server with a given player count. For example: `-maxplayers 5` sets the maximum number of players to 5. The theoretical maximum is `255`. You can set `-maxplayers 255` for this.
|
||||||
|
* `-world` - Starts the server and immediately loads a given world file. Note: this parameter expects an absolute path. For example: `-world C:\Terraria\MyWorld.wld` or `-world /root/MyWorld.wld`.
|
||||||
|
* `-worldselectpath` - Starts the server and changes the location for worlds to be the specified path. The server will look in this path for worlds to load. For example: `-worldselectpath /root` or `-worldselectpath C:\Terraria`.
|
||||||
|
* `-worldname` - Starts the server using the world name that exists in the set `world select path`. For example, if `MyWorld.wld` is inside `C:\Terraria\` and `-worldselectpath C:\Terraria\` is set, then `-worldname MyWorld` will load that world.
|
||||||
|
* `-autocreate` - Starts the server and, if a world file isn't found, automatically create the world file with a given size, 1-3, 1 being small. For example, set `-autocreate 3` to create a large world.
|
||||||
|
* `-config` - Starts the server with a given config file. For example, `-config C:\Terraria\config.json`.
|
||||||
|
* `-ignoreversion` - Ignores API version checks for plugins allowing for old plugins to run.
|
||||||
|
* `-forceupdate` - Forces the server to continue running, and not hibernating when no players are on. This results in time passing, grass growing, and cpu running.
|
||||||
|
* `-pass`, `-password` - Sets the server password. For example, `-pass mypassword` will set the password to `mypassword`.
|
||||||
|
* `-motd` - Sets the base game MOTD. For example, `-motd "Welcome to my server!"` will set the MOTD to `Welcome to my server!`.
|
||||||
|
* `-autoshutdown` - Enables the base game's "auto shutdown" feature.
|
||||||
|
* `-secure` - Turns on the base game's "antispam" feature.
|
||||||
|
* `-configpath` - Specifies the path tshock uses to resolve configs, log files, and sqlite db.
|
||||||
|
* `-logpath` - Overrides the default log path and saves logs here.
|
||||||
|
* `-logformat` - Changes the format of the name of log files, subject to C# date standard abbreviations. For example, `-logformat "yyyy-MM-dd"` will create a new log file for each day. The default is `yyyy-MM-dd_HH-mm-ss`.
|
||||||
|
* `-logclear` - Overwrites old config if it exists. Useful for docker. For example, `-logclear`.
|
||||||
|
* `-dump` - Dumps permissions and config file descriptions for wiki use.
|
||||||
|
* `-worldevil` - Sets the world's evil state (`random`, `corrupt`, or `crimson`). This only affects new worlds. For example, `-worldevil random` will set the world to a random evil state.
|
||||||
|
* `-heaptile` - Runs the server with the heaptile tile provider. HeapTile is an alternative ITile provider that uses less memory than the default. This is experimental and may cause issues.
|
||||||
|
* `-constileation` or `-c` - Runs the server with the Constileation tile provider. Constileation is an alternative ITile provider that uses less memory than the default. This is experimental and may cause issues.
|
||||||
|
* `-difficulty` - Sets the world's difficulty (`0` for `normal`, `1` for `expert`, `2` for `master`, `3` for `journey`). This only affects new worlds.
|
||||||
|
* `-loadlib` - Instructs the base game to load the library at the path. For example, `-loadlib C:\Terraria\MyLibrary.dll` will load the library `MyLibrary.dll` from the path `C:\Terraria\`.
|
||||||
|
* `-crashdir` - Instructs the base game to save crash dumps to the path. For example, `-crashdir C:\Terraria\CrashDumps` will save crash dumps to `C:\Terraria\CrashDumps`.
|
||||||
|
|
||||||
|
These command line flags are in-addition to the ones that the Terraria server offers (for example, `-lang` is now a vanilla flag, and still works).
|
||||||
|
|
||||||
|
## Autostarting TShock
|
||||||
|
|
||||||
|
If you want to start TShock automatically though a script, and bypass the interactive startup prompt, you need to specify a `-world` path, a `-port`, and `-maxplayers`.
|
||||||
|
|
||||||
|
For example: `TShock.Server.exe -world C:\Terraria\worlds\MyWorld.wld -port 7777 -maxplayers 8`
|
||||||
24
docs/index.html
Normal file
24
docs/index.html
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>☕️⚡️ TShock for Terraria docs</title>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<meta name="description" content="Documentation for TShock for Terraria! ✨☕️⚡️">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||||
|
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script>
|
||||||
|
window.$docsify = {
|
||||||
|
name: 'TShock for Terraria',
|
||||||
|
repo: 'pryaxis/tshock',
|
||||||
|
loadSidebar: true,
|
||||||
|
subMaxLevel: 9
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<!-- Docsify v4 -->
|
||||||
|
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
15
docs/tile-providers.md
Normal file
15
docs/tile-providers.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
TShock ships with two tile providers, which replace the Terraria tile datastore with different systems. Additionally, one major plugin developer provides an additional set of tile providers. For developers, these providers implement the `ITile` interface and register themselves as Tile Providers. `ITile` is provided by `OTAPI`.
|
||||||
|
|
||||||
|
Terraria, by default, stores tiles in a relatively unoptimized way. Hypothetically, this is the fastest way to access tiles, but it does so at the cost of memory. If you're running a Terraria server with limited memory, you may want to get back memory and trade off processing power instead. That's what these providers do.
|
||||||
|
|
||||||
|
## Constileation
|
||||||
|
|
||||||
|
Constileation is the newest tile provider shipped by TShock. It's faster than HeapTile, and saves memory. It uses 14 bytes per tile. Start your TShock server with the `-c` or `-constileation` command line argument to use this provider.
|
||||||
|
|
||||||
|
## HeapTile
|
||||||
|
|
||||||
|
HeapTile is one of the earliest tile providers shipped by TShock. Again, it offers memory advantages, but is really slow compared to Constileation and Tiled. Start your TShock server with the `-heaptile` command line argument to use this provider.
|
||||||
|
|
||||||
|
## Tiled
|
||||||
|
|
||||||
|
The [tiled plugin for TShock](https://github.com/thanatos-tshock/Tiled) by [thanatos](https://github.com/thanatos-tshock) offers additional tile providers, including their `1d`, `2d`, and `struct` providers. We urge you to check out and compare all tile providers to find the one that best suits your needs. Tiled attempts to bring the best of both worlds, offering tile providers that minimize memory usage while offering modest performance.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue