Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Guide] Server SetUp

Custom Title Activated
Loyal Member
Joined
Feb 2, 2008
Messages
1,038
Reaction score
11
Download server files




Some theory first
-----------------

The server communication structure is shown on the picture. Digits are the numbers servers are listening on, and arrows show the direction of connections.


Heaven - [Guide] Server SetUp - RaGEZONE Forums


Servers and their functions:
----------------------------
GroupServer: this baby plays the central role for the server operation. Disassembling of it revealed that it is responsible for authorizing the client, creating characters, map handling, etc. Think of it as the dispatcher and syncronizer between the Game and Gate Servers.

: it runs one or more . What is a map? A map is the part of the game world where your char can move without teleporting. If you are teleporting to another continent, you're changing maps. Maps are stored under the 'resource' directory of the server. See directory names there like 'garner', 'magicsea' and so on? Those are maps. Well, running even one map requires TONS of memory. Typically, running 'garner' map which in fact is Ascaron continent takes about 1GB of RAM on my machine. So, running all the continents and locations would require some serious hardware, I guess
Heaven - [Guide] Server SetUp - RaGEZONE Forums
Or, maybe there exists some tweak for amount of RAM used, I don't know yet, since all the config files are in bloody chinese.

GateServer: this is some proxy between the client, GroupServer and GameServer. This is the only piece of software the client is communicating with. There can be more than one GateServer, but in this example we'll use only one.

AccountServer: pretty straightforward. Simply checks if a certain user can be authorized to login or not.


Databases:
----------

AccountServer: contains all the users allowed to login. Passwords are plain md5 hashes.

GameDB: main game DB. Contains all the chars, their stats, items, friends, guilds etc.


How to get this all to work:
----------------------------

In this example I'll show how to run just one map, 'garner', which is Ascaron. If you try to teleport to magicsea, it won't take you there, because this map is not running on the server. Well, you can try to run magicsea and darkblue maps on the same GameServer, but it will be a memory hog. You've been warned.

First of all, unpack the archive somewhere on your hardisk.

Restore the database backups to your MSSQL server. The backups are in DB of the archive. I won't go into the details, since operating MSSQL is beyond of the scope of this guide.

Having both databases restored, you should edit some config files. I'll show them here entirely, with the appropriate comments. You also can get them from here:


AccountServer.cfg
-----------------
Code:
[net]
 listen_port = 1978          // the port AccountServer should listen on for GroupServer [URL="javascript:void(0)"]connection[/URL]
listen_ip = 127.0.0.1       // the inerface AccountServer should listen on for GroupServer connection 

[db]
 dbserver = (local)          // ip address of the MSSQL server running the AccountServer DB.
//                          // can be (local) which means 127.0.0.1 I suppose
db = AccountServer          // DB name
userid =
passwd =
//userid = account
//passwd = uCcnL+k0BUrE40Wr8VHg9A==
//passwd = cathy_way

[bill]
enable_bill = 0             // some kind of billing, not used for now
bill_server1 = 10.10.1.107
bill_server2 = 10.10.1.108

[tom]
enable_tom = 0              // not used now either

[gs]
GroupServerAndor = GroupServerAndor // looks like GroupServers are enumerated here
//                                  // we'll use only one for now
enable_ping = 0                     // dunno


GateServer.cfg
--------------

Code:
[Main]
Name = knight_gate01            // the name of the GateServer. not really important
Version = 133                   // the version of the server it should report to the client
//                              // 133 means 1.33, 102 means 1.02 and so on
                                  
[GroupServer]
IP = 127.0.0.1                  // ip address where GroupServer is running, in our case it's our local address
Port = 1975                     // port on which GroupServer is running
EnablePing = 180		// time interval to send KeepAlive packets to GroupServr

[ToClient]
IP = 0.0.0.0                    // interface GateServer should listen on for the client connection
Port = 1973                     // port number GateServer should listen on for the client connection
CommEncrypt = 1			// 
EnablePing = 60			// time interval to send KeepAlive packets to the client
初始最大連接 =1250              // fucked if I know. Heh why on earth making parameter names in chinese?
//                              // What if they localize C keywords?

