diff --git a/risk-of-rain-2.kvp b/risk-of-rain-2.kvp index 977616a..d65cd31 100644 --- a/risk-of-rain-2.kvp +++ b/risk-of-rain-2.kvp @@ -2,7 +2,7 @@ Meta.DisplayName=Risk of Rain 2 Meta.Description=Risk of Rain 2 Dedicated Server Meta.OS=Windows, Linux Meta.Arch=x86_64 -Meta.Author=IceOfWraith +Meta.Author=IceOfWraith, Greelan Meta.URL=https://store.steampowered.com/app/632360/Risk_of_Rain_2/ Meta.DisplayImageSource=steam:632360 Meta.EndpointURIFormat=steam://connect/{ip}:{GenericModule.App.Ports.$ApplicationPort2} @@ -13,7 +13,7 @@ Meta.MinAMPVersion=2.3.3.0 Meta.SpecificDockerImage=cubecoders/ampbase:wine Meta.DockerRequired=False Meta.ContainerPolicy=SupportedOnWindows, RecommendedOnLinux -Meta.ContainerPolicyReason=The server requires Wine and Xvfb to run on Linux. Using a container avoids the need to install these dependencies on the host. +Meta.ContainerPolicyReason=The server requires Wine (ideally Wine 8) and Xvfb to run on Linux. Using a container avoids the need to install these dependencies on the host. Meta.Prerequsites=[] Meta.ConfigReleaseState=NotSpecified App.DisplayName=Risk of Rain 2 @@ -27,7 +27,7 @@ App.WindowsCommandLineArgs= App.CommandLineArgs={{$PlatformArgs}} App.UseLinuxIOREDIR=False App.AppSettings={} -App.EnvironmentVariables={"LD_LIBRARY_PATH":"./linux64:%LD_LIBRARY_PATH%","SteamAppId":"{{$SteamAppID}}","WINEPREFIX":"{{$FullRootDir}}.wine","WINEARCH":"win64","WINEDEBUG":"-all"} +App.EnvironmentVariables={"LD_LIBRARY_PATH":"{{$FullRootDir}}linux64:%LD_LIBRARY_PATH%","SteamAppId":"{{$SteamAppID}}","WINEPREFIX":"{{$FullRootDir}}.wine","WINEARCH":"win64","WINEDLLOVERRIDES":"winhttp=n,b","WINEDEBUG":"-all"} App.CommandLineParameterFormat=+{0} {1} App.CommandLineParameterDelimiter= App.ExitMethod=OS_CLOSE @@ -39,7 +39,7 @@ App.HasReadableConsole=True App.SupportsLiveSettingsChanges=False App.LiveSettingChangeCommandFormat=set {0} "{1}" App.ApplicationIPBinding=0.0.0.0 -App.Ports=[{"Protocol":2,"Port":27015,"Offset":0,"Range":1,"Ref":"ApplicationPort1","Name":"Application Port 1","Description":"","ChildPorts":null},{"Protocol":2,"Port":27016,"Offset":0,"Range":1,"Ref":"ApplicationPort2","Name":"Application Port 2","Description":"","ChildPorts":null},{"Protocol":2,"Port":27017,"Offset":0,"Range":1,"Ref":"ApplicationPort3","Name":"Application Port 3","Description":"","ChildPorts":null}] +App.Ports=[{"Protocol":2,"Port":27015,"Offset":0,"Range":1,"Ref":"ApplicationPort1","Name":"Game Port","Description":"Port for game traffic","ChildPorts":null},{"Protocol":2,"Port":27016,"Offset":0,"Range":1,"Ref":"ApplicationPort2","Name":"Steam Query Port","Description":"Port for Steam query traffic","ChildPorts":null},{"Protocol":2,"Port":27017,"Offset":0,"Range":1,"Ref":"ApplicationPort3","Name":"Steam Port","Description":"Port for Steam traffic","ChildPorts":null}] App.AdminPortRef=RemoteAdminPort App.PrimaryApplicationPortRef=ApplicationPort1 App.UniversalSleepApplicationUDPPortRef=ApplicationPort1 @@ -52,7 +52,7 @@ App.AdminLoginTransform=None App.RCONConnectDelaySeconds=5 App.RCONConnectRetrySeconds=5 App.TelnetLoginFormat={0} -App.UpdateSources=[{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1180760","UpdateSourceArgs":"632360","ForceDownloadPlatform":"Windows"},{"UpdateStageName":"SteamCMD Download","UpdateSourcePlatform":"All","UpdateSource":"SteamCMD","UpdateSourceData":"1007","UpdateSourceTarget":"1180760","ForceDownloadPlatform":"Windows"},{"UpdateStageName":"Initialise Wine","UpdateSourcePlatform":"Linux","UpdateSource":"Executable","UpdateSourceData":"/bin/bash","UpdateSourceArgs":"-c 'WINEPREFIX=\"{{$FullRootDir}}.wine\" WINEARCH=win64 /usr/bin/wineboot --init --update'"}] +App.UpdateSources=@IncludeJson[risk-of-rain-2updates.json] App.Compatibility=None App.SteamUpdateAnonymousLogin=True App.SteamForceLoginPrompt=False @@ -66,7 +66,7 @@ App.ApplicationReadyMode=RegexMatch App.TemplateMatchRegex={{(\$?[\w]+)}} Console.FilterMatchRegex= Console.FilterMatchReplacement= -Console.ThrowawayMessageRegex=^.*Couldn't create a Convex Mesh from source mesh.*$|^.*Shader .* fallback shader .* not found.*$|^.*\[RoR2\.Audio\.NetworkSoundEventCatalog\] Error during network sound registration.*does not exist.*$|^.*\(Filename:.*Line: \d+\).*$ +Console.ThrowawayMessageRegex=^.*Couldn't create a Convex Mesh from source mesh.*$|^.*Shader .* fallback shader .* not found.*$|^.*\[RoR2\.Audio\.NetworkSoundEventCatalog\] Error during network sound registration.*does not exist.*$|^.*\(Filename:.*Line: \d+\).*|Fallback handler could not load library .*$ Console.AppReadyRegex=^.*Press Enter to chat.*$ Console.UserJoinRegex=^.*NetworkManagerSystem\.AddPlayerInternal\(conn=hostId: \d+ connectionId: (?\d+) .*$ Console.UserLeaveRegex=^.*Log: connection \{(?\d+)\} has been disconnected by timeout.*$ diff --git a/risk-of-rain-2config.json b/risk-of-rain-2config.json index e430c9e..39e2d67 100644 --- a/risk-of-rain-2config.json +++ b/risk-of-rain-2config.json @@ -1,75 +1,170 @@ [ { - "DisplayName": "Host name", - "Category": "Server Settings", - "Description": "Display name of the host", - "Keywords": "host name server", - "FieldName": "sv_hostname", - "InputType": "text", - "IsFlagArgument": false, - "ParamFieldName": "sv_hostname", - "IncludeInCommandLine": false, - "DefaultValue": "Powered by AMP", - "EnumValues": {} + "DisplayName":"Game Port", + "Category":"Server Settings", + "Description":"", + "Keywords":"", + "FieldName":"$ApplicationPort1", + "InputType":"number", + "Hidden":true, + "IsFlagArgument":false, + "ParamFieldName":"sv_port", + "IncludeInCommandLine":false, + "EnumValues":{} }, { - "DisplayName": "Password", - "Category": "Server Settings", - "Description": "Server password for users to join", - "Keywords": "server password users", - "FieldName": "sv_password", - "InputType": "password", - "IsFlagArgument": false, - "ParamFieldName": "sv_password", - "IncludeInCommandLine": false, - "DefaultValue": "", - "EnumValues": {} + "DisplayName":"Steam Query Port", + "Category":"Server Settings", + "Description":"", + "Keywords":"", + "FieldName":"$ApplicationPort2", + "InputType":"number", + "Hidden":true, + "IsFlagArgument":false, + "ParamFieldName":"steam_server_query_port", + "IncludeInCommandLine":false, + "EnumValues":{} }, { - "DisplayName": "Max Players", - "Category": "Server Settings", - "Description": "The maximum number of players", - "Keywords": "max players", - "FieldName": "$MaxUsers", - "InputType": "number", - "IsFlagArgument": false, - "ParamFieldName": "sv_maxplayers", - "IncludeInCommandLine": false, - "DefaultValue": "4", - "EnumValues": {}, - "MinValue":"1" + "DisplayName":"Steam Port", + "Category":"Server Settings", + "Description":"", + "Keywords":"", + "FieldName":"$ApplicationPort3", + "InputType":"number", + "Hidden":true, + "IsFlagArgument":false, + "ParamFieldName":"steam_server_steam_port", + "IncludeInCommandLine":false, + "EnumValues":{} }, { - "DisplayName": "Steam Heartbeat", - "Category": "Server Settings", - "Description": "Advertise on the server list", - "Keywords": "advertise server list steam heartbeat", - "FieldName": "steam_server_heartbeat_enabled", - "InputType": "checkbox", - "IsFlagArgument": false, - "ParamFieldName": "steam_server_heartbeat_enabled", - "IncludeInCommandLine": false, - "DefaultValue": "1", - "EnumValues": { - "True": "1", - "False": "0" + "DisplayName":"Host Name", + "Category":"Server Settings", + "Description":"Sets the name of the server displayed publicly", + "Keywords":"host,name,server,sv_hostname", + "FieldName":"sv_hostname", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"sv_hostname", + "IncludeInCommandLine":false, + "DefaultValue":"ROR2 - Powered by AMP", + "EnumValues":{} + }, + { + "DisplayName":"Custom Tags", + "Category":"Server Settings", + "Description":"Comma separated list of tags to display in the server browser", + "Keywords":"custom,tags,sv_custom_tags", + "FieldName":"sv_custom_tags", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"sv_custom_tags", + "IncludeInCommandLine":false, + "DefaultValue":"", + "EnumValues":{} + }, + { + "DisplayName":"Server Password", + "Category":"Server Settings", + "Description":"Sets the password for players to join the server. Default is no password", + "Keywords":"server,password,users,sv_password", + "FieldName":"sv_password", + "InputType":"password", + "IsFlagArgument":false, + "ParamFieldName":"sv_password", + "IncludeInCommandLine":false, + "DefaultValue":"", + "EnumValues":{} + }, + { + "DisplayName":"Player Limit", + "Category":"Server Settings", + "Description":"Sets the maximum number of players that may join the server at one time", + "Keywords":"max,players,sv_maxplayers", + "FieldName":"$MaxUsers", + "InputType":"number", + "MinValue":"1", + "IsFlagArgument":false, + "ParamFieldName":"sv_maxplayers", + "IncludeInCommandLine":false, + "DefaultValue":"4", + "EnumValues":{} + }, + { + "DisplayName":"Advertise Server", + "Category":"Server Settings", + "Description":"If enabled, the server will be advertised on the server list", + "Keywords":"advertise,server,list,steam,heartbeat,steam_server_heartbeat_enabled", + "FieldName":"steam_server_heartbeat_enabled", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"steam_server_heartbeat_enabled", + "IncludeInCommandLine":false, + "DefaultValue":"1", + "EnumValues":{ + "True":"1", + "False":"0" } }, { - "DisplayName": "Game Mode", - "Category": "Server Settings", - "Description": "Select a game mode for the server", - "Keywords": "game mode", - "FieldName": "gamemode", - "InputType": "enum", - "IsFlagArgument": false, - "ParamFieldName": "gamemode", - "IncludeInCommandLine": false, - "DefaultValue": "ClassicRun", - "EnumValues": { - "EclipseRun": "Eclipse", - "ClassicRun": "Normal", - "InfiniteTowerRun": "Simulacrum" + "DisplayName":"Game Mode", + "Category":"Server Settings", + "Description":"Sets the game mode for the server", + "Keywords":"game,mode,gamemode", + "FieldName":"gamemode", + "InputType":"enum", + "IsFlagArgument":false, + "ParamFieldName":"gamemode", + "IncludeInCommandLine":false, + "DefaultValue":"ClassicRun", + "EnumValues":{ + "EclipseRun":"Eclipse", + "ClassicRun":"Normal (default)", + "InfiniteTowerRun":"Simulacrum" } + }, + { + "DisplayName":"Additional Server Settings", + "Category":"Server Settings", + "Description":"Specifies additional [settings](https://riskofrain2.fandom.com/wiki/Developer_Console) to include in \"server.cfg\". Each setting must be on a separate line and end with a semi-colon (;)", + "Keywords":"additional,settings,custom", + "FieldName":"UserSettings", + "InputType":"Textarea", + "IsFlagArgument":false, + "ParamFieldName":"UserSettings", + "IncludeInCommandLine":false, + "DefaultValue":"", + "EnumValues":{} + }, + { + "DisplayName":"Install BepInEx", + "Category":"SteamCMD and Updates", + "Description":"Installs BepInEx. You must also select the \"BepInEx Version\" in the next field. NOTE: Update the server after enabling this option", + "Keywords":"install,bepinex", + "FieldName":"BepInExInstall", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"BepInExInstall", + "IncludeInCommandLine":false, + "DefaultValue":"false", + "EnumValues":{ + "False":"false", + "True":"true" + } + }, + { + "DisplayName":"BepInEx Version", + "Category":"SteamCMD and Updates", + "Description":"The version of BepInEx to download. You can find the latest version on [Thunderstore.io](https://thunderstore.io/package/bbepis/BepInExPack/). NOTE: Update the server after editing this option", + "Keywords":"install,bepinex,version", + "FieldName":"BepInExVersion", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"BepInExVersion", + "IncludeInCommandLine":false, + "DefaultValue":"5.4.2109", + "Placeholder":"5.4.2109", + "EnumValues":{} } ] \ No newline at end of file diff --git a/risk-of-rain-2metaconfig.json b/risk-of-rain-2metaconfig.json index c3de4f8..0bda8ee 100644 --- a/risk-of-rain-2metaconfig.json +++ b/risk-of-rain-2metaconfig.json @@ -1,23 +1,8 @@ [ { - "ConfigFile": "Risk of Rain 2_Data/Config/server.cfg", - "ConfigType": "kvp", - "ConfigFormat": "{0} \"{1}\";", - "Subsections": [ - { - "Heading": "$root", - "SettingMappings": { - "sv_maxplayers": "$MaxUsers", - "steam_server_heartbeat_enabled": "steam_server_heartbeat_enabled", - "sv_hostname": "sv_hostname", - "sv_port": "$ApplicationPort1", - "steam_server_query_port": "$ApplicationPort2", - "steam_server_steam_port": "$ApplicationPort3", - "sv_password": "sv_password", - "gamemode": "gamemode" - } - } - - ] + "ConfigFile":"Risk of Rain 2_Data/Config/server.cfg", + "ConfigType":"template", + "AutoMap":true, + "ConfigFileTemplate":"risk-of-rain-2/AMP_server.cfg" } ] \ No newline at end of file diff --git a/risk-of-rain-2server.cfg b/risk-of-rain-2server.cfg new file mode 100644 index 0000000..d900af9 --- /dev/null +++ b/risk-of-rain-2server.cfg @@ -0,0 +1,13 @@ +// This file is controlled by AMP and +// must be configured via AMP + +sv_maxplayers {{sv_maxplayers}}; +steam_server_heartbeat_enabled {{steam_server_heartbeat_enabled}}; +sv_hostname "{{sv_hostname}}"; +sv_port {{sv_port}}; +steam_server_query_port {{steam_server_query_port}}; +steam_server_steam_port {{steam_server_steam_port}}; +sv_password "{{sv_password}}"; +sv_custom_tags "{{sv_custom_tags}}"; +gamemode "{{gamemode}}"; +{{UserSettings}} \ No newline at end of file diff --git a/risk-of-rain-2updates.json b/risk-of-rain-2updates.json new file mode 100644 index 0000000..b6ab8d2 --- /dev/null +++ b/risk-of-rain-2updates.json @@ -0,0 +1,65 @@ +[ + { + "UpdateStageName":"SteamCMD Download", + "UpdateSourcePlatform":"All", + "UpdateSource":"SteamCMD", + "UpdateSourceData":"1180760", + "UpdateSourceArgs":"632360", + "ForceDownloadPlatform":"Windows" + }, + { + "UpdateStageName":"SteamCMD Download", + "UpdateSourcePlatform":"All", + "UpdateSource":"SteamCMD", + "UpdateSourceData":"1007", + "UpdateSourceTarget":"1180760", + "ForceDownloadPlatform":"Windows" + }, + { + "UpdateStageName":"Server Config Template File Download", + "UpdateSourcePlatform":"All", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://raw.githubusercontent.com/Greelan/AMPTemplates/dev/risk-of-rain-2server.cfg", + "UpdateSourceArgs":"AMP_server.cfg", + "UpdateSourceTarget":"{{$FullRootDir}}", + "OverwriteExistingFiles":true + }, + { + "UpdateStageName":"Download BepInEx From Thunderstore", + "UpdateSourcePlatform":"All", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://gcdn.thunderstore.io/live/repository/packages/bbepis-BepInExPack-{{BepInExVersion}}.zip", + "UpdateSourceArgs":"bbepis-BepInExPack-{{BepInExVersion}}.zip", + "UpdateSourceTarget":"{{$FullBaseDir}}", + "UpdateSourceConditionSetting":"BepInExInstall", + "UpdateSourceConditionValue":"true", + "UnzipUpdateSource":true, + "OverwriteExistingFiles":true, + "DeleteAfterExtract":true + }, + { + "UpdateStageName":"BepInEx Copy", + "UpdateSourcePlatform":"Windows", + "UpdateSource":"Executable", + "UpdateSourceData":"cmd.exe", + "UpdateSourceArgs":"/C xcopy /E /Y /I risk-of-rain-2\\1180760\\BepInExPack\\* risk-of-rain-2\\1180760\\ && rmdir /Q /S risk-of-rain-2\\1180760\\BepInExPack", + "UpdateSourceConditionSetting":"BepInExInstall", + "UpdateSourceConditionValue":"true" + }, + { + "UpdateStageName":"BepInEx Copy", + "UpdateSourcePlatform":"Linux", + "UpdateSource":"Executable", + "UpdateSourceData":"/bin/bash", + "UpdateSourceArgs":"-c '\\cp -rf ./risk-of-rain-2/1180760/BepInExPack/* ./risk-of-rain-2/1180760/ && rm -rf ./risk-of-rain-2/1180760/BepInExPack/'", + "UpdateSourceConditionSetting":"BepInExInstall", + "UpdateSourceConditionValue":"true" + }, + { + "UpdateStageName":"Initialise Wine", + "UpdateSourcePlatform":"Linux", + "UpdateSource":"Executable", + "UpdateSourceData":"/bin/bash", + "UpdateSourceArgs":"-c 'WINEPREFIX=\"{{$FullRootDir}}.wine\" WINEARCH=win64 /usr/bin/wineboot --init --update'" + } +] \ No newline at end of file