Difference between revisions of "Dedicated Server"

From MechWarrior: Living Legends Wiki
Jump to: navigation, search
(port, but this is old. needs images of better, GUI'd dedicated server stuff)
 
(Hint that http is needed for map downloads)
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Out of date | | This article needs a rewrite to incorporate the new launcher, server variables and league modes}}
 
 
 
==Overview==
 
==Overview==
  
This page will describe in a few easy steps to start up a dedicated server for Mechwarrior Living Legends. Examples are used to illustrate what is necessary to get it running as many other servers out there.
+
This page will describe in a few easy steps to start up a dedicated server for ''MechWarrior Living Legends''. Since 0.4.0, the process for setting up a dedicated server has become much easier than it used to be.
  
 
==Server Configuration==
 
==Server Configuration==
  
In order to run a dedicated server you need to set it up with a configuration file which tells the server what to do. There are two files required:
+
Server configuration is done entirely with the MWLL Launcher. First, select the Dedicated Server Configuration option from the launcher.
* <code>levelrotation.xml</code> - used to specify the maps and per-map settings
 
* <code>server.cfg</code> - used for the general server configuration
 
  
These two files need to be placed in either one of two locations:
+
===Map Rotation===
<code>%ProgramFiles%\Crysis Wars\mod\mwll</code> or <code>%Program Files%\Crysis Wars\mod\mwll\server</code>
 
  
'''Note:''' As of MWLL 0.4, the MWLL Launchers dedicated server section can also be used to generate the required files.
+
Choose the maps you wish to enter into the rotation by selecting them, then clicking Add to Rotation. All the maps available to your server are categorized by game mode, so double-check that you are adding maps from the desired game mode. From there, you can click an added map and configure the settings directly for that map, including spawn timers, respawn limits, income scaling and more.
  
===Levelrotation.xml===
+
The download URL is used for custom maps to tell the game where to download the map from when a player trying to connect to your server does not have it. You can find the main repository of maps [http://mechlivinglegends.net/maps/ here]; simply find the custom map(s) you are using, copy the link for it, replace ''https'' with ''http'' if present (!), and paste it into its download URL bar.
  
Here is an example for a levelrotation. You can add and remove maps as needed and also remove the randomizer if you want them to be played in order. This file does not need to be created since MWLL does come with a default levelrotation that looks almost the same. If you are not happy with it you can create a new one in the mwll directory and load that instead.
+
[[File:Dedicated server.PNG|right|thumb|An example of a simple [[Solaris Arena]] map rotation.]]
  
<pre>
+
===General Settings===
<levelRotation randomize="1">
 
<level name="Multiplayer/TSA/TSA_Sandblasted" gameRules="TeamSolarisArena">
 
  <setting setting="g_timelimit 100"/>
 
  <setting setting="g_fraglimit 0"/>
 
  <setting setting="g_pp_scale_income 1.00"/>
 
  <setting setting="g_revivetime 5"/>
 
  <setting setting="g_roundtime 100"/>
 
  <setting setting="g_roundlimit 0"/>
 
  <setting setting="g_preroundtime 0"/>
 
  <setting setting="g_suddendeath_time 0"/>
 
</level>
 
<level name="Multiplayer/TSA/TSA_Marshes" gameRules="TeamSolarisArena">
 
  <setting setting="g_timelimit 100"/>
 
  <setting setting="g_fraglimit 0"/>
 
  <setting setting="g_pp_scale_income 1.00"/>
 
  <setting setting="g_revivetime 5"/>
 
  <setting setting="g_roundtime 100"/>
 
  <setting setting="g_roundlimit 0"/>
 
  <setting setting="g_preroundtime 0"/>
 
  <setting setting="g_suddendeath_time 0"/>
 
</level>
 
<level name="Multiplayer/TSA/TSA_Inferno" gameRules="TeamSolarisArena">
 
  <setting setting="g_timelimit 100"/>
 
  <setting setting="g_fraglimit 0"/>
 
  <setting setting="g_pp_scale_income 1.00"/>
 
  <setting setting="g_revivetime 5"/>
 
  <setting setting="g_roundtime 100"/>
 
  <setting setting="g_roundlimit 0"/>
 
  <setting setting="g_preroundtime 0"/>
 
  <setting setting="g_suddendeath_time 0"/>
 
</level>
 
  <level name="Multiplayer/TSA/TSA_Clearcut" gameRules="TeamSolarisArena">
 
  <setting setting="g_timelimit 100"/>
 
  <setting setting="g_fraglimit 0"/>
 
  <setting setting="g_pp_scale_income 1.00"/>
 
  <setting setting="g_revivetime 5"/>
 
  <setting setting="g_roundtime 100"/>
 
  <setting setting="g_roundlimit 0"/>
 
  <setting setting="g_preroundtime 0"/>
 
  <setting setting="g_suddendeath_time 0"/>
 
</level>
 
</levelRotation>
 
</pre>
 
  
===Server.cfg===
+
Under this tab, you can set the server's name, the port it will use and whether or not it is password protected. The server's capacity and auto-start limits can also be set here, along with automatic ban settings to prevent egregious teamkilling.
  
The <code>server.cfg</code> is used to pre-configure your server when starting up. This example here should get you all set so use it as your own <code>server.cfg</code> which is placed in your mwll directory.
+
While forwarding the game's port is not necessary, doing so will allow it to be visible on websites such as [https://stats.spikx.net/mwll.html Spooky's online server browser] and via the MWLL Server Beacon bot on [[Discord]].
  
