Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2015
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.19 KB | None | 0 0
  1. ===========================
  2. QUAKE LIVE DEDICATED SERVER
  3. ===========================
  4.  
  5. x. Requirements
  6. x. Updating and Launching
  7. x. Configuring your server
  8. x. Managing server access list
  9. x. Setting up a map pool
  10. x. Creating custom gametypes (factories)
  11. x. Using Steam Workshop
  12. x. Using external remote console
  13. x. Using external stats
  14.  
  15. x. Requirements
  16. ---------------
  17.  
  18. TODO: ask ttimo for help. zlib is definitely in there. libc/libgcc/libstdc?
  19.  
  20. To run the 32-bit version of the server, you will need to install 32-bit versions of all libraries. See your
  21. distribution's instructions on how to perform this.
  22.  
  23.  
  24. x. Updating and Launching
  25. -------------------------
  26.  
  27. Install and update the server through SteamCMD, using a command similar to below.
  28.  
  29. ./steamcmd.sh +login user pass +force_install_dir ./steamapps/common/qlds/ +app_update 349090 +quit
  30.  
  31. Please see the Valve Developer Community for full SteamCMD options: https://developer.valvesoftware.com/wiki/SteamCMD
  32.  
  33. Run the server using the provided run_server_x86.sh and run_server_x64.sh scripts. This will set the proper working
  34. directory and LD_LIBRARY_PATH to the correct libsteam_api.so. You can add command line options at will.
  35.  
  36. A standard server or VPS can host many instances of Quake Live, so you may wish to run multiple servers. We recommend
  37. managing them through a third party process control system. Below is a sample script that will take one parameter: a
  38. number starting at 0. This will launch a server with a unique hostname, port, rcon port, and stats port. This is a
  39. great way to quickly run a small cluster of servers on a single box.
  40.  
  41. You should change the path to reflect where you have installed the game. Never run the server under root.
  42.  
  43. #!/bin/bash
  44. gameport=`expr $1 + 27960`
  45. rconport=`expr $1 + 28960`
  46. servernum=`expr $1 + 1`
  47.  
  48. exec /home/user/steamcmd/steamapps/common/qlds/run_server_x86.sh \
  49. +set net_strict 1 \
  50. +set net_port $gameport \
  51. +set sv_hostname "My Quake Live Server #$servernum" \
  52. +set fs_homepath /home/user/.quakelive/$gameport \
  53. +set zmq_rcon_enable 1 \
  54. +set zmq_rcon_password "dog" \
  55. +set zmq_rcon_port $rconport \
  56. +set zmq_stats_enable 1 \
  57. +set zmq_stats_password "dog" \
  58. +set zmq_stats_port $gameport
  59.  
  60. This can be combined with a process control system like supervisord in order to manage and launch any number of
  61. instances. Note that supervisord is third party software, and the below may change at any point. We will not support
  62. issues involving third party software.
  63.  
  64. You will need to replace "user" with the user name of the dedicated server.
  65.  
  66. [program:quakelive]
  67. command=/home/user/steamcmd/steamapps/common/qlds/launch.sh %(process_num)s
  68. user=user
  69. process_name=qzeroded_%(process_num)s
  70. numprocs=10
  71. autorestart=true
  72.  
  73. In conjunction with the above launch script, this will give you 10 server instances, numbered #1 to #20, starting
  74. at port 27960, with rcon starting at port 28960. They will automatically restart if crashed. For information on using
  75. rcon, please see later in this document.
  76.  
  77.  
  78. x. Configuring your server
  79. --------------------------
  80.  
  81. Configure your server through server.cfg. You may wish to make a copy of this file and place it into your fs_homepath,
  82. as updates to the default server.cfg may revert your changes to default. The default server.cfg is heavily commented,
  83. so please see that for further information.
  84.  
  85. There is no need to specify a map on the command line or server.cfg. The server will automatically execute the variable
  86. "serverstartup" when the server has completed initialization. By default, this will launch a random map selected
  87. from the server's map pool. Please see the below section on configuring map pools.
  88.  
  89. Quake Live servers are designed to handle multiple gametypes, and multiple gametype variations on one server. This
  90. means that your server can switch from Free For All to Capture the Flag to Clan Arena, to even variants of gametypes,
  91. such as InstaGib FFA, and custom variations that provide more traditional competitive settings.
  92.  
  93. Because of this, you should generally not place gameplay settings inside server.cfg. Although the server will attempt
  94. to restore all old settings after switching gametypes, these factory settings will override settings in server.cfg.
  95.  
  96. See the below section on creating custom factories to setup your own match rules.
  97.  
  98.  
  99. x. Managing server access list
  100. ------------------------------
  101.  
  102. Quake Live reads and stores to a persistent text file on disk information about who has access to server moderation,
  103. server administration, and ban list. By default, this is in the file access.txt, and can be changed through the
  104. console variable "g_accessFile"
  105.  
  106. Only edit this file on disk while all servers are stopped, as the game will write out the current access list before
  107. each map load. In order to have access to your server, you will need to add yourself as an admin. Obtain your
  108. 64-bit Steam ID by connecting to any match, and typing /players in the console. Put it in access.txt in the
  109. given format. Example:
  110.  
  111. 76561198072786081|admin
  112.  
  113. Save the file, and start the server. You can then use /mod, /admin, /demote, /ban and /unban commands to manage the
  114. access list while the server is running.
  115.  
  116.  
  117. x. Setting up a map pool
  118. ------------------------
  119.  
  120. The server's map pool accepts a map, and a factory, delimited with a |. See the default mappool.txt for an example.
  121. A different file can be specified through "sv_mapPoolFile"
  122.  
  123. If you wish to use your own custom factories, you can specify them in here so that your custom factory will appear
  124. in the three map voting system at the end of the game.
  125.  
  126. If you wish to lock your server to one gametype, then make sure your map pool only contains maps in that factory,
  127. then add 8 to g_voteFlags to stop "callvote map" from accepting the optional factory argument. This is not
  128. usually needed though; we recommend allowing your players to play and callvote whatever gametypes they wish to
  129. play on your servers, but it is often not bad to restrict Duel servers due to the low player counts.
  130.  
  131.  
  132. x. Creating custom gametypes (factories)
  133. ----------------------------------------
  134.  
  135. Setting up a custom factory is a bit more involved than the past solutions of editing config files, but it allows for
  136. more flexibility in match rules, while ensuring that settings don't leak over into future matches. By default,
  137. Quake Live ships with base rules for every gametype, and a few variations. Other factories may be available on Steam
  138. Workshop.
  139.  
  140. To define your own gametype factory, create a "scripts" folder inside your baseq3 directory, and name the file with
  141. anything that ends in ".factories"
  142.  
  143. Example: baseq3/factories/mynewgametype.factories
  144.  
  145. This file is a JSON file that contains either a JSON array with multiple factories, or a JSON object containing a
  146. single factory. For example, here is the built in InstaGib FFA factory:
  147.  
  148. {
  149. "id": "iffa",
  150. "title": "Instagib FFA"
  151. "author": "id Software",
  152. "description": "Railgun and Gauntlet only. One shot, one kill.",
  153. "basegt": "ffa",
  154. "cvars": {
  155. "g_dropCmds": "0",
  156. "g_spawnArmor": "0",
  157. "dmflags": "28",
  158. "g_instagib": "1",
  159. "g_startingWeapons": "65",
  160. "timelimit": "15",
  161. "g_allowKill": "0",
  162. "fraglimit": "50",
  163. "g_overtime": "0",
  164. "g_loadout": "0"
  165. },
  166. }
  167.  
  168. All fields should be present and of the correct type.
  169.  
  170. "id" is how you will refer to the factory inside a map pool or a callvote, and must be a string.
  171. "title", "author" and "description" are all strings containing info about the factory, and can be seen in Start Match
  172. "basegt" is a string of the base gametype it should apply the settings on. Valid values for "basegt" are:
  173. ffa, duel, race, tdm, ca, ctf, oneflag, har, ft, dom, ad, rr
  174. "cvars" is an object containing key value pairs of the cvar names and values to set.
  175.  
  176. If a factory is invalid, the reason why will be printed in the console during startup, and the factory will not be
  177. available for play.
  178.  
  179.  
  180. x. Using Steam Workshop
  181. -----------------------
  182.  
  183. Quake Live will only autodownload custom content that has been uploaded to Steam Workshop. The legacy HTTP and UDP
  184. download functions have been removed. If you want your players to be able to play custom content on your servers,
  185. you must use Steam Workshop.
  186.  
  187. To add a workshop item to your server, add its item ID to workshop.txt. The item ID can be obtained from the URL
  188. when browsing the Steam Workshop in your browser.
  189.  
  190. Before the server finishes initializing, it will attempt to download all items in workshop.txt, such that custom
  191. content can be included in your map pool. The progress of this process will be printed to the server console, and if
  192. any download fails, it will be skipped and the server will continue to start.
  193.  
  194. To upload content, you will need to use SteamCMD's workshop_build_item command. Please refer to the Steam documentation
  195. on how to upload Workshop content.
  196.  
  197.  
  198. x. Using external remote console
  199. --------------------------------
  200.  
  201. The remote console works differently than previous titles. Rcon is disabled by default, and can be configured using
  202. "zmq_rcon_enable", "zmq_rcon_ip". "zmq_rcon_port" and "zmq_rcon_password". Unlike previous titles, rcon will bind to
  203. the TCP port you specify, not UDP. The socket itself is a ZeroMQ socket, using CZMQ for authentication. Included with
  204. the server is a simple rcon client, zmq_rcon.py, written for Python 2.x. You will need to install Python CZMQ, which
  205. can most easily be done through "pip install czmq" if pip is available on your system. To run the script, use something
  206. similar to the following:
  207.  
  208. python zmq_rcon.py --host=tcp://127.0.0.1:27961 --password=mypass
  209.  
  210.  
  211. x. Using external stats
  212. -----------------------
  213.  
  214. Quake Live also exposes a ZeroMQ publish/subscribe socket that will emit a great amount of detail about the ongoing
  215. match, live as events occur. A basic script is included, zmq_stats_verbose.py, but it will simply print the stats events
  216. to screen as an example. All events emitted by the engine should be valid JSON. Any additional functionality and
  217. storing of stats is left as an exercise to the reader.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement