- Joined
- Dec 3, 2012
- Messages
- 162
- Reaction score
- 130
Hello everyone! I hope this tut will help you easy to compile the ArenaServer from the MainServer source.
I will take this source code: http://forum.ragezone.com/f613/source-code-ao-4-3-a-1107099
as an example.
1. DB for ArenaServer:
You need copy db atum2_db_1 and restore as atum2_db_arena (2 databases are the same)
2. Build Arena Bin:
Goto folder ProjectsServer\GameServer in the source, copy and rename:
- IMServer -> AIMServer
- LogServer -> ALogServer
- NPCServer -> ANPCServer
- FieldServer -> ArenaServer
Goto AIMServer folder, rename IMServer.vcxproj to AIMServer.vcxproj
in ALogServer folder, rename LogServer.vcxproj to ALogServer.vcxproj
in ANPCServer folder, rename NPCServer.vcxproj to ANPCServer.vcxproj
in ArenaServer folder, rename FieldServer.vcxproj to ArenaServer.vcxproj
Backto GameServer folder, open GameServer.sln with Microsoft Visual C++ 2013, right click on Solution > select Add > Existing Project...
And select AIMServer.vcxproj, do repeat with ALogServer.vcxproj, ANPCServer.vcxproj and ArenaServer.vcxproj
- Open Contents.h in ProjectsServer\GameServer\CommonGameServer, add code
- Right click on AIMServer, ALogServer, ANPCServer, ArenaServer > select Build Selection (Solutions Configurations R_WikiGames_Eng)
Waiting for build start, after build complete, you can see bin file in BuildResult folder
rename IMServer.exe to IMServer.exe
- LogServer.exe to ALogServer.exe
- NPCServer.exe to ANPCServer.exe
- FieldServer.exe to ArenaServer.exe
Copy its to yourServer/Bin
3. Config:
a, Global config: open GlobalGameServer.h in ProjectsServer\GameServer\CommonGameServer, you can see global config file path:
- Create ArenaGlobal.cfg in yourServer/config (same global.cfg), put IP, server name and set
like this:
b, Map config: open NPCIOCP.cpp in ProjectsServer\GameServer\ANPCServer\Main to see Arena map config file path:
- Crete ArenaMap.cfg in yourServer/config to load arena map, like this:
- Done, run both MainServer and ArenaServer, check SystemLog to know ArenaServer load ok:
ArenaFieldSystem log:
Good luck!
Some files in the tut:
I will take this source code: http://forum.ragezone.com/f613/source-code-ao-4-3-a-1107099
as an example.
1. DB for ArenaServer:
You need copy db atum2_db_1 and restore as atum2_db_arena (2 databases are the same)
2. Build Arena Bin:
Goto folder ProjectsServer\GameServer in the source, copy and rename:
- IMServer -> AIMServer
- LogServer -> ALogServer
- NPCServer -> ANPCServer
- FieldServer -> ArenaServer
Goto AIMServer folder, rename IMServer.vcxproj to AIMServer.vcxproj
in ALogServer folder, rename LogServer.vcxproj to ALogServer.vcxproj
in ANPCServer folder, rename NPCServer.vcxproj to ANPCServer.vcxproj
in ArenaServer folder, rename FieldServer.vcxproj to ArenaServer.vcxproj
Backto GameServer folder, open GameServer.sln with Microsoft Visual C++ 2013, right click on Solution > select Add > Existing Project...
And select AIMServer.vcxproj, do repeat with ALogServer.vcxproj, ANPCServer.vcxproj and ArenaServer.vcxproj
- Open Contents.h in ProjectsServer\GameServer\CommonGameServer, add code
Code:
#define ARENA
- Right click on AIMServer, ALogServer, ANPCServer, ArenaServer > select Build Selection (Solutions Configurations R_WikiGames_Eng)
Waiting for build start, after build complete, you can see bin file in BuildResult folder
rename IMServer.exe to IMServer.exe
- LogServer.exe to ALogServer.exe
- NPCServer.exe to ANPCServer.exe
- FieldServer.exe to ArenaServer.exe
Copy its to yourServer/Bin
3. Config:
a, Global config: open GlobalGameServer.h in ProjectsServer\GameServer\CommonGameServer, you can see global config file path:
- Create ArenaGlobal.cfg in yourServer/config (same global.cfg), put IP, server name and set
Code:
$ARENA_SERVER_FLAG=TRUE
like this:
b, Map config: open NPCIOCP.cpp in ProjectsServer\GameServer\ANPCServer\Main to see Arena map config file path:
- Crete ArenaMap.cfg in yourServer/config to load arena map, like this:
Code:
### CAUTION: Refer to "global.cfg"! ###
################################################################################
# User Defined Variables
################################################################################
################################################################################
ServerGroupDefaultMap $SERVER_GROUP_DEFAULT_MAP
######################################################################################################################
2001 1 FALSE $FIELD_SERVER_IP $FIELD_SERVER_PORT 6021 $NPC_SERVER_IP $NPC_SERVER_PORT 6026 256 256 FALSE
2002 1 FALSE $FIELD_SERVER_IP $FIELD_SERVER_PORT 6031 $NPC_SERVER_IP $NPC_SERVER_PORT 6036 256 256 FALSE
9101 30 TRUE $FIELD_SERVER_IP $FIELD_SERVER_PORT 7870 $NPC_SERVER_IP $NPC_SERVER_PORT 7875 256 256 TRUE
9102 30 TRUE $FIELD_SERVER_IP $FIELD_SERVER_PORT 7872 $NPC_SERVER_IP $NPC_SERVER_PORT 7873 256 256 TRUE
9200 30 TRUE $FIELD_SERVER_IP $FIELD_SERVER_PORT 7880 $NPC_SERVER_IP $NPC_SERVER_PORT 7885 256 256 TRUE
9201 30 TRUE $FIELD_SERVER_IP $FIELD_SERVER_PORT 7890 $NPC_SERVER_IP $NPC_SERVER_PORT 7895 256 256 TRUE
9202 30 TRUE $FIELD_SERVER_IP $FIELD_SERVER_PORT 7900 $NPC_SERVER_IP $NPC_SERVER_PORT 7905 256 256 TRUE
- Done, run both MainServer and ArenaServer, check SystemLog to know ArenaServer load ok:
ArenaFieldSystem log:
Code:
08-13 11:14:22| [Notify] Open all UDP Socket for NPCServer!! Count( 7)
08-13 11:14:24|Socket Connect SocketIndex[201] PeerIP[ 192.168.1.100] Port[49740]
[COLOR="#FF0000"]08-13 11:14:24| [Notify] ArenaServer, MainFieldServer is registered. MFSID(10061) MFSName( ROFL) MFSIP(192.168.1.100) PeerSocketIP(192.168.1.100) [/COLOR]
08-13 11:14:27| [Notify] UDP Socket ready for NPC Server!! MapIndex(2001) SockIdx( 0)
08-13 11:14:27| [Notify] UDP Socket ready for NPC Server!! MapIndex(2002) SockIdx( 1)
08-13 11:14:27| [Notify] UDP Socket ready for NPC Server!! MapIndex(9101) SockIdx( 2)
08-13 11:14:28| [Notify] UDP Socket ready for NPC Server!! MapIndex(9102) SockIdx( 3)
08-13 11:14:28| [Notify] UDP Socket ready for NPC Server!! MapIndex(9200) SockIdx( 4)
08-13 11:14:28| [Notify] UDP Socket ready for NPC Server!! MapIndex(9201) SockIdx( 5)
08-13 11:14:28| [Notify] UDP Socket ready for NPC Server!! MapIndex(9202) SockIdx( 6)
Good luck!
Some files in the tut:
You must be registered to see links
Last edited: