GameServer
One GameServer process runs one game world. It handles combat, items, monsters, events, PK, trade, guilds, duels, and every other piece of live gameplay. Each GameServer talks to a shared DataServer (persistence), JoinServer (auth), and ConnectServer (server list heartbeats).
Role#
- Owns one
ServerCodeand one TCP port for game clients - Routes all saves and loads through DataServer
- Validates every login through JoinServer
- Reports user counts and liveness to ConnectServer
- Loads its full game content (items, monsters, events, skills) from the shared
Data/root
File Location#
GameServer/
├── GameServer.exe
├── zlibwapi.dll
└── Data/
├── GameServerInfo - Common.dat
├── GameServerInfo - Character.dat
├── GameServerInfo - Command.dat
├── GameServerInfo - Event.dat
├── GameServerInfo - Skill.dat
└── GameServerInfo - Custom.dat
Two distinct config roots feed the process:
| Root | Purpose | Contents |
|---|---|---|
GameServer/Data/ | Per-server identity. One copy per GameServer instance. | The 6 .dat files above. |
Data/ at release root | Shared game content. One copy per installation, read by every GameServer. | Items, monsters, events, skills, plugins, quests, shops, messages. Documented in the Data section. |
Running multiple GameServers on the same machine means multiple GameServer/Data/ folders (one per instance) but they all share the single root-level Data/ folder.
Configuration Files (per-server identity)#
| File | Purpose |
|---|---|
Common.dat | Server identity, connections, logs, anti-hack, rates, PK, trade, guild, create character |
Character.dat | Per-class stats and growth |
Command.dat | Chat command costs, cooldowns, and limits |
Event.dat | Enable flags and schedules for every event |
Skill.dat | Buff and skill numerical parameters |
Custom.dat | Chaos mix announce, custom attack, custom messages, custom guild warehouse |
Chaos Machine recipes live in the ChaosMix plugin XMLs, not in a .dat file.
Shared game content (Item/, Monster/, Event/, Skill/, Plugins/, Shop/, etc.) is documented under its own pages.
Startup Order#
Resolve data paths#
Config root defaults to GameServer/Data/, shared content root to the installation Data/. Both can be overridden by environment variables (GS_CONFIG, GS_GAME_DATA) or by GameDataOverlay in Common.dat.
Read identity from Common.dat#
Pulls ServerName, ServerCode, ServerPort, ServerVersion, ServerMaxUserNumber, EnableCastleSiege, LicenseKey, and the DS / JS / CS endpoint keys.
License activation#
Validates LicenseKey. Failure aborts startup.
Start TCP listen#
Opens ServerPort for game clients.
Load shared game content#
Reads every file in the shared Data/ root: items, monsters, events, skills, plugins, shops, messages, maps, quests. The rest of the 6 .dat files are loaded here too.
Connect to JoinServer#
TCP connection to JoinServerAddress:JoinServerPort. Required for any login to succeed.
Connect to DataServer#
TCP connection to DataServerAddress:DataServerPort. Required for character load and save.
Connect to ConnectServer#
UDP to ConnectServerAddress:ConnectServerPort for heartbeats. The GameServer appears in the client's server list only after heartbeats start.
Dependencies#
- DataServer reachable at
DataServerAddress:DataServerPortwith a working SQL Server backend - JoinServer reachable at
JoinServerAddress:JoinServerPort - ConnectServer reachable at
ConnectServerAddress:ConnectServerPort(UDP) - Shared
Data/folder present at the release root with every file the process expects to load - Writable working directory for logs
Cross-File Dependencies#
The 6 .dat files are not independent. Keys in one often gate or feed behavior defined in another.
| Setting in... | Affects... |
|---|---|
Common.dat EnableCastleSiege | Whether Event.dat's Castle Siege schedule runs |
Common.dat WriteChaosMixLog | Whether ChaosMix plugin mixes produce audit entries |
Common.dat MaxLevelUp / PlusStatPoint / <CLASS>LevelUpPoint | Character.dat per-class stat growth curves |
| Common.dat Create Character Settings | Character.dat class availability (overlaps by class) |
| Command.dat reset command caps | Common.dat ServerMinReset / ServerMaxReset |
| Custom.dat Announce Chaos Mix | ChaosMix plugin outputs + Common.dat log toggle |
| Event.dat Castle Siege | GuildManager on DataServer + EnableCastleSiege flag |
Treat a config change as a pair: edit the primary key, then audit every file that depends on it.
Multi-Server Deployments#
Each additional GameServer:
- Gets its own
GameServer/Data/folder with a uniqueServerCodeandServerPort - Shares the single release-level
Data/folder (identical game content) - Uses a unique
LicenseKey(one per instance) - Appears in ConnectServer's
ServerList.xmlunder a<Server>entry with the matchingCode
Logs#
Chat, trade, command, connect, hack, cash shop, and chaos mix logs each have their own enable flag in Common.dat Log Settings. Logs land in the GameServer working directory. Chaos mix outcomes themselves are driven by the ChaosMix plugin.
Common Issues#
- Stuck at "Loading files..." -
LicenseKeyis empty, invalid, or the license service is unreachable - Listens on port but no one can log in - JoinServer connection failed. Check
JoinServerAddress:JoinServerPortand JS'sAllowableIpList.txt - Players can log in but character load times out - DataServer connection failed. Check
DataServerAddress:DataServerPortand DS'sAllowableIpList.txt - Server does not appear in the client's server list - UDP heartbeat not reaching ConnectServer, or this GameServer's
Codeis missing from ConnectServer'sServerList.xml - Two GameServers claim the same slot - duplicate
ServerCodein Common.dat - Port in use at startup - another GameServer instance is still running, or
ServerPortcollides with another process