From 6c1d9df968a6c23eb1a81d1a762e8ee4ee9d7917 Mon Sep 17 00:00:00 2001 From: IceOfWraith <96364530+IceOfWraith@users.noreply.github.com> Date: Fri, 28 Apr 2023 23:47:19 -0500 Subject: [PATCH] Add American Truck Simulator (#332) * Add American Truck Simulator The game requires additional setup which are linked in the ExtraSetupStepsURI. Linux only or Docker on Windows as there are issues running as NETWORK SERVICE in Windows. After this is fully reviewed, I'll convert it to work for Euro Truck Simulator 2 as well. * Update american-truck-simulator.kvp * Requested changes + moderators * Update american-truck-simulatorupdates.json --- american-truck-simulator.kvp | 98 +++++++ american-truck-simulator.sii | 33 +++ american-truck-simulatorconfig.json | 340 ++++++++++++++++++++++++ american-truck-simulatormetaconfig.json | 8 + american-truck-simulatorports.json | 16 ++ american-truck-simulatorupdates.json | 24 ++ 6 files changed, 519 insertions(+) create mode 100644 american-truck-simulator.kvp create mode 100644 american-truck-simulator.sii create mode 100644 american-truck-simulatorconfig.json create mode 100644 american-truck-simulatormetaconfig.json create mode 100644 american-truck-simulatorports.json create mode 100644 american-truck-simulatorupdates.json diff --git a/american-truck-simulator.kvp b/american-truck-simulator.kvp new file mode 100644 index 0000000..b81fd24 --- /dev/null +++ b/american-truck-simulator.kvp @@ -0,0 +1,98 @@ +Meta.DisplayName=American Truck Simulator +Meta.Description=American Truck Simulator Dedicated Server +Meta.OS=Windows, Linux +Meta.AarchSupport=NotSupported +Meta.Arch=x86_64 +Meta.Author=IceOfWraith +Meta.URL=https://store.steampowered.com/app/270880/American_Truck_Simulator/ +Meta.DisplayImageSource=steam:270880 +Meta.EndpointURIFormat=steam://connect/{ip}:{GenericModule.App.Ports.$SteamQueryPort} +Meta.ConfigManifest=american-truck-simulatorconfig.json +Meta.MetaConfigManifest=american-truck-simulatormetaconfig.json +Meta.ConfigRoot=american-truck-simulator.kvp +Meta.MinAMPVersion=2.4.3.0 +Meta.SpecificDockerImage= +Meta.DockerRequired=False +Meta.ContainerPolicy=SupportedOnLinux, RequiredOnWindows +Meta.ContainerPolicyReason=The game server does not run properly as NETWORK SERVICE, so it must be run within Docker on Windows. +Meta.ExtraSetupStepsURI=https://discourse.cubecoders.com/docs?topic=3790?utm_source=ampcreate&utm_content=ats-ets2 +Meta.Prerequsites=[] +Meta.ExtraContainerPackages=[] +Meta.ConfigReleaseState=NotSpecified +Meta.NoCommercialUsage=False +App.DisplayName=American Truck Simulator +App.RootDir=./american-truck-simulator/ +App.BaseDirectory=./american-truck-simulator/2239530/ +App.SteamWorkshopDownloadLocation= +App.ExecutableWin= +App.ExecutableLinux=2239530/bin/linux_x64/amtrucks_server +App.WorkingDir=2239530 +App.LinuxCommandLineArgs= +App.WindowsCommandLineArgs= +App.CommandLineArgs={{$PlatformArgs}} -nosingle {{$FormattedArgs}} +App.UseLinuxIOREDIR=False +App.AppSettings={} +App.EnvironmentVariables={"LD_LIBRARY_PATH":"{{$FullBaseDir}}linux64:{{$FullRootDir}}linux64:%LD_LIBRARY_PATH%","SteamAppId":"270880","XDG_DATA_HOME":"{{$FullBaseDir}}"} +App.CommandLineParameterFormat=-{0} "{1}" +App.CommandLineParameterDelimiter= +App.ExitMethod=OS_CLOSE +App.ExitTimeout=30 +App.ExitString=stop +App.ExitFile=app_exit.lck +App.HasWriteableConsole=False +App.HasReadableConsole=True +App.SupportsLiveSettingsChanges=False +App.LiveSettingChangeCommandFormat=set {0} "{1}" +App.ApplicationIPBinding=0.0.0.0 +App.Ports=@IncludeJson[american-truck-simulatorports.json] +App.AdminPortRef=0 +App.PrimaryApplicationPortRef=MainServerPort +App.UniversalSleepApplicationUDPPortRef=MainServerPort +App.UniversalSleepSteamQueryPortRef=QueryDedicatedPort +App.MaxUsers=8 +App.UseRandomAdminPassword=True +App.PersistRandomPassword=False +App.RemoteAdminPassword= +App.AdminMethod=STDIO +App.AdminLoginTransform=None +App.LoginTransformPrefix= +App.RCONConnectDelaySeconds=30 +App.RCONConnectRetrySeconds=15 +App.RCONHeartbeatMinutes=0 +App.RCONHeartbeatCommand=ping +App.TelnetLoginFormat={0} +App.UpdateSources=@IncludeJson[american-truck-simulatorupdates.json] +App.PreStartStages=[] +App.Compatibility=None +App.SteamUpdateAnonymousLogin=True +App.SteamForceLoginPrompt=False +App.RapidStartup=False +App.MonitorChildProcess=False +App.DumpFullChildProcessTree=False +App.MonitorChildProcessWaitMs=1000 +App.MonitorChildProcessName= +App.SupportsUniversalSleep=False +App.WakeupMode=Any +App.ApplicationReadyMode=Immediate +App.AttemptedExtIPFetch=True +App.IPFetchLimiter=System.Threading.SemaphoreSlim +App.LastFailedIPFetch=null +App.TemplateMatchRegex={{(\$?[\w]+)}} +Console.FilterMatchRegex= +Console.FilterMatchReplacement= +Console.ThrowawayMessageRegex=(WARNING|ERROR): Shader.+ +Console.AppReadyRegex=^$ +Console.UserJoinRegex=^$ +Console.UserLeaveRegex=^$ +Console.UserChatRegex=^$ +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 diff --git a/american-truck-simulator.sii b/american-truck-simulator.sii new file mode 100644 index 0000000..b1e64cb --- /dev/null +++ b/american-truck-simulator.sii @@ -0,0 +1,33 @@ +SiiNunit +{ +server_config : _nameless.3a6.40c0 { + lobby_name: "{{lobby_name}}" + description: "{{description}}" + welcome_message: "{{welcome_message}}" + password: "{{password}}" + max_players: {{max_players}} + max_vehicles_total: {{max_vehicles_total}} + max_ai_vehicles_player: {{max_ai_vehicles_player}} + max_ai_vehicles_player_spawn: {{max_ai_vehicles_player_spawn}} + connection_virtual_port: 100 + query_virtual_port: 101 + connection_dedicated_port: {{connection_dedicated_port}} + query_dedicated_port: {{query_dedicated_port}} + server_logon_token: "{{server_logon_token}}" + player_damage: {{player_damage}} + traffic: {{traffic}} + hide_in_company: {{hide_in_company}} + hide_colliding: {{hide_colliding}} + force_speed_limiter: {{force_speed_limiter}} + mods_optioning: {{mods_optioning}} + timezones: {{timezones}} + service_no_collision: {{service_no_collision}} + in_menu_ghosting: {{in_menu_ghosting}} + name_tags: {{name_tags}} + friends_only: false + show_server: true + moderator_list: {{moderator_list1}} + {{moderator_list2}} +} + +} diff --git a/american-truck-simulatorconfig.json b/american-truck-simulatorconfig.json new file mode 100644 index 0000000..0d8c513 --- /dev/null +++ b/american-truck-simulatorconfig.json @@ -0,0 +1,340 @@ +[ + { + "DisplayName":"Lobby Name", + "Category":"ATS - Server Settings", + "Description":"Session name, limited to 63", + "Keywords":"lobby,name", + "FieldName":"lobby_name", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"lobby_name", + "IncludeInCommandLine":false, + "DefaultValue":"American Truck Simulator Server - Powered by AMP", + "Placeholder":"American Truck Simulator Server - Powered by AMP", + "EnumValues":{} + }, + { + "DisplayName":"Description", + "Category":"ATS - Server Settings", + "Description":"Session description, limited to 63 characters.", + "Keywords":"lobby,description", + "FieldName":"description", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"description", + "IncludeInCommandLine":false, + "DefaultValue":"", + "EnumValues":{} + }, + { + "DisplayName":"Welcome Message", + "Category":"ATS - Server Settings", + "Description":"Session welcome message, limited to 127 characters.", + "Keywords":"welcome,message", + "FieldName":"welcome_message", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"welcome_message", + "IncludeInCommandLine":false, + "DefaultValue":"", + "EnumValues":{} + }, + { + "DisplayName":"Password", + "Category":"ATS - Server Settings", + "Description":"Session password, limited to 63 characters.", + "Keywords":"password", + "FieldName":"password", + "InputType":"password", + "IsFlagArgument":false, + "ParamFieldName":"password", + "IncludeInCommandLine":false, + "DefaultValue":"", + "EnumValues":{} + }, + { + "DisplayName":"Max Players", + "Category":"ATS - Server Settings", + "Description":"Maximum players in session, limit is 8 players.", + "Keywords":"max,players", + "FieldName":"$MaxUsers", + "InputType":"number", + "IsFlagArgument":false, + "ParamFieldName":"max_players", + "IncludeInCommandLine":false, + "DefaultValue":"8", + "MinValue":"1", + "MaxValue":"8", + "EnumValues":{} + }, + { + "DisplayName":"Max Vehicles Total", + "Category":"ATS - Server Settings", + "Description":"", + "Keywords":"max,vehicles,total", + "FieldName":"max_vehicles_total", + "InputType":"number", + "IsFlagArgument":false, + "ParamFieldName":"max_vehicles_total", + "IncludeInCommandLine":false, + "DefaultValue":"100", + "MinValue":"0", + "EnumValues":{} + }, + { + "DisplayName":"Max AI Vehicles Player", + "Category":"ATS - Server Settings", + "Description":"", + "Keywords":"max,ai,vehicles,player", + "FieldName":"max_ai_vehicles_player", + "InputType":"number", + "IsFlagArgument":false, + "ParamFieldName":"max_ai_vehicles_player", + "IncludeInCommandLine":false, + "DefaultValue":"50", + "MinValue":"0", + "EnumValues":{} + }, + { + "DisplayName":"Max AI Vehicles Player Spawn", + "Category":"ATS - Server Settings", + "Description":"", + "Keywords":"max,ai,vehicles,player,spawn", + "FieldName":"max_ai_vehicles_player_spawn", + "InputType":"number", + "IsFlagArgument":false, + "ParamFieldName":"max_ai_vehicles_player_spawn", + "IncludeInCommandLine":false, + "DefaultValue":"50", + "MinValue":"0", + "EnumValues":{} + }, + { + "DisplayName":"connection_dedicated_port", + "Category":"ATS - Server Settings", + "Description":"Port used for main game traffic", + "Keywords":"", + "FieldName":"$MainServerPort", + "InputType":"hidden", + "IsFlagArgument":false, + "ParamFieldName":"connection_dedicated_port", + "IncludeInCommandLine":false, + "EnumValues":{}, + "Hidden":true + }, + { + "DisplayName":"query_dedicated_port", + "Category":"ATS - Server Settings", + "Description":"Port used for Steam Query", + "Keywords":"", + "FieldName":"$QueryDedicatedPort", + "InputType":"number", + "IsFlagArgument":false, + "ParamFieldName":"query_dedicated_port", + "IncludeInCommandLine":false, + "EnumValues":{}, + "Hidden":true + }, + { + "DisplayName":"Server Logon Token", + "Category":"ATS - Server Settings", + "Description":"Use appid 270880 to create a [Steam Server Login Token](https://steamcommunity.com/dev/managegameservers).", + "Keywords":"server,logon,token", + "FieldName":"server_logon_token", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"server_logon_token", + "IncludeInCommandLine":false, + "DefaultValue":"", + "Placeholder":"6544F7E034119F113526E96474F", + "EnumValues":{} + }, + { + "DisplayName":"Player Damage", + "Category":"ATS - Server Settings", + "Description":"Flag to allow players to receive damage from other players.", + "Keywords":"player,damage", + "FieldName":"player_damage", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"player_damage", + "IncludeInCommandLine":false, + "DefaultValue":"true", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"Traffic", + "Category":"ATS - Server Settings", + "Description":"Flag to enable traffic.", + "Keywords":"traffic", + "FieldName":"traffic", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"traffic", + "IncludeInCommandLine":false, + "DefaultValue":"true", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"Hide In Company", + "Category":"ATS - Server Settings", + "Description":"Flag to enable if remote players are hidden in company area.", + "Keywords":"hide,company", + "FieldName":"hide_in_company", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"hide_in_company", + "IncludeInCommandLine":false, + "DefaultValue":"false", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"Hide Colliding", + "Category":"ATS - Server Settings", + "Description":"Flag to hide colliding vehicle after teleport. ", + "Keywords":"hide,colliding", + "FieldName":"hide_colliding", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"hide_colliding", + "IncludeInCommandLine":false, + "DefaultValue":"true", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"Force Speed Limiter", + "Category":"ATS - Server Settings", + "Description":"Flag to force speed limiter.", + "Keywords":"force,speed,limiter", + "FieldName":"force_speed_limiter", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"force_speed_limiter", + "IncludeInCommandLine":false, + "DefaultValue":"false", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"Mods Optioning", + "Category":"ATS - Server Settings", + "Description":"Flag to enable mods marked as optional, to be really optional.", + "Keywords":"mods,optioning", + "FieldName":"mods_optioning", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"mods_optioning", + "IncludeInCommandLine":false, + "DefaultValue":"false", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"Timezones", + "Category":"ATS - Server Settings", + "Description":"Sets whether the timezone updates as players change zones. It displays either the time or the time and timezone information.", + "Keywords":"timezones", + "FieldName":"timezones", + "InputType":"enum", + "IsFlagArgument":false, + "ParamFieldName":"timezones", + "IncludeInCommandLine":false, + "DefaultValue":"2", + "EnumValues":{ + "0": "Disabled", + "1": "Time Only", + "2": "Full Info" + } + }, + { + "DisplayName":"Service No Collision", + "Category":"ATS - Server Settings", + "Description":"Disable collisions on service area.", + "Keywords":"service,no,collision", + "FieldName":"service_no_collision", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"service_no_collision", + "IncludeInCommandLine":false, + "DefaultValue":"false", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"In Menu Ghosting", + "Category":"ATS - Server Settings", + "Description":"Disable collisions when game paused.", + "Keywords":"in,menu,ghosting", + "FieldName":"in_menu_ghosting", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"in_menu_ghosting", + "IncludeInCommandLine":false, + "DefaultValue":"false", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"Name Tags", + "Category":"ATS - Server Settings", + "Description":"Show player name tags above vehicles.", + "Keywords":"name,tags", + "FieldName":"name_tags", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"name_tags", + "IncludeInCommandLine":false, + "DefaultValue":"true", + "EnumValues":{ + "False": "false", + "True": "true" + } + }, + { + "DisplayName":"Moderator Count", + "Category":"ATS - Server Settings", + "Description":"The number of moderators in the Moderator List setting.", + "Keywords":"moderator,count", + "FieldName":"moderator_list1", + "InputType":"number", + "IsFlagArgument":false, + "ParamFieldName":"moderator_list1", + "IncludeInCommandLine":false, + "DefaultValue":"0", + "Placeholder":"0", + "EnumValues":{} + }, + { + "DisplayName":"Moderator List", + "Category":"ATS - Server Settings", + "Description":"Enter moderators, one per line. Increment the value in [#] starting at 0. 123456789 should be replaced with the moderator's Steam64 IDs. e.g. moderator_list[0]: 123456789.", + "Keywords":"moderator,list", + "FieldName":"moderator_list2", + "InputType":"Textarea", + "IsFlagArgument":false, + "ParamFieldName":"moderator_list2", + "IncludeInCommandLine":false, + "DefaultValue":"", + "EnumValues":{} + } +] \ No newline at end of file diff --git a/american-truck-simulatormetaconfig.json b/american-truck-simulatormetaconfig.json new file mode 100644 index 0000000..7e3f873 --- /dev/null +++ b/american-truck-simulatormetaconfig.json @@ -0,0 +1,8 @@ +[ + { + "ConfigFile":"American Truck Simulator/server_config.sii", + "AutoMap":true, + "ConfigType":"template", + "ConfigFileTemplate":"american-truck-simulator/AMP_server_config.sii" + } +] \ No newline at end of file diff --git a/american-truck-simulatorports.json b/american-truck-simulatorports.json new file mode 100644 index 0000000..4067acc --- /dev/null +++ b/american-truck-simulatorports.json @@ -0,0 +1,16 @@ +[ + { + "Protocol": "UDP", + "Port": "27015", + "Name": "Main Server Port", + "Description": "Port used for main game traffic", + "Ref": "MainServerPort" + }, + { + "Protocol": "UDP", + "Port": "27016", + "Name": "Query Dedicated Port", + "Description": "Port used for main game traffic", + "Ref": "QueryDedicatedPort" + } +] \ No newline at end of file diff --git a/american-truck-simulatorupdates.json b/american-truck-simulatorupdates.json new file mode 100644 index 0000000..3bea6d2 --- /dev/null +++ b/american-truck-simulatorupdates.json @@ -0,0 +1,24 @@ +[ + { + "UpdateStageName":"SteamCMD Download", + "UpdateSourceData":"2239530", + "UpdateSourcePlatform":"All", + "UpdateSource":"SteamCMD", + "UpdateSourceArgs":"270880" + }, + { + "UpdateStageName":"Settings Directory Creation", + "UpdateSourcePlatform":"All", + "UpdateSource":"CreateDirectory", + "UpdateSourceArgs":"{{$FullBaseDir}}American Truck Simulator" + }, + { + "UpdateStageName":"Settings Template Download", + "UpdateSourcePlatform":"All", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/american-truck-simulator.sii", + "UpdateSourceArgs":"AMP_server_config.sii", + "UpdateSourceTarget":"{{$FullRootDir}}", + "OverwriteExistingFiles":true + } +] \ No newline at end of file