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!

Zodiac - Tantra Development Reboot

Initiate Mage
Joined
Apr 28, 2009
Messages
2
Reaction score
0
I'm pretty sure he's looking for the function that manage packages client -> server , or, server -> client.
in the other hand in the source of the DBSERVER and Server_Zone shared in the previous thread contain the functions and the structure for the packages.
 
Junior Spellweaver
Joined
Oct 31, 2013
Messages
122
Reaction score
41
Adding functions to the game is actually easy to do, more if you know how to code with c++
Im actually changing/adding features on both sides by attaching my developed dll made in c++/cli or what is known as CLR language. this way is at least for me easy to make changes on the actual code made in c++ because im c# programer, so im changing the actual hardcoded to xml files, one example are Pets another is Kruma refining, another are task quest and so on (there are a lot features that are hard coded on the .exe(s))

Futhermore im actually added Lua scripting language support on client and server. The benefit of Lua is that allows to make changes on code w/o the need of recompile.

All the changes I actually made on both sides I do it on the dll, by redirecting the actual function to the new ones (the one made by me), this redirections are made dynamically, I just add in an xml file the parameters that my glue functions needs to make the inject, the glue function on the dll is in charge of finding the IntPtr of the function by name provided on the xml and then replacing all mem address that will call that function, in brief I just need to add the new function on a Lua file or on the dll (depending if i know the function will have more changes or not) and then add on the xml file the register of that function, and voila the function will be injected.

With this I can actually change any part of the client or server code.
Some of the things that I have already done with this approach are:
- Changing the lvl of pets from 12 to 20, Adding more Pets (client only have 18 declared), Changing the pet model just by editing the xml file (not by hex edit launcher)
- Adding more TaskQuest
- Adding new PVP zones as krumas
- Adding new NPCs with dialogs
- Adding more lvls to Minning and Herbalism
- Allowing Kruma refining to accept what ever item I want it to accept
- Adding new file logs for whatever i want to control (server side), for example world events
- removing the control of item type by ID, by adding new columns on xml file that have the type of the item, so for example a rare item is not controlled any more by its ID
- removing the limit of item IDs
- removing the need to compile in different languages, the client reads what language you use in your OS and display the UI with your language if is defined, if not english will be shown as default.
- Teleporting player to saved zone when they leave New maps (like mudha and some other maps does)
- Adding ItemMall system on new maps
.... And so on

Im actually working on UI system, it has been hard for me because i'm used to UNITY UI system which is really easy to develop, but with tantra im having a lot headaches xD i hope i ended up with a new UI system controlled all by xml and lua files.

Regards
 
Last edited:
Joined
Jun 10, 2009
Messages
658
Reaction score
140
Adding functions to the game is actually easy to do, more if you know how to code with c++
Im actually changing/adding features on both sides by attaching my developed dll made in c++/cli or what is known as CLR language. this way is at least for me easy to make changes on the actual code made in c++ because im c# programer, so im changing the actual hardcoded to xml files, one example are Pets another is Kruma refining, another are task quest and so on (there are a lot features that are hard coded on the .exe(s))

Futhermore im actually added Lua scripting language support on client and server. The benefit of Lua is that allows to make changes on code w/o the need of recompile.

All the changes I actually made on both sides I do it on the dll, by redirecting the actual function to the new ones (the one made by me), this redirections are made dynamically, I just add in an xml file the parameters that my glue functions needs to make the inject, the glue function on the dll is in charge of finding the IntPtr of the function by name provided on the xml and then replacing all mem address that will call that function, in brief I just need to add the new function on a Lua file or on the dll (depending if i know the function will have more changes or not) and then add on the xml file the register of that function, and voila the function will be injected.

