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

Reply
 
Thread Tools
  #1    
Old January 31st, 2014 (9:41 PM). Edited February 10th, 2016 by DoesntKnowHowToPlay.
DoesntKnowHowToPlay's Avatar
DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
Tiny Umbrella with Lots and Lots of Good
     
    Join Date: Jan 2012
    Posts: 258
    In this thread, I will explain how to expand the pokedex. You will need the following:

    -A GBA emulator (or flashcart if you're crazy)
    -An FR 1.0 English ROM
    -JPAN's save block hack
    -A hex editor
    -A solid understanding of hacking concepts. I won't be teaching you how to use a hex editor, or how to repoint things. If you're qualified to do this, odds are all you really need is the offsets, which is pretty much all this post is.


    Step 1: Get free RAM for the dex flags
    Spoiler:

    The first obstacle to expanding the Pokedex is the need for flags to store what new Pokemon the player has seen/caught. To do this, we need free memory.

    First things first, install JPAN's save block hack to your ROM. It can be found here: http://www.pokecommunity.com/showpost.php?p=6993092&postcount=206

    You will need to also disable the LR Help menu- otherwise, if the player opens it, they will corrupt all the newly saved memory. Do this by placing 1D E0 at x13b8c2.

    Now, before doing anything else, you should decide how many pokedex entries and how many pokemon you want. These don't have to be the same- it's entirely possible to map multiple pokemon to a single dex entry, or have unmapped pokemon- vanilla does just this with the limbo slots between Celebi and Treecko. Consider the limbo slots and Unown sprite slots- while slots 252-275 are actually quite safe to use, slots 412-439 store the sprites for eggs and every Unown form bar A. As such, if you use Unown, you will probably want to leave those alone.

    Once you've decided, figure out how many bits it will take to encode the number of dex entries- the answer is (number of dex entries)/8, rounded up. Using this, pick two locations in the RAM freed by JPAN's hack to be where Seen and Caught flags will go. Note that later steps will be easier if you put them next to each other. Now:

    Change x104B10 to point to new SEEN flags.
    Change x104B00 to 00 00.
    Change x104B02 to 00 00.
    This makes the game read using the new SEEN flags.

    Change x104B5C to point to new CAUGHT flags.
    Change x104B16 to 00 00.
    Change x104B18 to 00 00.
    Change x104B1A to 00 00.
    Change x104B26 to 16 E0.
    This makes the game read using the new CAUGHT flags.

    Change x104B34 to 0F E0.
    This makes both of the above bypass redundant SEEN flags.

    Test. At this point, if you start a new file, your pokedex should refuse to open- this is because the game is writing to the old flags but reading the new flags.

    Change x104B94 to point to new SEEN flags.
    Change x104B6A to 01 1C.
    Change x104B6C to 00 00.
    Change x104B78 to 1A E0.
    This makes the game write to the new SEEN flags.

    Change x104BB8 to point to new CAUGHT flags.
    Change x104BA2 to 01 1C.
    Change x104BA4 to 00 00.
    This makes the game write to the new CAUGHT flags.

    Again, test. Your dex should work normally now, but it works on the new memory. If you fiddle with Memory Viewer you should be able to watch the flags get set, and set them yourself.

    It's worth noting that normally, there are 3 sets of Seen flags. Why there are three sets is a mystery, but if you don't want to use JPAN's save hack for this, you can rewrite the method the game uses to access the flags and repurpose the redundant ones. I won't be explaining how to do that, though- you'll have to figure it out and write the routine yourself.

    We also need to make the game clear these flags properly when the player selects New Game at the main menu. We can do this with the following edits:

    Put a pointer to whichever set of flags comes first at x549D0.
    Put 20 1C 00 00 at x549b0.
    Put XX 22 at x549b6, where XX is the number of bytes taken by your dex flags.
    Put 20 1C at x549bc.
    Put YY 30 at x549be, where YY is the number of bytes between the sets of flags. YY is probably the same as XX, but it doesn't have to be.
    Put XX 22 at x549c2, where XX is the number of bytes taken by your dex flags.

    Alternatively, instead of these byte changes, you can instead make an OW script that clears the dex with writebytetooffset, and make sure it runs before the player gets the pokedex. Your choice.


    Step 2: Repoint goddamn everything
    Spoiler:

    Fire up Notepad and get ready to write out some offsets, we'll be here a while.

    Repoint and expand the Pokemon name table.
    This begins at x245EE0 and is 11 bytes per entry.
    In vanilla, it is x11B4 bytes long.
    There should be 40 pointers to it.

    Repoint and expand the base stat table.
    This begins at x254784 and is 28 (x1C) bytes per entry.
    In vanilla, it is x2D10 bytes long.
    There should be 57 pointers to it.

    There are two pointers to egg hatching time in the ROM that will need repointing.
    They are to x254795, and should point to the 18th byte of base stat data.

    Repoint and expand the level-up movepool table.
    This begins at x25d7b4 and is 4 bytes per entry.
    In vanilla, it is x670 bytes long.
    There should be 6 pointers to it.

    Test. If you put valid filler data in these tables, you should be able to get legit mons from the expanded slots and battle with them:



    Place 00 00 00 00 00 00 (that's six 00s) at x41000.
    This will cause the repointed name table to actually get used.

    Repoint and expand the front sprite table.
    This begins at x2350AC and is 8 bytes per entry.
    To my knowledge, the latter four bytes are not used.
    In vanilla, it is xDC0 bytes long.
    There should be 28 pointers to it.

    Repoint and expand the back sprite table.
    This begins at x23654C and is 8 bytes per entry
    To my knowledge, the latter four bytes are not used.
    In vanilla, it is xDC0 bytes long.
    tl;dr same as above.
    There should be 10 pointers to it.

    Put 07 E0 at xed72.
    Put 07 E0 at xf1b6.
    These will break the limiters preventing sprites from showing up.

    Test. You should get valid sprites, but with broken palettes and position data:



    Repoint and expand the pokemon palette table.
    This begins at x23730C and is 8 bytes per entry.
    Same as above, last four bytes unused, xDC0 total.
    There should be 5 pointers to it.

    Repoint and expand the shiny palette table.
    This begins at x2380CC and is the same as the above.
    There should be 3 pointers to it.

    Put 04 E0 at x44104.
    This breaks the limiter on the palette tables.

    Test. You should have a reasonably colored extended mon now.
    In fact, with a spare .ini, you can now add sprites using A-Series.

    Repoint and expand the Player Y table.
    This is at x235E6C, and is four bytes per mon.
    Despite what Wichu's readme may have you believe, it's x6E0 bytes long.
    There should be 8 pointers to it.

    Repoint and expand the Enemy Y table.
    This is at x2349cc, and is four bytes per mon.
    It's also x6E0 bytes long.
    There are 16 pointers to it, oddly enough.

    Repoint and expand the Altitude table.
    This is at x23A004, and is one byte per mon.
    This time it's only x19C bytes long. Alt-Unowns don't have altitude.

    Put 03 E0 at x7472e.
    Put 03 E0 at x7465e.
    Put 06 E0 at x74788.
    These break limiters, allowing these tables to be read.

    Test. I advise playing with A-Series again.

    Repoint and expand the icon pointer table at x3D37A0.
    Four bytes per mon. 6E0 bytes long.

    Each icon uses one of three palettes.
    This is controlled by the table at x3D3E80.
    It's x1B8 bytes long. One byte per mon.

    Put 00 00 at x96f90.
    This should make the icon show up, but with the wrong palette.
    Put 00 00 00 00 at x96e7a.
    This fixes the palette reads for extended mons in the party menu.
    Put 00 00 at x971da.
    This will fix the palette reads for extended mons in the dex once we get there.

    Once again, test.


    Step 3: Dealing with dex entries
    Spoiler:

    Repoint and extend the national pokedex order.
    This is a list at x251fee that denotes what dex entries mons get.
    The main use of this is to give the scattered Hoenn mons proper order.
    It is x336 bytes long, 2 per entry.
    Note that the limbo slots between Celebi and Treecko have entries on this table.
    You don't have to worry about Kanto dex order- that's just the first 151 things in nat dex.
    It'd be a good idea to fill this table out now instead of later. Make sure every dex page is tied to some mon.

    Repoint and extend the pokedex entries.
    These is at x44E850.
    Each entry is 36 (x24) bytes long.
    The table has 387 entries (one for 00, oddly enough), or x366C bytes.
    Unlike most other data, this is in actual pokedex order.

    Test, make sure your dex functions normally.
    You shouldn't be able to view entries past the regular ones though.

    At x1025ec, you'll find a byte. This byte times eight is the amount of memory allocated for the pokedex.
    If you have less than 510 mons, replace the byte with 1/2 your dex length.
    If you have less than 1020 mons, set it to 1/4 your dex length and put 40 01 at x1025EE.
    If you have more than 1020 mons, you should probably rethink what you're doing since 4-digit numbers aren't going to get along with the FR interface unless you do adjustments outside the scope of this tutorial.

    At x103920, put the number of dex entries you have minus one.
    If this is more than what got malloc'd, the game will crash.

    At x43220, put 00 00.
    Your dex should now load the full length:



    If it locks up, make sure every entry maps to something in dex ordering!


    Step 4: Misc. repointing
    Spoiler:

    Change x88ea4 to the number of dex entries minus one.
    This fixes the dex count on the title screen & trainer card.

    Change x104c28 to the number of dex entries minus one.
    This fixes the dex count on the pokedex menu.

    Repoint the TM compatability table.
    This is at x252bc8. Each entry is 8 bytes.
    The table as a whole is xCE0 bytes long.

    Repoint the tutor compatability table.
    This is at x459B80. Each entry is two bytes.
    The table as a whole is x338 bytes long.

    Repoint the evolution table.
    This is at x259754. Each entry is 40 (x28) bytes.
    The table as a whole is x4060 bytes.

    Repoint the item animation table.
    This is at x45FD50.
    Each entry is 5 bytes long. Entire thing is x811 bytes.

    Put 07 E0 at xec9a.
    This fixes the evolution animation.

    Put E0 at x97011.
    This fixes the stamps on the back of the trainer card.

    At your own leisure, add the new entries to the habitats list.
    This list is at x452c4c. More information can be found here: http://www.pokecommunity.com/showpost.php?p=6263014&postcount=75

    Add cries for the new mons. As you may know, cries after Celebi are handled unusually- the limbo slots are all hard-wired to Unown's cry (doubt this is hard to fix but lazy), while slots starting from Treecko use an auxilary table to find their cry. This table is at x2539D4- repoint and extend it. Note that you don't need to repoint the cry table itself- immediately after it is a second, unused copy of the cry table.

    You do need to repoint the cry table. You also need to repoint the secondary cry table, which is right after it and contains the same pointers with different accompanying data- this is used by the move Growl and possibly others.

    Put 01 1C 11 E0 at x720CA. This will enable cries past #511 to function.

    Repoint the footprint table. It can be found at x43FAB0, and is on a per-mon basis instead of a per-entry basis.
    As such, it is x674 bytes long.

    To fix breeding, write the ID of your last slot with meaningful evolution data at x459EC (pick an odd number; it's okay to go higher as long as it's not past the number of mons you actually have)
    Then, write half of one less than that at x459CC.
    If that requires more than one byte, write a quarter of one less than that instead, and change the x40 at x459CE to an x80.
    If you are also expanding the number of evolutions, change the x28s at x4598A and x4598E to the new size of the evolution struct.

    Given how many things need to be fixed, I probably missed something! Please let me know if you stumble upon anything not mentioned here.
    __________________

    Yet Another Fire Red Hack

    Physical/Special Split
    Reply With Quote

    Relevant Advertising!

      #2    
    Old February 1st, 2014 (2:41 PM).
    GoGoJJTech's Avatar
    GoGoJJTech GoGoJJTech is offline
    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
    • Gold Tier
     
    Join Date: Nov 2012
    Location: Earth
    Age: 18
    Gender: Female
    Nature: Jolly
    Posts: 2,477
    Tested and works on another ROM, great. Thanks for the help Doesnt, really :D
    Just that cries above 512 refuse to load up. It's a limit by the pointer to the cry conversion table.
    __________________
    I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
    The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
    Romhack.me Profile - Pokecommunity Profile - Youtube Channel

    Support me at my site!
    Pokémon Platinum Red and Blue
    Reply With Quote
      #3    
    Old February 1st, 2014 (2:42 PM).
    karatekid552's Avatar
    karatekid552 karatekid552 is offline
    What happens if I push it?....
       
      Join Date: Nov 2012
      Location: Do you really want to know? Really?
      Gender: Male
      Nature: Bold
      Posts: 1,766
      Just putting this out there, I am going to add this entire thing to my hacking suite. I was planning to release this month, but with this new development, I may need to push back the release date. I hope nobody minds.:D
      __________________

      Paired with Simba
      Reply With Quote
        #4    
      Old February 1st, 2014 (3:06 PM).
      Shadowraze's Avatar
      Shadowraze Shadowraze is offline
      ur mum
         
        Join Date: Apr 2013
        Location: ur mum
        Age: 18
        Gender: Other
        Nature: Lonely
        Posts: 798
        Quote:
        Originally Posted by karatekid552 View Post
        Just putting this out there, I am going to add this entire thing to my hacking suite. I was planning to release this month, but with this new development, I may need to push back the release date. I hope nobody minds.:D
        I don't mind at all. <:o

        Well it's great to see awesome developments in hacking while I was gone. Would definitely try this out later to see if it works.
        Reply With Quote
          #5    
        Old February 1st, 2014 (6:38 PM).
        MrDollSteak's Avatar
        MrDollSteak MrDollSteak is online now
        Formerly known as 11bayerf1
           
          Join Date: Dec 2008
          Location: Hong Kong
          Age: 22
          Gender: Male
          Posts: 811
          Fantastic work Doesn't!

          Good to see you've made the tutorial

          Undeniably useful entry into the hacking world.
          __________________
          Reply With Quote
            #6    
          Old February 1st, 2014 (7:45 PM).
          Kakarot1212's Avatar
          Kakarot1212 Kakarot1212 is offline
          Resident Programmer
             
            Join Date: Oct 2013
            Location: Phillipines
            Gender: Male
            Nature: Adamant
            Posts: 549
            Nice! Will this be still okay with hacks that already worked on?
            __________________
            Reply With Quote
              #7    
            Old February 1st, 2014 (7:52 PM).
            GoGoJJTech's Avatar
            GoGoJJTech GoGoJJTech is offline
            (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
            • Gold Tier
             
            Join Date: Nov 2012
            Location: Earth
            Age: 18
            Gender: Female
            Nature: Jolly
            Posts: 2,477
            Quote:
            Originally Posted by Hiroshi Kaede View Post
            Nice! Will this be still okay with hacks that already worked on?
            It works on any FR v1.0, from fresh to done
            __________________
            I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
            The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
            Romhack.me Profile - Pokecommunity Profile - Youtube Channel

            Support me at my site!
            Pokémon Platinum Red and Blue
            Reply With Quote
              #8    
            Old February 1st, 2014 (8:25 PM).
            ShyRayq's Avatar
            ShyRayq ShyRayq is offline
            Unprofessional Unprofessional
               
              Join Date: Aug 2007
              Gender: Male
              Nature: Adamant
              Posts: 1,482
              God dammit Doesn't! Now I have to restart my hack..again, now that this tutorial has been made!

              But seriously, great stuff right here. Great contributions to the hacking community.
              I expect hacks with expanded dexs in a few months....
              __________________
              3DS Friend Code: 5069-3944-3902
              IGN: Peter; (X, Y, OR, AS, M)
              Friend Safari: (Fighting) Throh, Meditite, Breloom
              Living Pokedex Complete: LG, E, Pl, Y, OR, M
              Big thanks especially to DestinedJagold, Xerneas_X, Elements1 and ~RNC~

              PM me if you want to trade, or add my FC.
              Reply With Quote
                #9    
              Old February 1st, 2014 (9:37 PM).
              GoGoJJTech's Avatar
              GoGoJJTech GoGoJJTech is offline
              (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
              • Gold Tier
               
              Join Date: Nov 2012
              Location: Earth
              Age: 18
              Gender: Female
              Nature: Jolly
              Posts: 2,477
              Quote:
              Originally Posted by ShyRayq View Post
              God dammit Doesn't! Now I have to restart my hack..again, now that this tutorial has been made!

              But seriously, great stuff right here. Great contributions to the hacking community.
              I expect hacks with expanded dexs in a few months....
              No need to restart at all. Just follow this with enough free space and you're good
              __________________
              I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
              The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
              Romhack.me Profile - Pokecommunity Profile - Youtube Channel

              Support me at my site!
              Pokémon Platinum Red and Blue
              Reply With Quote
                #10    
              Old February 2nd, 2014 (12:04 AM).
              kearnseyboy6's Avatar
              kearnseyboy6 kearnseyboy6 is offline
              Aussie's Toughest Mudder
                 
                Join Date: Dec 2008
                Posts: 300
                I'm having real trouble understanding this step:
                Spoiler:
                Repoint and extend the national pokedex order.
                This is a list at x251fee that denotes what dex entries mons get.
                The main use of this is to give the scattered Hoenn mons proper order.
                It is x4CA byte long, 2 per entry
                Note that the limbo slots between Celebi and Treecko have entries on this table.
                You don't have to worry about Kanto dex order- that's just the first 151 things in nat dex.
                It'd be a good idea to fill this table out now instead of later. Make sure every dex page is tied to some mon.


                0x4CA is 1226 or 613 bytes. Isn't there only 412 dex entries? I have simply added to the repointed table from entry no.387 (83 01) and gone up accordingly (84 01 85 01 86 01 87 01 88 01 etc..) Is this correct?
                __________________
                HOLIDAYING CURRENTLY!!
                Reply With Quote
                  #11    
                Old February 2nd, 2014 (1:43 AM).
                ShyRayq's Avatar
                ShyRayq ShyRayq is offline
                Unprofessional Unprofessional
                   
                  Join Date: Aug 2007
                  Gender: Male
                  Nature: Adamant
                  Posts: 1,482
                  Okay, I'm actually not sure about this so..

                  So, I followed the tut up to the repointing of Names,Data and Movesets.
                  As I was testing, I discovered that after I had caught and seen some Pokemon, then started a new game and got the Pokedex again, the data from the last save still existed. The Save-block didn't reset after starting a new game. So the only solution I can see is to delete the actual .sav file, or JPAN's hack has to be altered. Or, the solution is actually in a later part of the tutorial.
                  __________________
                  3DS Friend Code: 5069-3944-3902
                  IGN: Peter; (X, Y, OR, AS, M)
                  Friend Safari: (Fighting) Throh, Meditite, Breloom
                  Living Pokedex Complete: LG, E, Pl, Y, OR, M
                  Big thanks especially to DestinedJagold, Xerneas_X, Elements1 and ~RNC~

                  PM me if you want to trade, or add my FC.
                  Reply With Quote
                    #12    
                  Old February 2nd, 2014 (4:30 AM).
                  Sniper's Avatar
                  Sniper Sniper is offline
                  ふゆかい
                     
                    Join Date: Nov 2013
                    Location: Philippines
                    Gender: Male
                    Nature: Quiet
                    Posts: 1,453
                    Aaaah. My FireRed version.. I need to restart all over again D: Good work anyways.
                    __________________


                    Reply With Quote
                      #13    
                    Old February 2nd, 2014 (5:00 AM). Edited February 2nd, 2014 by GoGoJJTech.
                    GoGoJJTech's Avatar
                    GoGoJJTech GoGoJJTech is offline
                    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                    • Gold Tier
                     
                    Join Date: Nov 2012
                    Location: Earth
                    Age: 18
                    Gender: Female
                    Nature: Jolly
                    Posts: 2,477
                    Quote:
                    Originally Posted by Saturnus View Post
                    Aaaah. My FireRed version.. I need to restart all over again D: Good work anyways.
                    Ya don't need to start over guys. Why would you? K did this half through my hack and it's done fine now.

                    Quote:
                    Originally Posted by kearnseyboy6 View Post
                    I'm having real trouble understanding this step:
                    Spoiler:
                    Repoint and extend the national pokedex order.
                    This is a list at x251fee that denotes what dex entries mons get.
                    The main use of this is to give the scattered Hoenn mons proper order.
                    It is x4CA byte long, 2 per entry
                    Note that the limbo slots between Celebi and Treecko have entries on this table.
                    You don't have to worry about Kanto dex order- that's just the first 151 things in nat dex.
                    It'd be a good idea to fill this table out now instead of later. Make sure every dex page is tied to some mon.


                    0x4CA is 1226 or 613 bytes. Isn't there only 412 dex entries? I have simply added to the repointed table from entry no.387 (83 01) and gone up accordingly (84 01 85 01 86 01 87 01 88 01 etc..) Is this correct?
                    You have to go up after 440. Up to 440 is already used in the game, so adding will occupy slots 441 and up.

                    Quote:
                    Originally Posted by ShyRayq View Post
                    Okay, I'm actually not sure about this so..

                    So, I followed the tut up to the repointing of Names,Data and Movesets.
                    As I was testing, I discovered that after I had caught and seen some Pokemon, then started a new game and got the Pokedex again, the data from the last save still existed. The Save-block didn't reset after starting a new game. So the only solution I can see is to delete the actual .sav file, or JPAN's hack has to be altered. Or, the solution is actually in a later part of the tutorial.
                    Either delete the. Sav or your ram areas are not right.
                    __________________
                    I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
                    The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
                    Romhack.me Profile - Pokecommunity Profile - Youtube Channel

                    Support me at my site!
                    Pokémon Platinum Red and Blue
                    Reply With Quote
                      #14    
                    Old February 2nd, 2014 (6:38 AM).
                    DoesntKnowHowToPlay's Avatar
                    DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
                    Tiny Umbrella with Lots and Lots of Good
                       
                      Join Date: Jan 2012
                      Posts: 258
                      Quote:
                      Originally Posted by kearnseyboy6 View Post
                      I'm having real trouble understanding this step:
                      Spoiler:
                      Repoint and extend the national pokedex order.
                      This is a list at x251fee that denotes what dex entries mons get.
                      The main use of this is to give the scattered Hoenn mons proper order.
                      It is x4CA byte long, 2 per entry
                      Note that the limbo slots between Celebi and Treecko have entries on this table.
                      You don't have to worry about Kanto dex order- that's just the first 151 things in nat dex.
                      It'd be a good idea to fill this table out now instead of later. Make sure every dex page is tied to some mon.


                      0x4CA is 1226 or 613 bytes. Isn't there only 412 dex entries? I have simply added to the repointed table from entry no.387 (83 01) and gone up accordingly (84 01 85 01 86 01 87 01 88 01 etc..) Is this correct?
                      I messed up- it's x336 bytes. Thanks. Whatever you're grabbing should end with 82 01 66 01, the dex numbers of Deoxys and Chimecho.

                      That said, when you put it in the ROM you should take care to leave the next 28 entries blank unless you want to deal with the Egg and secondary Unown slots.


                      Quote:
                      As I was testing, I discovered that after I had caught and seen some Pokemon, then started a new game and got the Pokedex again, the data from the last save still existed. The Save-block didn't reset after starting a new game. So the only solution I can see is to delete the actual .sav file, or JPAN's hack has to be altered. Or, the solution is actually in a later part of the tutorial.
                      I'll look into this. It's happening on my cart too, probably because the game loads the save at the main menu so it can display your pokedex total but doesn't clear that area when you select New Game because...well why would it clear the LR menu's buffer?
                      __________________

                      Yet Another Fire Red Hack

                      Physical/Special Split
                      Reply With Quote
                        #15    
                      Old February 2nd, 2014 (7:12 AM).
                      karatekid552's Avatar
                      karatekid552 karatekid552 is offline
                      What happens if I push it?....
                         
                        Join Date: Nov 2012
                        Location: Do you really want to know? Really?
                        Gender: Male
                        Nature: Bold
                        Posts: 1,766
                        Quote:
                        Originally Posted by DoesntKnowHowToPlay View Post
                        I messed up- it's x336 bytes. Thanks. Whatever you're grabbing should end with 82 01 66 01, the dex numbers of Deoxys and Chimecho.

                        That said, when you put it in the ROM you should take care to leave the next 28 entries blank unless you want to deal with the Egg and secondary Unown slots.


                        I'll look into this. It's happening on my cart too, probably because the game loads the save at the main menu so it can display your pokedex total but doesn't clear that area when you select New Game because...well why would it clear the LR menu's buffer?
                        I'm fairly certain that in the function that clears the ram, there is an offset & number of 00s to fill with. If we could add just one more offset and number, it would work.
                        __________________

                        Paired with Simba
                        Reply With Quote
                          #16    
                        Old February 2nd, 2014 (7:59 AM). Edited February 3rd, 2014 by DoesntKnowHowToPlay.
                        DoesntKnowHowToPlay's Avatar
                        DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
                        Tiny Umbrella with Lots and Lots of Good
                           
                          Join Date: Jan 2012
                          Posts: 258
                          So it turns out the dex actually doesn't get wiped until after Oak finishes his rant at the start of the game. There's a few solutions to this problem- the laziest one would be to just make a level script in the first room that uses writebytetooffset to clear out the dex flags, but we can also just repurpose existing code instead by doing the following:

                          (note that this requires your Seen and Caught flags to be within xFF bytes of each other)

                          Put a pointer to whichever set of flags comes first at x549D0.
                          Put 02 1C 20 1C 00 00 at x549b0.
                          Put XX 22 at x549b6, where XX is the number of bytes taken by your dex flags.
                          Put 20 1C at x549bc.
                          Put YY 30 at x549be, where YY is the number of bytes between the sets of flags. YY is probably the same as XX, but it doesn't have to be.
                          Put XX 22 at x549c2, where XX is the number of bytes taken by your dex flags.
                          __________________

                          Yet Another Fire Red Hack

                          Physical/Special Split
                          Reply With Quote
                            #17    
                          Old February 2nd, 2014 (11:22 PM).
                          ShyRayq's Avatar
                          ShyRayq ShyRayq is offline
                          Unprofessional Unprofessional
                             
                            Join Date: Aug 2007
                            Gender: Male
                            Nature: Adamant
                            Posts: 1,482
                            Okay, more stuff coming from me.

                            So, I did the changes that would reset the save block, but when I edited the bytes, lots of...strange things started happening.
                            When I press "Start", my player's name is invisible, whenever I talk to anything, I get a bunch of blank text and gibberish, when I initiate the Oak script, the text blanks out halfway through the text and I get more gibberish.
                            And I know that this is the changes, because if I reset those changes to the hex, everything goes back to normal.

                            Just in case anyone can figure out what is wrong with my save block, here's some basic info:
                            SEEN FLAG: 0203C000, CAUGHT FLAG: 0203C04B
                            XX: either 4B or 96
                            YY: either 4B or 96 > (your wording was a tiny bit confusing to understand so I'm not sure which one it is)
                            __________________
                            3DS Friend Code: 5069-3944-3902
                            IGN: Peter; (X, Y, OR, AS, M)
                            Friend Safari: (Fighting) Throh, Meditite, Breloom
                            Living Pokedex Complete: LG, E, Pl, Y, OR, M
                            Big thanks especially to DestinedJagold, Xerneas_X, Elements1 and ~RNC~

                            PM me if you want to trade, or add my FC.
                            Reply With Quote
                              #18    
                            Old February 3rd, 2014 (7:28 AM).
                            DoesntKnowHowToPlay's Avatar
                            DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
                            Tiny Umbrella with Lots and Lots of Good
                               
                              Join Date: Jan 2012
                              Posts: 258
                              I typo'd the value at x549B0- it's supposed to be 20 1C, not 02 1C. Testing seems to indicate it's what's causing your problems. Sorry about that.
                              __________________

                              Yet Another Fire Red Hack

                              Physical/Special Split
                              Reply With Quote
                                #19    
                              Old February 3rd, 2014 (7:48 AM).
                              ~Ɓαitøt~'s Avatar
                              ~Ɓαitøt~ ~Ɓαitøt~ is offline
                                 
                                Join Date: Aug 2013
                                Location: France
                                Gender: Male
                                Nature: Timid
                                Posts: 22
                                Thank you for this tutorial.... Finally, the flags views / captured
                                Reply With Quote
                                  #20    
                                Old February 3rd, 2014 (12:39 PM).
                                Kawaii Shoujo Duskull's Avatar
                                Kawaii Shoujo Duskull Kawaii Shoujo Duskull is offline
                                The Cutest Duskull
                                   
                                  Join Date: Jul 2013
                                  Location: Far too deep in my thoughts.
                                  Age: 21
                                  Gender: Female
                                  Nature: Timid
                                  Posts: 283
                                  This is amazing. Nice tutorial!
                                  If I ever start on my own hack, I'll definitely try this out. :D
                                  Reply With Quote
                                    #21    
                                  Old February 5th, 2014 (6:06 PM).
                                  karatekid552's Avatar
                                  karatekid552 karatekid552 is offline
                                  What happens if I push it?....
                                     
                                    Join Date: Nov 2012
                                    Location: Do you really want to know? Really?
                                    Gender: Male
                                    Nature: Bold
                                    Posts: 1,766
                                    I am coding this into my program right now. I have finished step 2, but when I went to go test, OAK's intro kept crashing. I went through my code and found that the issue was caused by filling the old palette table for sprites with FF. There is a pointer at 0x130fa4 that points to an index 232 bytes in on the table. You only need to change this pointer if you fill the old table with FF.
                                    __________________

                                    Paired with Simba
                                    Reply With Quote
                                      #22    
                                    Old February 6th, 2014 (3:55 AM). Edited February 6th, 2014 by kearnseyboy6.
                                    kearnseyboy6's Avatar
                                    kearnseyboy6 kearnseyboy6 is offline
                                    Aussie's Toughest Mudder
                                       
                                      Join Date: Dec 2008
                                      Posts: 300
                                      Quote:
                                      Originally Posted by karatekid552 View Post
                                      I am coding this into my program right now. I have finished step 2, but when I went to go test, OAK's intro kept crashing. I went through my code and found that the issue was caused by filling the old palette table for sprites with FF. There is a pointer at 0x130fa4 that points to an index 232 bytes in on the table. You only need to change this pointer if you fill the old table with FF.
                                      Thanks! That's very handy to know for myself, but doesn't this also mean there are potentially more sprites that use the palette table as well, or is Oak the only one?

                                      Also I found the Item animation table is at 0x45FD54 instead, and the tutor compatibility is at 0x459B7E. No rush as I'm sure people will find it anyway!

                                      EDIT: Sorry KK552, it was referencing the nidoranF palette, so this means when you fill your Front sprites you need to repoint the Nidoran sprite right before the palette which is at 0x130FA0
                                      __________________
                                      HOLIDAYING CURRENTLY!!
                                      Reply With Quote
                                        #23    
                                      Old February 19th, 2014 (2:55 PM).
                                      Tetra's Avatar
                                      Tetra Tetra is offline
                                      Fumes Of Fury
                                      • Crystal Tier
                                       
                                      Join Date: Sep 2009
                                      Gender: Male
                                      Nature: Lax
                                      Posts: 1,088
                                      Hmm... I've tried this countless of times, but it seems that I keep repointing something wrong. And I've even gotten help from GoGo (thanks) but for some reason it just doesn't want to work! It would be great if someone could make a patch so that there are 493 slots, thanks. c:
                                      Reply With Quote
                                        #24    
                                      Old February 19th, 2014 (9:28 PM).
                                      karatekid552's Avatar
                                      karatekid552 karatekid552 is offline
                                      What happens if I push it?....
                                         
                                        Join Date: Nov 2012
                                        Location: Do you really want to know? Really?
                                        Gender: Male
                                        Nature: Bold
                                        Posts: 1,766
                                        Quote:
                                        Originally Posted by Zeratul View Post
                                        Hmm... I've tried this countless of times, but it seems that I keep repointing something wrong. And I've even gotten help from GoGo (thanks) but for some reason it just doesn't want to work! It would be great if someone could make a patch so that there are 493 slots, thanks. c:
                                        Thanks for that super descriptive description of your issue. What isn't working?


                                        BTW, my newest program supports this. So a patch won't be needed. I'm planning a release in a few days.
                                        __________________

                                        Paired with Simba
                                        Reply With Quote
                                          #25    
                                        Old February 20th, 2014 (7:57 AM).
                                        Tetra's Avatar
                                        Tetra Tetra is offline
                                        Fumes Of Fury
                                        • Crystal Tier
                                         
                                        Join Date: Sep 2009
                                        Gender: Male
                                        Nature: Lax
                                        Posts: 1,088
                                        Quote:
                                        Originally Posted by karatekid552 View Post
                                        Thanks for that super descriptive description of your issue. What isn't working?


                                        BTW, my newest program supports this. So a patch won't be needed. I'm planning a release in a few days.
                                        Hehe, no problem. I found out I was doing something very wrong, so I've corrected that. c:

                                        Ah, sweet! I can't wait to test it out, been hearing a lot about it :3
                                        Reply With Quote
                                        Reply
                                        Quick Reply

                                        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 5:04 AM.