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] 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" } ]