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!

[Development] Soul of the Ultimate Nation - Server Emulator

Initiate Mage
Joined
Apr 19, 2020
Messages
2
Reaction score
0
[QUOTE = CwaniX; 8999371] Привет, я посмотрел эти файлы, и похоже, что в них много нового :eek:tt:. Возможно, я наконец смогу исправить переход между землями. Было бы здорово, если бы вы могли также помочь с программированием :):. [/ QUOTE]

You finished work on server? I want play ))
 
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
@CwaniX

I'm glad to see that you picked up the project. I couldn't get back to the project, so it died. Anyway, I downloaded your source on GitHub. I will try to help out on what I can. What are you needing help with?

Also, why is there so many servers? Wouldn't it be better to merge some so there is less to update and maintain long term? Is there anything for a developer to look at visually that would help break down the what each server does by feature or function or role?
 
Last edited:
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
@CwaniX
I have older packet structures from other server files.

❈ CommonServerPackets.zip (S2S)
LINK: https://drive.google.com/open?id=1EIhyYcgtAbemsuTNqkNH64dJgqYZM8_i

Categories (S2S):
A : AgentServer
D : DBP Server
G : Game Server
M : Master Server
U : AuthAgent
X : AccountDBP Server
Z : Guild Server


AM_CONNECTION = 1,
AZ_GUILD = 1,
DG_CONNECTION = 1,
DG_CHARINFO = 2,
AM_OPERATION = 2,
AM_MAX = 3,
DG_ITEM = 3,
DG_WAREHOUSE = 4,
DG_OTHER = 5,
DG_EVENT = 6,
DG_MAX = 7,
AU_AUTH_S2S_ASK_NEWCLIENT = 15,
AU_AUTH_S2S_ANS_NEWCLIENT = 16,
//AU_AUTH_S2S_CLNT_DISCONNECT = 17,
AU_AUTH_S2S_PC_LOGIN = 18,
AU_AUTH_S2S_PC_LOGOUT = 19,
AU_AUTH_S2S_ASK_PC_LOGOUT = 20,
AU_AUTH_S2S_ANS_PC_LOGOUT = 21,
AU_AUTH_S2S_SERVER_LOGIN = 22,
//AU_AUTH_S2S_AGENT_LOGIN = 23,
//AU_AUTH_S2S_SERVER_LIST = 24,
//AU_AUTH_S2S_AUTH2AGENT_INFO = 25,
//AU_AUTH_S2S_AGENT2AUTH_INFO = 26,
AU_AUTH_S2S_AUTH2GAME_STATUS = 27,
AU_AUTH_S2S_GAME2AUTH_STATUS = 28,
AG_CONNECTION = 24,
AG_CHARINFO = 25,
AG_SYNC = 26,
AG_ZONE = 27,
AG_PARTY = 28,
AG_STATUS = 29,
AG_GM = 30,
AG_GUILD = 31,
AG_MAX = 32,
AD_CONNECTION = 33,
AD_CHARINFO = 34,
AD_MAX = 35,
❈ProgramCommon - C2S_S2C Packets.zip
LINK: https://drive.google.com/open?id=1dfaJLlZCiDIs2iXqBbKmxxbBc3dhkECu

Categories (C2S):
C : Client
G : Game Server
L : LoginFront
W : World Server

CG_CONNECTION = 1,
CG_CHARINFO,
CG_MAP,
CG_SYNC,
CG_BATTLE,
CG_STYLE,
CG_SKILL,
CG_CONVERSATION,
CG_ZONE,
CG_ITEM,
CG_TRADE,
CG_PARTY,
CG_TRIGGER,
CG_GM,
CG_ETC,
CG_STATUS,
CG_VENDOR,
CG_WAREHOUSE,
CG_PVP,
CG_SUMMON,
CG_GUILD,
CG_EVENT,
CG_MAX,
CL_AUTH = 51,
CL_MAX,
CW_CONNECTION = 1,
CW_CHAT,
CW_GM,
CW_VIEWPORT,
CW_ARMORKIT,
CW_FRIEND,
CW_GUILD,
❈ GameServerHandlers.zip
LINK:
https://drive.google.com/open?id=1mMBnVZrPr7NZcnzFPI1jKCL_BP5To69C

These are the handlers from the old GameServer. Maybe these can help.

❈ ProgramCommon - MapInfoParser.zip
LINK:
https://drive.google.com/open?id=1jhOPoaHgnqxts7i0LgV_m_PMaiZ71W0o

The GameServer uses this to parse the map information.
 
Last edited:
Newbie Spellweaver
Joined
May 9, 2019
Messages
40
Reaction score
25
I will try to help out on what I can. What are you needing help with?
It takes the most time to guess the packets structure. You can try to code some missing ones. You just have to add classes annotated IncomingPacket, packetProcessor and OutgoingPacket to AgentServer :p:. I am away from home for a few days now, but when I come back I will describe it more precisely.


