From 8d41fe1e4e2c2a4e2e7366a16ae3507eeaa647dd Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 24 Jan 2022 19:03:36 +1100 Subject: [PATCH 01/12] Initial commit --- unturned.kvp | 72 ++++++++++++++++++ unturnedconfig.json | 164 ++++++++++++++++++++++++++++++++++++++++ unturnedconfigfile.dat | 11 +++ unturnedmetaconfig.json | 8 ++ 4 files changed, 255 insertions(+) create mode 100644 unturned.kvp create mode 100644 unturnedconfig.json create mode 100644 unturnedconfigfile.dat create mode 100644 unturnedmetaconfig.json diff --git a/unturned.kvp b/unturned.kvp new file mode 100644 index 0000000..de9ddfe --- /dev/null +++ b/unturned.kvp @@ -0,0 +1,72 @@ +Meta.DisplayName=Unturned +Meta.Description=Unturned 3 Dedicated Server +Meta.OS=Windows, Linux +Meta.Author=Greelan +Meta.URL=https://smartlydressedgames.com/#unturned +Meta.DisplayImageSource=url:https://cdn.cloudflare.steamstatic.com/steam/apps/304930/library_hero.jpg?t=1613683705 +Meta.EndpointURIFormat=steam://connect/{ip}/{GenericModule.App.ApplicationPort1} +Meta.ConfigManifest=unturnedconfig.json +Meta.MetaConfigManifest=unturnedmetaconfig.json +Meta.ConfigRoot=unturned.kvp +Meta.MinAMPVersion=2.3.2.0 +Meta.SpecificDockerImage= +Meta.Prerequsites=[] +App.DisplayName=Unturned +App.RootDir=./U3DS/ +App.BaseDirectory=./U3DS/1110390/ +App.ExecutableWin=1110390\Unturned.exe +App.ExecutableLinux=1110390/Unturned_Headless.x86_64 +App.WorkingDir=1110390 +App.LinuxCommandLineArgs= +App.WindowsCommandLineArgs= +App.CommandLineArgs={{$PlatformArgs}} -batchmode -nographics +{{ServerType}}/UnturnedServer {{$FormattedArgs}} +App.AppSettings={} +App.EnvironmentVariables={"LD_LIBRARY_PATH":"./linux64:%LD_LIBRARY_PATH%:./Unturned_Headless_Data/Plugins/x86_64/","SteamAppId":"304930"} +App.CommandLineParameterFormat=-{0}/{1} +App.CommandLineParameterDelimiter= +App.ExitMethod=String +App.ExitTimeout=30 +App.ExitString=/shutdown +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.ApplicationPort1=27015 +App.ApplicationPort2=27016 +App.ApplicationPort3=0 +App.RemoteAdminPort=27017 +App.MaxUsers=10 +App.UseRandomAdminPassword=False +App.RemoteAdminPassword=Password123 +App.AdminMethod=TelnetRCON +App.RCONConnectDelaySeconds=5 +App.RCONConnectRetrySeconds=5 +App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1110390"},{"UpdateStageName":"Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/Greelan/AMPTemplates/unturned/unturnedconfigfile.dat","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Config File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Servers/UnturnedServer/Server/Commands.dat","UpdateSourceArgs":"./unturnedconfigfile.dat","OverwriteExistingFiles":false},{"UpdateStageName":"Rocket Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Modules/Rocket.Unturned"},{"UpdateStageName":"First Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/English.dat","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/English.dat","OverwriteExistingFiles":true},{"UpdateStageName":"Second Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.API.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.API.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Third Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Core.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Core.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fourth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fifth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.module","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.module","OverwriteExistingFiles":true},{"UpdateStageName":"Steam Directory Creation","UpdateSourcePlatform":"Linux","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64"},{"UpdateStageName":"Steamclient Copy","UpdateSourcePlatform":"Linux","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64/steamclient.so","UpdateSourceArgs":"./U3DS/1110390/linux64/steamclient.so","OverwriteExistingFiles":true}] +App.Compatibility=None +App.SteamUpdateAnonymousLogin=True +App.SteamForceLoginPrompt=False +App.RapidStartup=False +App.SupportsUniversalSleep=False +App.UniversalSleepApplicationUDPPort=27015 +App.UniversalSleepSteamQueryPort=27016 +App.WakeupMode=Any +App.ApplicationReadyMode=RegexMatch +App.TemplateMatchRegex={{(\$?[\w]+)}} +Console.FilterMatchRegex= +Console.FilterMatchReplacement= +Console.ThrowawayMessageRegex=^(WARNING|ERROR): Shader.+$ +Console.AppReadyRegex=^Loading level: 100%$ +Console.UserJoinRegex=^Connecting: PlayerID: (?.+?) Name: (?.+?) Character: (?.+?)$ +Console.UserLeaveRegex=^Disconnecting: PlayerID: (?.+?) Name: (?.+?) Character: (?.+?)$ +Console.UserChatRegex=^\[(?:World|Area|Group)\] (?.+?) \[(?.+?)\]: "(?.+)"$ +Console.UpdateAvailableRegex=^\[\d\d:\d\d:\d\d\] \[INFO\] A new server update is available! v[\d\.]+.$ +Console.SuppressLogAtStart=False +Console.ActivateLogRegex= +Console.UserActions={} +Limits.SleepMode=True +Limits.SleepOnStart=False +Limits.SleepDelayMinutes=5 +Limits.DozeDelay=2 +Limits.AutoRetryCount=5 \ No newline at end of file diff --git a/unturnedconfig.json b/unturnedconfig.json new file mode 100644 index 0000000..07f4632 --- /dev/null +++ b/unturnedconfig.json @@ -0,0 +1,164 @@ +[ + { + "DisplayName": "Server Port (REQUIRED)", + "Category": "Server Settings", + "Description": "Must match Application Port 1 from ADS Edit Port menu", + "Keywords": "server port", + "FieldName": "Port", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Port", + "IncludeInCommandLine": false, + "DefaultValue": "0" + }, + { + "DisplayName": "Server Type", + "Category": "Server Settings", + "Description": "", + "Keywords": "server,type,internet,lan", + "FieldName": "ServerType", + "InputType": "enum", + "IsFlagArgument": false, + "ParamFieldName": "", + "IncludeInCommandLine": false, + "DefaultValue": "InternetServer", + "EnumValues": { + "InternetServer": "Internet Server", + "LanServer": "LAN Server" + } + }, + { + "DisplayName": "Server Password", + "Category": "Server Settings", + "Description": "Password to connect to the server. Change this after installing the server", + "Keywords": "password", + "FieldName": "Password", + "InputType": "password", + "IsFlagArgument": false, + "ParamFieldName": "Password", + "IncludeInCommandLine": false, + "DefaultValue": "Password123" + }, + { + "DisplayName": "Owner", + "Category": "Server Settings", + "Description": "[Steam64 ID](https://steamidfinder.com/) of the server's owner, which gives them administrator commands and fully sets up the server", + "Keywords": "owner", + "FieldName": "Owner", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "Owner", + "IncludeInCommandLine": false, + "DefaultValue": "" + }, + { + "DisplayName": "Welcome Message", + "Category": "Server Settings", + "Description": "Player welcome message", + "Keywords": "welcome,message", + "FieldName": "Welcome", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "Welcome", + "IncludeInCommandLine": false, + "DefaultValue": "Welcome to Unturned. Hosted using AMP by CubeCoders" + }, + { + "DisplayName": "Player Limit", + "Category": "Server Settings", + "Description": "Maximum number of players that may connect to the server", + "Keywords": "players,limit", + "FieldName": "$MaxUsers", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Maxplayers", + "IncludeInCommandLine": false, + "DefaultValue": "10" + }, + { + "DisplayName": "Map", + "Category": "Server Settings", + "Description": "Sets the map", + "Keywords": "map", + "FieldName": "Map", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "Map", + "IncludeInCommandLine": false, + "DefaultValue": "PEI" + }, + { + "DisplayName": "Difficulty Mode", + "Category": "Server Settings", + "Description": "Sets the difficulty mode", + "Keywords": "difficulty,mode", + "FieldName": "Mode", + "InputType": "enum", + "IsFlagArgument": false, + "ParamFieldName": "Mode", + "IncludeInCommandLine": false, + "DefaultValue": "Normal", + "EnumValues": { + "Easy": "Easy", + "Normal": "Normal", + "Hard": "Hard" + } + }, + { + "DisplayName": "Perspective View", + "Category": "Server Settings", + "Description": "Sets the perspective view", + "Keywords": "perspective,view", + "FieldName": "Perspective", + "InputType": "enum", + "IsFlagArgument": false, + "ParamFieldName": "Perspective", + "IncludeInCommandLine": false, + "DefaultValue": "Both", + "EnumValues": { + "First": "First person only", + "Third": "Third person only", + "Vehicle": "Third person in vehicle only", + "Both": "First and third person allowed" + } + }, + { + "DisplayName": "Day/Night Cycle Period", + "Category": "Server Settings", + "Description": "Sets the day/night cycle period", + "Keywords": "day,night,cycle", + "FieldName": "Cycle", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Cycle", + "IncludeInCommandLine": false, + "DefaultValue": "43200", + "suffix": "seconds" + }, + { + "DisplayName": "Chat Rate", + "Category": "Server Settings", + "Description": "Sets the minimum time between chat messages in order to prevent spam", + "Keywords": "chatrate", + "FieldName": "Chatrate", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Chatrate", + "IncludeInCommandLine": false, + "DefaultValue": "0", + "suffix": "seconds" + }, + { + "DisplayName": "Timeout", + "Category": "Server Settings", + "Description": "Sets the maximum ping for players before they time out (400 - 600 ms recommended)", + "Keywords": "timeout", + "FieldName": "Timeout", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Timeout", + "IncludeInCommandLine": false, + "DefaultValue": "500", + "suffix": "milliseconds" + } +] \ No newline at end of file diff --git a/unturnedconfigfile.dat b/unturnedconfigfile.dat new file mode 100644 index 0000000..4adc002 --- /dev/null +++ b/unturnedconfigfile.dat @@ -0,0 +1,11 @@ +Port 0 +Password Password123 +Owner +Welcome Welcome to Unturned. Hosted using AMP by CubeCoders +Maxplayers 15 +Map PEI +Mode Easy +Perspective Both +Cycle 43200 +Chatrate 0 +Timeout 500 \ No newline at end of file diff --git a/unturnedmetaconfig.json b/unturnedmetaconfig.json new file mode 100644 index 0000000..fd139a5 --- /dev/null +++ b/unturnedmetaconfig.json @@ -0,0 +1,8 @@ +[ + { + "ConfigFile": "Servers/UnturnedServer/Server/Commands.dat", + "AutoMap": true, + "ConfigType": "kvp", + "ConfigFormat": "{0} {1}" + } +] \ No newline at end of file From 7bf9bfbdcc2919fad5e5a3f541392bfd52931a7b Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 24 Jan 2022 19:08:12 +1100 Subject: [PATCH 02/12] Update meta regex --- unturnedmetaconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unturnedmetaconfig.json b/unturnedmetaconfig.json index fd139a5..bf51dfb 100644 --- a/unturnedmetaconfig.json +++ b/unturnedmetaconfig.json @@ -3,6 +3,6 @@ "ConfigFile": "Servers/UnturnedServer/Server/Commands.dat", "AutoMap": true, "ConfigType": "kvp", - "ConfigFormat": "{0} {1}" + "ConfigFormatRegex": "^(?.+?) (?.*?)$" } ] \ No newline at end of file From 1d80d25cf81cfa18cf5ac05bced5c3a0c1ed1cfc Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 24 Jan 2022 19:42:18 +1100 Subject: [PATCH 03/12] Update config file defaults --- unturnedconfigfile.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unturnedconfigfile.dat b/unturnedconfigfile.dat index 4adc002..be27a0b 100644 --- a/unturnedconfigfile.dat +++ b/unturnedconfigfile.dat @@ -2,9 +2,9 @@ Port 0 Password Password123 Owner Welcome Welcome to Unturned. Hosted using AMP by CubeCoders -Maxplayers 15 +Maxplayers 10 Map PEI -Mode Easy +Mode Normal Perspective Both Cycle 43200 Chatrate 0 From 8ef25325fa07a6111f3e8aea8aaa616f911e150a Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 24 Jan 2022 21:54:38 +1100 Subject: [PATCH 04/12] Fix meta config --- unturnedmetaconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unturnedmetaconfig.json b/unturnedmetaconfig.json index bf51dfb..43b02be 100644 --- a/unturnedmetaconfig.json +++ b/unturnedmetaconfig.json @@ -3,6 +3,7 @@ "ConfigFile": "Servers/UnturnedServer/Server/Commands.dat", "AutoMap": true, "ConfigType": "kvp", + "ConfigFormat": "{0} {1}", "ConfigFormatRegex": "^(?.+?) (?.*?)$" } -] \ No newline at end of file +] From ee303f28275fe2064c5b3c55cb53c3ba200100e6 Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 24 Jan 2022 21:59:58 +1100 Subject: [PATCH 05/12] Fix formatting --- unturnedmetaconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unturnedmetaconfig.json b/unturnedmetaconfig.json index 43b02be..8746bdd 100644 --- a/unturnedmetaconfig.json +++ b/unturnedmetaconfig.json @@ -3,7 +3,7 @@ "ConfigFile": "Servers/UnturnedServer/Server/Commands.dat", "AutoMap": true, "ConfigType": "kvp", - "ConfigFormat": "{0} {1}", + "ConfigFormat": "{0} {1}", "ConfigFormatRegex": "^(?.+?) (?.*?)$" } ] From 06dcafb6ac7f645a2ec5e52bcdea84ba115b26fa Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 24 Jan 2022 22:00:43 +1100 Subject: [PATCH 06/12] Take 2 --- unturnedmetaconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unturnedmetaconfig.json b/unturnedmetaconfig.json index 8746bdd..2d9522c 100644 --- a/unturnedmetaconfig.json +++ b/unturnedmetaconfig.json @@ -1,9 +1,9 @@ [ - { + { "ConfigFile": "Servers/UnturnedServer/Server/Commands.dat", "AutoMap": true, "ConfigType": "kvp", - "ConfigFormat": "{0} {1}", + "ConfigFormat": "{0} {1}", "ConfigFormatRegex": "^(?.+?) (?.*?)$" } ] From 16a21eb73695783ea3b5438325ec925ab5dd4c0b Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Thu, 27 Jan 2022 15:34:07 +1100 Subject: [PATCH 07/12] Various updates - Server name now changeable - Additional settings added to UI and default config - RCON enabled after installation --- unturned.kvp | 6 +-- unturnedconfig.json | 99 +++++++++++++++++++++++++++++++++++++---- unturnedconfigfile.dat | 6 ++- unturnedmetaconfig.json | 7 ++- 4 files changed, 103 insertions(+), 15 deletions(-) diff --git a/unturned.kvp b/unturned.kvp index de9ddfe..ad425f5 100644 --- a/unturned.kvp +++ b/unturned.kvp @@ -19,14 +19,14 @@ App.ExecutableLinux=1110390/Unturned_Headless.x86_64 App.WorkingDir=1110390 App.LinuxCommandLineArgs= App.WindowsCommandLineArgs= -App.CommandLineArgs={{$PlatformArgs}} -batchmode -nographics +{{ServerType}}/UnturnedServer {{$FormattedArgs}} +App.CommandLineArgs={{$PlatformArgs}} -batchmode -nographics +{{ServerType}}/{{ServerName}} {{$FormattedArgs}} App.AppSettings={} App.EnvironmentVariables={"LD_LIBRARY_PATH":"./linux64:%LD_LIBRARY_PATH%:./Unturned_Headless_Data/Plugins/x86_64/","SteamAppId":"304930"} App.CommandLineParameterFormat=-{0}/{1} App.CommandLineParameterDelimiter= App.ExitMethod=String App.ExitTimeout=30 -App.ExitString=/shutdown +App.ExitString=shutdown App.ExitFile=app_exit.lck App.HasWriteableConsole=True App.HasReadableConsole=True @@ -43,7 +43,7 @@ App.RemoteAdminPassword=Password123 App.AdminMethod=TelnetRCON App.RCONConnectDelaySeconds=5 App.RCONConnectRetrySeconds=5 -App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1110390"},{"UpdateStageName":"Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/Greelan/AMPTemplates/unturned/unturnedconfigfile.dat","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Config File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Servers/UnturnedServer/Server/Commands.dat","UpdateSourceArgs":"./unturnedconfigfile.dat","OverwriteExistingFiles":false},{"UpdateStageName":"Rocket Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Modules/Rocket.Unturned"},{"UpdateStageName":"First Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/English.dat","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/English.dat","OverwriteExistingFiles":true},{"UpdateStageName":"Second Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.API.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.API.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Third Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Core.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Core.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fourth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fifth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.module","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.module","OverwriteExistingFiles":true},{"UpdateStageName":"Steam Directory Creation","UpdateSourcePlatform":"Linux","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64"},{"UpdateStageName":"Steamclient Copy","UpdateSourcePlatform":"Linux","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64/steamclient.so","UpdateSourceArgs":"./U3DS/1110390/linux64/steamclient.so","OverwriteExistingFiles":true}] +App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1110390"},{"UpdateStageName":"Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/Greelan/AMPTemplates/unturned/unturnedconfigfile.dat","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Config Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Servers/{{ServerName}}/Server"},{"UpdateStageName":"Config File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Servers/{{ServerName}}/Server/Commands.dat","UpdateSourceArgs":"./unturnedconfigfile.dat","OverwriteExistingFiles":false},{"UpdateStageName":"Rocket Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Modules/Rocket.Unturned"},{"UpdateStageName":"First Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/English.dat","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/English.dat","OverwriteExistingFiles":true},{"UpdateStageName":"Second Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.API.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.API.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Third Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Core.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Core.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fourth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fifth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.module","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.module","OverwriteExistingFiles":true},{"UpdateStageName":"Steam Directory Creation","UpdateSourcePlatform":"Linux","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64"},{"UpdateStageName":"Steamclient Copy","UpdateSourcePlatform":"Linux","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64/steamclient.so","UpdateSourceArgs":"./U3DS/1110390/linux64/steamclient.so","OverwriteExistingFiles":true}] App.Compatibility=None App.SteamUpdateAnonymousLogin=True App.SteamForceLoginPrompt=False diff --git a/unturnedconfig.json b/unturnedconfig.json index 07f4632..5362972 100644 --- a/unturnedconfig.json +++ b/unturnedconfig.json @@ -1,15 +1,54 @@ [ { - "DisplayName": "Server Port (REQUIRED)", + "DisplayName": "Server Port", "Category": "Server Settings", - "Description": "Must match Application Port 1 from ADS Edit Port menu", - "Keywords": "server port", - "FieldName": "Port", + "Description": "", + "Keywords": "", + "FieldName": "$ApplicationPort1", "InputType": "number", "IsFlagArgument": false, + "Hidden": true, "ParamFieldName": "Port", "IncludeInCommandLine": false, - "DefaultValue": "0" + "DefaultValue": "27015" + }, + { + "DisplayName": "Enable RCON", + "Category": "Server Settings", + "Description": "", + "Keywords": "", + "FieldName": "RCONEnabled", + "InputType": "number", + "IsFlagArgument": false, + "Hidden": true, + "ParamFieldName": "/RocketSettings/RCON/@Enabled", + "IncludeInCommandLine": false, + "DefaultValue": "true" + }, + { + "DisplayName": "RCON Port", + "Category": "Server Settings", + "Description": "", + "Keywords": "", + "FieldName": "$RemoteAdminPort", + "InputType": "number", + "IsFlagArgument": false, + "Hidden": true, + "ParamFieldName": "/RocketSettings/RCON/@Port", + "IncludeInCommandLine": false, + "DefaultValue": "27017" + }, + { + "DisplayName": "Server Name", + "Category": "Server Settings", + "Description": "WARNING: You MUST do first-time server setup (update the server and start and stop it once) after changing the name for correct configuration", + "Keywords": "name", + "FieldName": "ServerName", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "", + "IncludeInCommandLine": false, + "DefaultValue": "UnturnedServer" }, { "DisplayName": "Server Type", @@ -39,6 +78,18 @@ "IncludeInCommandLine": false, "DefaultValue": "Password123" }, + { + "DisplayName": "RCON Password", + "Category": "Server Settings", + "Description": "Password to connect to RCON. Change this after installing the server", + "Keywords": "RCON,password", + "FieldName": "$RemoteAdminPassword", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "/RocketSettings/RCON/@Password", + "IncludeInCommandLine": false, + "DefaultValue": "Password123" + }, { "DisplayName": "Owner", "Category": "Server Settings", @@ -51,6 +102,18 @@ "IncludeInCommandLine": false, "DefaultValue": "" }, + { + "DisplayName": "GSLT", + "Category": "Server Settings", + "Description": "Sets the [Game Server Login Token](https://steamcommunity.com/dev/managegameservers) for the server. Required for the server to appear in the server list. Use Steam App ID 304930", + "Keywords": "GSLT,token", + "FieldName": "GSLT", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "GSLT", + "IncludeInCommandLine": false, + "DefaultValue": "" + }, { "DisplayName": "Welcome Message", "Category": "Server Settings", @@ -73,7 +136,8 @@ "IsFlagArgument": false, "ParamFieldName": "Maxplayers", "IncludeInCommandLine": false, - "DefaultValue": "10" + "DefaultValue": "10", + "suffix": "players" }, { "DisplayName": "Map", @@ -118,8 +182,25 @@ "EnumValues": { "First": "First person only", "Third": "Third person only", - "Vehicle": "Third person in vehicle only", - "Both": "First and third person allowed" + "Both": "First and third person allowed", + "Vehicle": "Third person in vehicle only" + } + }, + { + "DisplayName": "Weather", + "Category": "Server Settings", + "Description": "Sets the weather", + "Keywords": "weather", + "FieldName": "Weather", + "InputType": "enum", + "IsFlagArgument": false, + "ParamFieldName": "Weather", + "IncludeInCommandLine": false, + "DefaultValue": "None", + "EnumValues": { + "None": "None", + "Storm": "Storm", + "Blizzard": "Blizzard" } }, { @@ -132,7 +213,7 @@ "IsFlagArgument": false, "ParamFieldName": "Cycle", "IncludeInCommandLine": false, - "DefaultValue": "43200", + "DefaultValue": "3600", "suffix": "seconds" }, { diff --git a/unturnedconfigfile.dat b/unturnedconfigfile.dat index be27a0b..72a7810 100644 --- a/unturnedconfigfile.dat +++ b/unturnedconfigfile.dat @@ -1,11 +1,13 @@ -Port 0 +Port 27015 Password Password123 Owner +GSLT Welcome Welcome to Unturned. Hosted using AMP by CubeCoders Maxplayers 10 Map PEI Mode Normal Perspective Both -Cycle 43200 +Weather None +Cycle 3600 Chatrate 0 Timeout 500 \ No newline at end of file diff --git a/unturnedmetaconfig.json b/unturnedmetaconfig.json index 2d9522c..c2e6582 100644 --- a/unturnedmetaconfig.json +++ b/unturnedmetaconfig.json @@ -1,9 +1,14 @@ [ { - "ConfigFile": "Servers/UnturnedServer/Server/Commands.dat", + "ConfigFile": "Servers/{{ServerName}}/Server/Commands.dat", "AutoMap": true, "ConfigType": "kvp", "ConfigFormat": "{0} {1}", "ConfigFormatRegex": "^(?.+?) (?.*?)$" + }, + { + "ConfigFile": "Servers/{{ServerName}}/Rocket/Rocket.config.xml", + "AutoMap": true, + "ConfigType": "xml" } ] From 80ef91861b0005ab36776daaad2b9d8c30b89ed5 Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 24 Jan 2022 19:03:36 +1100 Subject: [PATCH 08/12] Full commit --- unturned.kvp | 72 +++++++++ unturnedconfig.json | 283 ++++++++++++++++++++++++++++++++++++ unturnedconfigfile.dat | 13 ++ unturnedmetaconfig.json | 20 +++ unturnedworkshopconfig.json | 11 ++ 5 files changed, 399 insertions(+) create mode 100644 unturned.kvp create mode 100644 unturnedconfig.json create mode 100644 unturnedconfigfile.dat create mode 100644 unturnedmetaconfig.json create mode 100644 unturnedworkshopconfig.json diff --git a/unturned.kvp b/unturned.kvp new file mode 100644 index 0000000..a996a8f --- /dev/null +++ b/unturned.kvp @@ -0,0 +1,72 @@ +Meta.DisplayName=Unturned +Meta.Description=Unturned 3 Dedicated Server +Meta.OS=Windows, Linux +Meta.Author=Greelan +Meta.URL=https://smartlydressedgames.com/#unturned +Meta.DisplayImageSource=url:https://cdn.cloudflare.steamstatic.com/steam/apps/304930/library_hero.jpg?t=1613683705 +Meta.EndpointURIFormat=steam://connect/{ip}/{GenericModule.App.ApplicationPort1} +Meta.ConfigManifest=unturnedconfig.json +Meta.MetaConfigManifest=unturnedmetaconfig.json +Meta.ConfigRoot=unturned.kvp +Meta.MinAMPVersion=2.3.2.0 +Meta.SpecificDockerImage= +Meta.Prerequsites=[] +App.DisplayName=Unturned +App.RootDir=./U3DS/ +App.BaseDirectory=./U3DS/1110390/ +App.ExecutableWin=1110390\Unturned.exe +App.ExecutableLinux=1110390/Unturned_Headless.x86_64 +App.WorkingDir=1110390 +App.LinuxCommandLineArgs= +App.WindowsCommandLineArgs= +App.CommandLineArgs={{$PlatformArgs}} -batchmode -nographics +{{ServerType}}/{{ServerName}} {{$FormattedArgs}} +App.AppSettings={} +App.EnvironmentVariables={"LD_LIBRARY_PATH":"./linux64:%LD_LIBRARY_PATH%:./Unturned_Headless_Data/Plugins/x86_64/","SteamAppId":"304930"} +App.CommandLineParameterFormat=-{0}/{1} +App.CommandLineParameterDelimiter= +App.ExitMethod=String +App.ExitTimeout=30 +App.ExitString=shutdown +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.ApplicationPort1=27015 +App.ApplicationPort2=27016 +App.ApplicationPort3=0 +App.RemoteAdminPort=27017 +App.MaxUsers=10 +App.UseRandomAdminPassword=False +App.RemoteAdminPassword=Password123 +App.AdminMethod=TelnetRCON +App.RCONConnectDelaySeconds=5 +App.RCONConnectRetrySeconds=5 +App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1110390"},{"UpdateStageName":"Main Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/unturnedconfigfile.dat","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Workshop Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/unturnedworkshopconfig.json","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Config Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Servers/{{ServerName}}/Server"},{"UpdateStageName":"Config File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Servers/{{ServerName}}/Server/Commands.dat","UpdateSourceArgs":"./unturnedconfigfile.dat","OverwriteExistingFiles":false},{"UpdateStageName":"Rocket Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Modules/Rocket.Unturned"},{"UpdateStageName":"First Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/English.dat","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/English.dat","OverwriteExistingFiles":true},{"UpdateStageName":"Second Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.API.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.API.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Third Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Core.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Core.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fourth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fifth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.module","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.module","OverwriteExistingFiles":true},{"UpdateStageName":"Steam Directory Creation","UpdateSourcePlatform":"Linux","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64"},{"UpdateStageName":"Steamclient Copy","UpdateSourcePlatform":"Linux","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64/steamclient.so","UpdateSourceArgs":"./U3DS/1110390/linux64/steamclient.so","OverwriteExistingFiles":true}] +App.Compatibility=None +App.SteamUpdateAnonymousLogin=True +App.SteamForceLoginPrompt=False +App.RapidStartup=False +App.SupportsUniversalSleep=False +App.UniversalSleepApplicationUDPPort=27015 +App.UniversalSleepSteamQueryPort=27016 +App.WakeupMode=Any +App.ApplicationReadyMode=RegexMatch +App.TemplateMatchRegex={{(\$?[\w]+)}} +Console.FilterMatchRegex= +Console.FilterMatchReplacement= +Console.ThrowawayMessageRegex=^(WARNING|ERROR): Shader.+$ +Console.AppReadyRegex=^Loading level: 100%$ +Console.UserJoinRegex=^Connecting: PlayerID: (?.+?) Name: (?.+?) Character: (?.+?)$ +Console.UserLeaveRegex=^Disconnecting: PlayerID: (?.+?) Name: (?.+?) Character: (?.+?)$ +Console.UserChatRegex=^\[(?:World|Area|Group)\] (?.+?) \[(?.+?)\]: "(?.+)"$ +Console.UpdateAvailableRegex=^\[\d\d:\d\d:\d\d\] \[INFO\] A new server update is available! v[\d\.]+.$ +Console.SuppressLogAtStart=False +Console.ActivateLogRegex= +Console.UserActions={} +Limits.SleepMode=True +Limits.SleepOnStart=False +Limits.SleepDelayMinutes=5 +Limits.DozeDelay=2 +Limits.AutoRetryCount=5 \ No newline at end of file diff --git a/unturnedconfig.json b/unturnedconfig.json new file mode 100644 index 0000000..32ba672 --- /dev/null +++ b/unturnedconfig.json @@ -0,0 +1,283 @@ +[ + { + "DisplayName": "Server Port", + "Category": "Server Settings", + "Description": "", + "Keywords": "", + "FieldName": "$ApplicationPort1", + "InputType": "number", + "IsFlagArgument": false, + "Hidden": true, + "ParamFieldName": "Port", + "IncludeInCommandLine": false, + "DefaultValue": "27015" + }, + { + "DisplayName": "Enable RCON", + "Category": "Server Settings", + "Description": "", + "Keywords": "", + "FieldName": "RCONEnabled", + "InputType": "number", + "IsFlagArgument": false, + "Hidden": true, + "ParamFieldName": "/RocketSettings/RCON/@Enabled", + "IncludeInCommandLine": false, + "DefaultValue": "true" + }, + { + "DisplayName": "RCON Port", + "Category": "Server Settings", + "Description": "", + "Keywords": "", + "FieldName": "$RemoteAdminPort", + "InputType": "number", + "IsFlagArgument": false, + "Hidden": true, + "ParamFieldName": "/RocketSettings/RCON/@Port", + "IncludeInCommandLine": false, + "DefaultValue": "27017" + }, + { + "DisplayName": "Server Name", + "Category": "Server Settings", + "Description": "WARNING: You MUST do first-time server setup (update the server and start and stop it once) after changing the name for correct configuration", + "Keywords": "name", + "FieldName": "ServerName", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "", + "IncludeInCommandLine": false, + "DefaultValue": "UnturnedServer" + }, + { + "DisplayName": "Server Type", + "Category": "Server Settings", + "Description": "", + "Keywords": "server,type,internet,lan", + "FieldName": "ServerType", + "InputType": "enum", + "IsFlagArgument": false, + "ParamFieldName": "", + "IncludeInCommandLine": false, + "DefaultValue": "InternetServer", + "EnumValues": { + "InternetServer": "Internet Server", + "LanServer": "LAN Server" + } + }, + { + "DisplayName": "Server Password", + "Category": "Server Settings", + "Description": "Password to connect to the server. Change this after installing the server", + "Keywords": "password", + "FieldName": "Password", + "InputType": "password", + "IsFlagArgument": false, + "ParamFieldName": "Password", + "IncludeInCommandLine": false, + "DefaultValue": "Password123" + }, + { + "DisplayName": "RCON Password", + "Category": "Server Settings", + "Description": "Password to connect to RCON. Change this after installing the server", + "Keywords": "RCON,password", + "FieldName": "$RemoteAdminPassword", + "InputType": "password", + "IsFlagArgument": false, + "ParamFieldName": "/RocketSettings/RCON/@Password", + "IncludeInCommandLine": false, + "DefaultValue": "Password123" + }, + { + "DisplayName": "Owner", + "Category": "Server Settings", + "Description": "[Steam64 ID](https://steamidfinder.com/) of the server's owner, which gives them administrator commands and fully sets up the server", + "Keywords": "owner", + "FieldName": "Owner", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "Owner", + "IncludeInCommandLine": false, + "DefaultValue": "" + }, + { + "DisplayName": "GSLT", + "Category": "Server Settings", + "Description": "Sets the [Game Server Login Token](https://steamcommunity.com/dev/managegameservers) for the server. Required for the server to appear in the server list. Use Steam App ID 304930", + "Keywords": "GSLT,token", + "FieldName": "GSLT", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "GSLT", + "IncludeInCommandLine": false, + "DefaultValue": "" + }, + { + "DisplayName": "Welcome Message", + "Category": "Server Settings", + "Description": "Player welcome message", + "Keywords": "welcome,message", + "FieldName": "Welcome", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "Welcome", + "IncludeInCommandLine": false, + "DefaultValue": "Welcome to Unturned. Hosted using AMP by CubeCoders" + }, + { + "DisplayName": "Player Limit", + "Category": "Server Settings", + "Description": "Maximum number of players that may connect to the server", + "Keywords": "players,limit", + "FieldName": "$MaxUsers", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Maxplayers", + "IncludeInCommandLine": false, + "DefaultValue": "10", + "suffix": "players" + }, + { + "DisplayName": "Map", + "Category": "Server Settings", + "Description": "Sets the map", + "Keywords": "map", + "FieldName": "Map", + "InputType": "text", + "IsFlagArgument": false, + "ParamFieldName": "Map", + "IncludeInCommandLine": false, + "DefaultValue": "PEI" + }, + { + "DisplayName": "Difficulty Mode", + "Category": "Server Settings", + "Description": "Sets the difficulty mode", + "Keywords": "difficulty,mode", + "FieldName": "Mode", + "InputType": "enum", + "IsFlagArgument": false, + "ParamFieldName": "Mode", + "IncludeInCommandLine": false, + "DefaultValue": "Normal", + "EnumValues": { + "Easy": "Easy", + "Normal": "Normal", + "Hard": "Hard" + } + }, + { + "DisplayName": "Perspective View", + "Category": "Server Settings", + "Description": "Sets the perspective view", + "Keywords": "perspective,view", + "FieldName": "Perspective", + "InputType": "enum", + "IsFlagArgument": false, + "ParamFieldName": "Perspective", + "IncludeInCommandLine": false, + "DefaultValue": "Both", + "EnumValues": { + "First": "First person only", + "Third": "Third person only", + "Both": "First and third person allowed", + "Vehicle": "Third person in vehicle only" + } + }, + { + "DisplayName": "Weather", + "Category": "Server Settings", + "Description": "Sets the weather", + "Keywords": "weather", + "FieldName": "Weather", + "InputType": "enum", + "IsFlagArgument": false, + "ParamFieldName": "Weather", + "IncludeInCommandLine": false, + "DefaultValue": "None", + "EnumValues": { + "None": "None", + "Storm": "Storm", + "Blizzard": "Blizzard" + } + }, + { + "DisplayName": "Day/Night Cycle Period", + "Category": "Server Settings", + "Description": "Sets the day/night cycle period", + "Keywords": "day,night,cycle", + "FieldName": "Cycle", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Cycle", + "IncludeInCommandLine": false, + "DefaultValue": "3600", + "suffix": "seconds" + }, + { + "DisplayName": "Chat Rate", + "Category": "Server Settings", + "Description": "Sets the minimum time between chat messages in order to prevent spam", + "Keywords": "chatrate", + "FieldName": "Chatrate", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Chatrate", + "IncludeInCommandLine": false, + "DefaultValue": "0", + "suffix": "seconds" + }, + { + "DisplayName": "Timeout", + "Category": "Server Settings", + "Description": "Sets the maximum ping for players before they time out (400 - 600 ms recommended)", + "Keywords": "timeout", + "FieldName": "Timeout", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "Timeout", + "IncludeInCommandLine": false, + "DefaultValue": "500", + "suffix": "milliseconds" + }, + { + "DisplayName":"Workshop Items", + "Category":"Server Settings", + "Description":"Comma separated list of IDs of workshop items to install on the server", + "Keywords":"workshop,items", + "FieldName":"FileIDs", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"FileIDs", + "IncludeInCommandLine":false, + "DefaultValue":"", + "placeholder":"2478247379,2566953935" + }, + { + "DisplayName":"Excluded Workshop Items", + "Category":"Server Settings", + "Description":"Comma separated list of IDs of children items to ignore when installing workshop items", + "Keywords":"workshop,children,items", + "FieldName":"ChildrenFileIDs", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"ChildrenFileIDs", + "IncludeInCommandLine":false, + "DefaultValue":"", + "placeholder":"5685656858,7697679654" + }, + { + "DisplayName": "Maximum Workshop Retries", + "Category": "Server Settings", + "Description": "Sets the maximum number of retries to download workshop items", + "Keywords": "retries", + "FieldName": "MaxRetries", + "InputType": "number", + "IsFlagArgument": false, + "ParamFieldName": "MaxRetries", + "IncludeInCommandLine": false, + "DefaultValue": "2" + } +] \ No newline at end of file diff --git a/unturnedconfigfile.dat b/unturnedconfigfile.dat new file mode 100644 index 0000000..72a7810 --- /dev/null +++ b/unturnedconfigfile.dat @@ -0,0 +1,13 @@ +Port 27015 +Password Password123 +Owner +GSLT +Welcome Welcome to Unturned. Hosted using AMP by CubeCoders +Maxplayers 10 +Map PEI +Mode Normal +Perspective Both +Weather None +Cycle 3600 +Chatrate 0 +Timeout 500 \ No newline at end of file diff --git a/unturnedmetaconfig.json b/unturnedmetaconfig.json new file mode 100644 index 0000000..c7e7f04 --- /dev/null +++ b/unturnedmetaconfig.json @@ -0,0 +1,20 @@ +[ + { + "ConfigFile": "Servers/{{ServerName}}/Server/Commands.dat", + "AutoMap": true, + "ConfigType": "kvp", + "ConfigFormat": "{0} {1}", + "ConfigFormatRegex": "^(?.+?) (?.*?)$" + }, + { + "ConfigFile": "Servers/{{ServerName}}/WorkshopDownloadConfig.json", + "AutoMap": true, + "ConfigType": "template", + "ConfigFileTemplate": "unturnedworkshopconfig.json" + }, + { + "ConfigFile": "Servers/{{ServerName}}/Rocket/Rocket.config.xml", + "AutoMap": true, + "ConfigType": "xml" + } +] diff --git a/unturnedworkshopconfig.json b/unturnedworkshopconfig.json new file mode 100644 index 0000000..6ba7a13 --- /dev/null +++ b/unturnedworkshopconfig.json @@ -0,0 +1,11 @@ +{ + "File_IDs": [{{FileIDs}}], + "Ignore_Children_File_IDs": [{{ChildrenFileIDs}}], + "Query_Cache_Max_Age_Seconds": 600, + "Max_Query_Retries": {{MaxRetries}}, + "Use_Cached_Downloads": true, + "Should_Monitor_Updates": true, + "Shutdown_Update_Detected_Timer": 600, + "Shutdown_Update_Detected_Message": "Workshop file update detected, shutdown in: {0}", + "Shutdown_Kick_Message": "Shutdown for Workshop file update." +} \ No newline at end of file From 99cd87d113fe74402b23c308281ff52035d9976b Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 31 Jan 2022 11:37:07 +1100 Subject: [PATCH 09/12] Use RandomPassword input type --- unturnedconfig.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unturnedconfig.json b/unturnedconfig.json index 32ba672..ca17dc1 100644 --- a/unturnedconfig.json +++ b/unturnedconfig.json @@ -72,7 +72,7 @@ "Description": "Password to connect to the server. Change this after installing the server", "Keywords": "password", "FieldName": "Password", - "InputType": "password", + "InputType": "RandomPassword", "IsFlagArgument": false, "ParamFieldName": "Password", "IncludeInCommandLine": false, @@ -84,9 +84,9 @@ "Description": "Password to connect to RCON. Change this after installing the server", "Keywords": "RCON,password", "FieldName": "$RemoteAdminPassword", - "InputType": "password", + "InputType": "RandomPassword", "IsFlagArgument": false, - "ParamFieldName": "/RocketSettings/RCON/@Password", + "ParamFieldName": "/RocketSettings/RCON/@", "IncludeInCommandLine": false, "DefaultValue": "Password123" }, @@ -280,4 +280,4 @@ "IncludeInCommandLine": false, "DefaultValue": "2" } -] \ No newline at end of file +] From ec12de9c4484056943ce7a1cbbcb9e6da0e1d49d Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 31 Jan 2022 11:46:39 +1100 Subject: [PATCH 10/12] Fix accidental deletion in previous --- unturnedconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unturnedconfig.json b/unturnedconfig.json index ca17dc1..bf8c3ca 100644 --- a/unturnedconfig.json +++ b/unturnedconfig.json @@ -86,7 +86,7 @@ "FieldName": "$RemoteAdminPassword", "InputType": "RandomPassword", "IsFlagArgument": false, - "ParamFieldName": "/RocketSettings/RCON/@", + "ParamFieldName": "/RocketSettings/RCON/@Password", "IncludeInCommandLine": false, "DefaultValue": "Password123" }, From aa35ddfc165c7b7013d8213149659626dea6b431 Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Wed, 2 Feb 2022 00:21:14 +1100 Subject: [PATCH 11/12] Various updates - Use OS_CLOSE for saner shutdown (on Linux at least) - Add start/wait/stop update stages - Shorten exit timeout (for Windows) - Other tweaks (RCON port, command line args, manifest) --- unturned.kvp | 12 ++++++------ unturnedconfig.json | 20 ++++++++++---------- unturnedconfigfile.dat | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/unturned.kvp b/unturned.kvp index 70fcbf4..692c809 100644 --- a/unturned.kvp +++ b/unturned.kvp @@ -19,13 +19,13 @@ App.ExecutableLinux=1110390/Unturned_Headless.x86_64 App.WorkingDir=1110390 App.LinuxCommandLineArgs= App.WindowsCommandLineArgs= -App.CommandLineArgs={{$PlatformArgs}} -batchmode -nographics +{{ServerType}}/{{ServerName}} {{$FormattedArgs}} +App.CommandLineArgs={{$PlatformArgs}} -batchmode -nographics {{$FormattedArgs}} +{{ServerType}}/{{ServerName}} App.AppSettings={} App.EnvironmentVariables={"LD_LIBRARY_PATH":"./linux64:%LD_LIBRARY_PATH%:./Unturned_Headless_Data/Plugins/x86_64/","SteamAppId":"304930"} -App.CommandLineParameterFormat=-{0}/{1} +App.CommandLineParameterFormat=-{0}={1} App.CommandLineParameterDelimiter= -App.ExitMethod=String -App.ExitTimeout=30 +App.ExitMethod=OS_CLOSE +App.ExitTimeout=10 App.ExitString=shutdown App.ExitFile=app_exit.lck App.HasWriteableConsole=True @@ -36,14 +36,14 @@ App.ApplicationIPBinding=0.0.0.0 App.ApplicationPort1=27015 App.ApplicationPort2=27016 App.ApplicationPort3=0 -App.RemoteAdminPort=27017 +App.RemoteAdminPort=27115 App.MaxUsers=10 App.UseRandomAdminPassword=False App.RemoteAdminPassword=Password123 App.AdminMethod=TelnetRCON App.RCONConnectDelaySeconds=5 App.RCONConnectRetrySeconds=5 -App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1110390"},{"UpdateStageName":"Main Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/unturnedconfigfile.dat","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Workshop Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/unturnedworkshopconfig.json","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Config Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Servers/{{ServerName}}/Server"},{"UpdateStageName":"Config File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Servers/{{ServerName}}/Server/Commands.dat","UpdateSourceArgs":"./unturnedconfigfile.dat","OverwriteExistingFiles":false},{"UpdateStageName":"Rocket Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Modules/Rocket.Unturned"},{"UpdateStageName":"First Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/English.dat","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/English.dat","OverwriteExistingFiles":true},{"UpdateStageName":"Second Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.API.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.API.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Third Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Core.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Core.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fourth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fifth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.module","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.module","OverwriteExistingFiles":true},{"UpdateStageName":"Steam Directory Creation","UpdateSourcePlatform":"Linux","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64"},{"UpdateStageName":"Steamclient Copy","UpdateSourcePlatform":"Linux","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64/steamclient.so","UpdateSourceArgs":"./U3DS/1110390/linux64/steamclient.so","OverwriteExistingFiles":true}] +App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1110390"},{"UpdateStageName":"Main Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/unturnedconfigfile.dat","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Workshop Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://raw.githubusercontent.com/CubeCoders/AMPTemplates/main/unturnedworkshopconfig.json","UpdateSourceTarget":"../","OverwriteExistingFiles":true},{"UpdateStageName":"Config Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Servers/{{ServerName}}/Server"},{"UpdateStageName":"Config File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Servers/{{ServerName}}/Server/Commands.dat","UpdateSourceArgs":"./unturnedconfigfile.dat","OverwriteExistingFiles":false},{"UpdateStageName":"Rocket Directory Creation","UpdateSourcePlatform":"All","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Modules/Rocket.Unturned"},{"UpdateStageName":"First Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/English.dat","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/English.dat","OverwriteExistingFiles":true},{"UpdateStageName":"Second Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.API.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.API.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Third Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Core.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Core.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fourth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.dll","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.dll","OverwriteExistingFiles":true},{"UpdateStageName":"Fifth Rocket File Copy","UpdateSourcePlatform":"All","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Modules/Rocket.Unturned/Rocket.Unturned.module","UpdateSourceArgs":"./U3DS/1110390/Extras/Rocket.Unturned/Rocket.Unturned.module","OverwriteExistingFiles":true},{"UpdateStageName":"Steam Directory Creation","UpdateSourcePlatform":"Linux","UpdateSource":"CreateDirectory","UpdateSourceArgs":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64"},{"UpdateStageName":"Steamclient Copy","UpdateSourcePlatform":"Linux","UpdateSource":"CopyFilePath","UpdateSourceData":"./U3DS/1110390/Unturned_Headless_Data/Plugins/x86_64/steamclient.so","UpdateSourceArgs":"./U3DS/1110390/linux64/steamclient.so","OverwriteExistingFiles":true},{"UpdateStageName":"Start Server","UpdateSourcePlatform":"All","UpdateSource":"StartApplication"},{"UpdateStageName":"Wait For Server Start","UpdateSourcePlatform":"All","UpdateSource":"WaitForStartupComplete"},{"UpdateStageName":"Stop Server","UpdateSourcePlatform":"All","UpdateSource":"ShutdownApplication"}] App.Compatibility=None App.SteamUpdateAnonymousLogin=True App.SteamForceLoginPrompt=False diff --git a/unturnedconfig.json b/unturnedconfig.json index bf8c3ca..059dc1d 100644 --- a/unturnedconfig.json +++ b/unturnedconfig.json @@ -36,12 +36,12 @@ "Hidden": true, "ParamFieldName": "/RocketSettings/RCON/@Port", "IncludeInCommandLine": false, - "DefaultValue": "27017" + "DefaultValue": "27115" }, { "DisplayName": "Server Name", "Category": "Server Settings", - "Description": "WARNING: You MUST do first-time server setup (update the server and start and stop it once) after changing the name for correct configuration", + "Description": "WARNING: You MUST run an update of the server after changing the name for correct configuration", "Keywords": "name", "FieldName": "ServerName", "InputType": "text", @@ -69,14 +69,14 @@ { "DisplayName": "Server Password", "Category": "Server Settings", - "Description": "Password to connect to the server. Change this after installing the server", + "Description": "Password to connect to the server. Default is no password", "Keywords": "password", "FieldName": "Password", "InputType": "RandomPassword", "IsFlagArgument": false, "ParamFieldName": "Password", "IncludeInCommandLine": false, - "DefaultValue": "Password123" + "DefaultValue": "" }, { "DisplayName": "RCON Password", @@ -137,7 +137,7 @@ "ParamFieldName": "Maxplayers", "IncludeInCommandLine": false, "DefaultValue": "10", - "suffix": "players" + "Suffix": "players" }, { "DisplayName": "Map", @@ -214,7 +214,7 @@ "ParamFieldName": "Cycle", "IncludeInCommandLine": false, "DefaultValue": "3600", - "suffix": "seconds" + "Suffix": "seconds" }, { "DisplayName": "Chat Rate", @@ -227,7 +227,7 @@ "ParamFieldName": "Chatrate", "IncludeInCommandLine": false, "DefaultValue": "0", - "suffix": "seconds" + "Suffix": "seconds" }, { "DisplayName": "Timeout", @@ -240,7 +240,7 @@ "ParamFieldName": "Timeout", "IncludeInCommandLine": false, "DefaultValue": "500", - "suffix": "milliseconds" + "Suffix": "milliseconds" }, { "DisplayName":"Workshop Items", @@ -253,7 +253,7 @@ "ParamFieldName":"FileIDs", "IncludeInCommandLine":false, "DefaultValue":"", - "placeholder":"2478247379,2566953935" + "Placeholder":"2478247379,2566953935" }, { "DisplayName":"Excluded Workshop Items", @@ -266,7 +266,7 @@ "ParamFieldName":"ChildrenFileIDs", "IncludeInCommandLine":false, "DefaultValue":"", - "placeholder":"5685656858,7697679654" + "Placeholder":"5685656858,7697679654" }, { "DisplayName": "Maximum Workshop Retries", diff --git a/unturnedconfigfile.dat b/unturnedconfigfile.dat index 72a7810..6e851dd 100644 --- a/unturnedconfigfile.dat +++ b/unturnedconfigfile.dat @@ -1,5 +1,5 @@ Port 27015 -Password Password123 +Password Owner GSLT Welcome Welcome to Unturned. Hosted using AMP by CubeCoders From 6f64abcdf7ca5edd6b0077a628a5e08904c9a548 Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Tue, 8 Feb 2022 11:59:58 +1100 Subject: [PATCH 12/12] Update ExitMethod --- unturned.kvp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unturned.kvp b/unturned.kvp index 692c809..d1e01b9 100644 --- a/unturned.kvp +++ b/unturned.kvp @@ -24,8 +24,8 @@ App.AppSettings={} App.EnvironmentVariables={"LD_LIBRARY_PATH":"./linux64:%LD_LIBRARY_PATH%:./Unturned_Headless_Data/Plugins/x86_64/","SteamAppId":"304930"} App.CommandLineParameterFormat=-{0}={1} App.CommandLineParameterDelimiter= -App.ExitMethod=OS_CLOSE -App.ExitTimeout=10 +App.ExitMethod=String +App.ExitTimeout=15 App.ExitString=shutdown App.ExitFile=app_exit.lck App.HasWriteableConsole=True