Add Portal Knights (#115)

* Add Portal Knights (draft)

This is the first draft for Portal Knights. It currently seems to function fine on Windows. I have not completed the Linux (Proton) support yet.

* Add Proton

Updated config to include Proton support.

* Add new Ports setup and WINE/Docker

* Add extract stage

* Create manifest.json

* Delete manifest.json

* Finalize Settings

* Final updates

* Update repo source
This commit is contained in:
IceOfWraith 2022-11-11 14:05:12 -06:00 committed by GitHub
parent c773c29326
commit 22dd5ecef9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 574 additions and 0 deletions

84
portal-knights.kvp Normal file
View File

@ -0,0 +1,84 @@
Meta.DisplayName=Portal Knights
Meta.Description=Portal Knights Dedicated Server
Meta.OS=Windows, Linux
Meta.Arch=x86_64
Meta.Author=IceOfWraith
Meta.URL=https://store.steampowered.com/app/374040/Portal_Knights/
Meta.DisplayImageSource=steam:374040
Meta.EndpointURIFormat=steam://connect/{0}
Meta.ConfigManifest=portal-knightsconfig.json
Meta.MetaConfigManifest=portal-knightsmetaconfig.json
Meta.ConfigRoot=portal-knights.kvp
Meta.MinAMPVersion=
Meta.SpecificDockerImage=cubecoders/ampbase:wine
Meta.DockerRequired=False
Meta.ContainerPolicy=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.Prerequsites=[]
Meta.ConfigReleaseState=NotSpecified
App.DisplayName=Portal Knights
App.RootDir=./portal-knights/
App.BaseDirectory=./portal-knights/374040/
App.ExecutableWin=374040\pk_dedicated_server.exe
App.ExecutableLinux=/usr/bin/xvfb-run
App.WorkingDir=374040
App.LinuxCommandLineArgs=-a wine "./pk_dedicated_server.exe"
App.WindowsCommandLineArgs=
App.CommandLineArgs={{$PlatformArgs}} -config "{{$FullBaseDir}}server_config.json" -log Server.log
App.UseLinuxIOREDIR=False
App.AppSettings={}
App.EnvironmentVariables={"LD_LIBRARY_PATH":"./linux64:%LD_LIBRARY_PATH%","SteamAppId":"374040"}
App.CommandLineParameterFormat=-{0} {1}
App.CommandLineParameterDelimiter=
App.ExitMethod=OS_CLOSE
App.ExitTimeout=30
App.ExitString=stop
App.ExitFile=app_exit.lck
App.HasWriteableConsole=True
App.HasReadableConsole=True
App.SupportsLiveSettingsChanges=False
App.LiveSettingChangeCommandFormat=set {0} "{1}"
App.ApplicationIPBinding=0.0.0.0
App.Ports=[{"Protocol":2,"Port":28001,"Offset":0,"Range":1,"Ref":"GamePort","Name":"Game Port","Description":"Main game port","ChildPorts":null}]
App.AdminPortRef=
App.PrimaryApplicationPortRef=GamePort
App.UniversalSleepApplicationUDPPortRef=
App.UniversalSleepSteamQueryPortRef=
App.MaxUsers=4
App.UseRandomAdminPassword=False
App.RemoteAdminPassword=Password123
App.AdminMethod=STDIO
App.AdminLoginTransform=None
App.RCONConnectDelaySeconds=5
App.RCONConnectRetrySeconds=5
App.TelnetLoginFormat={0}
App.UpdateSources=[{"UpdateStageName": "SteamCMD Download","UpdateSourcePlatform": "All", "UpdateSource": "SteamCMD", "UpdateSourceData": "374040", "ForceDownloadPlatform": "Windows"},{"UpdateStageName": "Server Extract","UpdateSourcePlatform": "Windows", "UpdateSource": "Executable", "UpdateSourceData": "cmd.exe", "UpdateSourceArgs": "/C cd portal-knights\\374040 && tar -xf dedicated_server.zip"},{"UpdateStageName": "Server Extract","UpdateSourcePlatform": "Linux", "UpdateSource": "Executable", "UpdateSourceData": "/bin/bash", "UpdateSourceArgs": "-c 'cd portal-knights/374040 && unzip -u dedicated_server.zip'"},{"UpdateStageName":"Config File Download","UpdateSourcePlatform":"All","UpdateSource":"FetchURL","UpdateSourceData":"https://github.com/CubeCoders/AMPTemplates/raw/main/portal-knightsserver_config.json","UpdateSourceTarget":"{{$FullBaseDir}}","UpdateSourceArgs":"server_config.json","OverwriteExistingFiles":false}]
App.Compatibility=None
App.SteamUpdateAnonymousLogin=False
App.SteamForceLoginPrompt=False
App.RapidStartup=False
App.SupportsUniversalSleep=False
App.WakeupMode=Any
App.ApplicationReadyMode=RegexMatch
App.TemplateMatchRegex={{(\$?[\w]+)}}
App.MonitorChildProcess=True
App.MonitorChildProcessWaitMs=3000
App.MonitorChildProcessName=wine64
Console.FilterMatchRegex=
Console.FilterMatchReplacement=
Console.ThrowawayMessageRegex=^((WARNING|ERROR): Shader.+|\d+:err:ole:.*|Could not find Wine Gecko.*)$
Console.AppReadyRegex=^.*\'ReadyToServe\'\:\:Execute .*$
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

438
portal-knightsconfig.json Normal file
View File

@ -0,0 +1,438 @@
[
{
"DisplayName":"Server Name",
"Category":"PK - Server Settings",
"Description":"The name that your dedicated server will display.",
"Keywords":"server,name",
"FieldName":"name",
"InputType":"text",
"IsFlagArgument":false,
"ParamFieldName":"$.basicServerData.name",
"IncludeInCommandLine":false,
"DefaultValue":"AMP Powered Portal Knights Server",
"EnumValues":{}
},
{
"DisplayName":"Game IP",
"Category":"PK - Server Settings",
"Description":"The local network IP address of your dedicated server. The address 0.0.0.0 allows the host computer to listen to all local network traffic. You probably won't need to change this unless you're setting up your server to work on a specific network card or interface.",
"Keywords":"",
"FieldName":"$ApplicationIPBinding",
"InputType":"text",
"IsFlagArgument":false,
"Hidden":true,
"ParamFieldName":"$.basicServerData.ipv4",
"IncludeInCommandLine":false
},
{
"DisplayName":"Game Port",
"Category":"PK - Server Settings",
"Description":"The port for the dedicated server.",
"Keywords":"",
"FieldName":"$GamePort",
"InputType":"number",
"IsFlagArgument":false,
"Hidden":true,
"ParamFieldName":"$.basicServerData.port",
"IncludeInCommandLine":false
},
{
"DisplayName":"Save Folder Path",
"Category":"PK - Server Settings",
"Description":"This is the location where save data will be written.",
"Keywords":"Save,folder,path",
"FieldName":"saveFolderPath",
"InputType":"text",
"IsFlagArgument":false,
"ParamFieldName":"$.basicServerData.saveFolderPath",
"IncludeInCommandLine":false,
"DefaultValue":"./savedata"
},
{
"DisplayName":"Gameplay Mode",
"Category":"PK - Server Settings",
"Description":"The game play mode for the dedicated server.",
"Keywords":"gameplay,Mode",
"FieldName":"gameplayMode",
"InputType":"enum",
"IsFlagArgument":false,
"ParamFieldName":"$.gameplayMode",
"IncludeInCommandLine":false,
"DefaultValue":"Adventure",
"EnumValues":{
"Adventure": "Adventure",
"Creative": "Creative"
}
},
{
"DisplayName":"Universe Size",
"Category":"PK - Server Settings",
"Description":"The universe size for the dedicated server.",
"Keywords":"universe,Size",
"FieldName":"universeSize",
"InputType":"enum",
"IsFlagArgument":false,
"ParamFieldName":"$.universeSize",
"IncludeInCommandLine":false,
"DefaultValue":"Normal",
"EnumValues":{
"Small": "Normal",
"Normal": "Large",
"Large": "Huge"
}
},
{
"DisplayName":"Universe ID",
"Category":"PK - Server Settings",
"Description":"The world slot used when accessing this dedicated server.",
"Keywords":"universe,Id",
"FieldName":"universeId",
"InputType":"number",
"IsFlagArgument":false,
"ParamFieldName":"$.universeId",
"IncludeInCommandLine":false,
"DefaultValue":"0",
"EnumValues":{}
},
{
"DisplayName":"Hide Console Window",
"Category":"PK - Server Settings",
"Description":"This will hide the console window and break the console in AMP if changed.",
"Keywords":"",
"FieldName":"hideConsoleWindow",
"InputType":"text",
"IsFlagArgument":false,
"ParamFieldName":"$.hideConsoleWindow",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{},
"Hidden": true
},
{
"DisplayName":"Admin Password",
"Category":"PK - Server Settings",
"Description":"Choose the password used to access your dedicated server by the Admin user group.",
"Keywords":"admin,password",
"FieldName":"adminscredentialspassword",
"InputType":"RandomPassword",
"IsFlagArgument":false,
"ParamFieldName":"$.admins.credentials.password",
"IncludeInCommandLine":false,
"DefaultValue":"admin_password_please_change",
"EnumValues":{}
},
{
"DisplayName":"Admin Can Login",
"Category":"PK - Server Settings",
"Description":"Defines whether Admins can log in.",
"Keywords":"admin,Login",
"FieldName":"adminscanLogin",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.admins.canLogin",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Admin Can Kick Players",
"Category":"PK - Server Settings",
"Description":"Defines whether Admins can kick other players from the server.",
"Keywords":"admin,Kick,Players",
"FieldName":"adminscanKickPlayers",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.admins.canKickPlayers",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Admin Can Modify World",
"Category":"PK - Server Settings",
"Description":"Defines whether Admins can mine/build blocks/props.",
"Keywords":"admin,Modify,World",
"FieldName":"adminscanModifyWorld",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.admins.canModifyWorld",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Admin Can Interact With Crafting Stations",
"Category":"PK - Server Settings",
"Description":"Defines whether Admins can interact with crafting stations.",
"Keywords":"admin,Interact,Crafting,Stations",
"FieldName":"adminscanInteractWithCraftingStations",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.admins.canInteractWithCraftingStations",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Admin Can Interact With Chests",
"Category":"PK - Server Settings",
"Description":"Defines whether Admins can interact with chests. Should be used together with \"Admin Can Modify World\" in order to also prevent mining of chests.",
"Keywords":"admin,Interact,Chests",
"FieldName":"adminscanInteractWithChests",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.admins.canInteractWithChests",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Admin Can Interact With NPCs",
"Category":"PK - Server Settings",
"Description":"Defines whether Admins can interact with NPCs.",
"Keywords":"admin,Interact,NPCs",
"FieldName":"adminscanInteractWithNPCs",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.admins.canInteractWithNPCs",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"User Password",
"Category":"PK - Server Settings",
"Description":"Choose the password used to access your dedicated server by the User user group.",
"Keywords":"user,password",
"FieldName":"userscredentialspassword",
"InputType":"password",
"IsFlagArgument":false,
"ParamFieldName":"$.users.credentials.password",
"IncludeInCommandLine":false,
"DefaultValue":"",
"EnumValues":{}
},
{
"DisplayName":"User Can Login",
"Category":"PK - Server Settings",
"Description":"Defines whether Users can log in.",
"Keywords":"users,Login",
"FieldName":"userscanLogin",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.users.canLogin",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"User Can Kick Players",
"Category":"PK - Server Settings",
"Description":"Defines whether Users can kick other players from the server.",
"Keywords":"users,Kick,Players",
"FieldName":"userscanKickPlayers",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.users.canKickPlayers",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"User Can Modify World",
"Category":"PK - Server Settings",
"Description":"Defines whether Users can mine/build blocks/props.",
"Keywords":"users,Modify,World",
"FieldName":"userscanModifyWorld",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.users.canModifyWorld",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"User Can Interact With Crafting Stations",
"Category":"PK - Server Settings",
"Description":"Defines whether Users can interact with crafting stations.",
"Keywords":"users,Interact,Crafting,Stations",
"FieldName":"userscanInteractWithCraftingStations",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.users.canInteractWithCraftingStations",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"User Can Interact With Chests",
"Category":"PK - Server Settings",
"Description":"Defines whether Users can interact with chests. Should be used together with \"User Can Modify World\" in order to also prevent mining of chests.",
"Keywords":"users,Interact,Chests",
"FieldName":"userscanInteractWithChests",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.users.canInteractWithChests",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"User Can Interact With NPCs",
"Category":"PK - Server Settings",
"Description":"Defines whether Users can interact with NPCs.",
"Keywords":"users,Interact,NPCs",
"FieldName":"userscanInteractWithNPCs",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.users.canInteractWithNPCs",
"IncludeInCommandLine":false,
"DefaultValue":"true",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Guest Password",
"Category":"PK - Server Settings",
"Description":"Choose the password used to access your dedicated server by the Guest user group.",
"Keywords":"guests,password",
"FieldName":"guestscredentialspassword",
"InputType":"password",
"IsFlagArgument":false,
"ParamFieldName":"$.guests.credentials.password",
"IncludeInCommandLine":false,
"DefaultValue":"",
"EnumValues":{}
},
{
"DisplayName":"Guest Can Login",
"Category":"PK - Server Settings",
"Description":"Defines whether Guests can log in.",
"Keywords":"guests,Login",
"FieldName":"guestscanLogin",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.guests.canLogin",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Guest Can Kick Players",
"Category":"PK - Server Settings",
"Description":"Defines whether Guests can kick other players from the server.",
"Keywords":"guests,Kick,Players",
"FieldName":"guestscanKickPlayers",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.guests.canKickPlayers",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Guest Can Modify World",
"Category":"PK - Server Settings",
"Description":"Defines whether Guests can mine/build blocks/props.",
"Keywords":"guests,Modify,World",
"FieldName":"guestscanModifyWorld",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.guests.canModifyWorld",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Guest Can Interact With Crafting Stations",
"Category":"PK - Server Settings",
"Description":"Defines whether Guests can interact with crafting stations.",
"Keywords":"guests,Interact,Crafting,Stations",
"FieldName":"guestscanInteractWithCraftingStations",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.guests.canInteractWithCraftingStations",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Guest Can Interact With Chests",
"Category":"PK - Server Settings",
"Description":"Defines whether Guests can interact with chests. Should be used together with \"Guest Can Modify World\" enabled in order to also prevent mining of chests.",
"Keywords":"guests,Interact,Chests",
"FieldName":"guestscanInteractWithChests",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.guests.canInteractWithChests",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{
"True": "true",
"False": "false"
}
},
{
"DisplayName":"Guest Can Interact With NPCs",
"Category":"PK - Server Settings",
"Description":"Defines whether Guests can interact with NPCs.",
"Keywords":"guests,Interact,NPCs",
"FieldName":"guestscanInteractWithNPCs",
"InputType":"checkbox",
"IsFlagArgument":false,
"ParamFieldName":"$.guests.canInteractWithNPCs",
"IncludeInCommandLine":false,
"DefaultValue":"false",
"EnumValues":{
"True": "true",
"False": "false"
}
}
]