Also, why is there so many servers? Wouldn't it be better to merge some so there is less to update and maintain long term? Is there anything for a developer to look at visually that would help break down the what each server does by feature or function or role?
At the beginning I tried to build a structure similar to the original one:
AuthServer - supports user login and session start.
AgentServer - should act as a proxy between the client and the selected game channel. In my project currently contains all the logic.
GameServer - should contain all the game logic. It is currently not used in my project (see point above).
WorldServer - it supports chat and maybe something else regardless of channel.
DbServer - acts as a proxy/cache for the database. I plan to replace him with Redis or something similar.

It could be combined even into one server, but I think the current division is quite clear and consistent with the idea of microservices :p:.



[QUOTE = CwaniX; 8999371] Привет, я посмотрел эти файлы, и похоже, что в них много нового :eek:tt:. Возможно, я наконец смогу исправить переход между землями. Было бы здорово, если бы вы могли также помочь с программированием :):. [/ QUOTE]

You finished work on server? I want play ))
No, i haven't finished the server. I probably don't even have 1%.
 
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
@CwaniX

Truthfully you don't need proxies to the database, especially if you give each connecting server a separate login, do permissions, views, stored procedures, and connection time out. If you store passwords encrypted and make sensitive tables encrypted, then there shouldn't be any issues. Proxy servers are great in situations where the main servers are on separate machines, especially in a decentralized networks. Most private servers are probably ran on one/two machines (web for account creation/database and another to run the rest). Having so many servers makes it harder for developers new to the project to update and maintain the code, especially when there is a lack of comments and documentation. More servers end up acting like spaghetti code. This is my opinion and I could be wrong, especially since I don't have enough experience in server development. You might have to run multiple ports on one server or merge ports together. At this point in development, its better to leave the servers as they are.

In the mean time, I will look over the source code. Do you have all bugs and errors listed on GitHub? If so, I will just start there. I'm not very good at packet analysis, but I will look at that as well.
 
Newbie Spellweaver
Joined
May 29, 2014
Messages
64
Reaction score
59
@CwaniX

In the mean time, I will look over the source code. Do you have all bugs and errors listed on GitHub? If so, I will just start there. I'm not very good at packet analysis, but I will look at that as well.

Well i dont think anyone is good with packet analysis :) I would try and start with some easy ones like skills and skill upgrades. The Packets send are pretty small since they probably only contain a skill ID and something that indicates if its a cast or an upgrade. I will first try to make a Skill list that we then can convert in some DB structure together.
 
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
@CwaniX @Alex Mgh

❈ Want dynamic keys for each user?

Great! I figured out how to create dynamic keys per user while keeping the encryption algorithm from breaking on the server end. Encryption key is 4 bytes long, but the 1st byte cannot be altered. Changing the 1st byte changes how the encryption works on the client side.

The following code can be placed in public class AuthServerSession.

Code:
byte[] encKey = new byte[4];  
SecureRandom secureRandom = new SecureRandom();   
secureRandom.nextBytes(encKey); 
encKey[0] = 0x00;

❈ ServerList Packet

I was able to figure out majority of the bytes for the ansServerList packet. I was able to have two servers, one server with one channel, and the second server with two channels. Please review the packet structure below the protocols listed below.

The protocols for ServerList follow as:
byte S2C_ansSrvList_Srv = 0x11;
byte S2C_ansSrvList_Chn = 0x12;

Use this information below to create a dynamic server list packet on the auth/agent server. Couldn't tell if your server has this setup or not.

Code:
/*
    SERVERS ONLY:
    Size (2 bytes)
    Category (1 byte - 0x33)
    Protocol (1 byte - 0x11)
    # of Servers (1 byte)
    Server Name (32 bytes)
    Unknown (1 byte)
    Server # (1 byte)
    Unknown (1 byte)
    Unknown (1 byte) - filler/separator (0x00)
    Server Name (32 bytes)
    Unknown (1 byte)
    Server # (1 byte)
    Unknown (1 byte)
     */

/*
    CHANNELS ONLY:
    Size (2 bytes)
    Category (1 byte - 0x33)
    Protocol (1 byte - 0x12)
    # of Channels (1 byte)
    Channel Name (33 bytes)
    Server # (1 byte)
    Channel # (1 byte)
    Unknown (1 byte) - terminator byte (cannot be 0x00)
    Unknown (1 byte) - filler/separator (0x00)
    Channel Name (33 bytes)
    Server # (1 byte)
    Channel # (1 byte)
    Unknown (1 byte) - terminator byte (cannot be 0x00)
    Unknown (1 byte) - filler/separator (0x00)
    Channel Name (33 bytes)
    Server # (1 byte)
    Channel # (1 byte)
    Unknown (1 byte) - terminator byte (cannot be 0x00)
     */

❈ GitHub

Currently, I am getting errors on the server source code, so I need to spend some time fixing it. Eventually, I'm going to update the server code on GitHub for dynamic encryption keys per user and update ansServerList packet. If you guys want to do it before me, then please let me know.
 
Last edited:
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
@CwaniX
Can you help me with these errors? I have installed the Lombok plugin on IntelliJ.
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
May 29, 2014
Messages
64
Reaction score
59
@CwaniX
Can you help me with these errors? I have installed the Lombok plugin on IntelliJ.

