schema_server_config.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  3. <xs:element name="game_config" type="server_config_type" />
  4. <xs:simpleType name="nonEmptyString">
  5. <xs:restriction base="xs:string">
  6. <xs:minLength value="1" />
  7. </xs:restriction>
  8. </xs:simpleType>
  9. <!-- If game has different query port than the game port
  10. with this you can specify the difference to the game port. -->
  11. <xs:simpleType name="query_port_type_type">
  12. <xs:restriction base="xs:string">
  13. <xs:enumeration value="add" />
  14. <xs:enumeration value="subtract" />
  15. <xs:minLength value="1" />
  16. </xs:restriction>
  17. </xs:simpleType>
  18. <xs:complexType name="query_port_type">
  19. <xs:simpleContent>
  20. <xs:extension base="xs:string">
  21. <xs:attribute name="type" type="query_port_type_type" />
  22. </xs:extension>
  23. </xs:simpleContent>
  24. </xs:complexType>
  25. <xs:simpleType name="cli_param_id_type">
  26. <xs:restriction base="xs:string">
  27. <xs:enumeration value="GAME_TYPE" />
  28. <xs:enumeration value="HOSTNAME" />
  29. <xs:enumeration value="IP" />
  30. <xs:enumeration value="MAP" />
  31. <xs:enumeration value="PID_FILE" />
  32. <xs:enumeration value="PLAYERS" />
  33. <xs:enumeration value="PORT" />
  34. <xs:enumeration value="QUERY_PORT" />
  35. <xs:enumeration value="BASE_PATH" />
  36. <xs:enumeration value="HOME_PATH" />
  37. <xs:enumeration value="SAVE_PATH" />
  38. <xs:enumeration value="OUTPUT_PATH" />
  39. <xs:enumeration value="USER_PATH" />
  40. <xs:enumeration value="CONTROL_PASSWORD" />
  41. </xs:restriction>
  42. </xs:simpleType>
  43. <xs:complexType name="cli_param_type">
  44. <xs:simpleContent>
  45. <xs:extension base="xs:string">
  46. <xs:attribute name="id" type="cli_param_id_type" />
  47. <xs:attribute name="cli_string" type="xs:string" />
  48. <xs:attribute name="options" type="nonEmptyString" />
  49. </xs:extension>
  50. </xs:simpleContent>
  51. </xs:complexType>
  52. <xs:complexType name="cli_params_type">
  53. <xs:sequence>
  54. <xs:element name="cli_param" type="cli_param_type" maxOccurs="unbounded" />
  55. </xs:sequence>
  56. </xs:complexType>
  57. <!-- Type for server control protocol -->
  58. <xs:simpleType name="control_protocol_type">
  59. <xs:restriction base="xs:string">
  60. <xs:enumeration value="rcon" /><!-- HL, Q1/2/3 -->
  61. <xs:enumeration value="rcon2" /><!-- HL2(source) -->
  62. <xs:enumeration value="lcon" /><!-- legacy console -->
  63. <xs:enumeration value="armabe" /><!-- Arma 2 BattlEye -->
  64. <xs:enumeration value="minecraft" /><!-- Minecraft -->
  65. <xs:minLength value="1" />
  66. </xs:restriction>
  67. </xs:simpleType>
  68. <xs:simpleType name="control_protocol_type_type">
  69. <xs:restriction base="xs:string">
  70. <xs:enumeration value="new" /><!-- Half-Life version 1.1.0.6 or newer -->
  71. <xs:enumeration value="old" /><!-- Quake 1/2/3 or old Half-Life -->
  72. <xs:minLength value="1" />
  73. </xs:restriction>
  74. </xs:simpleType>
  75. <!-- Type for mods, each server must have at least one mod called, e.g., Default. -->
  76. <xs:complexType name="mod_type">
  77. <xs:sequence>
  78. <xs:element name="name" type="xs:string" />
  79. <!-- Installer name overrides the key attribute if present. -->
  80. <xs:element name="installer_name" type="xs:string" minOccurs="0" />
  81. <xs:element name="installer_login" type="xs:string" minOccurs="0" />
  82. <xs:element name="betaname" type="xs:string" minOccurs="0" />
  83. <xs:element name="betapwd" type="xs:string" minOccurs="0" />
  84. <xs:element name="steam_bitness" type="xs:positiveInteger" minOccurs="0" />
  85. </xs:sequence>
  86. <xs:attribute name="key" type="xs:string" />
  87. </xs:complexType>
  88. <xs:complexType name="mods_type">
  89. <xs:sequence>
  90. <xs:element name="mod" type="mod_type" maxOccurs="unbounded" />
  91. </xs:sequence>
  92. </xs:complexType>
  93. <xs:complexType name="simple_key_type">
  94. <xs:simpleContent>
  95. <xs:extension base="xs:string">
  96. <xs:attribute name="key" type="xs:string" />
  97. </xs:extension>
  98. </xs:simpleContent>
  99. </xs:complexType>
  100. <xs:complexType name="option_type">
  101. <xs:simpleContent>
  102. <xs:extension base="xs:string">
  103. <xs:attribute name="value" type="xs:string" />
  104. </xs:extension>
  105. </xs:simpleContent>
  106. </xs:complexType>
  107. <!-- Type for server cfg params replace -->
  108. <xs:complexType name="replace_text_type">
  109. <xs:choice minOccurs="0" maxOccurs="unbounded">
  110. <xs:element name="default" type="xs:string" minOccurs="0" />
  111. <xs:element name="var" type="xs:string" />
  112. <xs:element name="filepath" type="xs:string" />
  113. <xs:element name="options" type="xs:string" />
  114. <xs:element name="occurrence" type="xs:string" minOccurs="0" />
  115. </xs:choice>
  116. <xs:attribute name="key" type="xs:string" />
  117. </xs:complexType>
  118. <xs:complexType name="alltext_type">
  119. <xs:sequence>
  120. <xs:element name="text" type="replace_text_type" maxOccurs="unbounded" />
  121. </xs:sequence>
  122. <xs:attribute name="key" type="xs:string" />
  123. </xs:complexType>
  124. <xs:complexType name="replace_texts_type">
  125. <xs:choice minOccurs="0" maxOccurs="unbounded" >
  126. <xs:element name="alltext" type="alltext_type" />
  127. <xs:element name="text" type="replace_text_type" />
  128. </xs:choice>
  129. </xs:complexType>
  130. <!-- Type for server cli params -->
  131. <xs:complexType name="server_param_type">
  132. <xs:choice minOccurs="0" maxOccurs="unbounded">
  133. <xs:element name="option" type="option_type" />
  134. <xs:element name="attribute" type="simple_key_type" />
  135. <xs:element name="default" type="simple_key_type" maxOccurs="1" />
  136. <xs:element name="caption" type="xs:string" maxOccurs="1" />
  137. <xs:element name="desc" type="xs:string" maxOccurs="1" />
  138. <xs:element name="options" type="xs:string" />
  139. <xs:element name="access" type="xs:string" minOccurs="0" maxOccurs="1" />
  140. </xs:choice>
  141. <xs:attribute name="id" type="xs:string" />
  142. <xs:attribute name="key" type="xs:string" />
  143. <xs:attribute name="type" type="xs:string" default="text" />
  144. </xs:complexType>
  145. <xs:complexType name="group_type">
  146. <xs:sequence>
  147. <xs:element name="param" type="server_param_type" maxOccurs="unbounded" />
  148. </xs:sequence>
  149. <xs:attribute name="key" type="xs:string" />
  150. <xs:attribute name="name" type="xs:string" />
  151. </xs:complexType>
  152. <xs:complexType name="server_params_type">
  153. <xs:choice minOccurs="0" maxOccurs="unbounded" >
  154. <xs:element name="group" type="group_type" />
  155. <xs:element name="param" type="server_param_type" />
  156. </xs:choice>
  157. </xs:complexType>
  158. <!-- Type for reserve ports -->
  159. <xs:simpleType name="port_type_type">
  160. <xs:restriction base="xs:string">
  161. <xs:enumeration value="add" />
  162. <xs:enumeration value="subtract" />
  163. <xs:minLength value="1" />
  164. </xs:restriction>
  165. </xs:simpleType>
  166. <xs:complexType name="port_type">
  167. <xs:simpleContent>
  168. <xs:extension base="xs:string">
  169. <xs:attribute name="type" type="port_type_type" />
  170. <xs:attribute name="id" type="xs:string" />
  171. <xs:attribute name="cli_string" type="xs:string" />
  172. <xs:attribute name="options" type="nonEmptyString" />
  173. </xs:extension>
  174. </xs:simpleContent>
  175. </xs:complexType>
  176. <xs:complexType name="reserve_ports_type">
  177. <xs:sequence>
  178. <xs:element name="port" type="port_type" maxOccurs="unbounded" />
  179. </xs:sequence>
  180. </xs:complexType>
  181. <!-- Type for server cfg custom fields -->
  182. <xs:complexType name="custom_field_type">
  183. <xs:choice minOccurs="0" maxOccurs="unbounded">
  184. <xs:element name="option" type="option_type" />
  185. <xs:element name="default" type="xs:string" minOccurs="0" />
  186. <xs:element name="default_value" type="xs:string" minOccurs="0" />
  187. <xs:element name="var" type="xs:string" />
  188. <xs:element name="filepath" type="xs:string" />
  189. <xs:element name="options" type="xs:string" />
  190. <xs:element name="occurrence" type="xs:string" minOccurs="0" />
  191. <xs:element name="access" type="xs:string" minOccurs="0" maxOccurs="1" />
  192. <xs:element name="desc" type="xs:string" maxOccurs="1" />
  193. </xs:choice>
  194. <xs:attribute name="id" type="xs:string" />
  195. <xs:attribute name="key" type="xs:string" />
  196. <xs:attribute name="type" type="xs:string" default="text" />
  197. </xs:complexType>
  198. <xs:complexType name="custom_fields_type">
  199. <xs:choice minOccurs="0" maxOccurs="unbounded" >
  200. <xs:element name="field" type="custom_field_type" />
  201. </xs:choice>
  202. </xs:complexType>
  203. <!-- Type for player_info -->
  204. <xs:complexType name="index_type">
  205. <xs:simpleContent>
  206. <xs:extension base="xs:string">
  207. <xs:attribute name="key" type="xs:string" />
  208. </xs:extension>
  209. </xs:simpleContent>
  210. </xs:complexType>
  211. <xs:complexType name="player_info_type">
  212. <xs:choice minOccurs="0" maxOccurs="unbounded" >
  213. <xs:element name="index" type="index_type" />
  214. </xs:choice>
  215. </xs:complexType>
  216. <!-- Type for server player_commands -->
  217. <xs:complexType name="command_type">
  218. <xs:choice minOccurs="0" maxOccurs="unbounded">
  219. <xs:element name="option" type="option_type" />
  220. <xs:element name="default" type="xs:string" maxOccurs="1" />
  221. <xs:element name="string" type="xs:string" />
  222. </xs:choice>
  223. <xs:attribute name="key" type="xs:string" />
  224. <xs:attribute name="type" type="xs:string" default="text" />
  225. </xs:complexType>
  226. <xs:complexType name="player_commands_type">
  227. <xs:choice minOccurs="0" maxOccurs="unbounded" >
  228. <xs:element name="command" type="command_type" />
  229. </xs:choice>
  230. </xs:complexType>
  231. <!-- Type for config files module -->
  232. <xs:complexType name="files_type">
  233. <xs:simpleContent>
  234. <xs:extension base="xs:string">
  235. <xs:attribute name="description" type="xs:string" />
  236. <xs:attribute name="options" type="nonEmptyString" />
  237. </xs:extension>
  238. </xs:simpleContent>
  239. </xs:complexType>
  240. <xs:complexType name="configuration_files_type">
  241. <xs:sequence>
  242. <xs:element name="file" type="files_type" maxOccurs="unbounded" />
  243. </xs:sequence>
  244. </xs:complexType>
  245. <!-- The main of the template -->
  246. <xs:complexType name="server_config_type">
  247. <xs:sequence>
  248. <xs:element name="game_key" type="nonEmptyString" />
  249. <xs:element name="protocol" type="nonEmptyString" minOccurs="0"/>
  250. <xs:element name="lgsl_query_name" type="nonEmptyString" minOccurs="0" />
  251. <xs:element name="gameq_query_name" type="nonEmptyString" minOccurs="0" />
  252. <xs:element name="installer" type="nonEmptyString" minOccurs="0" />
  253. <xs:element name="game_name" type="nonEmptyString" />
  254. <xs:element name="server_exec_name" type="nonEmptyString" />
  255. <xs:element name="query_port" type="query_port_type" minOccurs="0" />
  256. <xs:element name="cli_template" type="nonEmptyString" minOccurs="0" />
  257. <xs:element name="cli_params" type="cli_params_type" minOccurs="0" />
  258. <xs:element name="reserve_ports" type="reserve_ports_type" minOccurs="0" />
  259. <xs:element name="cli_allow_chars" type="nonEmptyString" minOccurs="0" />
  260. <xs:element name="maps_location" type="nonEmptyString" minOccurs="0" />
  261. <xs:element name="map_list" type="nonEmptyString" minOccurs="0" />
  262. <xs:element name="console_log" type="nonEmptyString" minOccurs="0" />
  263. <xs:element name="exe_location" type="nonEmptyString" minOccurs="0" />
  264. <xs:element name="max_user_amount" type="xs:positiveInteger" minOccurs="0" />
  265. <xs:element name="control_protocol" type="control_protocol_type" minOccurs="0" />
  266. <xs:element name="control_protocol_type" type="control_protocol_type_type" minOccurs="0" />
  267. <xs:element name="mods" type="mods_type" />
  268. <xs:element name="replace_texts" type="replace_texts_type" minOccurs="0" />
  269. <xs:element name="server_params" type="server_params_type" minOccurs="0" />
  270. <xs:element name="custom_fields" type="custom_fields_type" minOccurs="0" />
  271. <xs:element name="list_players_command" type="nonEmptyString" minOccurs="0" />
  272. <xs:element name="player_info_regex" type="nonEmptyString" minOccurs="0" />
  273. <xs:element name="player_info" type="player_info_type" minOccurs="0" />
  274. <xs:element name="player_commands" type="player_commands_type" minOccurs="0" />
  275. <xs:element name="pre_install" type="nonEmptyString" minOccurs="0" />
  276. <xs:element name="post_install" type="nonEmptyString" minOccurs="0" />
  277. <xs:element name="pre_start" type="nonEmptyString" minOccurs="0" />
  278. <xs:element name="environment_variables" type="nonEmptyString" minOccurs="0" />
  279. <xs:element name="lock_files" type="nonEmptyString" minOccurs="0" />
  280. <xs:element name="configuration_files" type="configuration_files_type" minOccurs="0" />
  281. </xs:sequence>
  282. </xs:complexType>
  283. </xs:schema>