With this I can actually change any part of the client or server code.
Some of the things that I have already done with this approach are:
- Changing the lvl of pets from 12 to 20, Adding more Pets (client only have 18 declared), Changing the pet model just by editing the xml file (not by hex edit launcher)
- Adding more TaskQuest
- Adding new PVP zones as krumas
- Adding new NPCs with dialogs
- Adding more lvls to Minning and Herbalism
- Allowing Kruma refining to accept what ever item I want it to accept
- Adding new file logs for whatever i want to control (server side), for example world events
- removing the control of item type by ID, by adding new columns on xml file that have the type of the item, so for example a rare item is not controlled any more by its ID
- removing the limit of item IDs
- removing the need to compile in different languages, the client reads what language you use in your OS and display the UI with your language if is defined, if not english will be shown as default.
- Teleporting player to saved zone when they leave New maps (like mudha and some other maps does)
- Adding ItemMall system on new maps
.... And so on

Im actually working on UI system, it has been hard for me because i'm used to UNITY UI system which is really easy to develop, but with tantra im having a lot headaches xD i hope i ended up with a new UI system controlled all by xml and lua files.

Regards

This is beautiful work. It would be helpful for us if you guide programmers like me how to achieve such stuffs!
 
Joined
Oct 16, 2004
Messages
894
Reaction score
94
Dont bother.
This is highly exclusive to only few people that I know. Eliana (xxswissxx) included.
And Im sure, absolutely nobody will share this information except for the post above.

Also, most of the "pro developers" that pushes Tantra Server Development to extended content like Eliana is moving to another game or developing one for themselves. ;)

Edit:
TL;DR: Tantra Development has been dead for many years. All you see here & other dev forum is a cycle of copy-pasta releases.
 
Joined
Jun 10, 2009
Messages
658
Reaction score
140
Dont bother.
This is highly exclusive to only few people that I know. Eliana (xxswissxx) included.
And Im sure, absolutely nobody will share this information except for the post above.

Also, most of the "pro developers" that pushes Tantra Server Development to extended content like Eliana is moving to another game or developing one for themselves. ;)

Edit:
TL;DR: Tantra Development has been dead for many years. All you see here & other dev forum is a cycle of copy-pasta releases.

Just trying. I am not saying to release the full thing so that I can directly leech off from it.Helpful pointers or guidelines would mean a lot to people who want to develop Tantra Online.

For example I am trying to build simple emulator but that's not possible until I understand how to read and build packets. Harcoded packets do not work.

If "pro developers" have moved out of Tantra, they should release the work so that others can benefit from it. After all that is why this community is for right? I would have happily shared my work if I am moving out of Tantra!
 
Joined
Oct 16, 2004
Messages
894
Reaction score
94
If "pro developers" have moved out of Tantra, they should release the work so that others can benefit from it. After all that is why this community is for right? I would have happily shared my work if I am moving out of Tantra!
Have to break it to you but this is not what's happening in RZ since 13 yrs ago.
They're not obliged to release their work too.

If only you were this active when those people were also active on Tantra, I bet Tantra Development will get into new heights.

Well, in my previous Team, we supported anyone capable.
We supported DBOG Emulation development as well and other projects so I dont see you not being supported if they were active long time ago.

In addition, Tantra is long dead. The players who keeps playing the game are the same players who are trying each new private servers. The money from donation coming from those players are minimal at worst, zero.

I suggest you try to emulate new other games.
I propose MU Legends.
The game is not complicated as its only mainly focusing on "Dungeon Crawling" & "enchanting your gears".
Im sure when you start a MU Legends project, there will be MUCH MUCH more interest in it. ;)
 
Last edited:
Joined
Jun 10, 2009
Messages
658
Reaction score
140
Have to break it to you but this is not what's happening in RZ since 13 yrs ago.
They're not obliged to release their work too.

If only you were this active when those people were also active on Tantra, I bet Tantra Development will get into new heights.

Well, in my previous Team, we supported anyone capable.
We supported DBOG Emulation development as well and other projects so I dont see you not being supported if they were active long time ago.

In addition, Tantra is long dead. The players who keeps playing the game are the same players who are trying each new private servers. The money from donation coming from those players are minimal at worst, zero.

