Overview
The TSWMU Season 22 Part 1.3 server package is a set of small programs that run together and are managed by the START.exe tool. Data (accounts, characters, items, guilds, logs) is stored in SQL Server, and the programs connect to SQL Server through ODBC.
Components
| Component | Executable | Role | How many |
|---|---|---|---|
| START | START.exe |
Activates the license, starts / stops / monitors every server, automatically restarts a server when it crashes, and acts as the gateway for EDITOR, the Launcher and the website. | 1 per server package |
| ConnectServer | ConnectServer.exe |
The player's first point of entry: sends the server list (read from Data\ServerMap.xml) and the IP + port of the GameServer the player selects. GameServers report their status (online, number of players online) to ConnectServer. |
1 |
| LoginServer | LoginServer.exe |
Keeps the login state of every account: GameServers connect to it to verify account names and passwords, block one account from being logged in at two places at once, and handle server transfers between GameServers. Players never connect directly to LoginServer. | 1 |
| ServerLink | ServerLink.exe |
The bridge between GameServers: guilds, Gens, alliances, guild search, cross-server mail / chat, Castle Siege, and cross-channel parties. It writes these changes to the database. Players never connect directly to ServerLink. | 1 |
| GameServer | GameServer.exe |
Runs the actual game world (maps, monsters, characters, events). Each GameServer is a sub server with its own ServerCode. |
1 or more (one GameServer per sub) |
How they connect
Client (main.exe)
| 1) connects to ConnectServer's Client.Port (sample default 44406) -> receives the server list
| 2) picks a server -> connects to that GameServer's ServerPort (set in Data\ServerMap.xml)
v
GameServer (one per sub)
|-- connects to ConnectServer (ConnectServer's GameServer.Port, sample 44422): reports status, online count
|-- connects to LoginServer (LoginServer's GameServer.Port, sample 44430): account verification
|-- connects to ServerLink (ServerLink's GameServer.Port, sample 55566): guilds, Gens, parties...
|-- connects to SQL Server (port 1433): GameDB, AccountDB, LogDB
START.exe launches and monitors all of the programs above through local connections on the machine.
The addresses and ports that GameServer uses to connect to ConnectServer / LoginServer / ServerLink are set in Data\game_common.conf (see game_common.conf). Players only need to reach two things: the ConnectServer port and the port of each GameServer.
Sub servers (GameServer)
The sample package comes with 6 GameServer folders, each folder being 1 sub:
| Folder | Sample ServerCode | Role |
|---|---|---|
4.1.GameServer_NON-PVP |
0 | Regular sub, PK disabled (Non-PvP) |
4.2.GameServer_PVP |
1 | Regular sub, PK enabled (PvP) |
4.2.GameServer_VIP |
2 | Gold / VIP sub (see Sub server & ServerMap) |
5.GameServer_Siege |
19 | Castle Siege sub |
6.GameServer_Event |
18 | Event sub |
7.GameServer_ArkaWar |
17 | Arka War sub |
You don't have to run them all: in the sample package's START.ini, only ConnectServer, LoginServer, ServerLink and 4.1.GameServer_NON-PVP are enabled; the remaining subs are set to Enabled=0 so you can turn them on when needed.
Included tools
- START: manages the servers and the license (required; the servers cannot be started manually on their own).
- EDITOR: a tool for editing game data and configuring the client / Launcher.
- Launcher: the program players use to register, log in and enter the game.
- TswSetup: installer for the website, Launcher updates and FTP.
See the Tools section.