Просмотр исходного кода

TrackMania Nations Forever xml update

- Rewritten the server startup command line
- Removed "/internet" it was useless, official docs says this is "disapeared, it's now the default"
- Removed "IP and "PORT" from "cli_params", OGP will write out to the config file
- Removed "login" and "password" account fields from "server_params", since it can be saved in the config file manually where server owners also needs to set the last three digit of the cd-key to success login to the Master server
- Removed "MAPS" from "cli_params" and "maps_location" selector since it named wrong, it is matchsettings and could not set custom there
- Added the ability to choose the "MatchSettings" before server startup in the "server_params"
- Fixed "max_user_amount" to maximum supported slot
- Added to set "home_name" automatically by OGP in the startup command line (because the server config has syntax error "replace_texts" cannot use here)
- Added to set "max_players", "port" and "ip" automatically by OGP in the config file
- Added "custom_fileds" to set "server_p2p_port", "xmlrpc_allowremote" and "xmlrpc_port" in the config file
- Added support for Windows 32 bit OS
- Added original game icon
- Cosmetics corrections

Note: to success server start you have to use a registered account in the config file, this can be done in the game easily.
rocco27 8 лет назад
Родитель
Сommit
63eae48cf9

BIN
images/icons/tmnf.png


+ 51 - 19
modules/config_games/server_configs/trackmanianf_linux32.xml

@@ -1,30 +1,62 @@
 <game_config>
-  <game_key>tmf_linux32</game_key>
+  <game_key>trackmanianf_linux32</game_key>
   <game_name>TrackMania Nations Forever</game_name>
   <server_exec_name>TrackmaniaServer</server_exec_name>
-  <cli_template>/internet /bindip%IP%%PORT% %MAP%.txt /nodaemon /dedicated_cfg=dedicated_cfg.txt</cli_template>
+  <cli_template>/nodaemon %MS% /dedicated_cfg=dedicated_cfg.txt %HOSTNAME%</cli_template>
   <cli_params>
-    <cli_param id="MAP" cli_string="/game_settings=MatchSettings/Nations/" />
-    <cli_param id="IP" cli_string="=" />
-    <cli_param id="PORT" cli_string=":" />
+    <cli_param id="HOSTNAME" cli_string="/servername=" options="q" />
   </cli_params>
-  <maps_location>GameData/Tracks/MatchSettings/Nations/</maps_location>
-  <max_user_amount>32</max_user_amount>
+  <max_user_amount>255</max_user_amount>
   <mods>
     <mod key="tmnf">
-      <name>none</name>
+      <name>None</name>
     </mod>
   </mods>
+  <replace_texts>
+    <text key="max_players">
+      <default>max_players</default>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+    </text>
+    <text key="port">
+      <default>server_port</default>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+    </text>
+    <text key="ip">
+      <default>bind_ip_address</default>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+    </text>
+  </replace_texts>
   <server_params>
-	<param key="/login=" type="text">
-	  <option>ns</option>
-      <caption>/login=</caption>
-      <desc>Your TMF login username</desc>
-	</param>
-	<param key="/password=" type="text">
-	  <option>ns</option>
-      <caption>/password=</caption>
-      <desc>Your TMF login password</desc>
-	</param>
+    <param key="/game_settings=MatchSettings/Nations/" type="text" id="MS">
+      <default>NationsWhite.txt</default>
+      <options>ns</options>
+      <desc>Set the match settings file (available files are NationsWhite.txt, NationsGreen.txt, NationsBlue.txt and NationsRed.txt).</desc>
+    </param>
   </server_params>
-</game_config>
+  <custom_fields>
+    <field key="server_p2p_port" type="text">
+      <default>server_p2p_port</default>
+      <default_value>3450</default_value>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+      <desc>Port number used by the server to listen the peer-to-peer connections.</desc>
+    </field>
+    <field key="xmlrpc_allowremote" type="text">
+      <default>xmlrpc_allowremote</default>
+      <default_value>False</default_value>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+      <desc>Enables/Disables remote connections. You can either set it to True or False or specify an IP (or a symbolic name): in that case only connections from that IP and localhost will be accepted.</desc>
+    </field>
+    <field key="xmlrpc_port" type="text">
+      <default>xmlrpc_port</default>
+      <default_value>5000</default_value>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+      <desc>Port number used by the server to listen xmlrpc calls.</desc>
+    </field>
+  </custom_fields>
+</game_config>

+ 62 - 0
modules/config_games/server_configs/trackmanianf_win32.xml

@@ -0,0 +1,62 @@
+<game_config>
+  <game_key>trackmanianf_win32</game_key>
+  <game_name>TrackMania Nations Forever</game_name>
+  <server_exec_name>TrackmaniaServer.exe</server_exec_name>
+  <cli_template>%MS% /dedicated_cfg=dedicated_cfg.txt %HOSTNAME%</cli_template>
+  <cli_params>
+    <cli_param id="HOSTNAME" cli_string="/servername=" options="q" />
+  </cli_params>
+  <max_user_amount>255</max_user_amount>
+  <mods>
+    <mod key="tmnf">
+      <name>None</name>
+    </mod>
+  </mods>
+  <replace_texts>
+    <text key="max_players">
+      <default>max_players</default>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+    </text>
+    <text key="port">
+      <default>server_port</default>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+    </text>
+    <text key="ip">
+      <default>bind_ip_address</default>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+    </text>
+  </replace_texts>
+  <server_params>
+    <param key="/game_settings=MatchSettings/Nations/" type="text" id="MS">
+      <default>NationsWhite.txt</default>
+      <options>ns</options>
+      <desc>Set the match settings file (available files are NationsWhite.txt, NationsGreen.txt, NationsBlue.txt and NationsRed.txt).</desc>
+    </param>
+  </server_params>
+  <custom_fields>
+    <field key="server_p2p_port" type="text">
+      <default>server_p2p_port</default>
+      <default_value>3450</default_value>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+      <desc>Port number used by the server to listen the peer-to-peer connections.</desc>
+    </field>
+    <field key="xmlrpc_allowremote" type="text">
+      <default>xmlrpc_allowremote</default>
+      <default_value>False</default_value>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+      <desc>Enables/Disables remote connections. You can either set it to True or False or specify an IP (or a symbolic name): in that case only connections from that IP and localhost will be accepted.</desc>
+    </field>
+    <field key="xmlrpc_port" type="text">
+      <default>xmlrpc_port</default>
+      <default_value>5000</default_value>
+      <filepath>GameData/Config/dedicated_cfg.txt</filepath>
+      <options>tags</options>
+      <desc>Port number used by the server to listen xmlrpc calls.</desc>
+    </field>
+  </custom_fields>
+</game_config>