I suggest you try to emulate new other games.
I propose MU Legends.
The game is not complicated as its only mainly focusing on "Dungeon Crawling" & "enchanting your gears".
Im sure when you start a MU Legends project, there will be MUCH MUCH more interest in it. ;)

You seem to know quite a lot about Tantra yourself and you are still active here. Hence you should share your knowledge with me :thumbup1:

how to read and build packets
Will you answer this question I am trying to find answer to?
 
Joined
Jan 4, 2011
Messages
83
Reaction score
21
@cyberinferno: if i understand you, what you want to know is: how the data is transfer from client to server and viceversa. If that is what you want to know, then here is a brief explanation.

Lets start by saying that almost all packets from client and server are encrypted with and algorithm made by hanbit, That algorithm use a 1024 char array to encrypt/decrypt pakets.
Do you remember that thread where someone said "change the [jo]" to bind the client to the server? if so, i will say that that "jo" is just 2 bytes of the 1024 char array used to encrypt/decrypt the packet.

Because you are c# programmer as I am, I will show u part of my code that is the c++ translation:
Luxray - Zodiac - Tantra Development Reboot - RaGEZONE Forums


that is part of the code used by the client & server to encrypt packets, where:
ClientKey is the 1024 char array, as you may see client and server will take different start point of that array based on the stored oldchecksum and so on.
the first 12 bytes of the packet, will not be encrypted, because those bytes stores the message code, the checksum, and the time stamp of the message.
If for example the client fails to receive a response from the server, client will try to send the packet again, but, this 2do time the packet will not be the same, because the oldchecksum will not longer be 0 so the other stored vars.

to really understand how it works you have to do some like I did, make a hook on the client & server "send/recv" functions from WS2_32 dll, and then have fun with the reverse engineering, will be easy for you since you have the c++ source.

BTW the CPSock class didnt change at all from the sources you have til now days so that class is not outdated as you said in your other thread. The classes outdated are HTNetWorkHandle & TNNetworkManager coz they added more functions on them.

P.D I didnt show you the c# version of the ReadClientMessage function because it is allmost correctly explained in your other thread (at least the logic of it by Nothilvien he/she have some errors but just because he/she is just explaining the code you posted w/o having for that time the whole class on his/her hands)
 
Last edited:
Joined
Jun 10, 2009
Messages
658
Reaction score
140
@cyberinferno: if i understand you, what you want to know is: how the data is transfer from client to server and viceversa. If that is what you want to know, then here is a brief explanation.

Lets start by saying that almost all packets from client and server are encrypted with and algorithm made by hanbit, That algorithm use a 1024 char array to encrypt/decrypt pakets.
Do you remember that thread where someone said "change the [jo]" to bind the client to the server? if so, i will say that that "jo" is just 2 bytes of the 1024 char array used to encrypt/decrypt the packet.

Because you are c# programmer as I am, I will show u part of my code that is the c++ translation:
Luxray - Zodiac - Tantra Development Reboot - RaGEZONE Forums


that is part of the code used by the client & server to encrypt packets, where:
ClientKey is the 1024 char array, as you may see client and server will take different start point of that array based on the stored oldchecksum and so on.
the first 12 bytes of the packet, will not be encrypted, because those bytes stores the message code, the checksum, and the time stamp of the message.
If for example the client fails to receive a response from the server, client will try to send the packet again, but, this 2do time the packet will not be the same, because the oldchecksum will not longer be 0 so the other stored vars.

to really understand how it works you have to do some like I did, make a hook on the client & server "send/recv" functions from WS2_32 dll, and then have fun with the reverse engineering, will be easy for you since you have the c++ source.

BTW the CPSock class didnt change at all from the sources you have til now days so that class is not outdated as you said in your other thread. The classes outdated are HTNetWorkHandle & TNNetworkManager coz they added more functions on them.

P.D I didnt show you the c# version of the ReadClientMessage function because it is allmost correctly explained in your other thread (at least the logic of it by Nothilvien he/she have some errors but just because he/she is just explaining the code you posted w/o having for that time the whole class on his/her hands)