<pre>
+
===Advanced Settings===
g_useProfile = 1
 
g_teamlock = 0
 
  
r_ShadersAsyncCompiling = 1
+
The HTTP server options allow for the remote management of your server using an external tool as opposed to the server in-game console, which can cause some issues. Debugging has the server collect logs in case of a crash or other problem and can be used to keep chat logs.
r_driver = "DX9"
 
  
sv_levelrotation = "levelrotation.xml"
+
==Known Issues==
sv_servername = "Servername"
 
sv_password = "0"
 
  
sv_voice_enable_groups 0
+
*Naming the <code>levelrotation.xml</code> file anything other than <code>levelrotation.xml</code> and trying to load it inside the server.cfg is bound to fail. Crysis has a bug that ignores this variable, and it will subsequently load the default <code>levelrotation.xml</code> that came with the mod.
net_enable_voice_chat = 0
 
  
sv_cheatprotection = 0
+
*Modifications made directly to the server.cfg file, found in the My Documents/My Games/Crysis Wars/MWLL/server folder will not take effect if the launcher configuration tool is used, as they will be overwritten. Always keep a backup of your server.cfg file (unless you do intend to overwrite it).
net_pb_sv_enable false
 
sv_ranked = 0
 
sv_maxplayers = 32
 
sv_bandwidth = 900000
 
sv_packetRate  = 240
 
  
g_timelimit = 100
+
==Unlimited Funds Testing Setup==
g_minteamlimit = 0
+
To setup a private testing server where you can have unlimited money, enter the command '''sv_leaguemode_enabled = 1''' followed by '''sv_leaguemode_givecbills = 1''' into the server console. This will enable League Mode on your server and from there, every time you press the Home key, you will receive 100,000 CBills.
g_revivetime = 5
 
g_autoteambalance = 0
 
g_tk_punish = 0
 
g_tk_punish_limit = 100
 
 
 
ban_timeout = 600
 
 
 
log_verbosity = 1
 
log_fileverbosity = 1
 
 
 
g_nextlevel
 
</pre>
 
 
 
===Game modes===
 
There are currently three game modes available which can be set via <code>sv_gamerules</code> or the <code>gameRules</code> attribute in the level rotation:
 
  
* <code>TerrainControl</code> - works with all <code>TC</code> maps
+
== launching ==
* <code>TeamSolarisArena</code> - works with all <code>TSA</code> maps
+
The server can be launched from the launcher, or alternatively from an custom created shortcut.<br>
* <code>TestOfStrength</code> - works with all <code>TSA</code> maps
+
/TODO/ put a screenshot of shortcut parameters
  
===Server Startup===
+
== termination ==
 
+
If all went well, the server can be shut down by typing quit into the console too.
Go to your <code>Crysis Wars\bin32</code> (or <code>Crysis Wars\bin64</code>) directory and chose the ''CrysisDedicatedServer.exe'' with a right-click, then ''Send to'' --> ''Desktop'' to create a new shortcut to the server binary.
 
