From 85276259d66e70244f318eaf9024f85efc8bfe4d Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Fri, 28 Apr 2023 11:20:26 +1000 Subject: [PATCH] Add Foundry Virtual Tabletop (#312) --- foundry-vtt.kvp | 88 ++++++++++++++++++++++++++++++++++++++ foundry-vttconfig.json | 59 +++++++++++++++++++++++++ foundry-vttmetaconfig.json | 7 +++ foundry-vttupdates.json | 56 ++++++++++++++++++++++++ 4 files changed, 210 insertions(+) create mode 100644 foundry-vtt.kvp create mode 100644 foundry-vttconfig.json create mode 100644 foundry-vttmetaconfig.json create mode 100644 foundry-vttupdates.json diff --git a/foundry-vtt.kvp b/foundry-vtt.kvp new file mode 100644 index 0000000..b117722 --- /dev/null +++ b/foundry-vtt.kvp @@ -0,0 +1,88 @@ +Meta.DisplayName=Foundry Virtual Tabletop +Meta.Description=Foundry Virtual Tabletop Dedicated Server +Meta.OS=Windows, Linux +Meta.Arch=x86_64 +Meta.Author=Greelan +Meta.URL=https://foundryvtt.com +Meta.DisplayImageSource=url:https://foundryvtt.com/static/assets/icons/fvtt.png +Meta.EndpointURIFormat= +Meta.ConfigManifest=foundry-vttconfig.json +Meta.MetaConfigManifest=foundry-vttmetaconfig.json +Meta.ConfigRoot=foundry-vtt.kvp +Meta.MinAMPVersion=2.4.3.0 +Meta.SpecificDockerImage= +Meta.DockerRequired=False +Meta.ContainerPolicy=Supported +Meta.ContainerPolicyReason= +Meta.ExtraSetupStepsURI=https://discourse.cubecoders.com/docs?topic=3951?utm_source=ampcreate&utm_content=foundryvtt +Meta.Prerequsites=[] +Meta.ConfigReleaseState=NotSpecified +Meta.NoCommercialUsage=False +App.DisplayName=Foundry Virtual Tabletop +App.RootDir=./foundry-vtt/ +App.BaseDirectory=./foundry-vtt/ +App.ExecutableWin=node\node.exe +App.ExecutableLinux=node/bin/node +App.WorkingDir=server +App.LinuxCommandLineArgs= +App.WindowsCommandLineArgs= +App.CommandLineArgs={{$PlatformArgs}} resources/app/main.js --port={{$ServerPort}} --dataPath="{{$FullBaseDir}}data" {{$FormattedArgs}} +App.UseLinuxIOREDIR=False +App.AppSettings={} +App.EnvironmentVariables={} +App.CommandLineParameterFormat=--{0}={1} +App.CommandLineParameterDelimiter= +App.ExitMethod=OS_CLOSE +App.ExitTimeout=30 +App.ExitString=stop +App.ExitFile=lock +App.HasWriteableConsole=True +App.HasReadableConsole=True +App.SupportsLiveSettingsChanges=False +App.LiveSettingChangeCommandFormat=set {0} "{1}" +App.ApplicationIPBinding=0.0.0.0 +App.Ports=[{"Protocol":"TCP","Name":"Server Port","Description":"Port for game traffic","Port":30000,"Ref":"ServerPort"}] +App.AdminPortRef=ServerPort +App.PrimaryApplicationPortRef=ServerPort +App.UniversalSleepApplicationUDPPortRef=ServerPort +App.UniversalSleepSteamQueryPortRef=ServerPort +App.MaxUsers=16 +App.UseRandomAdminPassword=False +App.RemoteAdminPassword=Password123 +App.AdminMethod=STDIO +App.AdminLoginTransform=None +App.RCONConnectDelaySeconds=5 +App.RCONConnectRetrySeconds=5 +App.RCONHeartbeatMinutes=0 +App.RCONHeartbeatCommand=ping +App.TelnetLoginFormat={0} +App.UpdateSources=@IncludeJson[foundry-vttupdates.json] +App.Compatibility=None +App.SteamUpdateAnonymousLogin=True +App.SteamForceLoginPrompt=False +App.RapidStartup=False +App.MonitorChildProcess=True +App.MonitorChildProcessWaitMs=100 +App.MonitorChildProcessName=main.js +App.SupportsUniversalSleep=False +App.WakeupMode=Any +App.ApplicationReadyMode=RegexMatch +App.TemplateMatchRegex={{(\$?[\w]+)}} +Console.FilterMatchRegex=\[\d+m +Console.FilterMatchReplacement= +Console.ThrowawayMessageRegex=^(WARNING|ERROR): Shader.+$ +Console.AppReadyRegex=^FoundryVTT \| [\d-]+ [\d:]+ \| \[info\] Server started and listening on port \d+$ +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/foundry-vttconfig.json b/foundry-vttconfig.json new file mode 100644 index 0000000..3c75ce6 --- /dev/null +++ b/foundry-vttconfig.json @@ -0,0 +1,59 @@ +[ + { + "DisplayName":"Server Port", + "Category":"Server Settings", + "Description":"", + "Keywords":"", + "FieldName":"$ServerPort", + "InputType":"number", + "Hidden":true, + "IsFlagArgument":false, + "ParamFieldName":"$.port", + "IncludeInCommandLine":false, + "EnumValues":{} + }, + { + "DisplayName":"Server Download URL", + "Category":"Server Settings", + "Description":"Sets the full URL to download the server from. [Login](https://foundryvtt.com/) to obtain a current timed URL, then update the server before the timeout. NOTE: Make sure to select the \"Linux/NodeJS\" version", + "Keywords":"download,url", + "FieldName":"DownloadURL", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"DownloadURL", + "IncludeInCommandLine":false, + "DefaultValue":"", + "Placeholder":"https://foundryvtt.s3.amazonaws.com", + "EnumValues":{} + }, + { + "DisplayName":"Node.js Version", + "Category":"Server Settings", + "Description":"Sets the [Node.js release version](https://nodejs.org/download/release/) to install to run the server. Minimum v14.x required. NOTE: Specify a numbered version like v.14.21.3, rather than any \"latest\" version", + "Keywords":"node,nodejs,version", + "FieldName":"NodeVersion", + "InputType":"text", + "IsFlagArgument":false, + "ParamFieldName":"NodeVersion", + "IncludeInCommandLine":false, + "DefaultValue":"v14.21.3", + "Placeholder":"v14.21.3", + "EnumValues":{} + }, + { + "DisplayName":"Enable UPnP", + "Category":"Server Settings", + "Description":"If set, UPnP will be enabled on the server. This functionality requires a UPnP-enabled router to work", + "Keywords":"upnp", + "FieldName":"upnp", + "InputType":"checkbox", + "IsFlagArgument":false, + "ParamFieldName":"upnp", + "IncludeInCommandLine":false, + "DefaultValue":"false", + "EnumValues":{ + "False":"false", + "True":"true" + } + } +] \ No newline at end of file diff --git a/foundry-vttmetaconfig.json b/foundry-vttmetaconfig.json new file mode 100644 index 0000000..65a4567 --- /dev/null +++ b/foundry-vttmetaconfig.json @@ -0,0 +1,7 @@ +[ + { + "ConfigFile":"data/Config/options.json", + "AutoMap":true, + "ConfigType":"json" + } +] \ No newline at end of file diff --git a/foundry-vttupdates.json b/foundry-vttupdates.json new file mode 100644 index 0000000..e74fe61 --- /dev/null +++ b/foundry-vttupdates.json @@ -0,0 +1,56 @@ +[ + { + "UpdateStageName":"Server Directory Creation", + "UpdateSourcePlatform":"All", + "UpdateSource":"CreateDirectory", + "UpdateSourceArgs":"{{$FullBaseDir}}server" + }, + { + "UpdateStageName":"Data Directory Creation", + "UpdateSourcePlatform":"All", + "UpdateSource":"CreateDirectory", + "UpdateSourceArgs":"{{$FullBaseDir}}data" + }, + { + "UpdateStageName":"Server Download", + "UpdateSourcePlatform":"All", + "UpdateSource":"FetchURL", + "UpdateSourceData":"{{DownloadURL}}", + "UpdateSourceTarget":"{{$FullBaseDir}}server", + "UpdateSourceArgs":"FoundryVTT.zip", + "UnzipUpdateSource":true, + "OverwriteExistingFiles":true, + "DeleteAfterExtract":true + }, + { + "UpdateStageName":"Node.js Download", + "UpdateSourcePlatform":"Linux", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://nodejs.org/download/release/{{NodeVersion}}/node-{{NodeVersion}}-linux-x64.tar.gz", + "UpdateSourceTarget":"{{$FullBaseDir}}" + }, + { + "UpdateStageName":"Node.js Extract", + "UpdateSourcePlatform":"Linux", + "UpdateSource":"Executable", + "UpdateSourceData":"/bin/bash", + "UpdateSourceArgs":"-c 'cd foundry-vtt && rm -Rf node && tar xf node-{{NodeVersion}}-linux-x64.tar.gz && mv node-{{NodeVersion}}-linux-x64 node && rm node-{{NodeVersion}}-linux-x64.tar.gz'" + }, + { + "UpdateStageName":"Node.js Download", + "UpdateSourcePlatform":"Windows", + "UpdateSource":"FetchURL", + "UpdateSourceData":"https://nodejs.org/download/release/{{NodeVersion}}/node-{{NodeVersion}}-win-x64.zip", + "UpdateSourceTarget":"{{$FullBaseDir}}", + "UnzipUpdateSource":true, + "OverwriteExistingFiles":true, + "DeleteAfterExtract":true + }, + { + "UpdateStageName":"Node.js Extract", + "UpdateSourcePlatform":"Windows", + "UpdateSource":"Executable", + "UpdateSourceData":"cmd.exe", + "UpdateSourceArgs":"/C cd foundry-vtt & rmdir /S /Q node & rename node-{{NodeVersion}}-win-x64 node" + } +]