If you have converted encryption/decryption algorithm in C# please share!
 
Joined
Jan 4, 2011
Messages
83
Reaction score
21
I'm start thinking that you don't like to code by yourself at all.

I already shared with you how client and server encrypts the packet, the decryption is done in the opposite way :
for (int i = 12; i < Size; i++, pos++)
{
int rst = pos % 1024;
var Trans = ClientKey[2 * rst + KeywordFlag];
int mod = i & 0x3;
if (mod == 0) pMsg = (byte)(pMsg - (Trans << 2));
if (mod == 1) pMsg = (byte)(pMsg + (Trans >> 1));
if (mod == 2) pMsg = (byte)(pMsg - (Trans << 1));
if (mod == 3) pMsg = (byte)(pMsg + (Trans >> 2));
Sum += pMsg;
}
of course the dif is that the Sum of the byte values (which is the CheckSum) on the decrypt is done after the packet is decrypted, so it can be compared with the one that client sent on the 3rd byte of the buffer: pRecvBuffer[nProcPosition + 3].

BTW if you still on the C# emulator, then I will recommend you to start understanding c++, so you can convert the code. And as I said in my previous post, hook a send & recv functions of the WS2_32 dll, or hook ReadClientMessage & AddClientMessage from CPSock so you can see the packet before and after the encryption/decryption
 
Last edited:
Joined
Jun 10, 2009
Messages
658
Reaction score
140
I'm start thinking that you don't like to code by yourself at all.

I already shared with you how client and server encrypts the packet, the decryption is done in the opposite way :
for (int i = 12; i < Size; i++, pos++)
{
int rst = pos % 1024;
var Trans = ClientKey[2 * rst + KeywordFlag];
int mod = i & 0x3;
if (mod == 0) pMsg = (byte)(pMsg - (Trans << 2));
if (mod == 1) pMsg = (byte)(pMsg + (Trans >> 1));
if (mod == 2) pMsg = (byte)(pMsg - (Trans << 1));
if (mod == 3) pMsg = (byte)(pMsg + (Trans >> 2));
Sum += pMsg;
}
of course the dif is that the Sum of the byte values (which is the CheckSum) on the decrypt is done after the packet is decrypted, so it can be compared with the one that client sent on the 3rd byte of the buffer: pRecvBuffer[nProcPosition + 3].

BTW if you still on the C# emulator, then I will recommend you to start understanding c++, so you can convert the code. And as I said in my previous post, hook a send & recv functions of the WS2_32 dll, or hook ReadClientMessage & AddClientMessage from CPSock so you can see the packet before and after the encryption/decryption


You think I didn't try? I tried and failed so asked. Maybe I should make this encryption part a dll and use.

If you feel I don't code you probably check my github account which has tools like
 
Joined
Jan 4, 2011
Messages
83
Reaction score
21
May I know why you said you failed? I mean..are you getting some kind of response from Zone when you send your packet with your emulator? if you don't receive a response, have you check what the Zone logs registered?
 
Joined
Jun 10, 2009
Messages
658
Reaction score
140
May I know why you said you failed? I mean..are you getting some kind of response from Zone when you send your packet with your emulator? if you don't receive a response, have you check what the Zone logs registered?

When I sent reply packets to client, the client just got stuck. It did not show server selection screen.
 
Joined
Jan 4, 2011
Messages
83
Reaction score
21
A cording to your post, are you saying that you send a packet from Zone Server to the client, when the client hits OK on the Login window?

I don't know if you already know this, if not hope helps:
After you type your account id and password and hit OK, client send a request to the Login Server (not to the zone server) and receive a response with a code which defines if the login was success or not, then client set g_iLoginResultID == to the response which then makes the StateMachine tell to HTIntroManager to move on to the Server Select window IF and ONLY IF g_iLoginResultID ==1.

As you may see, moving to the server select window, is NOT managed by an encrypted response from the zone server.

LOGIN server does not encrypt packets.
 
Back
Top