You have to set the application.location variable in your run/debug configuration.

sJxZOoN - [Development] Soul of the Ultimate Nation - Server Emulator - RaGEZONE Forums

in Eclipse/SpringSuite it looks like this. In IntelliJ almost the same.
Then you have to save the Config files (you can find them in each server as a .PROPERTY_TEMPLATE file)
into a config folder. The config folder must be inside the path you specified as the application.location.

The auth server config is missing two lines, CWanix posted them in page 4 i think

EDIT: here

opensun.agent.ip=127.0.0.1
opensun.agent.port=9000
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
You have to set the application.location variable in your run/debug configuration.

sJxZOoN - [Development] Soul of the Ultimate Nation - Server Emulator - RaGEZONE Forums

in Eclipse/SpringSuite it looks like this. In IntelliJ almost the same.
Then you have to save the Config files (you can find them in each server as a .PROPERTY_TEMPLATE file)
into a config folder. The config folder must be inside the path you specified as the application.location.

The auth server config is missing two lines, CWanix posted them in page 4 i think

EDIT: here

opensun.agent.ip=127.0.0.1
opensun.agent.port=9000
Alex Mgh
I don't see Spring Boot under Debug Configuration on IntelliJ. I have went back to page 4 to look at CwaniX picture and I don't have that either. In the meantime, I will look some stuff up online about Spring Boot on IntelliJ. I will follow the other things you have mentioned.

Also, it would be highly recommended if @CwaniX or you update the GitHub with instructions on how to setup the project for people who wish to help out.


Need simplify and clean a bit the code / plan a structure.

Im glad the project will continue!
marelegg

I agree.


Alex Mgh

Spring Boot is only available in IntelliJ Ultimate, as mentioned on IntelliJ's support pages.
LINK: https://www.jetbrains.com/help/idea/spring-boot.html
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
Alex Mgh

This what is available in the market for Spring Boot when searching for plugins.
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
May 29, 2014
Messages
64
Reaction score
59
Tried all and it didnt work for me in InteliJ :)

@Alex Mgh

This what is available in the market for Spring Boot when searching for plugins.



Not MySql, you need Postgresql
never worked with it before but already got used to it.
It comes with a nice GUI and a SQL Shell.

Okay. I will have to install Eclipse and MySQL. The ReadMe on GitHub is getting updated today, whether it's by you, CwaniX or I.
 
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
Anyway GOOD NEWS!

English translation works !
Translated and Injected most Strings.
Missing:
-Names
-QuestText
-Error/Warning/Loading Messages

hRNvqEL - [Development] Soul of the Ultimate Nation - Server Emulator - RaGEZONE Forums



here is link to some more screenshots:
https://imgur.com/a/ebp4mUc

That's awesome. How are you injecting the patch? We need to create a tool to repacking the WPK, that would be more beneficial long term.


CwaniX

I cannot update your project in GitHub. All it did was fork the project and the commits I made to README.md is made on my end in my version of the project. Check out the link to see the README.md.
LINK: https://github.com/Ashime/OpenSUN-Server/tree/patch-1

Due to the fact this is my first time doing GitHub, I apologize for the lack of understanding.



You have to set the application.location variable in your run/debug configuration.

sJxZOoN - [Development] Soul of the Ultimate Nation - Server Emulator - RaGEZONE Forums

in Eclipse/SpringSuite it looks like this. In IntelliJ almost the same.
Then you have to save the Config files (you can find them in each server as a .PROPERTY_TEMPLATE file)
into a config folder. The config folder must be inside the path you specified as the application.location.

The auth server config is missing two lines, CWanix posted them in page 4 i think

EDIT: here

opensun.agent.ip=127.0.0.1
opensun.agent.port=9000
Alex Mgh
What must you do in the Environment tab to make this work? I have all of the property_template files in a folder called config. Thank you.
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Oct 20, 2013
Messages
193
Reaction score
56
@CwaniX @Alex Mgh
[STRIKE]Where is the database to attach into PostgreSQL 10?
[/STRIKE]

Nevermind, I figured it out from page 1. Its mentioned as listed below:

Yes you need PostgreSQL, but the only thing you need to do is create an empty database and a user for it. You do not have to manually execute any scripts. The entire base structure will be created the first time the server is started. The only thing you have to do manually is to create a player account with the command:
Code:
SELECT public.func_create_user_and_account(<username>, <password>)
 
Newbie Spellweaver
Joined
May 9, 2019
Messages
40
Reaction score
25
WOW I was away for a while and so much happened here :laugh:. I will have some time tomorrow so I'll try to work on the server a little bit :):.



I cannot update your project in GitHub. All it did was fork the project and the commits I made to README.md is made on my end in my version of the project. Check out the link to see the README.md.
LINK: https://github.com/Ashime/OpenSUN-Server/tree/patch-1

Due to the fact this is my first time doing GitHub, I apologize for the lack of understanding.

You should be able to create a pull request: https://help.github.com/en/github/c...-requests/creating-a-pull-request-from-a-fork
 
Back
Top