[ToGameServer]
IP = 127.0.0.1                  // interface GateServer should listen on for the GameServer connection
Port = 1971                     // port number GateServer should listen on for the GameServer connection
EnablePing = 180		// time interval to send KeepAlive packets to GameServer

[ShowRange]
ShowMin = 500                   // dunno
ShowMax = 800                   // dunno
IsUse = 0                       // dunno


GameServer.cfg
--------------

Code:
[標識]                         // oh man again that gibberish as the parameter names. chinese sucks :P
name = GameServer01            // GameServer name, not really important
equment = shouhushen           // dunno

[網關服務器信息]
gate = 127.0.0.1, 1971         // GateServers addresses, in this example we use only one 
//gate = 127.0.0.1, 1972       // 

[地圖列表]                     // maps that this GameServer should run
map  = garner                  // in this example we run only 'garner'
//map  = eastgoaf
//map = magicsea               // you can try to enable others here, if you have plenty of RAM
//map = darkblue


[游戲數據庫]                   // game database section
db_ip   = 127.0.0.1            // MSSQL server ip
db_usr  = game                 // DB user
db_pass = EZCpyYOZVofugqDFBZrLKw== // DB user password, seem to be encrypted with DES and base64 encoded


[Socket]
keep_alive = 120

[ID基數]                        // no idea
BaseID = 0x50000000

[實體數目]                      // seems to be some max values, like max num of players, chars, etc
max_ply = 100                  // 
//max_cha = 40000                 // 
//max_item = 70000                // 
//max_tnpc = 300                  // 
//max_cha = 5000

[公會最大成員數]
guild_num	= 80

[公會最大待批成員數]
guild_try_num	= 80

[道具]
item_show_time	= 60            // looks like the time a dropped item should exist before vapourizing
item_prot_time	= 30            // looks like the time a dropped item should 'remember' its owner

[喊話間隔]
say_interval	= 1		// dunno

[保存大地圖]
db_mapmask	= 1             // dunno

[LOG開關]                       // dunno, may be some log parameters
log_cha     = 0
log_cal     = 0
log_ai      = 0
log_mission = 0

[調試指令開關]                  // no idea
supercmd   =  1 

[資源目錄]                      // directory name under which all server maps and resources
res_dir = resource              // are located, in our case 'resource'

[Log目錄]                       // where to log all those error messages
log_dir = log\log1

GroupServer.cfg
---------------
Code:
[Main]
Name         = GroupServerAndor // GroupServer name. I think it should match
//                              // the GroupServer names in [gs] section of the AccountServer.cfg
Listen_Port  = 1975             // 
Listen_IP    = 127.0.0.1        // interface GroupServer should listen on for GateServer connection
KeepAlive    = 600
Version      = 103

[AccountServer]
AcctEnable   = 1                // dunno but we set this enabled for now
Password     = GroupServerAndor // dunno but we set it to match the GroupServer names
//                              // in [gs] section of the AccountServer.cfg
IP           = 127.0.0.1        // ip address of the AccountServer
Port         = 1978             // port number of the AccountServer

[Database]
IP           = (local)          // MSSQL ip address 
DB           = gamedb           // game database name
//Login	     = game
//Password   = EZCpyYOZVofugqDFBZrLKw==
Login        =                  // if (local) is set, it doesn't require db user name
Password     =                  // and password to be specified

MaxVal       = 2000000000

[角色]                          
每帳號最大角色數       = 3      // no idea
個性化圖標的最大值     = 30     // 
最大登錄人數           = 3000   // 

[好友]
最多被邀請數           = 5
未決邀請超時           = 30     // 
每角色最多好友數       = 50	//
每角色的自制好友分組數 = 10

[組隊]
最多被邀請數           = 5
未決邀請超時           = 30	//
每組隊最多成員數       = 5

[聊天]
每玩家最多會話數       = 30
每會話最多玩家數       = 50
世界頻道說話間隔       = 60     // 
交易頻道說話間隔       = 300    // 
私聊頻道說話間隔       = 2      // 

[出生地]
白銀城				=garner
沙嵐城				=magicsea
冰狼堡				=darkblue
Set Chinese(Taiwan) as your system language
Also set Chinese(Taiwan) as default language for non-Unicode programs.

