From 6c303ec80fb1181c6d8f6fcb8b91fb7c94973b21 Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Mon, 17 Jul 2023 08:52:24 +1000 Subject: [PATCH] V Rising: add mod support for Windows (#423) --- v-rising.kvp | 8 ++--- v-risingconfig.json | 34 +++++++++++++++++++-- v-risingmetaconfig.json | 21 +++++++++++++ v-risingports.json | 6 ++-- v-risingupdates.json | 65 +++++++++++++++++++---------------------- 5 files changed, 90 insertions(+), 44 deletions(-) diff --git a/v-rising.kvp b/v-rising.kvp index ca2ccb7..756cabb 100644 --- a/v-rising.kvp +++ b/v-rising.kvp @@ -1,8 +1,8 @@ Meta.DisplayName=V Rising -Meta.Description=V Rising Dedicated Server +Meta.Description=V Rising Dedicated Server with BepInEx Option for Windows Meta.OS=Windows, Linux Meta.Arch=x86_64 -Meta.Author=Tempus Thales, IceOfWraith +Meta.Author=Greelan, IceOfWraith, Tempus Thales Meta.URL=https://store.steampowered.com/app/1604030/V_Rising/ Meta.DisplayImageSource=steam:1604030 Meta.EndpointURIFormat=steam://connect/{ip}:{GenericModule.App.Ports.$ApplicationPort2} @@ -59,7 +59,7 @@ App.SteamForceLoginPrompt=False App.RapidStartup=False App.SupportsUniversalSleep=True App.WakeupMode=Any -App.ApplicationReadyMode=Immediate +App.ApplicationReadyMode=RegexMatch App.TemplateMatchRegex={{(\$?[\w]+)}} App.MonitorChildProcess=True App.MonitorChildProcessWaitMs=2000 @@ -69,7 +69,7 @@ App.RCONHeartbeatCommand="announce" Console.FilterMatchRegex= Console.FilterMatchReplacement= Console.ThrowawayMessageRegex=^((WARNING|ERROR): Shader.+|Could not find Wine Gecko.*)$ -Console.AppReadyRegex=^Server is ready\.$ +Console.AppReadyRegex=^\[rcon\] 127\.0\.0\.1 successfully authenticated!$ Console.UserJoinRegex=^User '{Steam (?\d+)}' '\d+', approvedUserIndex: \d+, Character: '(?.+?)' connected as ID '\d+,\d+', Entity '[\d,]+'\.$ Console.UserLeaveRegex=^User '{Steam (?\d+)}' disconnected. approvedUserIndex: \d+ Reason: (.+?) (.+?)$ Console.UserChatRegex= diff --git a/v-risingconfig.json b/v-risingconfig.json index 530926d..44141a9 100644 --- a/v-risingconfig.json +++ b/v-risingconfig.json @@ -1,4 +1,18 @@ [ + { + "DisplayName": "Disable BepInEx Console", + "Category": "V Rising - Host Settings", + "Description": "Needed for BepInEx to function", + "Keywords": "", + "FieldName": "LoggingConsoleEnabled", + "InputType": "text", + "Hidden": true, + "IsFlagArgument": false, + "ParamFieldName": "Logging.Console.Enabled", + "IncludeInCommandLine": false, + "DefaultValue": "false", + "EnumValues": {} + }, { "DisplayName": "Server Name", "Category": "V Rising - Host Settings", @@ -110,7 +124,7 @@ "ParamFieldName": "MaxConnectedUsers", "IncludeInCommandLine": false, "Suffix": "players", - "MinValue":"1" + "MinValue": "1" }, { "DisplayName": "Max Connected Admins", @@ -372,5 +386,21 @@ "True": "true", "False": "false" } + }, + { + "DisplayName": "Activate BepInEx (Windows Only)", + "Category": "SteamCMD and Updates", + "Description": "If set, BepInEx will be installed when the server is updated and enabled when the server is run, allowing the server to be modded. Mods must be installed in the BepInEx/plugins directory, which is created after BepInEx is first run. Windows only at this time", + "Keywords": "install,enable,bepinex,modded,mods", + "FieldName": "BepInExEnabled", + "InputType": "checkbox", + "IsFlagArgument": false, + "ParamFieldName": "General.enabled", + "IncludeInCommandLine": false, + "DefaultValue": "false", + "EnumValues": { + "False": "false", + "True": "true" + } } -] +] \ No newline at end of file diff --git a/v-risingmetaconfig.json b/v-risingmetaconfig.json index 060cebd..b26bebc 100644 --- a/v-risingmetaconfig.json +++ b/v-risingmetaconfig.json @@ -8,5 +8,26 @@ "ConfigFile": "save-data/Settings/ServerGameSettings.json", "AutoMap": true, "ConfigType": "json" + }, + { + "ConfigFile": "doorstop_config.ini", + "AutoMap": true, + "ConfigType": "ini", + "ConfigFormat": "{0} = {1}", + "ConfigFormatRegex": "^(?.+?) = (?.*?)$" + }, + { + "ConfigFile": "doorstop_config.ini", + "AutoMap": true, + "ConfigType": "ini", + "ConfigFormat": "{0}={1}", + "ConfigFormatRegex": "^(?[^ ]+?)=(?[^ ]*?)$" + }, + { + "ConfigFile": "BepInEx/config/BepInEx.cfg", + "AutoMap": true, + "ConfigType": "ini", + "ConfigFormat": "{0} = {1}", + "ConfigFormatRegex": "^(?.+?) = (?.*?)$" } ] \ No newline at end of file diff --git a/v-risingports.json b/v-risingports.json index 8460bab..f12c03c 100644 --- a/v-risingports.json +++ b/v-risingports.json @@ -5,7 +5,7 @@ "Offset": 0, "Range": 1, "Ref": "ApplicationPort1", - "Name": "Application Port 1", + "Name": "Game Port", "Description": "Server Game Port", "ChildPorts": null }, @@ -15,7 +15,7 @@ "Offset": 0, "Range": 1, "Ref": "ApplicationPort2", - "Name": "Application Port 2", + "Name": "Steam Query Port", "Description": "Steam Query Port", "ChildPorts": null }, @@ -25,7 +25,7 @@ "Offset": 0, "Range": 1, "Ref": "RemoteAdminPort", - "Name": "Remote Admin Port", + "Name": "RCON Port", "Description": "RCON Connection Port", "ChildPorts": null } diff --git a/v-risingupdates.json b/v-risingupdates.json index 73d49a7..b5fea5b 100644 --- a/v-risingupdates.json +++ b/v-risingupdates.json @@ -5,56 +5,51 @@ "UpdateSource":"SteamCMD", "UpdateSourceData":"1829350", "UpdateSourceArgs":"1604030", - "UpdateSourceVersion":null, - "UpdateSourceTarget":null, - "UnzipUpdateSource":false, - "OverwriteExistingFiles":false, - "ForceDownloadPlatform":"Windows", - "UpdateSourceConditionSetting":null, - "UpdateSourceConditionValue":null, - "DeleteAfterExtract":false + "ForceDownloadPlatform":"Windows" }, { "UpdateStageName":"Data Directory Creation", "UpdateSourcePlatform":"All", "UpdateSource":"CreateDirectory", - "UpdateSourceData":null, - "UpdateSourceArgs":"./v-rising/1829350/save-data/Settings", - "UpdateSourceVersion":null, - "UpdateSourceTarget":null, - "UnzipUpdateSource":false, - "OverwriteExistingFiles":false, - "UpdateSourceConditionSetting":null, - "UpdateSourceConditionValue":null, - "DeleteAfterExtract":false + "UpdateSourceArgs":"{{$FullBaseDir}}save-data/Settings" }, { "UpdateStageName":"Game Config File Copy", "UpdateSourcePlatform":"All", "UpdateSource":"CopyFilePath", - "UpdateSourceData":"./v-rising/1829350/save-data/Settings/ServerHostSettings.json", - "UpdateSourceArgs":"./v-rising/1829350/VRisingServer_Data/StreamingAssets/Settings/ServerHostSettings.json", - "UpdateSourceVersion":null, - "UpdateSourceTarget":null, - "UnzipUpdateSource":false, - "OverwriteExistingFiles":false, - "UpdateSourceConditionSetting":null, - "UpdateSourceConditionValue":null, - "DeleteAfterExtract":false + "UpdateSourceData":"{{$FullBaseDir}}save-data/Settings/ServerHostSettings.json", + "UpdateSourceArgs":"{{$FullBaseDir}}VRisingServer_Data/StreamingAssets/Settings/ServerHostSettings.json", + "OverwriteExistingFiles":false }, { "UpdateStageName":"Game Config File Copy", "UpdateSourcePlatform":"All", "UpdateSource":"CopyFilePath", - "UpdateSourceData":"./v-rising/1829350/save-data/Settings/ServerGameSettings.json", - "UpdateSourceArgs":"./v-rising/1829350/VRisingServer_Data/StreamingAssets/Settings/ServerGameSettings.json", - "UpdateSourceVersion":null, - "UpdateSourceTarget":null, - "UnzipUpdateSource":false, - "OverwriteExistingFiles":false, - "UpdateSourceConditionSetting":null, - "UpdateSourceConditionValue":null, - "DeleteAfterExtract":false + "UpdateSourceData":"{{$FullBaseDir}}save-data/Settings/ServerGameSettings.json", + "UpdateSourceArgs":"{{$FullBaseDir}}VRisingServer_Data/StreamingAssets/Settings/ServerGameSettings.json", + "OverwriteExistingFiles":false + }, + { + "UpdateStageName":"Download BepInEx From Thunderstore", + "UpdateSourcePlatform":"Windows", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://v-rising.thunderstore.io/package/download/BepInEx/BepInExPack_V_Rising/1.668.5/", + "UpdateSourceArgs":"BepInEx-BepInExPack_V_Rising-1.668.5.zip", + "UpdateSourceTarget":"{{$FullBaseDir}}", + "UnzipUpdateSource":true, + "OverwriteExistingFiles":true, + "DeleteAfterExtract":true, + "UpdateSourceConditionSetting":"BepInExEnabled", + "UpdateSourceConditionValue":"true" + }, + { + "UpdateStageName":"BepInEx Copy", + "UpdateSourcePlatform":"Windows", + "UpdateSource":"Executable", + "UpdateSourceData":"cmd.exe", + "UpdateSourceArgs":"/C xcopy /E /Y /I v-rising\\1829350\\BepInExPack_V_Rising\\* v-rising\\1829350\\ && rmdir /Q /S v-rising\\1829350\\BepInExPack_V_Rising", + "UpdateSourceConditionSetting":"BepInExEnabled", + "UpdateSourceConditionValue":"true" }, { "UpdateStageName":"Initialise Wine",