From e35e1483500d0b66eab4ca16f30eee000b051a8e Mon Sep 17 00:00:00 2001 From: James Manker Date: Tue, 15 Feb 2022 21:17:03 -0600 Subject: [PATCH 1/2] Added fix for connection timeout error Set the ConfigFormat to use quotes around all settings. I believe this was causing games with spaces in the name to be non-joinable. The strange part is you could set it back to having a space and it would work going forward. Also set the ExitMethod to String and quit. The user must type yes following since there is no option to do two input commands to quit a server. CtrlC doesn't work in AMP on Windows for this game. And CtrlC doesn't work for this game on the Linux Terminal. OS_CLOSE ended in a kill. Removed the config file and used the start/wait/stop update stages instead. --- CraftopiaTemplate.ini | 88 ---------------------------------------- craftopia.kvp | 12 +++--- craftopiaconfig.json | 5 ++- craftopiametaconfig.json | 3 +- 4 files changed, 11 insertions(+), 97 deletions(-) delete mode 100644 CraftopiaTemplate.ini diff --git a/CraftopiaTemplate.ini b/CraftopiaTemplate.ini deleted file mode 100644 index 2573c22..0000000 --- a/CraftopiaTemplate.ini +++ /dev/null @@ -1,88 +0,0 @@ - -; Game World Data Setting - name, difficulty, gameMode -; name : world name -; difficulty : 0- Easy, 1- Normal(default), 2- Hard, 3- VeryHard -; gameMode : 1- NormalWorld(default), 2- CreativeWorld_Build, 3- CreativeWorld_Play - -; Server Setting - isUseSteamLobby, port -; isUseSteamLobby : using steam account to host the server(1- True(not supported) / 0- False) -; port : used when not using steam lobby function -; maxPlayerNumber : maximum number of player can join into the server(1 ~ 127) -; usePassword : using server password(1- True / 0- False) -; serverPassword : setting server password up to 8 digit number pin - -; Graphics Setting - vSyncCount, maxFPS, grassBend, clothSimOption -; vSyncCount : vertical sync, 0- disable, 1- once per frame 2- per two frame -; maxFPS : max frames per second, set to -1 for unlimited fps -; grassBend : enable Grass Bend(1- True / 0- False) -; ClothSimOption : cloth simulation, 1- animate everybody's, 2- animate nobody's - -; Save Setting - autoSaveSec, autoSavePerHour -; autoSaveSec : autoSavePer ** second, to disable, set to -1 -; autoSavePerHour : enable autoSavePerHour(1- True / 0- False) -; savePath : relative path base on ServerSetting.ini folder or absolute path - -; Creative Mode Setting - -; quickCraft : crafting without checking item cost(1- True / 0- False) -; ageLevel : age Level of the game world, effect crafting recipe -; islandLevel : island level override, effect monster and dungeon level, set to -1 to disable override -; noDeath : player character would not dead(1- True / 0- False) -; noDamage : player character would not take damage(1- True / 0- False) -; noHunger : player character would not be hungry(1- True / 0- False) -; infinitStamina : player character has infinit stamina(1- True / 0- False) -; forceDayTime : game world day time override, 0 to 24, set to -1 to disable -; buildingIgnoreDamage : building would not take damage(1- True / 0- False) -; noBuild : player can not place new building(1- True / 0- False) - -; Creative Mode Player Status Override - apply at gameStart -; Level : override character level, set to 0 to disable -; Health : override character health, set to 0 to disable -; Mana : override character mana, set to 0 to disable -; Stamina : override character stamia, set to 0 to disable -; Money : override character money -; SkillPoint : override character skill point -; EnchantPoint : override character enchant point - -[GameWorld] -name=NoName -difficulty=1 -gameMode=1 - -[Host] -isUseSteamLobby=0 -port=6587 -maxPlayerNumber=7 -usePassword=0 -serverPassword=00000000 - -[Graphics] -vSyncCount=0 -maxFPS=60 -grassBend=0 -clothSimOption=2 - -[Save] -autoSaveSec=300 -autoSavePerHour=1 -savePath=DedicatedServerSave/ - -[CreativeModeSetting] -quickCraft=1 -ageLevel=7 -islandLevel=-1 -noDeath=1 -noDamage=1 -noHunger=1 -infinitStamina=1 -forceDayTime=-1 -buildingIgnoreDamage=0 -noBuild=0 - -[CreativeModePlStatus] -Level=0 -Health=0 -Mana=0 -Stamina=0 -Money=1000 -SkillPoint=0 -EnchantPoint=0 diff --git a/craftopia.kvp b/craftopia.kvp index 4f3d3f6..19ec1ce 100644 --- a/craftopia.kvp +++ b/craftopia.kvp @@ -1,11 +1,11 @@ Meta.DisplayName=Craftopia -Meta.Description= +Meta.Description=Craftopia Dedicated Server Meta.OS=Windows, Linux Meta.Arch=x86_64 Meta.Author=Andy Boatman, IceOfWraith Meta.URL=https://store.steampowered.com/app/1307550/Craftopia/ Meta.DisplayImageSource=steam:1307550 -Meta.EndpointURIFormat=steam://connect/{0} +Meta.EndpointURIFormat= Meta.ConfigManifest=craftopiaconfig.json Meta.MetaConfigManifest=craftopiametaconfig.json Meta.ConfigRoot=craftopia.kvp @@ -26,8 +26,8 @@ App.AppSettings={} App.EnvironmentVariables={"LD_LIBRARY_PATH":"./linux64:%LD_LIBRARY_PATH%","SteamAppId":"1670340"} App.CommandLineParameterFormat=-{0} "{1}" App.CommandLineParameterDelimiter= -App.ExitMethod=OS_CLOSE -App.ExitTimeout=30 +App.ExitMethod=String +App.ExitTimeout=120 App.ExitString=quit App.ExitFile=app_exit.lck App.HasWriteableConsole=True @@ -45,7 +45,7 @@ App.RemoteAdminPassword=Password123 App.AdminMethod=STDIO App.RCONConnectDelaySeconds=5 App.RCONConnectRetrySeconds=5 -App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":31,"UpdateSource":4,"UpdateSourceData":"1670340","UpdateSourceArgs":null,"UpdateSourceVersion":null,"UpdateSourceTarget":null,"UnzipUpdateSource":false,"OverwriteExistingFiles":false,"ForceDownloadPlatform":0,"UpdateSourceConditionSetting":null,"UpdateSourceConditionValue":null},{"UpdateStageName": "Base Config Download","UpdateSourcePlatform": "All", "UpdateSource": "FetchURL", "UpdateSourceData": "https://github.com/CubeCoders/AMPTemplates/raw/main/CraftopiaTemplate.ini","UpdateSourceTarget":"1670340/ServerSetting.ini"}] +App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1670340"},{"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 @@ -67,7 +67,7 @@ Console.UpdateAvailableRegex=^\[\d\d:\d\d:\d\d\] \[INFO\] A new server update is Console.SuppressLogAtStart=False Console.ActivateLogRegex= Console.UserActions={} -Limits.SleepMode=True +Limits.SleepMode=False Limits.SleepOnStart=False Limits.SleepDelayMinutes=5 Limits.DozeDelay=2 diff --git a/craftopiaconfig.json b/craftopiaconfig.json index f9ab5c4..b4c6351 100644 --- a/craftopiaconfig.json +++ b/craftopiaconfig.json @@ -53,12 +53,13 @@ "Category": "Server Settings", "Keywords": "port", "FieldName": "$ApplicationPort1", - "InputType": "hidden", + "InputType": "number", "IsFlagArgument": false, "ParamFieldName": "Host.port", "IncludeInCommandLine": true, "DefaultValue": "6587", - "EnumValues": {} + "EnumValues": {}, + "Hidden": true }, { "DisplayName": "Max Players", diff --git a/craftopiametaconfig.json b/craftopiametaconfig.json index b0a71dc..c8388c3 100644 --- a/craftopiametaconfig.json +++ b/craftopiametaconfig.json @@ -1,6 +1,7 @@ [ { "ConfigFile": "ServerSetting.ini", - "AutoMap": true + "AutoMap": true, + "ConfigFormat": "{0}=\"{1}\"" } ] From ed5a8f38c77768e9e765d99db678bfae206446b6 Mon Sep 17 00:00:00 2001 From: James Manker Date: Tue, 15 Feb 2022 21:55:14 -0600 Subject: [PATCH 2/2] ConfigFormat changes not needed I believe that this game's dedicated server is the cause of the timeout issue. It is still in an early beta stage at this point. I have tried to recreate the problem and no matter what, I cannot now. After the first initial connection to any server it works from then on. The ini file is intended to not have quotes in this case given the examples at the top. There are other settings I've put in the GUI but do not seem to function in the server yet, things like "No Food", "No Death", etc. have no impact. You will die and you will be angry. Please contact the develop to have them fix their game. --- craftopiametaconfig.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/craftopiametaconfig.json b/craftopiametaconfig.json index c8388c3..b0a71dc 100644 --- a/craftopiametaconfig.json +++ b/craftopiametaconfig.json @@ -1,7 +1,6 @@ [ { "ConfigFile": "ServerSetting.ini", - "AutoMap": true, - "ConfigFormat": "{0}=\"{1}\"" + "AutoMap": true } ]