View File

@ -0,0 +1,7 @@
[
{
"ConfigFile": "server_config.json",
"AutoMap": true,
"ConfigType": "json"
}
]

View File

@ -0,0 +1,45 @@
{
"basicServerData": {
"name": "AMP Powered Portal Knights Server",
"ipv4": "0.0.0.0",
"port": 28001,
"saveFolderPath": "./savedata"
},
"gameplayMode": "Adventure",
"universeSize": "Normal",
"universeId": 0,
"hideConsoleWindow": false,
"admins": {
"credentials": {
"password": "admin_password_please_change"
},
"canLogin": true,
"canKickPlayers": true,
"canModifyWorld": true,
"canInteractWithCraftingStations": true,
"canInteractWithChests": true,
"canInteractWithNPCs": true
},
"users": {
"credentials": {
"password": ""
},
"canLogin": true,
"canKickPlayers": false,
"canModifyWorld": true,
"canInteractWithCraftingStations": true,
"canInteractWithChests": true,
"canInteractWithNPCs": true
},
"guests": {
"credentials": {
"password": ""
},
"canLogin": false,
"canKickPlayers": false,
"canModifyWorld": false,
"canInteractWithCraftingStations": false,
"canInteractWithChests": false,
"canInteractWithNPCs": false
}
}