IF YOU DON'T DO THIS, YOU"LL KEEP LOOSING YOUR CHAR JOB AFTER EVERY RECONNECT/MAP CHANGE.


Make sure things in the DB are in correct Chinese, and not like question marks
Heaven - [Guide] Server SetUp - RaGEZONE Forums


Assuming you use windows XP, and you have the original disc:
1. Go to the Control Panel
2. Go to Language settings or w/e it is called (The Globe icon)
3. Go to the second tab, check the second box (the one that says something about installing asiatic languages) and hit OK
4. Let windows install the languages.
5. Go again to that globe icon thing, now go to the third tab (advanced)
6. Choose for "Language for programs not Unicode-compatible" Chinese(Taiwan)
7. Reboot your PC if it doesn't happen automatically.
8. boot your server, now, if I am correct, you should see no more gibberish, but instead you should see Chinese characters. Now, do the quest again, or use the attr command, and then after teleporting you still have your class
Heaven - [Guide] Server SetUp - RaGEZONE Forums



Time to run it
--------------

1. run AccountServer.exe
It should show some GUI window if it succeeded to run.
2. run GroupServer.exe
3. run GateServer.exe
4. finally run GameServer.exe
It should show some GUI window if it succeeded to run.
 
Experienced Elementalist
Joined
Aug 3, 2006
Messages
224
Reaction score
0
wow.... awesome job!

Set it up and seems like i had no error.. now its waiting till i got the client(14kb/s)
I hope i can connect...

1000000 Times Thanks :)
 
Custom Title Activated
Loyal Member
Joined
Feb 2, 2008
Messages
1,038
Reaction score
11
Ok just wanted to add a guide to RaGEZone.
 
Junior Spellweaver
Joined
Jun 9, 2007
Messages
165
Reaction score
0
If im correct, this infomation is off the Privitia Forums?
 
Custom Title Activated
Loyal Member
Joined
Feb 2, 2008
Messages
1,038
Reaction score
11
Yes, I just forgot to credit Zukota :p
 
Newbie Spellweaver
Joined
Jul 23, 2008
Messages
15
Reaction score
0
I cant to run this server (( when i try to run game server or other servers i see:"cant connect to database" i have "mysql" in servers config files i write user name and password
i dont understand why it isnt work(( if anybody can send me a "normal server" please send it to kust111@mail.ru! helppp meeee!!! i want to play!
 
Newbie Spellweaver
Joined
Sep 29, 2007
Messages
6
Reaction score
0
Help please! What it for an error??? When I start AccountServer.exe Main database handler create failed, AccountServer hang!
 
Skilled Illusionist
Joined
Jun 23, 2008
Messages
319
Reaction score
10
Help...
it does not pass of this part
Heaven - [Guide] Server SetUp - RaGEZONE Forums

What is Your Server Side?

because if u have server 1.33 and client 1.35 its can't login and just comfirmation page only.
or Your Database. Try to do more again.
 
Initiate Mage
Joined
Sep 26, 2008
Messages
1
Reaction score
0
help me plz every time i try to log in it says (connection fail).what do i do?
 
Skilled Illusionist
Joined
Jun 23, 2008
Messages
319
Reaction score
10
help me plz every time i try to log in it says (connection fail).what do i do?

maybe Your Gate Doesn't Work Properly.

Try to Setup all Again and Check one By one maybe there is something Wrong.
 
Initiate Mage
Joined
Nov 27, 2008
Messages
4
Reaction score
0
hi, i am a great problem , i got setup tales of pirates server, i open accountserver,groupserver,..., all ok, (group server say: accountserver:x.x.x.x.x.x is socket:1,is socket 2,is ok this?),and when kopol-gs put..ok,i open client,and when i login in game put: connection timed out 0x0...and i can
 
Newbie Spellweaver
Joined
Dec 4, 2008
Messages
5
Reaction score
0
hi thx but when i try to log in appear <Map not reachaple>


and i have other error
SQL Error State:01000, Native Error Code: 1645, ODBC Error: [Microsoft][ODBC SQL
Server Driver][SQL Server]Changed database context to 'gamedb'.
AccountServer:127.0.0.1,1978來了!Socket數:1
help plz
 
Back
Top