The PokéCommunity Forums Fan Games ROM Hacking Research & Development
Quick Research & Development Thread

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!

Reply
 
Thread Tools
  #851    
Old July 7th, 2016 (10:42 PM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
 
Join Date: Nov 2012
Location: Earth
Age: 19
Gender: Female
Nature: Jolly
Posts: 2,475
Quote:
Originally Posted by AkameTheBulbasaur View Post
I figured out something while I was importing music from PMD Red Rescue Team into Fire Red. I found that the music I inserted would be far too soft, but I didn't know how to make it louder.

I learned that the beginning of each track starts with "bc 00" and somewhere, not too far after that is "bd" followed by another byte. This byte is the instrument the track uses (If the track uses multiple instruments during its loop there will be multiple "bd"s). "Be" changes the "force", which is how intensely the instruments play. There are usually many of these per track as well, depending on the type of song.

"BC 00 BB 40 BD 18 C2 2C BF 5E BE 3B"

This is an example of what it might look like. For me I just changed the value after "be" to whichever value I wanted (usually 70-80 or 46-50 in hex). This technically isn't the true volume of the track, but it gave me the desired result.

I didn't look into what BC and BF meant or the rest of the structure, but it was something that I thought might be useful for somebody who is importing songs from other games and can't find a better way to change the "volume".
Sorry to burst your bubble, but this isn't really research and it's certainly not development. If you look in MPlayDef.s it'll show you each of the command names and they're all very suggestive of what they do except for the library ones (but you don't need to know those since.. they're libraries and not present in all games)
__________________
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
  #852    
Old July 8th, 2016 (10:39 PM).
i0Bjhansen0's Avatar
i0Bjhansen0 i0Bjhansen0 is offline
     
    Join Date: Mar 2016
    Age: 22
    Gender: Male
    Posts: 130
    Quote:
    Originally Posted by kleenexfeu View Post
    For Emerald

    The game displays the default sprite, icon and base stats for Deoxys




    01 BC 00 47 at 0x8034C32 for the sprite.

    C0 46 C0 46 C0 46 C0 46 at 0x8068A2C for the stats.

    C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 0x80D3030 for the icon.
    Not sure if I can ask this here, but can someone port this to Fire Red if it hasn't been done already? I would like Deoxys to be normal forme.
    __________________
    Check out my Hack-in-progress and help decide the last Mega Evolution.



    If my Avatar flashes too much, let me know and I'll change it. I increased the frames from the original before uploading it.
    Reply With Quote
      #853    
    Old July 9th, 2016 (12:44 AM). Edited July 9th, 2016 by AkameTheBulbasaur.
    AkameTheBulbasaur's Avatar
    AkameTheBulbasaur AkameTheBulbasaur is offline
    Akame Marukawa of Iyotono
       
      Join Date: May 2013
      Location: A place :D
      Age: 21
      Gender: Male
      Nature: Gentle
      Posts: 351
      Quote:
      Originally Posted by i0Bjhansen0 View Post
      Not sure if I can ask this here, but can someone port this to Fire Red if it hasn't been done already? I would like Deoxys to be normal forme.
      The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.

      The Front sprite is at 0xE3958C and the Back sprite is at 0xE39D70. They're both two frames, so if you want to edit the sprite you'll have to change both frames. Frame 1 is Normal Forme and Frame 2 is Attack Forme. So if you wanted Normal form you'd just have to change the second one to also be Normal Forme. If you wanted Defense or Speed Formes you'd have to change both frames to be those or it will just show up as Attack Forme by default. Deoxys is the only Pokemon that has two frames for their sprite by default in FireRed. If you change the sprite for one frame it won't really change it (or at the very least it won't if you only change the first one.)

      The Normal Form icon is at 0xE3A388. Like the sprite, the Icon has twice as many frames as the rest (in this case four instead of two) although the game obviously only uses the last two frames. This is not too difficult to edit either. NSE will show you all four frames, and you can go from there. If you want other Formes you will need to edit all of the frames, same as the sprite.
      __________________
      "The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
      Reply With Quote
        #854    
      Old July 9th, 2016 (6:50 AM). Edited July 9th, 2016 by BluRose.
      BluRose BluRose is offline
      blu rass
         
        Join Date: Apr 2014
        Location: hyakkoku city
        Age: 17
        Gender: Male
        Nature: Timid
        Posts: 756
        Quote:
        Originally Posted by AkameTheBulbasaur View Post
        The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.
        Spoiler:


        The Front sprite is at 0xE3958C and the Back sprite is at 0xE39D70. They're both two frames, so if you want to edit the sprite you'll have to change both frames. Frame 1 is Normal Forme and Frame 2 is Attack Forme. So if you wanted Normal form you'd just have to change the second one to also be Normal Forme. If you wanted Defense or Speed Formes you'd have to change both frames to be those or it will just show up as Attack Forme by default. Deoxys is the only Pokemon that has two frames for their sprite by default in FireRed. If you change the sprite for one frame it won't really change it (or at the very least it won't if you only change the first one.)

        The Normal Form icon is at 0xE3A388. Like the sprite, the Icon has twice as many frames as the rest (in this case four instead of two) although the game obviously only uses the last two frames. This is not too difficult to edit either. NSE will show you all four frames, and you can go from there. If you want other Formes you will need to edit all of the frames, same as the sprite.
        Code:
        0x0825E086 (0x38 bytes; 0x1C x 2):
        38 00 3E 00 44 00 4A 00 50 00 56 00 5C 00 61 00 
        67 00 6D 00 73 00 78 00 7E 00 83 00 88 00 8E 00 
        93 00 98 00 9D 00 A2 00 A7 00 AB 00 B0 00 B5 00 
        B9 00 BD 00 C1 00 C5 00
        
        Decimal conversion of the first 12 bytes:
        56 00 62 00 68 00 74 00 80 00 86 00
        To assume that there is a 00 byte in between each actual stat, the base stats shown are:
        HP: 56
        Attack: 62
        Defense: 68
        Speed: 74
        Sp. Attack: 80
        Sp. Defense: 86

        Actual:
        HP: 50
        Attack: 180
        Defense: 20
        Speed: 150
        Sp. Attack: 180
        Sp. Defense: 20

        Point being, you sure that the base stats are located at 0x0825E086?
        Unless if I'm totally off in understanding this...?

        EDIT: Sprites and Icons are correct, though <3
        EDIT2: Normal Doexys' Base Stats are at 0x0825745C, but this doesn't matter.
        "32 B4 14 96 B4 14" doesn't exist in the ROM, however... Does the ROM use multipliers to change the base stats...?
        EDIT3: "32 00 B4 00 14 00 96 00 B4 00 14 00" exists in the ROM at 0x0825E026 with a pointer located at 0x08044704. I don't have IDA or anything to check it out, though, so...
        __________________
        am i cool yet
        Reply With Quote
          #855    
        Old July 9th, 2016 (9:44 AM).
        i0Bjhansen0's Avatar
        i0Bjhansen0 i0Bjhansen0 is offline
           
          Join Date: Mar 2016
          Age: 22
          Gender: Male
          Posts: 130
          Quote:
          Originally Posted by AkameTheBulbasaur View Post
          The base stats for Deoxys actually used by FireRed are at 0x25E086. You can edit them to be normal forme manually there.

          The Front sprite is at 0xE3958C and the Back sprite is at 0xE39D70. They're both two frames, so if you want to edit the sprite you'll have to change both frames. Frame 1 is Normal Forme and Frame 2 is Attack Forme. So if you wanted Normal form you'd just have to change the second one to also be Normal Forme. If you wanted Defense or Speed Formes you'd have to change both frames to be those or it will just show up as Attack Forme by default. Deoxys is the only Pokemon that has two frames for their sprite by default in FireRed. If you change the sprite for one frame it won't really change it (or at the very least it won't if you only change the first one.)

          The Normal Form icon is at 0xE3A388. Like the sprite, the Icon has twice as many frames as the rest (in this case four instead of two) although the game obviously only uses the last two frames. This is not too difficult to edit either. NSE will show you all four frames, and you can go from there. If you want other Formes you will need to edit all of the frames, same as the sprite.
          So for the sprites, are they compressed or can I just put the normal forme over the attack forme and not have to worry about ruining code behind it?

          Quote:
          Originally Posted by BluRose View Post
          Code:
          0x0825E086 (0x38 bytes; 0x1C x 2):
          38 00 3E 00 44 00 4A 00 50 00 56 00 5C 00 61 00 
          67 00 6D 00 73 00 78 00 7E 00 83 00 88 00 8E 00 
          93 00 98 00 9D 00 A2 00 A7 00 AB 00 B0 00 B5 00 
          B9 00 BD 00 C1 00 C5 00
          
          Decimal conversion of the first 12 bytes:
          56 00 62 00 68 00 74 00 80 00 86 00
          To assume that there is a 00 byte in between each actual stat, the base stats shown are:
          HP: 56
          Attack: 62
          Defense: 68
          Speed: 74
          Sp. Attack: 80
          Sp. Defense: 86

          Actual:
          HP: 50
          Attack: 180
          Defense: 20
          Speed: 150
          Sp. Attack: 180
          Sp. Defense: 20

          Point being, you sure that the base stats are located at 0x0825E086?
          Unless if I'm totally off in understanding this...?

          EDIT: Sprites and Icons are correct, though <3
          EDIT2: Normal Doexys' Base Stats are at 0x0825745C, but this doesn't matter.
          "32 B4 14 96 B4 14" doesn't exist in the ROM, however... Does the ROM use multipliers to change the base stats...?
          EDIT3: "32 00 B4 00 14 00 96 00 B4 00 14 00" exists in the ROM at 0x0825E026 with a pointer located at 0x08044704. I don't have IDA or anything to check it out, though, so...
          There's a lot of stuff here. I'm assuming that at 0x25e026 those are what you believe the stats to be? I'm going to check it out.
          __________________
          Check out my Hack-in-progress and help decide the last Mega Evolution.



          If my Avatar flashes too much, let me know and I'll change it. I increased the frames from the original before uploading it.
          Reply With Quote
            #856    
          Old July 9th, 2016 (10:11 AM). Edited July 9th, 2016 by BluRose.
          BluRose BluRose is offline
          blu rass
             
            Join Date: Apr 2014
            Location: hyakkoku city
            Age: 17
            Gender: Male
            Nature: Timid
            Posts: 756
            Quote:
            Originally Posted by i0Bjhansen0 View Post
            So for the sprites, are they compressed or can I just put the normal forme over the attack forme and not have to worry about ruining code behind it?

            There's a lot of stuff here. I'm assuming that at 0x25e026 those are what you believe the stats to be? I'm going to check it out.
            it's basically like a normal sprite
            you should be able to just paste normal forme onto attack forme without any repercussions

            that's what i'm thinking, yes, but i have no way to check without going through a lot of hassle that i literally can't do right now lol~

            EDIT: found time to do it, and yes, 0x0825E026 is the location of the stats (at least it seems so based off of knizz's idb), as 0x08044708-0x080447A4 is the routine for updating deoxys' stats and uses the data loaded at 0x08044704~
            __________________
            am i cool yet
            Reply With Quote
              #857    
            Old July 9th, 2016 (3:45 PM).
            i0Bjhansen0's Avatar
            i0Bjhansen0 i0Bjhansen0 is offline
               
              Join Date: Mar 2016
              Age: 22
              Gender: Male
              Posts: 130
              Quote:
              Originally Posted by BluRose View Post
              it's basically like a normal sprite
              you should be able to just paste normal forme onto attack forme without any repercussions

              that's what i'm thinking, yes, but i have no way to check without going through a lot of hassle that i literally can't do right now lol~

              EDIT: found time to do it, and yes, 0x0825E026 is the location of the stats (at least it seems so based off of knizz's idb), as 0x08044708-0x080447A4 is the routine for updating deoxys' stats and uses the data loaded at 0x08044704~
              Ok. One more question. Is it possible to "remove" the part of the code to not have a need to do what I'm going to be doing?
              __________________
              Check out my Hack-in-progress and help decide the last Mega Evolution.



              If my Avatar flashes too much, let me know and I'll change it. I increased the frames from the original before uploading it.
              Reply With Quote
                #858    
              Old July 9th, 2016 (4:53 PM).
              BluRose BluRose is offline
              blu rass
                 
                Join Date: Apr 2014
                Location: hyakkoku city
                Age: 17
                Gender: Male
                Nature: Timid
                Posts: 756
                Quote:
                Originally Posted by i0Bjhansen0 View Post
                Ok. One more question. Is it possible to "remove" the part of the code to not have a need to do what I'm going to be doing?
                it's definitely possible! i just have barely an idea on how to do it; i don't know where the game states for it to change into the attack forme. if we just nop every reference to the stat update, then we thoeoretically don't (???????) have to do the easiest part of the attack forme changing: changing the attack forme's stats. we won't care about that, though, and we'll instead just try to cause no stat change to be made at all.

                so we'll use emerald's idb and kleenexfeu's byte changes in emerald as a ref for a moment.

                um, try 01 BC 00 47 at 0x0800EDAE. this theoretically causes no sprite change to be made...
                also try C0 46 C0 46 C0 46 C0 46 at 0x08044690. this theoretically causes no stat change to be made...
                lastly, try C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 0x08097038. this theoretically causes no icon change to be made...

                if this works, please report back <3
                __________________
                am i cool yet
                Reply With Quote
                  #859    
                Old July 9th, 2016 (5:04 PM).
                i0Bjhansen0's Avatar
                i0Bjhansen0 i0Bjhansen0 is offline
                   
                  Join Date: Mar 2016
                  Age: 22
                  Gender: Male
                  Posts: 130
                  Quote:
                  Originally Posted by BluRose View Post
                  it's definitely possible! i just have barely an idea on how to do it; i don't know where the game states for it to change into the attack forme. if we just nop every reference to the stat update, then we thoeoretically don't (???????) have to do the easiest part of the attack forme changing: changing the attack forme's stats. we won't care about that, though, and we'll instead just try to cause no stat change to be made at all.

                  so we'll use emerald's idb and kleenexfeu's byte changes in emerald as a ref for a moment.

                  um, try 01 BC 00 47 at 0x0800EDAE. this theoretically causes no sprite change to be made...
                  also try C0 46 C0 46 C0 46 C0 46 at 0x08044690. this theoretically causes no stat change to be made...
                  lastly, try C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 C0 46 at 0x08097038. this theoretically causes no icon change to be made...

                  if this works, please report back <3
                  I'm sorry to say this... but..........

                  IT TOTALLY WORKS. Great job! Not only did Deoxys look Normal, his minisprite was Normal, and his back sprite was Normal, his stats are Normal too. :D
                  __________________
                  Check out my Hack-in-progress and help decide the last Mega Evolution.



                  If my Avatar flashes too much, let me know and I'll change it. I increased the frames from the original before uploading it.
                  Reply With Quote
                    #860    
                  Old July 17th, 2016 (7:09 AM).
                  GoGoJJTech's Avatar
                  GoGoJJTech GoGoJJTech is offline
                  (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                   
                  Join Date: Nov 2012
                  Location: Earth
                  Age: 19
                  Gender: Female
                  Nature: Jolly
                  Posts: 2,475
                  Quote:
                  Originally Posted by GoGoJJTech View Post
                  If you want a-map 1.92 to have support for new pokemon in the wild then follow these directions:
                  http://pastebin.com/13djBRnT
                  Originally found by Baitot :D
                  I have updated the link to the file now :)
                  __________________
                  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
                    #861    
                  Old August 4th, 2016 (9:37 PM).
                  mkarthick98's Avatar
                  mkarthick98 mkarthick98 is offline
                  Tensai
                     
                    Join Date: Oct 2014
                    Location: India
                    Gender: Male
                    Nature: Lonely
                    Posts: 44
                    Quote:
                    Originally Posted by GoGoJJTech View Post
                    I have updated the link to the file now :)
                    Still can't seem to download it. I keep getting a 404 error. Any idea why? I absolutely refuse to use A-Map 1.95.
                    Reply With Quote
                      #862    
                    Old August 4th, 2016 (11:09 PM).
                    GoGoJJTech's Avatar
                    GoGoJJTech GoGoJJTech is offline
                    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
                     
                    Join Date: Nov 2012
                    Location: Earth
                    Age: 19
                    Gender: Female
                    Nature: Jolly
                    Posts: 2,475
                    Quote:
                    Originally Posted by mkarthick98 View Post
                    Still can't seem to download it. I keep getting a 404 error. Any idea why? I absolutely refuse to use A-Map 1.95.
                    Fixed again.
                    Also, you wouldn't be able to edit expanded Pokémon with 1.95 in the first place, so it wasn't an option ;)
                    __________________
                    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
                      #863    
                    Old August 5th, 2016 (1:03 AM).
                    mkarthick98's Avatar
                    mkarthick98 mkarthick98 is offline
                    Tensai
                       
                      Join Date: Oct 2014
                      Location: India
                      Gender: Male
                      Nature: Lonely
                      Posts: 44
                      Thanks. Didn't someone come up with a way to do it in A-Map 1.95? If they didn't, my bad..
                      Reply With Quote
                        #864    
                      Old August 14th, 2016 (1:32 PM). Edited August 18th, 2016 by Derlo.
                      Derlo's Avatar
                      Derlo Derlo is offline
                      Working on Essence of light...
                         
                        Join Date: Aug 2007
                        Posts: 132
                        I spotted a routine shortly after checking for DEOXYS and MEW obedience, I think it's related with badge obedience checks before attack, but could not confirm if this is it. It's in: 0801D438.
                        And anyone knows how to increase pokemon chance disobey without proper badge?

                        Quote:
                        EDIT: Answering to myself!
                        I don't know if everyone has the same problem, but the FR ROM that I'm using doesn't check the badges to control the obedience of the POKEMON according to the level that it is. The MON's just obeys, in any level and with no badges.
                        So, I removed the part that checks MEW/Deoxys and the part where the routine reads a memory bank of the RAM... and works perfectly.

                        So, to fix this, just fill with zeros (00's) from offset 0801d45a to 0801d484.

                        Making this, when you MON's level are above of limit obedience of your last badge, it will be starting to disobey. And the chance to disobey will increase, automatically, with the amount of levels above the badge limit.
                        This also will cause the MEW / Deoxys obey smoothly.
                        __________________



                        Pokémon
                        Essence of Light

                        Comming Soon...
                        Reply With Quote
                          #865    
                        Old August 15th, 2016 (8:01 AM).
                        Mr.Pkmn's Avatar
                        Mr.Pkmn Mr.Pkmn is offline
                        Ordinary ASM Magician
                           
                          Join Date: May 2008
                          Posts: 54
                          In Gen 3, Protect/Detect/Endure are bugged. The game is supposed to read the probability from a table which has only 4 entries, thus reading garbage data after the 4th consecutive protect.

                          To get the correct behavior (like gen 5+, no cap) replace the bytes at 0x26FB6 with this (FR):
                          Code:
                          01 7A 14 88 CC 40 1D F0 84 FF 21 1C
                          If you ever manage to get off 16 consecutive protects, it will fail the next one because of precision .
                          __________________
                          Someone making a pokemon hack

                          Reply With Quote
                            #866    
                          Old August 18th, 2016 (8:33 PM).
                          AkameTheBulbasaur's Avatar
                          AkameTheBulbasaur AkameTheBulbasaur is offline
                          Akame Marukawa of Iyotono
                             
                            Join Date: May 2013
                            Location: A place :D
                            Age: 21
                            Gender: Male
                            Nature: Gentle
                            Posts: 351
                            Quote:
                            Originally Posted by colcolstyles View Post
                            If anyone's interested, here's a tiny little morsel of information that I found recently. At the address '0x3A72A0' in Fire Red, you will find two bytes: '0xCD' and '0xFF'. These two bytes are used whenever the player is given two or more of some item using the 'giveitem' construct. The '0xCD' corresponds to an uppercase 'S' while the '0xFF' is the terminator byte, signifying the end of the string. If you change the byte from '0xCD' to '0xE7', the 'S' will become a lowercase 's'. I figure this might come in handy for those de-capitalization patches because it's really annoying to see "Player received the Poké BallS!" every time the player receives more than one of an item.
                            Adding onto this, the location of the (S) when selling multiple items in the PokeMart is at 0x41696C. (Still in FireRed).
                            __________________
                            "The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
                            Reply With Quote
                              #867    
                            Old August 20th, 2016 (3:43 PM). Edited August 22nd, 2016 by AkameTheBulbasaur.
                            AkameTheBulbasaur's Avatar
                            AkameTheBulbasaur AkameTheBulbasaur is offline
                            Akame Marukawa of Iyotono
                               
                              Join Date: May 2013
                              Location: A place :D
                              Age: 21
                              Gender: Male
                              Nature: Gentle
                              Posts: 351
                              Quote:
                              Originally Posted by Sea Dragon View Post
                              Haven't seen these on here so I thought I'd post what I've found.
                              These are both for Emerald.
                              Change moves called in the Nature Power table:
                              The offset of the Nature Power table in FireRed is 0x25081C. The limiter is at 0xD75FC.

                              Also I found a couple of item checks:

                              At 0x1E496 is the Critical-Hit Ratio item checks. So this is for stuff like Lucky Punch, Stick and Scope Lens.
                              At 0x21CC2 is the Exp. Share check.

                              There appears to be more than one Exp. Share check. I foun two others: one at 0x21BBC and one at 0x21DAA.

                              The one at 0x21BBC appears to only be used by Pokemon who were sent out into battle. I'm not sure about the 0x21DAA one.

                              When I was messing around with them (I was trying to make some sort of Exp. All routine but gave up because I couldn't figure out how to get it not to give experience to eggs) the one at 0x21CC2 is the one that gave me the best results when I branched off of it.
                              __________________
                              "The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
                              Reply With Quote
                                #868    
                              Old August 22nd, 2016 (11:47 AM).
                              AkameTheBulbasaur's Avatar
                              AkameTheBulbasaur AkameTheBulbasaur is offline
                              Akame Marukawa of Iyotono
                                 
                                Join Date: May 2013
                                Location: A place :D
                                Age: 21
                                Gender: Male
                                Nature: Gentle
                                Posts: 351
                                The Great And Powerful Lucky Egg

                                The check for the Lucky Egg is at:

                                FireRed: 0x21DBA
                                Emerald: 0x4A67A

                                The byte that determines the experience multiplier is at:

                                FireRed: 0x21DC2
                                Emerald: 0x4A682

                                In the vanilla games, this byte has a value of 0x96, or 150 is decimal.

                                This gives a multiplier of 1.5.

                                So if you want to change the amount of experience the Lucky Egg gives you, just follow these three easy steps!

                                1. Choose a value that you want to multiply the gained experience by (It will have to be less than 2.5 without using ASM).

                                2. Take away the decimal point (so 1.5 would be 150, 2.0 would be 200).

                                3. Convert that value to hex (so 1.5 is 0x96, 2.5 is 0xFA) and put that value at the offset listed above.
                                __________________
                                "The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
                                Reply With Quote
                                  #869    
                                Old August 25th, 2016 (1:51 AM).
                                Spherical Ice's Avatar
                                Spherical Ice Spherical Ice is online now
                                 
                                Join Date: Nov 2007
                                Location: Bristol, UK
                                Age: 20
                                Posts: 5,235
                                Quote:
                                Originally Posted by CrabInfestedPubes View Post
                                Just to be clear, what does this actually do? Will making these hex changes allow me to get Shedinja by evolving Nincada in Firered? Or do I have to do more than that?
                                If you expanded the number of evolutions per Pokémon, the evolution method for spawning Shedinja will be broken until you make those hex changes. If you're simply using vanilla FireRed, you don't need to make these hex changes.
                                __________________
                                Reply With Quote
                                  #870    
                                Old September 1st, 2016 (11:40 AM).
                                NewDenverCity's Avatar
                                NewDenverCity NewDenverCity is offline
                                   
                                  Join Date: Apr 2014
                                  Location: Antarctica
                                  Gender: Male
                                  Nature: Calm
                                  Posts: 329
                                  So here's a little bonus thing on b_status3_bits_pbs, or 0x02023DFC in FR. Setting it to 0x8000 or 1000000000000000b, on the defender, then that Pokemon will not be hit by critical hits, like Shell Armor and Battle Armor. This applies to all Gen 3 games, but I don't know the exact offsets of the status bits.
                                  Reply With Quote
                                    #871    
                                  Old September 1st, 2016 (1:43 PM).
                                  C me's Avatar
                                  C me C me is offline
                                  Creator of Pokemon League Of Legends
                                     
                                    Join Date: Jan 2014
                                    Age: 21
                                    Gender: Male
                                    Posts: 683
                                    Quote:
                                    Originally Posted by NewDenverCity View Post
                                    So here's a little bonus thing on b_status3_bits_pbs, or 0x02023DFC in FR. Setting it to 0x8000 or 1000000000000000b, on the defender, then that Pokemon will not be hit by critical hits, like Shell Armor and Battle Armor. This applies to all Gen 3 games, but I don't know the exact offsets of the status bits.
                                    Just to quickly add it's 0x020242AC for Emerald.
                                    Reply With Quote
                                      #872    
                                    Old September 5th, 2016 (3:29 AM). Edited September 5th, 2016 by jirachiwishmaker.
                                    jirachiwishmaker's Avatar
                                    jirachiwishmaker jirachiwishmaker is offline
                                       
                                      Join Date: Jul 2007
                                      Location: Forina
                                      Gender: Male
                                      Nature: Lonely
                                      Posts: 105
                                      For Emerald, to enable the catching areas in the pokedex to show the new catching areas of the new creating maps, just change the byte at 0x0813CE5C from D2 to FF.
                                      Reply With Quote
                                        #873    
                                      Old October 5th, 2016 (2:30 AM).
                                      Froosty's Avatar
                                      Froosty Froosty is offline
                                      The_Learner
                                         
                                        Join Date: Sep 2014
                                        Location: Somewhere in this world.
                                        Age: 20
                                        Gender: Male
                                        Nature: Brave
                                        Posts: 541
                                        Its so silly of me because i was totally unaware about this amazing thread upto few minutes back!
                                        __________________
                                        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
                                          #874    
                                        Old October 5th, 2016 (3:06 AM).
                                        Froosty's Avatar
                                        Froosty Froosty is offline
                                        The_Learner
                                           
                                          Join Date: Sep 2014
                                          Location: Somewhere in this world.
                                          Age: 20
                                          Gender: Male
                                          Nature: Brave
                                          Posts: 541
                                          Quote:
                                          Originally Posted by Chaos Rush View Post
                                          So lately I've been studying ASM a bit and gonna try and finally get it down. I've managed to locate parts of the START menu's code simply by finding their text pointer, and then the pointer to that table of pointers, and then looking at the surrounding code in VBA's disassembler. Whenever I saw something such "mov r2, #0x8", I wondered what would happen if I had a different value load into that register. As a result, I've figured this out so far:

                                          0x0806EF94 = X positioning of [name] in the START menu.
                                          Change it and you can reposition [name]:


                                          0x0806EFD0 = the font used in the START menu.
                                          00 gives you the smaller font. Any other value doesn't seem to do anything.


                                          0x0806EFD4 = X positioning of the text in the START menu (except [name])
                                          The default value is 08. This is what it looks like if you change it to 00:

                                          (Changing it to FF/giving longer text strings will NOT magically make the menu box's width longer unlike the multichoice boxes that the script engine uses)

                                          0x0806F0DE = relative X positioning of cursor in START menu
                                          0x0806F0E0 = relative Y positioning of cursor in START menu
                                          By positioning, I don't mean the actual selection within the start menu, I mean the actual pixel coordinates of the cursor within the start menu.

                                          None of this info is useful yet, but eventually I would like to port Emerald's START menu look onto FireRed because I find it more aesthetically pleasing.

                                          But that's not all I found!

                                          At 0x083A7344 is a table that basically controls the START menu itself. The format of the table goes like this:
                                          [XX XX XX 08][YY YY YY 08]
                                          XX XX XX 08 = pointer to text string within START menu (such as POKéDEX, POKéMON, BAG, etc.)
                                          YY YY YY 08 = pointer to the routine of aforementioned function. Yes, I'm serious. You can literally switch around your START menu like this:

                                          Notice how POKéMON is in the first slot like in B/W/B2/W2/X/Y, not POKéDEX like in Gens I-IV. And no, I did not just switch the text string pointer, I switched around the function pointers too. Don't believe me? Try it yourself! It's fun!

                                          Here's the table at 0x083A7344 in detail:
                                          41627D = POKéDEX text string
                                          06F411 = POKéDEX routine (+1)

                                          415A66 = POKéMON text string
                                          06F44D = POKéMON routine (+1)

                                          416285 = BAG text string
                                          06F481 = BAG routine (+1)

                                          41628E = [name] text string
                                          06F4B5 = Trainer Card routine (+1)

                                          416291 = SAVE text string
                                          06F4E9 = SAVE routine (+1)

                                          416296 = OPTION text string
                                          06F4FD = OPTION routine (+1)

                                          41629D = EXIT text string
                                          06F541 = EXIT routine (+1)

                                          4162A2 = RETIRE text string (Safari Zone)
                                          06F555 = RETIRE routine(+1)

                                          41628E = [name] text string
                                          06F56D = ??? (+1) (fadescreen then freezes the game, I'm assuming its for the alternate Trainer Card shown during Link Battles/Trades)

                                          Unfortunately I haven't been able to find what dictates how many entries the START menu gets, but hopefully with this knowledge, it will be a lot easier to implement something like the a PokéGear onto FireRed. Not to mention that these offsets are the actual routines used for the Pokédex, party screen, bag, Trainer Card, Save menu, and Options. I'm not joking lol, if you literally put this in a script:
                                          Code:
                                          //---------------
                                          #dynamic 0x800000
                                          #org @main
                                          callasm 0x806F411 //this is the Pokédex routine offset from the START menu table
                                          end
                                          It will open up the Pokédex. You can literally use callasm and use any of the offsets from the table and it will load up that function!

                                          So say, you wrote a custom PokéGear code. You can edit one of the function pointers in the table to your new code and voila, you'll have a PokéGear within your START menu. Of course, what would be more ideal is if we could figure out how to expand the number of entries the START menu gets. I'm sure it wouldn't be that hard, the thing is that I have no idea how to find the routine that the game uses when you actually press the START button.
                                          I am always amazed by your findings, do you think if there is any way we could add icons to the menu..... it would be more amazing then :)
                                          __________________
                                          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
                                            #875    
                                          Old October 6th, 2016 (9:58 AM). Edited November 18th, 2016 by Sea Dragon.
                                          Sea Dragon's Avatar
                                          Sea Dragon Sea Dragon is offline
                                             
                                            Join Date: Mar 2016
                                            Location: Maine
                                            Gender: Male
                                            Nature: Quiet
                                            Posts: 22
                                            I've found a bunch of information on HM scripts and ported Ephraim225's HM check to Emerald so that you don't need to teach HM's to use them.

                                            Emerald HM scripts:
                                            Surf:271EA0
                                            Waterfall:290A49
                                            Dive:290B0F
                                            Dive(return to surface):290b5a
                                            Cut:2906BB
                                            Rock Smash:2907A6
                                            Strength:2908BA
                                            Surf check(prescript asm):insert 0000 @9c80a to disable (go here for fire red offset)
                                            use a level script for Flash.

                                            Emerald offsets for HM check routine(http://www.pokecommunity.com/showpost.php?p=8927083&postcount=726):
                                            Players party:0x20244EC
                                            Decrypt:0x0806A519
                                            TM compatibility table(default):0x831E898
                                            Var 0x800D:0x20375F0
                                            Players team size:0x20244E9
                                            *Note that you'll need a separate slightly modified version of this asm to check for Waterfall and Dive because they are found on a different byte in the compatibility table.
                                            Spoiler:
                                            .align 2
                                            .thumb

                                            start:
                                            push {r0-r5, lr}
                                            mov r5, #0x0

                                            loopback:
                                            ldr r0, =(0x20244EC) /* Player's party in RAM */
                                            mov r2, #0x64
                                            mov r1, r5
                                            mul r1, r1, r2
                                            add r0, r0, r1
                                            mov r1, #0xB
                                            ldr r3, =(0x0806A519) /* Pokemon decrypter */
                                            bl linker

                                            ldr r3, =(0x831E898) /* TM Compatibility table */
                                            lsl r0, r0, #0x3
                                            add r3, r0, r3
                                            add r3, r3, #0x6 <-----change this part to 0x7 for Dive/Waterfall
                                            ldrb r2, [r3]
                                            ldr r1, =(0x20375F0) /* Var 0x800D in RAM */
                                            ldrb r0, [r1]
                                            mov r3, r0
                                            and r3, r2, r3
                                            cmp r0, r3
                                            beq end

                                            ldr r3, =(0x20244E9) /* Player's team size */
                                            ldrb r3, [r3]
                                            add r5, r5, #0x1
                                            cmp r5, r3
                                            beq endfail
                                            b loopback

                                            end:
                                            strb r5, [r1]
                                            pop {r0-r5, pc}

                                            endfail:
                                            mov r5, #0x6
                                            strb r5, [r1]
                                            pop {r0-r5, pc}

                                            linker:
                                            bx r3


                                            Call fly HM asm with an item:
                                            Insert an XSE script with the item script routine(also in Complete Item Editor).
                                            Fly asm appears to be @0x8124690, but to make it work I needed to use callasm 11 times in my script. It seems weird but it worked for me(maybe there's a loop somewhere?).
                                            In your script use loadbytefrompointer with 0x20375F0(var 0x800D's ram location) and setfarbyte to write the result of your HM or move check to
                                            0x203ced1 so that the right Pokemon will appear in the animation.
                                            Look here for info on checking the map type(indoors, cave etc.)
                                            EDIT: Fly map isn't showing location names unless you move the cursor over the Pokemon League.

                                            Black bar HM animation offset:080B84F8
                                            RAM where shown Pokemon's hex appears:2038C08
                                            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
                                            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 7:31 AM.