:Now edit this shortcut by doing a right-click on it on the desktop icon and choosing ''Properties''. In the ''Target'' box add a <code>-mod MWLL +exec server.cfg</code> to it.
 
:This should be enough to get you going.
 
 
 
==Running the Server==
 
 
 
To start the server just double click on the created shortcut on your desktop. A dos window will come up which is the server console for your created dedicated server.
 
 
 
==Known Issues==
 
 
 
Name the levelrotation anything else than <code>levelrotation.xml</code> and trying to load it inside the server.cfg is bound to fail. Crysis has a bug that ignores this variable it will load the default <code>levelrotation.xml</code> that came with the mod.
 
 
 
==Unlimited Funds Testing Setup==
 
To setup a private testing server to spawn any type of mech follow these steps:
 
* Create folder <code>%ProgramFiles%\Crysis Wars\mod\mwll\server</code>
 
* Create <code>server.cfg</code> and <code>levelrotation.xml</code> as per above sections and place into the new <code>\server</code> folder (don't forget to customize your servername and password)
 
* Create shortcut to one of the ''CrysisDedicatedServer.exe'' executable files (64-bit or 32-bit) as described in the section above
 
* Run the shortcut
 
* Enter the following commands at the console:
 
:<code>sv_gamerules TestofStrength</code>
 
:<code>sv_starting_cbills 10000000</code>
 
:<code>map TSA_Sandblasted</code>
 
* Move the <code>\server</code> folder OUT of the mwll directory (to your desktop or something) Leaving it there will produce a "cheat" warning for modified game files when running the client/game
 
* Run your game as normal, you should find your game listed in the "Multiplayer" > "Local Area Network" listing
 
* When finished, typing <code>quit</code> in the server console window will shutdown the dedicated server
 
  
 
{{Navbox Guides}}
 
{{Navbox Guides}}

Revision as of 08:08, 16 May 2018

Overview

This page will describe in a few easy steps to start up a dedicated server for MechWarrior Living Legends. Since 0.4.0, the process for setting up a dedicated server has become much easier than it used to be.

Server Configuration

Server configuration is done entirely with the MWLL Launcher. First, select the Dedicated Server Configuration option from the launcher.

Map Rotation

Choose the maps you wish to enter into the rotation by selecting them, then clicking Add to Rotation. All the maps available to your server are categorized by game mode, so double-check that you are adding maps from the desired game mode. From there, you can click an added map and configure the settings directly for that map, including spawn timers, respawn limits, income scaling and more.

The download URL is used for custom maps to tell the game where to download the map from when a player trying to connect to your server does not have it. You can find the main repository of maps here; simply find the custom map(s) you are using, copy the link for it, replace https with http if present (!), and paste it into its download URL bar.

An example of a simple Solaris Arena map rotation.

General Settings

Under this tab, you can set the server's name, the port it will use and whether or not it is password protected. The server's capacity and auto-start limits can also be set here, along with automatic ban settings to prevent egregious teamkilling.

While forwarding the game's port is not necessary, doing so will allow it to be visible on websites such as Spooky's online server browser and via the MWLL Server Beacon bot on Discord.

Advanced Settings

The HTTP server options allow for the remote management of your server using an external tool as opposed to the server in-game console, which can cause some issues. Debugging has the server collect logs in case of a crash or other problem and can be used to keep chat logs.

Known Issues

  • Naming the levelrotation.xml file anything other than levelrotation.xml and trying to load it inside the server.cfg is bound to fail. Crysis has a bug that ignores this variable, and it will subsequently load the default levelrotation.xml that came with the mod.
  • Modifications made directly to the server.cfg file, found in the My Documents/My Games/Crysis Wars/MWLL/server folder will not take effect if the launcher configuration tool is used, as they will be overwritten. Always keep a backup of your server.cfg file (unless you do intend to overwrite it).

Unlimited Funds Testing Setup

To setup a private testing server where you can have unlimited money, enter the command sv_leaguemode_enabled = 1 followed by sv_leaguemode_givecbills = 1 into the server console. This will enable League Mode on your server and from there, every time you press the Home key, you will receive 100,000 CBills.

launching

The server can be launched from the launcher, or alternatively from an custom created shortcut.
/TODO/ put a screenshot of shortcut parameters

termination

If all went well, the server can be shut down by typing quit into the console too.