The PokéCommunity Forums Fan Games ROM Hacking Tools, Tutorials & Resources
Tutorial [Dissassembly] Setting up and using the Pokeruby/Pokeemerald dissassembly

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.


Reply
 
Thread Tools
  #1    
Old September 3rd, 2017 (3:45 PM). Edited March 8th, 2018 by ProjectRevoTPP.
ProjectRevoTPP ProjectRevoTPP is offline
     
    Join Date: May 2015
    Gender: Other
    Posts: 23
    Setting up and using Pokeruby/Pokeemerald




    Part 0: An Introduction
    Spoiler:

    I'm sure you've all heard of the recent gen 3 disassemblies and want to use them. That's good: but I'm sure an equal portion of you are on Windows and don't know how to make salad from scratch. So, how do you use pokeruby to make changes to things such as the code itself and what advantages does it offer me over traditional binary hacking, I hear you ask?

    I'm glad you asked, but first we need to go over traditional methods of hacking gen 3.

    1. Pre-Existing Tools
    Currently, changing things in ROM requires just that: directly editing a ROM. The thing is though that pointers and data itself cant be moved without moving it to free space in the ROM, and whatever pointed there needs to be repointed by hand, manually, in order to avoid issues. This is particularly annoying if you're making a lot of changes.

    2. Compiled C Injection
    So what if you want to add new code? Well, you could write some C and compile it into ARM and thumb, and then manually change the pointers in your code to direct at the correct ROM data and redirect anything to use your new function. Still sounds very annoying? Well, lets talk about how this ROM was assembled in the first place.

    The Pokemon games, in Game Freak's original source, were written in a programming language called C - specifically C90, a version of C published in 1990. This means all the data and code that make up the ROM were written in separate human-readable C files. These files are then run through a compiler to generate machine code. This machine code output is all joined together using a tool called a linker, which figures out how to combine these fragments into the final output (the ROM). This linking process determines the final offsets and recalculates every pointer for all the data and code automatically, meaning you don't have to keep track of the locations of data, only the labels given to that data.

    By reversing this process, we can translate all the pointers and binary data (that you'd edit in a hex editor or another tool) back into human-readable C. This means that we can repeat the compiling and linking processes to get a modified ROM, but maintain the flexibility of being able to work with labeled data and code.

    What is compilation you ask?

    Compilation is the process that takes a higher level language and compiles it into assembly so the computer can understand and execute the instructions. This can be used for a number of reasons: but the main one here is that it makes a programmer's job easier when all they have to deal with is the higher level language and not things like register balancing and reallocation by hand.

    There are a number of compiler/developer environments, but the one we will be using for this tutorial is Cygwin and thus assumes you have Windows at the moment. (Sorry Linux and Mac)

    Part 1: Setting up and using Cygwin (Skip this if you already have Cygwin and it has the git and make packages, or you have an environment like this already setup)
    Spoiler:

    What is Cygwin?
    From Google: Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment.

    Where do I get Cygwin?
    https://cygwin.com/install.html

    Which version do I pick? x86 or x86-64?
    Depending on your operating system if it's 32-bit or 64-bit, pick the version appropriate.

    Download the version you need and install it following its instructions. I recommend using a path such as
    Code:
    C:/cygwin
    but it is up to you. For this tutorial we will be assuming it is at C:/cygwin, but use your own path. Once Cygwin is installed, run cygwin once and close out of it. This step is important. Run cygwin's setup again to install the "git" and "make" packages. You need these to compile pokeruby.

    Follow the instructions here: http://imgur.com/a/JEtym

    Once that's done, Cygwin should be good to go, but we still need to setup devkitpro before we can compile pokeruby.

    Part 2: Setting up Devkitpro and linking it with Cygwin (only applicable if you installed Cygwin)
    Spoiler:

    What is devkitpro?
    From the devkitpro wiki: devkitPro is the vendor of a number of cross compilers intended for use by hobby programmers writing their own games and applications for popular games consoles where it's possible to run unsigned code. The goal is to provide amateur programmers with the means to program for resource limited devices and so gain valuable experience which would transfer well to a career in game development.

    Where do I get devkitpro?
    You can get devkitpro here: https://sourceforge.net/projects/devkitpro/files/Automated%20Installer/

    One important note: If you already have devkitpro, make sure your version is r46 or later, or else pokeruby won't match when compiling!

    It is strongly recommended you install devkitpro to C:/devkitpro to avoid confusion. The tutorial will assume this is the path of devkitpro, but it can be anything.

    Do not forget to run cygwin once and close out of it to generate the home user files or else this bashrc adjustment will fail to recognize devkitpro!

    Once you install devkitpro, we need to link it with cygwin. Open C:\cygwin32\home\(username)\.bashrc . If you do not have this file, make one with https://hastebin.com/suzeruzihu.bash and name it .bashrc. Be sure to use an editor to set it to Unix line endings (in notepad++, Edit > EOL Conversion > Unix) or else funny stuff will happen.

    If you already have a bashrc, add:

    Code:
    export DEVKITPRO=/cygdrive/c/devkitPro
    export DEVKITARM=$DEVKITPRO/devkitARM
    ...to the end of bashrc. let the "c/devkitPro" be your path to devkitPro if you do not have it at C:/devkitPro.

    Close out of cygwin and reopen it. Devkitpro should now be configured correctly.

    Part 3: Setting up Pokeruby/Pokeemerald
    Spoiler:

    We're now actually going to setup Pokeruby or Pokeemerald for compilation on Windows. We need to choose a folder to be our working folder; for this tutorial, we will be using C:/pokeruby as an example. Use C:/pokeemerald if you prefer that instead. Please note that you can use anywhere to do it.

    Make the folder at the location, (alternatively you can switch to one folder above with cd and use mkdir (folder) to make it), and do the following commands:

    Code:
    cd C:/<your folder here>
    git init
    git remote add origin https://github.com/pret/pokeruby.git (if you are using pokeemerald, use https://github.com/pret/pokeemerald.git instead)
    git pull origin master
    Note: you can use git clone to retrieve it alternatively, but this is the method I use since its more precise.

    If you are on Windows and don't want to bother with compiling the tools and agbcc needed to compile pokeruby/pokeemerald (which I assume is most of you), visit https://github.com/pret/pokeruby-tools and download the ZIP. Overwrite tools/ with the one in the zip. agbcc.exe's path should be
    Code:
    pokeruby/tools/agbcc/agbcc.exe
    , with similar paths for the other tools.

    Finally, we are ready to build.

    Type
    Code:
    make compare
    to build, which will build the ROM and then compare its sha1 hash to the original to make sure it matches. If all goes well, you should see this at the end: Note: you can add -jN to the make command where N is the number of extra threads you want to use when compiling. If you have a good PC, you can take advantage of this for faster compile times. For example, I use -j16, but you might use -j4.

    The disassembly make take many minutes to compile: be patient. I have heard of 15 minute compile times before, but the disassembly takes around 2-3 minutes for me for a clean build. It will take even longer if you are building pokeemerald.

    Code:
    pokeruby.gba: OK
    or
    Code:
    pokeemerald.gba: OK
    A .gba file has appeared in your folder where one didn't exist before. Congrats, you have built the disassembly into a ROM! Now lets practice making changes to it: in particular, a change to the pokedex code.

    Part 4: Making changes and test them
    Spoiler:

    Here is the part of the guide where we're going to do a single change to how the game works. If you only wanted to know how to build the ROM and that's it - you can stop reading now. This section applies to pokeruby only, but the same principle of making code changes applies regardless of the dissassembly.

    The change we have in mind is a simple one: change the pokedex so that when you use AREA mode, it plays a sound effect if the Pokemon you are looking at is in the same room you are. We need to insert a flag that says the game is currently in the Pokedex area screen, however, because pokeruby doesn't quite have all RAM Labeled yet, we need to use a hack to ensure we don't shift RAM. (Although all of pokeruby's ROM pointers are labeled and repoint correctly: there's still a few holdout RAM addresses that haven't been labeled yet [specifically in the battle scripts] as of the writing of this)

    Make a new file called "pokedex_flag.c" and have it look like:

    Code:
    #include "global.h"
    
    EWRAM_DATA bool8 gPokedexAreaScreenFlag = {0};
    To note, make sure the file is saved in Unix line endings like you did earlier in notepad++, and the file has to have an extra new line.

    Add
    Code:
    .include "src/pokedex_flag.o"
    to the end of sym_ewram.txt so the game sees the new flag. Save the txt file.

    Now that we have the hack out of the way, we can get to the real meat of the change itself. Lets think about it for a second: in order to play a sound if a Pokemon is in the same room you are, we first need to add a function which takes a species as input and returns TRUE or FALSE. Lets open wild_encounter.c to do that: the reason we need to put the function in wild_encounter.c is mainly that the structs used in the check are also declared in the same file - so it has to be here.

    This tutorial wont teach you how to write C: There's other ones out there that can do better than I, so lets write the function:

    Code:
    #define NUM_GRASS_SLOTS 12
    #define NUM_WATER_SLOTS 5
    #define NUM_ROCK_SLOTS 5
    #define NUM_FISHING_SLOTS 10
    
    bool8 IsMonInLocalArea(u16 species)
    {
        u8 i;
        u16 headerNum = GetCurrentMapWildMonHeader();
        struct WildPokemonInfo *landMonsInfo = gWildMonHeaders[headerNum].landMonsInfo;
        struct WildPokemonInfo *waterMonsInfo = gWildMonHeaders[headerNum].waterMonsInfo;
        struct WildPokemonInfo *rockSmashMonsInfo = gWildMonHeaders[headerNum].rockSmashMonsInfo;
        struct WildPokemonInfo *fishingMonsInfo = gWildMonHeaders[headerNum].fishingMonsInfo;
    
        if(headerNum == 0xFFFF)
            return FALSE;
    
        // do grass check.
        if(landMonsInfo != NULL)
        {
            for(i = 0; i < NUM_GRASS_SLOTS; i++)
                if(landMonsInfo->wildPokemon[i].species == species)
                    return TRUE;
        }
    
        // do water check.
        if(waterMonsInfo != NULL)
        {
            for(i = 0; i < NUM_WATER_SLOTS; i++)
                if(waterMonsInfo->wildPokemon[i].species == species)
                    return TRUE;
        }
    
        // do rock smash check.
        if(rockSmashMonsInfo != NULL)
        {
            for(i = 0; i < NUM_ROCK_SLOTS; i++)
                if(rockSmashMonsInfo->wildPokemon[i].species == species)
                    return TRUE;
        }
    
        // do fishing check.
        if(fishingMonsInfo != NULL)
        {
            for(i = 0; i < NUM_FISHING_SLOTS; i++)
                if(fishingMonsInfo->wildPokemon[i].species == species)
                    return TRUE;
        }
    
        return FALSE;
    }
    Add this to the end of wild_encounters.c. This code gets the map header of the player, fetches all 4 structs of the wild encounter data of the current map (regardless if NULL or not), then checks each struct one by one. If any of them have a matching species, the function will return TRUE. Makes sense, right?

    Now that we're done, save the file (remember the newline at the end of every file is needed) and open up pokedex.c. The two functions we need to change are Task_InitAreaScreenMultistep and Task_AreaScreenProcessInput . Because pokedex_area_screen isn't decompiled yet (at the time of writing this), this is why we need the boolean flag.

    First, add:

    Code:
    extern bool8 gPokedexAreaScreenFlag;
    extern bool8 IsMonInLocalArea(u16 species);
    before Task_InitAreaScreenMultistep. This tells the file where to find those two things so they can be called.

    Add:

    Code:
    gPokedexAreaScreenFlag = TRUE;
    ...right after case 2 and before ShowPokedexAreaScreen is called in Task_InitAreaScreenMultistep. this will tell a later function to execute the check once, which sets the flag back to 0.

    In Task_AreaScreenProcessInput, this function checks a flag to see if its no longer 0, and then puts a function on the task func to execute. This function is executed every frame while the Area screen is active, so we need the Area check to be here.

    Insert:

    Code:
        if(gPokedexAreaScreenFlag == TRUE)
        {
            if(IsMonInLocalArea(NationalPokedexNumToSpecies(gUnknown_0202FFBC->dexNum)) == TRUE)
                PlaySE(SE_C_PIKON);
    
            gPokedexAreaScreenFlag = FALSE;
        }
    Note: gUnknown_0202FFBC may have been relabeled since this tutorial. You may need to update that label. Do a
    Code:
    git grep 202FFBC pokeruby.map
    to find the new label after you have already compiled once.

    ...before the check. If "songs.h" is not already included at the top of pokedex.c, please add it via
    Code:
    #include "songs.h"
    . Save the file and recompile the rom with "make" (dont use compare, as the ROM definitely wont match now, but that's not the point now). Use -jN if you want. Test your ROM and try to view the Pokedex area screen of a Pokemon that is in the route/cave you are in, for example, Poochyena in Route 101. You should hear the jingle, which means you succeeded!

    Here's a video showing what that change will function like:

    https://youtu.be/PKr2HwF0tkU

    Conclusion:

    You'll be able to make code changes with the disassembly similar to this fashion. To note: pokeruby nor pokeemerald is not ready for production yet, obviously, but this tutorial will teach you how to use it on a most basic level. Although this does and will open up gen 3 tremendously: there is much work to be done; we need to work more on pokefirered sometime down the line. Hopefully, now that you know how to setup the dissassemblies, you know how to make changes and eventually contribute to our cause. Thanks for reading.
    Reply With Quote

    Relevant Advertising!

      #2    
    Old October 4th, 2017 (9:14 AM). Edited October 4th, 2017 by camthesaxman.
    camthesaxman camthesaxman is offline
    reverse engineer of teh pokeymanz
       
      Join Date: Jan 2017
      Gender: Male
      Nature: Lonely
      Posts: 23
      I want to point out that installing Cygwin isn't necessary. It is simpler to follow the instructions in INSTALL.md and use MSYS, which comes bundled with devkitPro and doesn't require you to edit the .bashrc file.

      Git is also not required, unless you want to contribute to the project. You can simply navigate to https://github.com/pret/pokeruby, click the green "Clone or download" and click "Download ZIP". Extract this to C:\devkitPro\msys\home\<Username>. Download the tools from https://github.com/pret/pokeruby-tools and copy the tools folder over the tools folder in your pokeruby-master directory. After that, go into your start menu, and in the devkitPro folder, there should be a "MSys" shortcut (it has a blue M icon). Click that to open the MSYS environment (this works a bit like Cygwin, same commands and everything), and navigate to that pokeruby-master directory with the following command.
      Code:
      cd pokeruby-master
      Now, your tools should be set up, and you can build the ROM with the "make" command.
      Code:
      make
      It will take a few minutes to build, so be patient. After that, you can edit files and re-build the ROM with "make".


      If you want to contribute to pokeruby and need to use git, the official Git for Windows can be used with MSYS. You can find it here https://git-scm.com/download/win. During the installer, choose the option to run Git from the command prompt, but NOT the included Unix utilities.

      After that, git should be usable from anywhere, so run
      Code:
      git clone https://github.com/pret/pokeruby.git
      in MSYS to download the repository.
      __________________

      Pokemon Ruby/Sapphire disassembly project
      Reply With Quote
        #3    
      Old October 10th, 2017 (4:26 AM). Edited October 10th, 2017 by NathanHaze.
      NathanHaze NathanHaze is offline
         
        Join Date: Sep 2017
        Location: México
        Gender: Male
        Posts: 1
        I get a message typing "git pull origin master": Unable to find remote helper for 'https'
        And @camthesaxman, "cd pokeruby-master" not works with me, I wrote "C:\devkitPro\msys\home\pokeruby-master" instead.
        But for now I try to make a hack with this.
        In any case thanks to both.
        Reply With Quote
          #4    
        Old October 11th, 2017 (4:33 PM). Edited October 11th, 2017 by Lunos.
        Lunos's Avatar
        Lunos Lunos is online now
        The Observer
           
          Join Date: Oct 2008
          Location: Montevideo (Uruguay)
          Gender: Male
          Nature: Lonely
          Posts: 1,350
          Quote:
          Originally Posted by camthesaxman View Post
          I want to point out that installing Cygwin isn't necessary. It is simpler to follow the instructions in INSTALL.md and use MSYS, which comes bundled with devkitPro and doesn't require you to edit the .bashrc file.

          Git is also not required, unless you want to contribute to the project. You can simply navigate to https://github.com/pret/pokeruby, click the green "Clone or download" and click "Download ZIP". Extract this to C:\devkitPro\msys\home\<Username>. Download the tools from https://github.com/pret/pokeruby-tools and copy the tools folder over the tools folder in your pokeruby-master directory. After that, go into your start menu, and in the devkitPro folder, there should be a "MSys" shortcut (it has a blue M icon). Click that to open the MSYS environment (this works a bit like Cygwin, same commands and everything), and navigate to that pokeruby-master directory with the following command.
          Code:
          cd pokeruby-master
          Now, your tools should be set up, and you can build the ROM with the "make" command.
          Code:
          make
          It will take a few minutes to build, so be patient. After that, you can edit files and re-build the ROM with "make".
          This method seems to be working fine. During the process, scaninc.exe crashes but it apparently doesn't harm the building process itself.
          __________________
          Reply With Quote
            #5    
          Old October 12th, 2017 (3:06 PM).
          Awec Awec is offline
          Maniacal Egotist ~
             
            Join Date: Aug 2007
            Posts: 25
            I tried building it, and it made a rom successfully but the rom was unplayable.
            Reply With Quote
              #6    
            Old October 14th, 2017 (8:26 AM).
            ProjectRevoTPP ProjectRevoTPP is offline
               
              Join Date: May 2015
              Gender: Other
              Posts: 23
              Quote:
              Originally Posted by Awec View Post
              I tried building it, and it made a rom successfully but the rom was unplayable.
              You need to ensure you have devkit r46 or newer. Although r45 will build a ROM, it wont be a matching ROM and have corrupted audio and such.

              Please do
              Code:
              make compare
              instead of make so you can be sure your ROM matches.
              Reply With Quote
                #7    
              Old October 21st, 2017 (2:03 PM).
              Awec Awec is offline
              Maniacal Egotist ~
                 
                Join Date: Aug 2007
                Posts: 25
                I did make compare and it said the rom matched, but it wouldn't play on VBA for some reason. Worked fine when I tried Bizhawk though.
                Reply With Quote
                  #8    
                Old October 21st, 2017 (4:30 PM).
                ProjectRevoTPP ProjectRevoTPP is offline
                   
                  Join Date: May 2015
                  Gender: Other
                  Posts: 23
                  Quote:
                  Originally Posted by Awec View Post
                  I did make compare and it said the rom matched, but it wouldn't play on VBA for some reason. Worked fine when I tried Bizhawk though.
                  You need to set VBA's Save type to Flash 128K. Flash 128K is required to run gen 3 Pokemon games.
                  Reply With Quote
                    #9    
                  Old October 23rd, 2017 (6:52 PM).
                  camthesaxman camthesaxman is offline
                  reverse engineer of teh pokeymanz
                     
                    Join Date: Jan 2017
                    Gender: Male
                    Nature: Lonely
                    Posts: 23
                    I fixed the scaninc issue yesterday, so you shouldn't have any more problems with that if you re-download the tools.
                    __________________

                    Pokemon Ruby/Sapphire disassembly project
                    Reply With Quote
                      #10    
                    Old December 11th, 2017 (11:55 AM).
                    Lunos's Avatar
                    Lunos Lunos is online now
                    The Observer
                       
                      Join Date: Oct 2008
                      Location: Montevideo (Uruguay)
                      Gender: Male
                      Nature: Lonely
                      Posts: 1,350
                      The guys from the Pret Team helped me with a little problem that I had and I think that it is worth bringing up over here, just in case anyone decides to build Pokeemerald.

                      If anyone uses the standalone devkitARM like me, the entry to put in the ".bashrc" file is:
                      export DEVKITARM=/cygdrive/c/devkitARM/


                      And of course, the devkitARM folder must be in "C:", in this case.
                      __________________
                      Reply With Quote
                        #11    
                      Old January 4th, 2018 (7:08 AM). Edited January 4th, 2018 by slawter666.
                      slawter666's Avatar
                      slawter666 slawter666 is offline
                         
                        Join Date: Sep 2008
                        Posts: 82
                        I've recently endeavoured to learn C to make use of this project, specifically to insert a looping idle animation for the sprites rather than have a static image.

                        So before making edits to the ROM i wanted to try to get graphics loaded in a seperate .c file. I thought it would be as simple as choosing the location of the image and displaying it on screen (for a static image anyway) however that does not seem to be the case and searching on google has confused me further.

                        I only started learning C last night so I am very new to it, if someone could point me in the right direction so I know what I need to learn it would be most appreciated.
                        __________________
                        Reply With Quote
                          #12    
                        Old February 3rd, 2018 (5:14 AM). Edited February 3rd, 2018 by Phenom2122.
                        Phenom2122's Avatar
                        Phenom2122 Phenom2122 is offline
                           
                          Join Date: Jun 2014
                          Gender: Male
                          Nature: Quiet
                          Posts: 49
                          I just have to say that this is absolutely incredible and I never in my wildest dreams thought that I would see something like this. I just have a few questions.

                          - Where does it get it's source data from? I just ran Pokeemerald and it doesn't need a source ROM but still produces a bunch of source files and images. I feel kinda stupid asking this but does this mean that the game is shipped with Pokeemerald? I was under the impression that I would need to drop a ROM into the folder or something but clearly that's not the case.

                          - How exactly do I tell what has been decompiled and what hasn't? Is the stuff in the 'asm' folder still not done? This ties in with my first question. How is this tool able to produce an Emerald ROM while not needing a source ROM and while still being incomplete?

                          - What implications does this have for other games? Would the same principle behind decompiling Pokemon Emerald also apply to other GBA games like Golden Sun or Megaman Battle Network?
                          Reply With Quote
                            #13    
                          Old February 3rd, 2018 (8:09 PM).
                          Diegoisawesome's Avatar
                          Diegoisawesome Diegoisawesome is offline
                          Oh god the bees
                           
                          Join Date: Dec 2007
                          Location: :noitacoL
                          Age: 21
                          Gender: Male
                          Nature: Naive
                          Posts: 1,046
                          Quote:
                          Originally Posted by Phenom2122 View Post
                          I just have to say that this is absolutely incredible and I never in my wildest dreams thought that I would see something like this. I just have a few questions.

                          - Where does it get it's source data from? I just ran Pokeemerald and it doesn't need a source ROM but still produces a bunch of source files and images. I feel kinda stupid asking this but does this mean that the game is shipped with Pokeemerald? I was under the impression that I would need to drop a ROM into the folder or something but clearly that's not the case.

                          - How exactly do I tell what has been decompiled and what hasn't? Is the stuff in the 'asm' folder still not done? This ties in with my first question. How is this tool able to produce an Emerald ROM while not needing a source ROM and while still being incomplete?

                          - What implications does this have for other games? Would the same principle behind decompiling Pokemon Emerald also apply to other GBA games like Golden Sun or Megaman Battle Network?
                          The source data is all included there in the repository. It used to require a ROM from which data would be extracted, but a few weeks ago we went on a crusade to extract all the unextracted data from the ROM so now it's no longer necessary.
                          Everything in the 'asm' directory is raw assembly that hasn't been decompiled into C yet. The extracted assembly code, when compiled, matches what was in the ROM already, it's just less useful in assembly form than in C form, which is why the project isn't yet complete.
                          Yes, the same principle could be applied to decompile other games, but the games would need to fit certain criteria in order for decompilation into C to be possible (such as level of optimization used when building).
                          __________________


                          My other resources:
                          My Website
                          diegoisawesome's MEGA-HUGE XSE Scripting Tutorial
                          diegoisawesome's Miscellaneous Finds
                          The Ruins of Alph Puzzles
                          Diego's Miscellaneous Patches
                          GBA Intro Manager
                          The Secret Sauce: Triple-Layer Tiles
                          Reply With Quote
                            #14    
                          Old February 4th, 2018 (2:42 AM).
                          Phenom2122's Avatar
                          Phenom2122 Phenom2122 is offline
                             
                            Join Date: Jun 2014
                            Gender: Male
                            Nature: Quiet
                            Posts: 49
                            Quote:
                            Originally Posted by Diegoisawesome View Post
                            The source data is all included there in the repository. It used to require a ROM from which data would be extracted, but a few weeks ago we went on a crusade to extract all the unextracted data from the ROM so now it's no longer necessary.
                            Everything in the 'asm' directory is raw assembly that hasn't been decompiled into C yet. The extracted assembly code, when compiled, matches what was in the ROM already, it's just less useful in assembly form than in C form, which is why the project isn't yet complete.
                            Yes, the same principle could be applied to decompile other games, but the games would need to fit certain criteria in order for decompilation into C to be possible (such as level of optimization used when building).
                            Thanks for the response. Before actually trying this out I was under the impression that there was still a long way to go but it sounds like for all intents and purposes, we can already modify every aspect of the game with what we've got so far. This is just incredible. The ROM modding scene has definitely come a long way since I started out hex editing Emerald on my phone years ago. And I feel almost like I'm getting left further and further behind in terms of knowledge every time I visit this community after a long absence. Here's to hoping that some great bug free modding tools arise from this. Very exciting. Thanks to you and everyone involved in this.
                            Reply With Quote
                              #15    
                            Old February 4th, 2018 (12:30 PM). Edited February 4th, 2018 by BluRose.
                            BluRose BluRose is offline
                            blu rass
                               
                              Join Date: Apr 2014
                              Location: hyakkoku city
                              Age: 17
                              Gender: Male
                              Nature: Timid
                              Posts: 731
                              Quote:
                              Originally Posted by Phenom2122 View Post
                              Thanks for the response. Before actually trying this out I was under the impression that there was still a long way to go but it sounds like for all intents and purposes, we can already modify every aspect of the game with what we've got so far. This is just incredible. The ROM modding scene has definitely come a long way since I started out hex editing Emerald on my phone years ago. And I feel almost like I'm getting left further and further behind in terms of knowledge every time I visit this community after a long absence. Here's to hoping that some great bug free modding tools arise from this. Very exciting. Thanks to you and everyone involved in this.
                              but that's just the thing
                              there is absolutely nothing that will require a tool anymore after everything is decompiled
                              want to edit anything about pokémon?
                              src/data/pokemon/, sprites in data/graphics/pokemon/
                              want to add in lines of text for use in a scripted event? no more repointing! append it to a file in
                              data/text/maps/
                              want to script, but hate xse's at-times wrong labels?
                              data/scripts
                              want to make your party menu look entirely different?
                              change some constants in the arrays of
                              src/field/party_menu.c
                              soon, over will be the days of hacky methods of doing things in favor for nice projects like this one that's been in progress for two days
                              the one thing that, solely for organizational purposes, i'd still like to have, is a map tool. which padz and touched are both independently working on
                              __________________
                              am i cool yet
                              Reply With Quote
                                #16    
                              Old February 5th, 2018 (1:00 AM). Edited February 5th, 2018 by Phenom2122.
                              Phenom2122's Avatar
                              Phenom2122 Phenom2122 is offline
                                 
                                Join Date: Jun 2014
                                Gender: Male
                                Nature: Quiet
                                Posts: 49
                                Quote:
                                Originally Posted by BluRose View Post
                                but that's just the thing
                                there is absolutely nothing that will require a tool anymore after everything is decompiled
                                want to edit anything about pokémon?
                                src/data/pokemon/, sprites in data/graphics/pokemon/
                                want to add in lines of text for use in a scripted event? no more repointing! append it to a file in
                                data/text/maps/
                                want to script, but hate xse's at-times wrong labels?
                                data/scripts
                                want to make your party menu look entirely different?
                                change some constants in the arrays of
                                src/field/party_menu.c
                                soon, over will be the days of hacky methods of doing things in favor for nice projects like this one that's been in progress for two days
                                the one thing that, solely for organizational purposes, i'd still like to have, is a map tool. which padz and touched are both independently working on
                                I know that you could just use Notepad++ and whatever your favourite image editing tools are to get the job done but without some tools to go along with this, I think that a lot of modders that are closer to the beginner level are just going to use the old tools anyway because they wont know what to do with any of this.

                                I mean, if you're going to be making a map editor, why stop there? Let it also be an image editor that automatically loads the correct palette, asign a text editor to it for easily hunting out that one script that you want to edit on a specific map. Throw in a pokemon editor so that while you're editing wild encounters for a certain map you can also tweak something about a pokemon that you've just thought of. Let it also act as a sort of 'mod manager', injecting or removing code from other sources such as Day and Night systems etc. You can't have a day and night system without a map editor that supports it. In order to change things you need to have an overview of everything or you're going to run into errors and forgetfulness, that's why this modding scene has been a bit of a mess for a while, you have to hunt through hundreds of obscure tools, many with the same features as each other, just to find that one feature that isn't in any of the rest. I mean for years the only choice of map editing has been to juggle between Advance Map 1.92 and 1.95. A map editor is the perfect basis for a Skyrim Creation Kit style editor and I for one would love to see a one stop shop tool that supports these disassembly projects.

                                Of course, it sounds like I'm just shouting commands about it, well that's not what I'm doing. I just hope at the least whatever tools come from this stay open source and that all the tool makers at least come to some sort of agreement so that we don't end up with situations like now where you have ten million different ini files to edit for ten million different tools while they all could just share the same ini and make everyone's life easier.

                                Edit: I hope that this map editor has a plugin system at the very least.
                                Reply With Quote
                                  #17    
                                Old February 7th, 2018 (9:48 AM). Edited March 4th, 2018 by Deokishisu.
                                Deokishisu's Avatar
                                Deokishisu Deokishisu is offline
                                Mr. Magius
                                   
                                  Join Date: Feb 2006
                                  Location: If I'm online, it's a safe bet I'm at a computer.
                                  Gender: Male
                                  Nature: Relaxed
                                  Posts: 859
                                  Quote:
                                  Originally Posted by Phenom2122 View Post
                                  I know that you could just use Notepad++ and whatever your favourite image editing tools are to get the job done but without some tools to go along with this, I think that a lot of modders that are closer to the beginner level are just going to use the old tools anyway because they wont know what to do with any of this.

                                  I mean, if you're going to be making a map editor, why stop there? Let it also be an image editor that automatically loads the correct palette, asign a text editor to it for easily hunting out that one script that you want to edit on a specific map. Throw in a pokemon editor so that while you're editing wild encounters for a certain map you can also tweak something about a pokemon that you've just thought of. Let it also act as a sort of 'mod manager', injecting or removing code from other sources such as Day and Night systems etc. You can't have a day and night system without a map editor that supports it. In order to change things you need to have an overview of everything or you're going to run into errors and forgetfulness, that's why this modding scene has been a bit of a mess for a while, you have to hunt through hundreds of obscure tools, many with the same features as each other, just to find that one feature that isn't in any of the rest. I mean for years the only choice of map editing has been to juggle between Advance Map 1.92 and 1.95. A map editor is the perfect basis for a Skyrim Creation Kit style editor and I for one would love to see a one stop shop tool that supports these disassembly projects.

                                  Of course, it sounds like I'm just shouting commands about it, well that's not what I'm doing. I just hope at the least whatever tools come from this stay open source and that all the tool makers at least come to some sort of agreement so that we don't end up with situations like now where you have ten million different ini files to edit for ten million different tools while they all could just share the same ini and make everyone's life easier.

                                  Edit: I hope that this map editor has a plugin system at the very least.
                                  I think you may be misunderstanding the ease with which everything except probably mapping and sound design will be with the disassembly. If you wanted Day/Night Wild Pokemon, for example, you would just add a check for the time and load another wild encounter table (that you just appended to the end). For a lot of the features that a map editor would traditionally need to support, there's no need for that support in a hacking environment where we have a full disassembly. Creating tools to work with the disassembly for things that would just be text edits in the source is not only limiting but completely unnecessary. If someone wanted to change the base stats structure but have been relying on tools to edit the source, their tool for editing Pokemon would immediately break and they'd have no idea what to do.
                                  __________________
                                  For ROMHackers, PokeCommunity is dead after the scandal. If you enjoy the ROMHacking scene, come with the rest of us to Silph Co. It is a forum by ROMHackers, for ROMHackers. None of the bloat of PC, and staff that knows what our subset of the community needs.
                                  Reply With Quote
                                  Reply

                                  Quick Reply

                                  Join the conversation!

                                  Create an account to post a reply in this thread, participate in other discussions, and more!

                                  Create a PokéCommunity Account

                                  Sponsored Links
                                  Thread Tools

                                  Posting Rules
                                  You may not post new threads
                                  You may not post replies
                                  You may not post attachments
                                  You may not edit your posts

                                  BB code is On
                                  Smilies are On
                                  [IMG] code is On
                                  HTML code is Off

                                  Forum Jump


                                  All times are GMT -8. The time now is 6:14 AM.