Re: [Development] Soul of the Ultimate Nation - Server Emulator
Ok lets see if i can post this :)
It seems to be alot but its just very detailed.
First your config folder should look like this.
https://i.imgur.com/tCciPXp.png
The red circled name will later be the path you specify in your IDE(Spring Suite). In this case C:\SpringSuiteDEV
then go to your Spring Suite and select Debug Configurations
https://i.imgur.com/XJ0kdtR.png
create a new configuration
https://i.imgur.com/Ljq1XoV.png
Then you can name it what you want but preferable the server you want to start.
And select the first server form the list.
https://i.imgur.com/5zrhRXl.png
Then press the Search button on the right and there should only be 1 return, also select this.
https://i.imgur.com/nw9wHZ9.png
Then go to the environment Tab and add the Variable with the name application.location and your OWN path from Step 1.
https://i.imgur.com/svSHwft.png
Now you have to apply everything and DEBUG it ONCE so it shows in your Menu later.
https://i.imgur.com/MZ7TUXU.png
Repeat this for all of the 5 Servers! except for the common server.
Normally the Spring Boot Window should be open. If it is not you can search it like this.
https://i.imgur.com/ua15PaB.png
https://i.imgur.com/Y7MM01l.png
I hope this helps.
I will try to Create a more Detailed and more Structured Readme in Word or something.
- - - Updated - - -
- - - Updated - - -
Anyway, here is the link to the English Resource file.
If there are any issues i will upload the full Client but it should be the same:
https://drive.google.com/file/d/1QDl...w?usp=drivesdk
4 Attachment(s)
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Quote:
Originally Posted by
Alex Mgh
@CwaniX could you try and help me understand the way you process packets from client and send them back. It seems so different from what I am used to in c#.
I implemented a small framework for handling incoming and outgoing packets. All you have to do is add three classes with the appropriate annotations: IncomingPacket, PacketProcessor and OutgoingPacket. You can look at classes C2SAskSrvSelectPacket, C2SAskSrvSelectProcessor and S2CAnsSrvSelectPacket as a simple example. If you use some packet capture utility, you will probably get something like this from the client:
Attachment 167151
1 is the length of the packet.
2 is the category and type.
3 is the content.
You must complete the appropriate fields in the incoming object (you don't fill in the length because it is handled automatically):
Attachment 167152
Then the prepared object goes to the processor where you can perform the required operations and finally send the outgoing packet:
Attachment 167153
The outgoing packet looks similar to the incoming one but requires an additional defined order of fields in the packet:
Attachment 167154
I hope this information will be helpful :):
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Alright this already helps alot.
So when i create a new Package. For example this one
https://i.imgur.com/UsJTPHo.png
then "c8" is the category (already defined as skill by you)
"c5" is the Type
and the rest is some other information i have to figure out?
I would start with something like this?
https://i.imgur.com/pnbn5HC.png
- - - Updated - - -
Quote:
Originally Posted by
Alex Mgh
Just so everyone sees it clearly
Re: [Development] Soul of the Ultimate Nation - Server Emulator
hey guys .
how is it going with the server?
is it running yet? im willing to help
if its running maybe even with some $ :)
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Quote:
Originally Posted by
zalogo
hey guys .
how is it going with the server?
is it running yet? im willing to help
if its running maybe even with some $ :)
Well heavily depends on your definition of running :P
If you would like to help i would consider trying to get the server running on your computer as a first step.
If you encounter any problems feel free to reply :)
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Quote:
Originally Posted by
Alex Mgh
Well heavily depends on your definition of running :P
If you would like to help i would consider trying to get the server running on your computer as a first step.
If you encounter any problems feel free to reply :)
- - - Updated - - -
I found out that there are packets that have no Content. For example when the Client crashes he will sent a message to the server directly before loading characters. Problem is the Packet Decoder throws an error because it cant handle the packet. I tried to add a knew C2S Packet for that case but it doesnt get recognized. Maybe the decoder doesnt allow packets with no content? I tried to check myself but i dont know if i am right :)
Some packets will not have any content, especially from the client. As an example, this one packet that is sent to the Auth Server from the client:
Code:
askServerList Packet
------------------------------
Size (2 bytes)
Category (1 byte - 0x33)
Protocol (1 byte - 0x0F)
Also, what packet are you exactly talking about? I will look at the PacketDecoder and see what's wrong.
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Quote:
Originally Posted by
Ashime
Some packets will not have any content, especially from the client. As an example, this one packet that is sent to the Auth Server from the client:
Code:
askServerList Packet
------------------------------
Size (2 bytes)
Category (1 byte - 0x33)
Protocol (1 byte - 0x0F)
Also, what packet are you exactly talking about? I will look at the PacketDecoder and see what's wrong.
No need to worry, i was wrong about that. It only happens in debug mode so i have to see why it happens.
- - - Updated - - -
Ok guys I have the best NEWS ever. I found a way to unpack the Resource.wpk and tell the client to use the unpacked files and not the Resource.wpk. Now we can edit everything we want !!!
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Quote:
Originally Posted by
Alex Mgh
No need to worry, i was wrong about that. It only happens in debug mode so i have to see why it happens.
- - - Updated - - -
Ok guys I have the best NEWS ever. I found a way to unpack the Resource.wpk and tell the client to use the unpacked files and not the Resource.wpk. Now we can edit everything we want !!!
Sounds great, but that can cause problems long term. For now, this is the best solution we have. Can you please post how you got the client to use the unpacked files and any tools that you might have used? Thanks!
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Thats the error i always get now even with the original client so thats not the problem.
Quote:
2020-04-30 00:09:21.454 DEBUG 25588 --- [ntLoopGroup-6-1] p.c.o.c.server.messages.PacketDecoder : [ PACKET DECODER] [userId: ] Incoming data: 48 76 00 00 01 00 00 00 00 32 30 30 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 40 00 03 00 66 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 30 00 20 00 00 20 00 00 20 81 07 20 42 00 20 0f 00 20 00 00 20 00 00 20 00 00 20 0e 00 20 07 08 66 bf 25 66
2020-04-30 00:09:21.455 ERROR 25588 --- [ntLoopGroup-6-1] p.c.o.c.server.messages.PacketDecoder : [ PACKET DECODER] [userId: ] Unknown packet: 48 76
1 Attachment(s)
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Quote:
Originally Posted by
Alex Mgh
Thats the error i always get now even with the original client so thats not the problem.
Did you check if the packet definition loads correctly?
Attachment 167171
Re: [Development] Soul of the Ultimate Nation - Server Emulator
The First Version of the Client is here. Just place the Resource file in you client:
https://drive.google.com/file/d/1QDl...w?usp=drivesdk
I am uploading the new one (without the WPK) now but it will take some time :)
- - - Updated - - -
Quote:
Originally Posted by
CwaniX
https://i.imgur.com/Pv89CqF.png
Maybe the packet contains some other information than before?
Re: [Development] Soul of the Ultimate Nation - Server Emulator
This should work regardless of the content. This error occurs when there is no class definition with the appropriate header. Did you change something in the code?
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Quote:
Originally Posted by
Alex Mgh
No need to worry, i was wrong about that. It only happens in debug mode so i have to see why it happens.
- - - Updated - - -
Ok guys I have the best NEWS ever. I found a way to unpack the Resource.wpk and tell the client to use the unpacked files and not the Resource.wpk. Now we can edit everything we want !!!
Quote:
Originally Posted by
Ashime
Sounds great, but that can cause problems long term. For now, this is the best solution we have. Can you please post how you got the client to use the unpacked files and any tools that you might have used? Thanks!
Maybe you can make the client read only the unpacked .txt string files and the rest from the wpk? like the KR client.
Re: [Development] Soul of the Ultimate Nation - Server Emulator
Quote:
Originally Posted by
CwaniX
This should work regardless of the content. This error occurs when there is no class definition with the appropriate header. Did you change something in the code?
The error is thrown by the world server. Thats super strange. I didnt touch the Connection Packets in the Agent server. Just the SKILL packet. And even there i dont process anything just added some variables to check the incoming Package.
So somehow the world server thinks the package is for him.
When i start the world server after i already am in character selection it works fine.
- - - Updated - - -
@CwaniX or @Ashime
How would you try to figure out what Type of Packet you would have to send back? Just bruteforce try everything? The Category would be the same, but the type i have no idea.
Re: [Development] Soul of the Ultimate Nation - Server Emulator
This is a very difficult question :laugh:.
- You can start another old server locally and try to sniff packets with some packet analyzer. The problem is that old servers are heavily defective and many things don't work.
- You can search old source files - especially Protocol_**.h, PacketStruct_**.h and Handler_**.h.
- You can try to add 1 to the incoming packet type. Probably the original protocol was constructed in this way but many things have changed over the years.
- If you can use debuggers like OllyDBG, Ghidra, IDA... :laugh:.