105 lines
2.1 KiB
Markdown
105 lines
2.1 KiB
Markdown
# XML Game Configuration System
|
|
|
|
## Purpose
|
|
|
|
The XML game configuration system describes how a game server should be started, queried, and customized.
|
|
|
|
Primary files:
|
|
|
|
- `Panel/modules/config_games/schema_server_config.xml`
|
|
- `Panel/modules/config_games/server_config_parser.php`
|
|
- `Panel/modules/config_games/xml_config_creator.php`
|
|
- `Panel/modules/config_games/config_servers.php`
|
|
- `Panel/modules/config_games/cli-params.php`
|
|
- `Panel/modules/config_games/set_params.php`
|
|
|
|
## What XML Controls
|
|
|
|
The schema supports:
|
|
|
|
- game and installer names
|
|
- startup command templates
|
|
- CLI parameter substitution
|
|
- reserved ports
|
|
- query port calculation
|
|
- control protocol selection
|
|
- mod definitions
|
|
- custom fields
|
|
- server parameter groups
|
|
- text replacement helpers
|
|
|
|
## Important Variables
|
|
|
|
The schema and startup builder can work with variables such as:
|
|
|
|
- `GAME_TYPE`
|
|
- `HOSTNAME`
|
|
- `IP`
|
|
- `MAP`
|
|
- `PID_FILE`
|
|
- `PLAYERS`
|
|
- `PORT`
|
|
- `QUERY_PORT`
|
|
- `BASE_PATH`
|
|
- `HOME_PATH`
|
|
- `SAVE_PATH`
|
|
- `OUTPUT_PATH`
|
|
- `USER_PATH`
|
|
- `CONTROL_PASSWORD`
|
|
|
|
## Startup Parameters
|
|
|
|
The Panel builds startup parameters from the XML template and the stored server configuration.
|
|
|
|
Key concepts:
|
|
|
|
- `cli_template`
|
|
- `cli_params`
|
|
- `reserve_ports`
|
|
- `server_params`
|
|
- `custom_fields`
|
|
- `clean_server_param_value`
|
|
|
|
The XML file defines:
|
|
|
|
- which parameters exist
|
|
- how they are quoted or spaced
|
|
- whether the parameter is editable by the customer
|
|
- what defaults should be used
|
|
|
|
## Query Definitions
|
|
|
|
The XML schema supports query-related concepts such as:
|
|
|
|
- `gameq`
|
|
- `lgsl`
|
|
- `teamspeak3`
|
|
- query port offset calculations
|
|
- control protocol selection
|
|
|
|
These values are used by `gamemanager` and the agent status logic to calculate query metadata, not to decide online/offline by themselves.
|
|
|
|
## Installation and File Editing
|
|
|
|
XML definitions also feed:
|
|
|
|
- config file shortcuts
|
|
- install-time behavior
|
|
- docs links
|
|
- reserved ports
|
|
- mod or content behavior
|
|
|
|
## Recommended Mental Model
|
|
|
|
Think of the XML system as the capability definition layer:
|
|
|
|
```text
|
|
game XML
|
|
-> startup template
|
|
-> parameter rules
|
|
-> query rules
|
|
-> content/mod hooks
|
|
-> docs links
|
|
-> scheduler and status hints
|
|
```
|
|
|