How to : Update your own RotMG Client Source

Discussion in 'Maplestory Accounts - Buy Sell Trade' started by Alde., 3/19/17.

Thread Status:
Not open for further replies.
  1. Alde.

    Alde.
    Expand Collapse
    High Risk Status: This user has been flagged as high risk due to one or more reasons

    Offline
    Goal
    Step by step tutorial to update an outdated client source.
    We want to compare two decompiled clients to find modifications and update our own client source.

    Required Softwares
    1. JPEXS
    JPEXS is a free flash decompiler used to decompile the clients
    2. Trillix
    Trillix is a paid flash decompiler used to decompile the assets of the new client
    3. WinMerge
    Winmerge is a free file comparator used to compare the clients
    4. Intellij IDEA Ultimate
    IDEA Ultimate is IDE to develop software. We'll use it to update our source and compile/run it.

    Please note that both Trillix and Intelij are paid softwares. Trillix is not essential. Intelij is, but you can get FlashDevelop for free.

    Tutorial

    1. Download the clients (new and old)
    Scroll at the bottom of static.drips.pw/rotmg to see all the released clients.
    Download the two clients you want to compare and put them on your Desktop.

    2. Download the source from Github and get it running
    You can use any Client source you want, but I recommend you use mine. Github, iobsidian, realmclient. Download ZIP. Put on to desktop.
    Make sure you have the Flex SDK installed on your machine. Put it in C:\Flex.
    Open the project in Intellij IDEA Ultimate.
    Sometimes, IDEA can be a real pain. If you see errors, go in
    File > Project Structure > Module > Depencies > Select Flex
    and set Flex everywhere you can. Keep IDEA openned.

    3. Decompile and compare
    Great. Now the hard work is done.
    Open JPEXS, open the two clients, and right click > export selection for both 'scripts' folder. Put those in those folders, I.E. 'New' and 'Old'. Close JPEXS.
    Great. Now Open WinMerge, file, open, select the two folders to compare.
    Optional : Right click on the filename/folder bar, customize columns, select differences, click O.K.
    You will see how many files have changed. For this current build, there is 5 files that have changed.
    Open the file with the most changes first.
    Right click on the top where it says 'C:\Users\VaypeNaysh\Desktop\Clients\new\scripts\k abam\rotmg\messaging\impl\GameServerConnection.as' and copy the filename.

    4. Update the source
    Keep WinMerge openned. Go in Intellij IDEA Ultimate and press CTRL+SHIFT+F and search for ''GameServerConnection" (without the .as)
    Ctrl+Click on the first result. Now you can begin updating the code. You can copy and paste the modified sections or update the values and code manually.

    You're almost done. Sometimes, errors will emerge. This is because of differences between the source and the decompiled client.
    You could figure it out by yourself, but variable names like arg becomes param and loc becomes local. Just rename the variables.

    Repeat the process for every files with differences in WinMerge.

    5. Updating the assets
    Now that we're done updating the source code, we want to update the assets. Sometimes the assets don't change so this step is optionnal but recommended.
    Open the new client in Trillix. At the top, press 'export source'. Go in kabam/rotmg/assets and paste the images to your source folder.

    That's it!

    I want to give a special thanks to our lord and savior 059.
    Thanks and happy coding.
     
    • This user is inactive. Hasn't logged into their account in over 60 days.
Thread Status:
Not open for further replies.