浏览代码

Added Citadel: Forged with Fire xml

- Linux and Windows support
- The game server generates only empty config files which cannot use for configuration, so the xml installs recommended config files
rocco27 8 年之前
父节点
当前提交
793b519e3b

二进制
images/icons/citadelfwf.png


+ 73 - 0
modules/config_games/server_configs/citadelfwf_linux64.xml

@@ -0,0 +1,73 @@
+<game_config>
+  <game_key>citadelfwf_linux64</game_key>
+  <protocol>lgsl</protocol>
+  <lgsl_query_name>citadelfwf</lgsl_query_name>
+  <installer>steamcmd</installer>
+  <game_name>Citadel: Forged with Fire</game_name>
+  <server_exec_name>CitadelServer-Linux-Shipping</server_exec_name>
+  <cli_template>-nosteamclient -server -log</cli_template>
+  <reserve_ports>
+    <port type="add" id="QUERY_PORT" cli_string="?QueryPort=">19238</port>
+  </reserve_ports>
+  <console_log>Citadel/Saved/Logs/Citadel.log</console_log>
+  <exe_location>Citadel/Binaries/Linux</exe_location>
+  <max_user_amount>70</max_user_amount>
+  <mods>
+    <mod key="default">
+      <name>None</name>
+      <installer_name>489650</installer_name>
+      <installer_login>anonymous</installer_login>
+    </mod>
+  </mods>
+  <replace_texts>
+    <text key="port">
+      <default>Port=.*</default>
+      <var>Port=</var>
+      <filepath>Citadel/Saved/Config/LinuxServer/Engine.ini</filepath>
+    </text>
+    <text key="port">
+      <default>ConnectionPort=.*</default>
+      <var>ConnectionPort=</var>
+      <filepath>Citadel/Saved/Config/LinuxServer/Game.ini</filepath>
+    </text>
+    <text key="query_port">
+      <default>QueryPort=.*</default>
+      <var>QueryPort=</var>
+      <filepath>Citadel/Saved/Config/LinuxServer/Game.ini</filepath>
+    </text>
+    <text key="home_name">
+      <default>(ServerName=")([^",]*)</default>
+      <var>${1}%key%</var>
+      <filepath>Citadel/Saved/Config/LinuxServer/Game.ini</filepath>
+      <options>key-regex</options>
+    </text>
+    <text key="max_players">
+      <default>(PlayerLimit=)([^,]*)</default>
+      <var>${1}%key%</var>
+      <filepath>Citadel/Saved/Config/LinuxServer/Game.ini</filepath>
+      <options>key-regex</options>
+    </text>
+    <text key="control_password">
+      <default>Password=.*</default>
+      <var>Password=</var>
+      <filepath>Citadel/Saved/Config/LinuxServer/Game.ini</filepath>
+    </text>
+  </replace_texts>
+  <post_install>
+    cfg1="Engine.ini"
+    cfg2="Game.ini"
+    if [ -f "Citadel/Saved/Config/LinuxServer" ]
+      then
+        echo "Config files already generated or fixed. OK!"
+      else
+        echo "Config files not found."
+        echo "Downloading config files in $cfg1 and $cfg2!"
+        mkdir -p Citadel/Saved/Config/LinuxServer
+        wget https://pastebin.com/raw/Rn9BHUUz -O Citadel/Saved/Config/LinuxServer/$cfg1
+        wget https://pastebin.com/raw/FzXyKpiA -O Citadel/Saved/Config/LinuxServer/$cfg2
+    fi
+  </post_install>
+  <configuration_files>
+    <file description="Server Configurations">Citadel/Saved/Config/LinuxServer/Game.ini</file>
+  </configuration_files>
+</game_config>

+ 72 - 0
modules/config_games/server_configs/citadelfwf_win64.xml

