Add TShock (#392)

This commit is contained in:
Greelan 2023-06-21 15:50:30 +10:00 committed by GitHub
parent 391eacb472
commit d1065bc09a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2757 additions and 0 deletions

View File

@ -0,0 +1,9 @@
bin
dotnet
i18n
ServerPlugins
GeoIP.dat
TShock.Installer
TShock.Installer.exe
TShock.Server
TShock.Server.exe

98
tshock.kvp Normal file
View File

@ -0,0 +1,98 @@
Meta.DisplayName=TShock - Terraria Server
Meta.Description=TShock Dedicated Server for Terraria
Meta.OS=Windows, Linux
Meta.AarchSupport=Native
Meta.Arch=All
Meta.Author=Greelan
Meta.URL=https://ikebukuro.tshock.co/#/
Meta.DisplayImageSource=steam:105600
Meta.EndpointURIFormat=steam://connect/{0}
Meta.ConfigManifest=tshockconfig.json
Meta.MetaConfigManifest=tshockmetaconfig.json
Meta.ConfigRoot=tshock.kvp
Meta.MinAMPVersion=2.4.3.6
Meta.SpecificDockerImage=
Meta.DockerRequired=False
Meta.ContainerPolicy=SupportedOnLinux, RecommendedOnWindows
Meta.ContainerPolicyReason=AMP's console is unable to provide input on Windows for TShock. It is able to do so on Linux, therefore Docker is recommended on Windows.
Meta.ExtraSetupStepsURI=
Meta.Prerequsites=[]
Meta.ExtraContainerPackages=[]
Meta.ConfigReleaseState=NotSpecified
Meta.NoCommercialUsage=False
Meta.ConfigVersion=0.0.0.0
Meta.ReleaseNotes=
Meta.BreakingReleaseNotes=
App.DisplayName=TShock
App.RootDir=./tshock-server/
App.BaseDirectory=./tshock-server/
App.SteamWorkshopDownloadLocation=
App.ExecutableWin=TShock.Server.exe
App.ExecutableLinux=TShock.Server
App.WorkingDir=
App.LinuxCommandLineArgs=
App.WindowsCommandLineArgs=
App.CommandLineArgs={{$PlatformArgs}} -port {{$ServerPort}} -ip {{$ApplicationIPBinding}} -world "Worlds/{{world}}" -worldselectpath "{{$FullBaseDir}}Worlds" -configpath "{{$FullBaseDir}}tshock" -logpath "tshock/logs" {{disableannouncementbox}}{{secure}}{{noupnp}}{{forceupdate}}{{ignoreversion}}{{$FormattedArgs}} {{CustomServerArgs}}
App.UseLinuxIOREDIR=False
App.AppSettings={}
App.EnvironmentVariables={"LD_LIBRARY_PATH":"{{$FullRootDir}}linux64:%LD_LIBRARY_PATH%","SteamAppId":"105600","DOTNET_ROOT":"{{$FullBaseDir}}dotnet"}
App.CommandLineParameterFormat=-{0} "{1}"
App.CommandLineParameterDelimiter=
App.ExitMethod=OS_CLOSE
App.ExitTimeout=30
App.ExitString=exit
App.ExitFile=app_exit.lck
App.HasWriteableConsole=True
App.HasReadableConsole=True
App.SupportsLiveSettingsChanges=False
App.LiveSettingChangeCommandFormat=set {0} "{1}"
App.ApplicationIPBinding=0.0.0.0
App.Ports=[{"Protocol":"TCP","Port":7777,"Ref":"ServerPort","Name":"Server Port","Description":"Port for game traffic"},{"Protocol":"TCP","Port":7878,"Ref":"RESTAPIPort","Name":"Rest API Port","Description":"Port for REST API"}]
App.AdminPortRef=0
App.PrimaryApplicationPortRef=ServerPort
App.UniversalSleepApplicationUDPPortRef=ServerPort
App.UniversalSleepSteamQueryPortRef=0
App.MaxUsers=8
App.UseRandomAdminPassword=False
App.PersistRandomPassword=False
App.RemoteAdminPassword=
App.AdminMethod=STDIO
App.AdminLoginTransform=None
App.LoginTransformPrefix=
App.RCONConnectDelaySeconds=5
App.RCONConnectRetrySeconds=5
App.RCONHeartbeatMinutes=0
App.RCONHeartbeatCommand=ping
App.TelnetLoginFormat={0}
App.UpdateSources=@IncludeJson[tshockupdates.json]
App.PreStartStages=[]
App.Compatibility=None
App.SteamUpdateAnonymousLogin=False
App.SteamForceLoginPrompt=True
App.RapidStartup=False
App.MonitorChildProcess=False
App.DumpFullChildProcessTree=False
App.MonitorChildProcessWaitMs=100
App.MonitorChildProcessName=
App.SupportsUniversalSleep=False
App.WakeupMode=Any
App.ApplicationReadyMode=RegexMatch
App.TemplateMatchRegex={{(\$?[\w]+)}}
Console.FilterMatchRegex=
Console.FilterMatchReplacement=
Console.ThrowawayMessageRegex=^??Error Logging Enabled.$
Console.AppReadyRegex=^Listening on port (\d+)$
Console.UserJoinRegex=^(?<username>.+?) has joined\.$
Console.UserLeaveRegex=^(?<username>.+?) has left\.$
Console.UserChatRegex=^<(?<username>.+?)> (?<message>.+)$
Console.UpdateAvailableRegex=^\[\d\d:\d\d:\d\d\] \[INFO\] A new server update is available! v[\d\.]+.$
Console.MetricsRegex=
Console.SuppressLogAtStart=False
Console.ActivateLogRegex=
Console.UserActions={}
Limits.SleepMode=True
Limits.SleepOnStart=False
Limits.SleepDelayMinutes=5
Limits.DozeDelay=2
Limits.AutoRetryCount=5
Limits.SleepStartThresholdSeconds=25

2363
tshockconfig.json Normal file

File diff suppressed because it is too large Load Diff

20
tshockmetaconfig.json Normal file
View File

@ -0,0 +1,20 @@
[
{
"ConfigFile":"tshock/config.json",
"AutoMap":true,
"ConfigType":"json"
},
{
"ConfigFile":"tshock/motd.txt",
"ConfigType":"kvp",
"ConfigFormat":"{0}{1}",
"Subsections":[
{
"Heading":"$root",
"SettingMappings":{
"":"motd"
}
}
]
}
]

148
tshockserverconfig.json Normal file
View File

@ -0,0 +1,148 @@
{
"Settings": {
"ServerPassword": "",
"ServerPort": 7777,
"MaxSlots": 8,
"ReservedSlots": 20,
"ServerName": "AMP Powered TShock Server",
"UseServerName": false,
"LogPath": "tshock/logs",
"DebugLogs": false,
"DisableLoginBeforeJoin": false,
"IgnoreChestStacksOnLoad": false,
"WorldTileProvider": "default",
"AutoSave": true,
"AnnounceSave": true,
"ShowBackupAutosaveMessages": true,
"BackupInterval": 10,
"BackupKeepFor": 240,
"SaveWorldOnCrash": true,
"SaveWorldOnLastPlayerExit": false,
"InvasionMultiplier": 1,
"DefaultMaximumSpawns": 5,
"DefaultSpawnRate": 600,
"InfiniteInvasion": false,
"PvPMode": "normal",
"SpawnProtection": true,
"SpawnProtectionRadius": 10,
"RangeChecks": true,
"HardcoreOnly": false,
"MediumcoreOnly": false,
"SoftcoreOnly": false,
"DisableBuild": false,
"DisableHardmode": false,
"DisableDungeonGuardian": false,
"DisableClownBombs": false,
"DisableSnowBalls": false,
"DisableTombstones": true,
"DisablePrimeBombs": false,
"ForceTime": "normal",
"DisableInvisPvP": false,
"MaxRangeForDisabled": 10,
"RegionProtectChests": false,
"RegionProtectGemLocks": true,
"IgnoreProjUpdate": false,
"IgnoreProjKill": false,
"AllowCutTilesAndBreakables": false,
"AllowIce": false,
"AllowCrimsonCreep": true,
"AllowCorruptionCreep": true,
"AllowHallowCreep": true,
"StatueSpawn200": 3,
"StatueSpawn600": 6,
"StatueSpawnWorld": 10,
"PreventBannedItemSpawn": false,
"PreventDeadModification": true,
"PreventInvalidPlaceStyle": true,
"ForceXmas": false,
"ForceHalloween": false,
"AllowAllowedGroupsToSpawnBannedItems": false,
"RespawnSeconds": 0,
"RespawnBossSeconds": 0,
"AnonymousBossInvasions": true,
"MaxHP": 500,
"MaxMP": 200,
"BombExplosionRadius": 5,
"GiveItemsDirectly": false,
"DefaultRegistrationGroupName": "default",
"DefaultGuestGroupName": "guest",
"RememberLeavePos": false,
"MaximumLoginAttempts": 3,
"KickOnMediumcoreDeath": false,
"MediumcoreKickReason": "Death results in a kick.",
"BanOnMediumcoreDeath": false,
"MediumcoreBanReason": "Death results in a ban.",
"DisableDefaultIPBan": false,
"EnableWhitelist": false,
"WhitelistKickReason": "You are not on the whitelist.",
"ServerFullReason": "Server is full.",
"ServerFullNoReservedReason": "Server is full. No reserved slots open.",
"KickOnHardcoreDeath": false,
"HardcoreKickReason": "Death results in a kick.",
"BanOnHardcoreDeath": false,
"HardcoreBanReason": "Death results in a ban.",
"KickProxyUsers": true,
"RequireLogin": false,
"AllowLoginAnyUsername": true,
"AllowRegisterAnyUsername": false,
"MinimumPasswordLength": 4,
"BCryptWorkFactor": 7,
"DisableUUIDLogin": false,
"KickEmptyUUID": false,
"TilePaintThreshold": 15,
"KickOnTilePaintThresholdBroken": false,
"MaxDamage": 1175,
"MaxProjDamage": 1175,
"KickOnDamageThresholdBroken": false,
"TileKillThreshold": 60,
"KickOnTileKillThresholdBroken": false,
"TilePlaceThreshold": 32,
"KickOnTilePlaceThresholdBroken": false,
"TileLiquidThreshold": 50,
"KickOnTileLiquidThresholdBroken": false,
"ProjIgnoreShrapnel": true,
"ProjectileThreshold": 50,
"KickOnProjectileThresholdBroken": false,
"HealOtherThreshold": 50,
"KickOnHealOtherThresholdBroken": false,
"SuppressPermissionFailureNotices": false,
"DisableModifiedZenith": false,
"DisableCustomDeathMessages": true,
"CommandSpecifier": "/",
"CommandSilentSpecifier": ".",
"DisableSpewLogs": true,
"DisableSecondUpdateLogs": false,
"SuperAdminChatRGB": [
255,
255,
255
],
"SuperAdminChatPrefix": "(Super Admin) ",
"SuperAdminChatSuffix": "",
"EnableGeoIP": false,
"DisplayIPToAdmins": false,
"ChatFormat": "{1}{2}{3}: {4}",
"ChatAboveHeadsFormat": "{2}",
"EnableChatAboveHeads": false,
"BroadcastRGB": [
127,
255,
212
],
"StorageType": "sqlite",
"SqliteDBPath": "tshock.sqlite",
"MySqlHost": "localhost:3306",
"MySqlDbName": "",
"MySqlUsername": "",
"MySqlPassword": "",
"UseSqlLogs": false,
"RevertToTextLogsOnSqlFailures": 10,
"RestApiEnabled": false,
"RestApiPort": 7878,
"LogRest": false,
"EnableTokenEndpointAuthentication": false,
"RESTMaximumRequestsPerInterval": 5,
"RESTRequestBucketDecreaseIntervalMinutes": 1,
"ApplicationRestTokens": {}
}
}

119
tshockupdates.json Normal file
View File

@ -0,0 +1,119 @@
[
{
"UpdateStageName":"TShock Server Download",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"FetchURLFromJQ",
"UpdateSourceData":"https://api.github.com/repos/Pryaxis/TShock/releases/latest",
"UpdateSourceArgs":"$.assets[3].browser_download_url",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UnzipUpdateSource":true,
"OverwriteExistingFiles":true,
"DeleteAfterExtract":true
},
{
"UpdateStageName":"TShock Server Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURLFromJQ",
"UpdateSourceData":"https://api.github.com/repos/Pryaxis/TShock/releases/latest",
"UpdateSourceArgs":"$.assets[1].browser_download_url",
"UpdateSourceArch":"x86_64",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UnzipUpdateSource":true,
"OverwriteExistingFiles":true,
"DeleteAfterExtract":true
},
{
"UpdateStageName":"TShock Server Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURLFromJQ",
"UpdateSourceData":"https://api.github.com/repos/Pryaxis/TShock/releases/latest",
"UpdateSourceArgs":"$.assets[0].browser_download_url",
"UpdateSourceArch":"aarch64",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UnzipUpdateSource":true,
"OverwriteExistingFiles":true,
"DeleteAfterExtract":true
},
{
"UpdateStageName":"TShock Server Unpack",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArch":"x86_64",
"UpdateSourceArgs":"-c 'cd {{$FullBaseDir}} && tar -xf TShock-Beta-linux-x64-Release.tar && rm -f TShock-Beta-linux-x64-Release.tar && chmod +x TShock.Server'"
},
{
"UpdateStageName":"TShock Server Unpack",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"Executable",
"UpdateSourceData":"/bin/bash",
"UpdateSourceArch":"aarch64",
"UpdateSourceArgs":"-c 'cd {{$FullBaseDir}} && tar -xf TShock-Beta-linux-arm64-Release.tar && rm -f TShock-Beta-linux-arm64-Release.tar && chmod +x TShock.Server'"
},
{
"UpdateStageName":"Create TShock Directory",
"UpdateSourcePlatform":"All",
"UpdateSource":"CreateDirectory",
"UpdateSourceArgs":"{{$FullBaseDir}}tshock"
},
{
"UpdateStageName":"Server Config File Download",
"UpdateSourcePlatform":"All",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/tshockserverconfig.json",
"UpdateSourceArgs":"config.json",
"UpdateSourceTarget":"{{$FullBaseDir}}tshock",
"OverwriteExistingFiles":false
},
{
"UpdateStageName":"Create Dotnet Directory",
"UpdateSourcePlatform":"All",
"UpdateSource":"CreateDirectory",
"UpdateSourceArgs":"{{$FullBaseDir}}dotnet"
},
{
"UpdateStageName":"ASP.NET Core Runtime Download",
"UpdateSourcePlatform":"Windows",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/{{DotnetVersion}}/aspnetcore-runtime-{{DotnetVersion}}-win-x64.zip",
"UpdateSourceTarget":"{{$FullBaseDir}}dotnet",
"UnzipUpdateSource":true,
"OverwriteExistingFiles":true,
"DeleteAfterExtract":true
},
{
"UpdateStageName":"ASP.NET Core Runtime Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/{{DotnetVersion}}/aspnetcore-runtime-{{DotnetVersion}}-linux-x64.tar.gz",
"UpdateSourceArch":"x86_64",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UpdateSourceTarget":"{{$FullBaseDir}}dotnet",
"UnzipUpdateSource":true,
"OverwriteExistingFiles":true,
"DeleteAfterExtract":true
},
{
"UpdateStageName":"ASP.NET Core Runtime Download",
"UpdateSourcePlatform":"Linux",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/{{DotnetVersion}}/aspnetcore-runtime-{{DotnetVersion}}-linux-arm64.tar.gz",
"UpdateSourceArch":"aarch64",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UpdateSourceTarget":"{{$FullBaseDir}}dotnet",
"UnzipUpdateSource":true,
"OverwriteExistingFiles":true,
"DeleteAfterExtract":true
},
{
"UpdateStageName":"Backup Exclusions Download 1",
"UpdateSourcePlatform":"All",
"UpdateSource":"FetchURL",
"UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/exclusions/.backupExclusionsTShock",
"UpdateSourceArgs":".backupExclude",
"UpdateSourceTarget":"{{$FullBaseDir}}",
"UpdateSourceConditionSetting":"backupExclude",
"UpdateSourceConditionValue":"true",
"OverwriteExistingFiles":false
}
]