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

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old October 2nd, 2016 (9:28 PM). Edited October 4th, 2016 by Froosty.
Froosty's Avatar
Froosty Froosty is offline
The_Learner
     
    Join Date: Sep 2014
    Location: Somewhere in this world.
    Age: 21
    Gender: Male
    Nature: Brave
    Posts: 541
    Hello guys, I am The_learner.
    Spoiler:
    I have been playing pokemon games for some time.. and for always I am a big fan of gba games rather than Ds ans 3ds or gb games.
    The reason for it might also be that the first game I played was FIRE RED

    The feature that is a available in fired but not in other games is "habitat"
    .
    Thanks to lot of tools and people we can easily add pokemons in fire red, (this is great)
    But the game itself wont put the added pokemon in a specific habitat.
    It needs to be edited.
    So with the thought of helping other hackers out there, I decided to make this small tutorial.
    (I am not a professional hacker but with some study i actually found out a method to fo it)


    Tools you need:
    1. PGE (my suggestion)
    2. Hex editor (any)
    3. Free space finder
    4. Free time and a brain of course :P (a bad joke)

    Learning the table:
    Spoiler:
    Firstly i hope all of you might know about tools like PGE and G3HS.
    They have a .ini file in their folder.
    Open it and goto BPRE section, and search for habitat!
    You will see an pointer there,
    HabitatTable=452C4C

    Open hex exitor and goto that pointer(452C4C).
    You will see the main table responsible for habitat data over there!

    The table should be in this format!
    ZZ YY XX 08 DD 00 00 00
    Spoiler:
    Where;
    XX YY ZZ is the pointer to the table of specific habitat.
    DD CC are most probably the number of pages for a specific habitat, but I suggest not to edit the last 4 bytes of the data, as they can be done easily with PGE.
    (The first 4 bytes can also be easily edited with PGE)


    There are 9 habitats and each habitat table takes 8 bytes so the table for Habitat is within the 48(hex) value from that pointer:
    Spoiler:
    D4 27 45 08 1B 00 00 00 AC 28 45 08 1A 00 00 00 7C 29 45 08 10 00 00 00 FC 29 45 08 10 00 00 00 7C 2A 45 08 0A 00 00 00 CC 2A 45 08 11 00 00 00 54 2B 45 08 0B 00 00 00 AC 2B 45 08 0C 00 00 00 0C 2C 45 08 08 00 00 00


    We can easily dissemble that data for better knowledge:
    Spoiler:

    D4 27 45 08 1B 00 00 00 - habitat grassland
    AC 28 45 08 1A 00 00 00 - habitat forest
    7C 29 45 08 10 00 00 00 - habitat water edge
    FC 29 45 08 10 00 00 00 - habitat sea
    7C 2A 45 08 0A 00 00 00 - habitat cave
    CC 2A 45 08 11 00 00 00 - habitat mountain
    54 2B 45 08 0B 00 00 00 - habitat rough terrain
    AC 2B 45 08 0C 00 00 00 - habitat urban
    0C 2C 45 08 08 00 00 00 - habitat rare

    In the above table:
    the bolded portion indicates the pointer to the pages, and the underlined hex values represent the number of pages of the corresponding habitats.

    For eg: D4 27 45 08 1B 00 00 00 - habitat grassland
    It means the grassland habitat has 1B(27) pages and the pointer to the pages is at 0x4527D4

    It is the same for all the other data as well.



    If you visit the pointer XX YY ZZ from above then again you will find a table responsible for pokemon data on pages!
    (If you remember well in a pokedex on habitat searching, in one page 2-3 pokemon are seen then next page is opened with other pokemons)
    .
    The above table is responsible for that happening.


    Again the table will be in same format;
    Spoiler:
    ZZ YY XX 08 DD 00 00 00
    But this time;
    XX YY ZZ is pointer to pokemon data!
    DD is number of pokemon per page (min1-max4)


    Lets visit the cave habitat this time, as it has less number of pages so a shorter task of making you understand :)
    Spoiler:

    firstly I went to the pointer 0x452A7C which is the table to pages for cave habitat as we talked earlier
    now the number of pages in cave habitat is A(10) that means the table should be of A*8 bytes=50 bytes
    so I copied the 50 bytes of data from that pointer
    Spoiler:
    AC 26 45 08 03 00 00 00 B2 26 45 08 04 00 00 00 BA 26 45 08 04 00 00 00 C2 26 45 08 03 00 00 00 C8 26 45 08 03 00 00 00 CE 26 45 08 02 00 00 00 D2 26 45 08 03 00 00 00 D8 26 45 08 02 00 00 00 DC 26 45 08 02 00 00 00 E0 26 45 08 03 00 00 00


    again I am shortening the data for better understanding
    AC 26 45 08 03 00 00 00 - first page with 3 pokemons
    B2 26 45 08 04 00 00 00 - second page with 4 pokemons
    BA 26 45 08 04 00 00 00 - third page with 4 pokemons
    C2 26 45 08 03 00 00 00 - forth page with 3 pokemons
    C8 26 45 08 03 00 00 00 - fifth page with 3 pokemons
    CE 26 45 08 02 00 00 00 - sixth page with 2 pokemons
    D2 26 45 08 03 00 00 00 - seventh page with 3 pokemons
    D8 26 45 08 02 00 00 00 - eighth page with 2 pokemons
    DC 26 45 08 02 00 00 00 - ninth page with 2 pokemons
    E0 26 45 08 03 00 00 00 - tenth page with 3 pokemons

    As you can see in data above, the first four byte again is the pointer, but this time its the pointer to the pokemon data, and the underlined hex value is the indication of number of pokemon in that page.
    this value handles the working of the first four byte of the pointer.(this is not so important, but try to get the meaning of it)

    For eg:AC 26 45 08 03 00 00 00 - first page with 3 pokemons
    I am going to the first page of cave habitat; its pointer is 0x4526AC
    the first page has 3 pokemons, each pokemon take 2 bytes so the first page will read the 6 bytes from the pointer above
    29 00 2A 00 A9 00
    here it is
    again,
    29 00 - first pokemon in this page ( 00 29 in hex --> 41in dec which is Zubat)
    2A 00 - second pokemon in this page (00 2A in hex --> 42 in dec which is Golbat)
    A9 00 - third pokemon in this page (00 A9 in hex --> 169 in dec which is Crobat)

    The pokemon is based on the index number as seen in PGE or G3HS
    eg: if index number of a pokemon is 721 then it is 2D1 in hex,
    or better say 02D1; now add a space in middle and then reverse the values it will be D1 02.

    Spoiler:
    but it is better if you change the pokemon with the help of PGE habitat editor
    What i suggest is you place the pointer in the page table then in that pointer simply put "01 00" if you check in habitat editor then it will show bulbasaur, then you can select the pokemon you want from dropdown menu. you need not play with hex by this method.



    Every time the DD I stated in the pointers above acts as the limiter to the table,
    means if you set DD to 03 in the habitat table,
    then it will only load 3 pages even if you have set more in the pointer.
    .
    So you need to be good at hex editing as well,
    and also have a look at this tutorial.

    I will be adding pics to this tutorial soon and also try to edit it to be more understandable.
    .


    Expanding the table
    Spoiler:
    soon



    I would love to get feedbacks and know if this method is working for you :)
    Pls reply to this thread if you are not understanding any thing or you are getting any kind of error. I would love to help you out :D
    Thanks.
    __________________
    Want to talk with me regarding Rom-hacking ??? Want to get access to my works exclusive than anywhere else ???
    Click here to get in the discord server here where rom-hacking is a everyday talk and task.

    Want to showcase your hack on discord server ??? Click here to get the dask done.

    My works:
    TOOL: TL's Quick Enhancer
    TUTORIAL: Fire red habitat editing
    TUTORIAL: Fire red Transparent text-box


    | |
    Reply With Quote
      #2   Link to this post, but load the entire thread.  
    Old October 26th, 2016 (12:42 PM).
    mbcn10ww's Avatar
    mbcn10ww mbcn10ww is offline
       
      Join Date: Oct 2016
      Location: Brazil
      Gender: Male
      Nature: Lonely
      Posts: 364
      Excuse me, but I want to know what I'm doing wrong:
      I've expanded my habitats correctly. (I know this because I'm a "HEXpert", and when I open my rom on PGE or G3HS it works perfectly)

      But my PokéDex habitats page is glitched, and when I catch a new PKMN the game crashes when the habitats page would be executed.
      __________________
      My Works:
      [Fire Red] Adding New Trainer Sprites
      [Fire Red] My Version of HMs Type Check
      [Fire Red] Touched's Mega Evolution System (PATCH)
      Reply With Quote
        #3   Link to this post, but load the entire thread.  
      Old October 26th, 2016 (3:47 PM).
      pokefreak890's Avatar
      pokefreak890 pokefreak890 is offline
      The One that will make everything great
         
        Join Date: Nov 2014
        Gender: Male
        Posts: 820
        Regarding all this If possible can u show me pictures on how to do this since I'm a visual learner
        __________________
        3DS FREIND CODE : 2724-3540-0898
        Reply With Quote
          #4   Link to this post, but load the entire thread.  
        Old October 26th, 2016 (5:19 PM).
        Froosty's Avatar
        Froosty Froosty is offline
        The_Learner
           
          Join Date: Sep 2014
          Location: Somewhere in this world.
          Age: 21
          Gender: Male
          Nature: Brave
          Posts: 541
          Quote:
          Originally Posted by pokefreak890 View Post
          Regarding all this If possible can u show me pictures on how to do this since I'm a visual learner
          Yeah wait pls ... i got your errors so i will go with pictures in this tutorial and possible i will even upload a video in youtube... :) just wait some time more.

          Quote:
          Originally Posted by mbcn10ww View Post
          Excuse me, but I want to know what I'm doing wrong:
          I've expanded my habitats correctly. (I know this because I'm a "HEXpert", and when I open my rom on PGE or G3HS it works perfectly)

          But my PokéDex habitats page is glitched, and when I catch a new PKMN the game crashes when the habitats page would be executed.
          It should not have happened if you followed this process as nothing happened with me, but wait i will once redo the tutorial with pictures... hope that will be easier :)
          __________________
          Want to talk with me regarding Rom-hacking ??? Want to get access to my works exclusive than anywhere else ???
          Click here to get in the discord server here where rom-hacking is a everyday talk and task.

          Want to showcase your hack on discord server ??? Click here to get the dask done.

          My works:
          TOOL: TL's Quick Enhancer
          TUTORIAL: Fire red habitat editing
          TUTORIAL: Fire red Transparent text-box


          | |
          Reply With Quote
            #5   Link to this post, but load the entire thread.  
          Old October 26th, 2016 (5:42 PM).
          mbcn10ww's Avatar
          mbcn10ww mbcn10ww is offline
             
            Join Date: Oct 2016
            Location: Brazil
            Gender: Male
            Nature: Lonely
            Posts: 364
            Quote:
            Originally Posted by The_learner View Post
            Yeah wait pls ... i got your errors so i will go with pictures in this tutorial and possible i will even upload a video in youtube... :) just wait some time more.


            It should not have happened if you followed this process as nothing happened with me, but wait i will once redo the tutorial with pictures... hope that will be easier :)
            I've found the problem, the habitats in my rom base wasn't repointed correctly, only 0x08106888 was with the 4C 2C 45 08, I've fixed it putting my new table offset on all 4C 2C 45 08 pointers.
            Thank you for the tutorial. ^^
            Reply With Quote
              #6   Link to this post, but load the entire thread.  
            Old October 26th, 2016 (5:58 PM).
            Froosty's Avatar
            Froosty Froosty is offline
            The_Learner
               
              Join Date: Sep 2014
              Location: Somewhere in this world.
              Age: 21
              Gender: Male
              Nature: Brave
              Posts: 541
              Quote:
              Originally Posted by mbcn10ww View Post
              I've found the problem, the habitats in my rom base wasn't repointed correctly, only 0x08106888 was with the 4C 2C 45 08, I've fixed it putting my new table offset on all 4C 2C 45 08 pointers.
              Thank you for the tutorial. ^^
              So did you fix the problem...??
              __________________
              Want to talk with me regarding Rom-hacking ??? Want to get access to my works exclusive than anywhere else ???
              Click here to get in the discord server here where rom-hacking is a everyday talk and task.

              Want to showcase your hack on discord server ??? Click here to get the dask done.

              My works:
              TOOL: TL's Quick Enhancer
              TUTORIAL: Fire red habitat editing
              TUTORIAL: Fire red Transparent text-box


              | |
              Reply With Quote
                #7   Link to this post, but load the entire thread.  
              Old October 26th, 2016 (6:14 PM).
              mbcn10ww's Avatar
              mbcn10ww mbcn10ww is offline
                 
                Join Date: Oct 2016
                Location: Brazil
                Gender: Male
                Nature: Lonely
                Posts: 364
                Quote:
                Originally Posted by The_learner View Post
                So did you fix the problem...??
                Yep, it's working fine now, with all 721 PKMN. ^^

                Now I want to create separate Dexes, something like region separate Dexes and a Mega Dex.
                Reply With Quote
                  #8   Link to this post, but load the entire thread.  
                Old October 26th, 2016 (10:21 PM).
                Froosty's Avatar
                Froosty Froosty is offline
                The_Learner
                   
                  Join Date: Sep 2014
                  Location: Somewhere in this world.
                  Age: 21
                  Gender: Male
                  Nature: Brave
                  Posts: 541
                  Quote:
                  Originally Posted by mbcn10ww View Post
                  Yep, it's working fine now, with all 721 PKMN. ^^

                  Now I want to create separate Dexes, something like region separate Dexes and a Mega Dex.
                  I am glad my tutorial got helpful.... but i dont know about the seperate dex thing... :(
                  Cant help you with that though
                  __________________
                  Want to talk with me regarding Rom-hacking ??? Want to get access to my works exclusive than anywhere else ???
                  Click here to get in the discord server here where rom-hacking is a everyday talk and task.

                  Want to showcase your hack on discord server ??? Click here to get the dask done.

                  My works:
                  TOOL: TL's Quick Enhancer
                  TUTORIAL: Fire red habitat editing
                  TUTORIAL: Fire red Transparent text-box


                  | |
                  Reply With Quote
                    #9   Link to this post, but load the entire thread.  
                  Old October 27th, 2016 (4:22 AM).
                  mbcn10ww's Avatar
                  mbcn10ww mbcn10ww is offline
                     
                    Join Date: Oct 2016
                    Location: Brazil
                    Gender: Male
                    Nature: Lonely
                    Posts: 364
                    Quote:
                    Originally Posted by The_learner View Post
                    I am glad my tutorial got helpful.... but i dont know about the seperate dex thing... :(
                    Cant help you with that though
                    Don't worry, no one knows how to do it, I will try it myself.
                    Reply With Quote
                      #10   Link to this post, but load the entire thread.  
                    Old October 27th, 2016 (4:24 AM).
                    Froosty's Avatar
                    Froosty Froosty is offline
                    The_Learner
                       
                      Join Date: Sep 2014
                      Location: Somewhere in this world.
                      Age: 21
                      Gender: Male
                      Nature: Brave
                      Posts: 541
                      Quote:
                      Originally Posted by mbcn10ww View Post
                      Don't worry, no one knows how to do it, I will try it myself.
                      I think it will meed asm thing...
                      __________________
                      Want to talk with me regarding Rom-hacking ??? Want to get access to my works exclusive than anywhere else ???
                      Click here to get in the discord server here where rom-hacking is a everyday talk and task.

                      Want to showcase your hack on discord server ??? Click here to get the dask done.

                      My works:
                      TOOL: TL's Quick Enhancer
                      TUTORIAL: Fire red habitat editing
                      TUTORIAL: Fire red Transparent text-box


                      | |
                      Reply With Quote
                        #11   Link to this post, but load the entire thread.  
                      Old October 27th, 2016 (4:30 AM).
                      mbcn10ww's Avatar
                      mbcn10ww mbcn10ww is offline
                         
                        Join Date: Oct 2016
                        Location: Brazil
                        Gender: Male
                        Nature: Lonely
                        Posts: 364
                        Quote:
                        Originally Posted by The_learner View Post
                        I think it will meed asm thing...
                        I know, but I have to try it.
                        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
                        Ad Content
                        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 12:42 PM.