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.
Default location
..\Data\ relative to GameServer.exe (one folder up)
Contains
Item, Monster, Monster\MonsterSetBase\, MapManager.xml, MapServerInfo.xml, Effect.xml, Message.xml, Plugins\, Skill\, Event, Shop\, EventItemBag\, 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.
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
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.
Folders that are read as a whole
Some content is not one file but a folder of files that the GameServer reads all at once. For these, the overlay works per folder, not per file: if the folder exists in the overlay, the GameServer reads only the overlay folder and ignores the main folder completely. Files from the two folders are never merged.
Monster\MonsterSetBase\
Monster and NPC spawns, one file per map
Event\Invasions\
Invasion definitions
EventItemBag\
Event item bag (loot) files
Shop\
NPC shop files
Plugins\Quests\
Custom quest files
Plugins\LuckySpin\
Lucky Spin files
Plugins\Achievements\
Achievement files
Plugins\Dungeons\
Dungeon files
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.
--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.
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
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.
The headline use case. One shared installation runs both worlds as separate processes. The Castle Siege world only differs in three settings: EnableCastleSiege, ServerCode, and ServerPort.
Folder layout:
Launch the primary world (no overlay needed):
Launch the Castle Siege subserver (same exe, config overlay pointed at the tiny folder):
The CS process inherits every item, monster, drop table, plugin setting, chaos mix recipe, character config, and command from the shared folders. The only thing it overrides is the one GameServerInfo - Common.dat file in the overlay, which flips EnableCastleSiege=1 and sets its own code and port.
An event world that uses all the same server settings but a different drop table and chaos mix recipe.
Launch the event process:
Only those two files are overridden. Items, monsters, maps, and every other GameData file come from the shared folder. The server identity (name, port, code) is whatever is in the main GameServerData folder - no config overlay is used here.
A subserver that needs both different server identity (for its own port and code) and different game content (for event drops).
Launch:
Or equivalently with environment variables:
The two roots are fully independent - you can mix and match as needed.
Common Issues
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
ServerCodeandServerPortin each world'sGameServerInfo - Common.datoverlay.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
start-worlds.bat:
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