@@ -0,0 +1,72 @@
+<game_config>
+  <game_key>citadelfwf_win64</game_key>
+  <protocol>lgsl</protocol>
+  <lgsl_query_name>citadelfwf</lgsl_query_name>
+  <installer>steamcmd</installer>
+  <game_name>Citadel: Forged with Fire</game_name>
+  <server_exec_name>CitadelServer.exe</server_exec_name>
+  <cli_template>-nosteamclient -server -log</cli_template>
+  <reserve_ports>
+    <port type="add" id="QUERY_PORT" cli_string="?QueryPort=">19238</port>
+  </reserve_ports>
+  <console_log>Citadel/Saved/Logs/Citadel.log</console_log>
+  <max_user_amount>70</max_user_amount>
+  <mods>
+    <mod key="default">
+      <name>None</name>
+      <installer_name>489650</installer_name>
+      <installer_login>anonymous</installer_login>
+    </mod>
+  </mods>
+  <replace_texts>
+    <text key="port">
+      <default>Port=.*</default>
+      <var>Port=</var>
+      <filepath>Citadel/Saved/Config/WindowsServer/Engine.ini</filepath>
+    </text>
+    <text key="port">
+      <default>ConnectionPort=.*</default>
+      <var>ConnectionPort=</var>
+      <filepath>Citadel/Saved/Config/WindowsServer/Game.ini</filepath>
+    </text>
+    <text key="query_port">
+      <default>QueryPort=.*</default>
+      <var>QueryPort=</var>
+      <filepath>Citadel/Saved/Config/WindowsServer/Game.ini</filepath>
+    </text>
+    <text key="home_name">
+      <default>(ServerName=")([^",]*)</default>
+      <var>${1}%key%</var>
+      <filepath>Citadel/Saved/Config/WindowsServer/Game.ini</filepath>
+      <options>key-regex</options>
+    </text>
+    <text key="max_players">
+      <default>(PlayerLimit=)([^,]*)</default>
+      <var>${1}%key%</var>
+      <filepath>Citadel/Saved/Config/WindowsServer/Game.ini</filepath>
+      <options>key-regex</options>
+    </text>
+    <text key="control_password">
+      <default>Password=.*</default>
+      <var>Password=</var>
+      <filepath>Citadel/Saved/Config/WindowsServer/Game.ini</filepath>
+    </text>
+  </replace_texts>
+  <post_install>
+    cfg1="Engine.ini"
+    cfg2="Game.ini"
+    if [ -f "Citadel/Saved/Config/WindowsServer" ]
+      then
+        echo "Config files already generated or fixed. OK!"
+      else
+        echo "Config files not found."
+        echo "Downloading config files in $cfg1 and $cfg2!"
+        mkdir -p Citadel/Saved/Config/WindowsServer
+        wget https://pastebin.com/raw/Rn9BHUUz -O Citadel/Saved/Config/WindowsServer/$cfg1
+        wget https://pastebin.com/raw/FzXyKpiA -O Citadel/Saved/Config/WindowsServer/$cfg2
+    fi
+  </post_install>
+  <configuration_files>
+    <file description="Server Configurations">Citadel/Saved/Config/WindowsServer/Game.ini</file>
+  </configuration_files>
+</game_config>

+ 4 - 0
protocol/lgsl/lgsl_protocol.php

@@ -48,6 +48,7 @@ if (!function_exists('lgsl_version')) { // START OF DOUBLE LOAD PROTECTION
 		"callofdutywaw"	=> "Call of Duty: World at War",
 		"callofdutymw2"	=> "Call of Duty: Modern Warfare 2",
 		"callofdutymw3"	=> "Call of Duty: Modern Warfare 3",
+		"citadelfwf"	=> "Citadel: Forged with Fire",
 		"cncrenegade"	=> "Command and Conquer: Renegade",
 		"conanexiles"	=> "Conan Exiles",
 		"crysis"		=> "Crysis",
@@ -195,6 +196,7 @@ if (!function_exists('lgsl_version')) { // START OF DOUBLE LOAD PROTECTION
 		"callofdutywaw"	=> "02",
 		"callofdutymw2"	=> "02",
 		"callofdutymw3"	=> "31",
+		"citadelfwf"	=> "05",
 		"cncrenegade"	=> "03",
 		"conanexiles"	=> "05",
 		"crysis"		=> "06",
@@ -350,6 +352,7 @@ if (!function_exists('lgsl_version')) { // START OF DOUBLE LOAD PROTECTION
 		"callofdutywaw"	=> "qtracker://{IP}:{S_PORT}?game=CallOfDutyWorldAtWar&action=show",
 		"callofdutymw2"	=> "aiw://connect/{IP}:{S_PORT}",
 		"callofdutymw3"	=> "steam://connect/{IP}:{Q_PORT}",
+		"citadelfwf"	=> "steam://connect/{IP}:{Q_PORT}",
 		"cncrenegade"	=> "qtracker://{IP}:{S_PORT}?game=CommandConquerRenegade&action=show",
 		"conanexiles"	=> "steam://connect/{IP}:{Q_PORT}",
 		"crysis"		=> "qtracker://{IP}:{S_PORT}?game=Crysis&action=show",
@@ -495,6 +498,7 @@ if (!function_exists('lgsl_version')) { // START OF DOUBLE LOAD PROTECTION
 			case "bf3"				: $c_to_q = 22000;	$c_def = 25200;	$q_def = 47200;	$c_to_s = 0;	break;
 			case "bf2142"			: $c_to_q = 0;		$c_def = 17567;	$q_def = 29900;	$c_to_s = 0;	break;
 			case "callofdutymw3"	: $c_to_q = -1;		$c_def = 27015;	$q_def = 27014;	$c_to_s = 0;	break;
+			case "citadelfwf"		: $c_to_q = 19238;	$c_def = 7777;	$q_def = 27015;	$c_to_s = 0;	break;
 			case "conanexiles"		: $c_to_q = 19238;	$c_def = 7777;	$q_def = 27015;	$c_to_s = 0;	break;
 			case "cube"				: $c_to_q = 1;		$c_def = 28785;	$q_def = 28786;	$c_to_s = 0;	break;
 			case "dayzmod"			: $c_to_q = 1;		$c_def = 2302;	$q_def = 2303;	$c_to_s = 0;	break;