Working with mu sources

Results 1 to 6 of 6
  1. #1
    Novice Rizao is offline
    MemberRank
    Jan 2020 Join Date
    4Posts

    Working with mu sources

    Hello there! I'm new here at ragezone and I would like to ask a questions I could not get answered anywhere else.
    1. Where should I start If I want to compile my own server files with client? I've seen some older tutorials, but are they still relevant for the new seasons? (referring to this)
    2. I've seen some people configuring databases as well, any posts where I can learn that?
    3. What's your personal experience working with sources? Any tips and tricks for a guy, who is just starting this out?

    ps. I have some background in programming, but not specifically with c++. Just want to test myself.

    Thank you


  2. #2
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    669Posts

    Re: Working with mu sources

    First of all welcome.

    The road to understand how Mu Online is working server side/client side is a pretty tough one because there are many sources, coded in many different styles by many devs. Some of those sources are pretty hard to be followed and understand, but with patience and if you're getting used to how others did that coding, you're on the right path.

    You'll absolutely need Visual Studio and C++ OOP, at least let's say a medium level of knowledge.

    For example, I've started with zTeam sources for S6E3. It took me a while to follow up the code and how the things are done, even knowing C++.

    Databases are already done most of the time in the repacks. You just need to understand SQL and how to write queries in your help. Only in case you need something custom, you're gonna work with the database, but most of the time, not really, maybe in your website to get info or save info.

    The communication between server and client is done like this:

    Client -> GameServer -> DataServer -> SQL Database queries -> DataServer -> GameServer -> Client (this is it in most cases)

    In GS and client source code, the methods and functions which are communicating between each application are named like this DGsenddata or GDsenddata. This means DataServer to GameServer and GameServer to DataServer.

    Try this repack with sources: https://forum.ragezone.com/f197/rele...urces-1092599/

    The rest, it's up to you.

    If you have questions or you need help, post them in Help section for Mu Online PC. https://forum.ragezone.com/f193/

  3. #3
    Novice Rizao is offline
    MemberRank
    Jan 2020 Join Date
    4Posts

    Re: Working with mu sources

    Quote Originally Posted by zipper20032 View Post
    First of all welcome.

    The road to understand how Mu Online is working server side/client side is a pretty tough one because there are many sources, coded in many different styles by many devs. Some of those sources are pretty hard to be followed and understand, but with patience and if you're getting used to how others did that coding, you're on the right path.

    You'll absolutely need Visual Studio and C++ OOP, at least let's say a medium level of knowledge.

    For example, I've started with zTeam sources for S6E3. It took me a while to follow up the code and how the things are done, even knowing C++.

    Databases are already done most of the time in the repacks. You just need to understand SQL and how to write queries in your help. Only in case you need something custom, you're gonna work with the database, but most of the time, not really, maybe in your website to get info or save info.

    The communication between server and client is done like this:

    Client -> GameServer -> DataServer -> SQL Database queries -> DataServer -> GameServer -> Client (this is it in most cases)

    In GS and client source code, the methods and functions which are communicating between each application are named like this DGsenddata or GDsenddata. This means DataServer to GameServer and GameServer to DataServer.

    Try this repack with sources: https://forum.ragezone.com/f197/rele...urces-1092599/

    The rest, it's up to you.

    If you have questions or you need help, post them in Help section for Mu Online PC. https://forum.ragezone.com/f193/
    Thank you for your time. Amazing insights!

  4. #4
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    669Posts

    Re: Working with mu sources

    No worries. And remember: When it comes to development in Mu Online (actually in every possible game), the key is the patience.

  5. #5
    Novice Rizao is offline
    MemberRank
    Jan 2020 Join Date
    4Posts

    Re: Working with mu sources

    Quote Originally Posted by zipper20032 View Post
    No worries. And remember: When it comes to development in Mu Online (actually in every possible game), the key is the patience.
    May I ask one more thing. Is it possible to :
    Hook a .dll to existing client to whom I don't have source code. Lets say, if user writes a "/hey" in chat, then server replies "Hello to you too!"

  6. #6
    C++ Developer zipper20032 is offline
    MemberRank
    Oct 2006 Join Date
    0x198837ADLocation
    669Posts

    Re: Working with mu sources

    Yes, it's possible. That's called Detouring, because you need to detour the chat/commands function and get the information out into your DLL.

    You can do that from GameServer too and it's easier. GameServer's chat functions are getting everything from players chat input.

    You can get the input under a switch case thing like: (this is already existing in the GMMng.cpp)
    Code:
    Let's assume that you have command /hey, registered in the AccessData.ini (the file for commands)
    It's registered in the enum for commands called COMMANDS (GMMng.h) with value 100.
    
    GMMng.cpp
    
    switch(code_command)
    {
       case: 100 //         /hey command
      {
         //You got the command /hey here with the code_command value 100
         //Do whatever you want with it
      }
      break;
    }
    You already have the ClientDLL source which you can build the zClient.dll which is doing everything regarding the client side of the game, also the detouring of many many functions from the main.exe. More or less, the client source file is exactly the DLL you want.



Advertisement