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 ServerCode and 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:

RootPurposeContents
GameServer/Data/Per-server identity. One copy per GameServer instance.The 6 .dat files above.
Data/ at release rootShared 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)#

FilePurpose
Common.datServer identity, connections, logs, anti-hack, rates, PK, trade, guild, create character
Character.datPer-class stats and growth
Command.datChat command costs, cooldowns, and limits
Event.datEnable flags and schedules for every event
Skill.datBuff and skill numerical parameters
Custom.datChaos 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:DataServerPort with 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 EnableCastleSiegeWhether Event.dat's Castle Siege schedule runs
Common.dat WriteChaosMixLogWhether ChaosMix plugin mixes produce audit entries
Common.dat MaxLevelUp / PlusStatPoint / <CLASS>LevelUpPointCharacter.dat per-class stat growth curves
Common.dat Create Character SettingsCharacter.dat class availability (overlaps by class)
Command.dat reset command capsCommon.dat ServerMinReset / ServerMaxReset
Custom.dat Announce Chaos MixChaosMix plugin outputs + Common.dat log toggle
Event.dat Castle SiegeGuildManager 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 unique ServerCode and ServerPort
  • Shares the single release-level Data/ folder (identical game content)
  • Uses a unique LicenseKey (one per instance)
  • Appears in ConnectServer's ServerList.xml under a <Server> entry with the matching Code

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..." - LicenseKey is empty, invalid, or the license service is unreachable
  • Listens on port but no one can log in - JoinServer connection failed. Check JoinServerAddress:JoinServerPort and JS's AllowableIpList.txt
  • Players can log in but character load times out - DataServer connection failed. Check DataServerAddress:DataServerPort and DS's AllowableIpList.txt
  • Server does not appear in the client's server list - UDP heartbeat not reaching ConnectServer, or this GameServer's Code is missing from ConnectServer's ServerList.xml
  • Two GameServers claim the same slot - duplicate ServerCode in Common.dat
  • Port in use at startup - another GameServer instance is still running, or ServerPort collides with another process

Last updated May 17, 2026