For the complete documentation index, see llms.txt. This page is also available as Markdown.

Data Overlays

Run multiple worlds from one GameServer binary without duplicating config files using the data overlay system

The GameServer supports a data overlay mechanism that lets a single installation serve multiple worlds (for example a primary world plus a Castle Siege subserver) without duplicating configuration files. You point each GameServer process at a shared main folder and an optional small overlay folder containing only the files you want to change. Any file missing from the overlay is read from the main folder unchanged.

This eliminates the old pattern of maintaining two parallel Data\ folders that had to be kept in sync by hand.

The Two Folder Roots

There are two independent folder roots, each with its own optional overlay. An admin can override one, both, or neither.

GameData (shared game content)

The game content tree: item drops, monster spawns, plugin XML configs, map data, effects, messages, and so on.

Property
Value

Default location

..\Data\ relative to GameServer.exe (one folder up)

Contains

Item, Monster, MonsterSetBase\, MapManager.xml, MapServerInfo.xml, Effect.xml, Message.xml, Plugins\*.xml, Skill\, Event, etc.

GameServerData (server identity config)

The per-server config tree. These are the six GameServerInfo - *.dat files that define the server name, port, code, license key, and event toggles.

Property
Value

Default location

Data\ next to GameServer.exe (i.e., GameServer\Data\)

Contains

GameServerInfo - Common.dat, - Character.dat, - Command.dat, - Custom.dat, - Event.dat, - Skill.dat

Which root does my file belong to? If it's a GameServerInfo - *.dat file, it's in GameServerData. Everything else - plugin XMLs, item/monster data, drop tables, maps, effects - is in GameData.

How an Overlay Works

An overlay is simply a second folder containing only the files you want to override. When the GameServer needs a file, it checks the overlay first. If the file exists there, it's used. If not, it falls back to the main folder.

  • Files present in the overlay → overlay version is used

  • Files absent from the overlay → main version is used

  • Zero duplication of anything you're not changing

Each root has its own independent overlay setting, so you can overlay game content only, server config only, both, or neither.

Configuration Sections

You can configure overlay paths in three ways. When more than one is set, the highest-precedence source wins.

1. Command-Line Flags (highest precedence)

Pass these when launching GameServer.exe. Both --flag value and --flag=value forms are accepted.

Flag
Purpose

--game-data <path>

Override the GameData main folder

--game-data-overlay <path>

Set the GameData overlay folder

--config <path>

Override the GameServerData main folder

--config-overlay <path>

Set the GameServerData overlay folder

2. Environment Variables

If no command-line flag is given, the GameServer checks these environment variables.

Variable
Equivalent Flag

GS_GAME_DATA

--game-data

GS_GAME_DATA_OVERLAY

--game-data-overlay

GS_CONFIG

--config

GS_CONFIG_OVERLAY

--config-overlay

3. Common.dat Key (GameData overlay only)

If neither a flag nor an environment variable sets the GameData overlay, the GameServer reads it from GameServerInfo - Common.dat inside the GameServerData folder:

Path Format

  • Absolute Windows paths (D:\Servers\CS\Overlay\) and relative paths both work.

  • Forward slashes and backslashes are interchangeable.

  • A trailing slash is optional.

  • An empty value disables the overlay.

Important Behavior

Boot Log Confirmation: On startup the GameServer logs the resolved GameData root, GameData overlay (or (none)), GameServerData root, and GameServerData overlay. Always check these lines after changing overlay settings to confirm your configuration loaded correctly.

The Two Roots Are Independent: You can set a GameData overlay without a GameServerData overlay, or vice versa, or both. Picking one does not force the other.

Examples

No overlay is needed. Launch GameServer.exe with no flags and the server reads:

  • GameData from ..\Data\ (one folder up from the exe)

  • GameServerData from Data\ (next to the exe)

Launch:

Nothing new to configure. Existing installations keep working exactly as before.

Common Issues

Castle Siege flag in the wrong place: EnableCastleSiege lives in GameServerInfo - Common.dat, which is a GameServerData file. To enable it for a subserver only, use --config-overlay, not --game-data-overlay.

Multi-World Deployment

Now that the overlay system exists, running multiple worlds from a single GameServer binary is straightforward. Each world is a separate GameServer.exe process launched with its own --config-overlay pointing at a folder containing a unique GameServerInfo - Common.dat (different ServerName, ServerCode, ServerPort). All processes share the same GameData folder and the same base GameServerData configs - no file duplication.

Requirements

  • One DataServer per world. Game state (characters, items, guilds) is per-world, so each world needs its own DataServer instance or at minimum a separate database.

  • Unique ServerCode and ServerPort in each world's GameServerInfo - Common.dat overlay.

  • ConnectServer routes players to worlds via ServerList.xml - each world appears as its own server entry.

  • No shared state between processes. GameServer uses no shared mutexes or file locks, so multiple instances on the same machine do not conflict.

Example: Main + Castle Siege

ConnectServer Setup

Each world must appear in the ConnectServer's ServerList.xml so players can select it:

Scaling Beyond Two Worlds

The pattern scales to any number of worlds - just add more overlay folders, each with its own GameServerInfo - Common.dat containing a unique ServerCode and ServerPort. You can also combine --config-overlay with --game-data-overlay if a specific world needs different drop tables, monster spawns, or plugin configs.

Last updated