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
  #826    
Old March 27th, 2016 (7:34 AM). Edited March 27th, 2016 by Xencleamas.
Xencleamas's Avatar
Xencleamas Xencleamas is offline
Suddenly lurking in the shadows...
     
    Join Date: Feb 2014
    Location: Asgard
    Gender: Male
    Nature: Adamant
    Posts: 457
    Quote:
    Originally Posted by Spherical Ice View Post
    When a new save is generated, the default wallpapers for the storage system will loop through the first four wallpapers for every box. This always annoyed me way back when I first played FRLG; it felt like they were just wasting the assets.

    To make the boxes use wallpapers 1 through 14, change the byte at 0x8C836 to 0xD (you can make it higher but as there are only fourteen boxes, it won't really affect anything). As the wallpapers are assigned at the time of generating the save, this will only affect new saves.
    Default Wallpapers (Emerald)

    In Emerald, to make the boxes use wallpapers 1 through 14, change the byte at 0x080C77C6 to 0xF (you can make it higher but as there are only fourteen boxes, it won't really affect anything). As the wallpapers are assigned at the time of generating the save, this will only affect new saves.

    To note though, especially for FireRed, it should be 0xF not 0xD. It is because not a complete bug but what happened to me is Forest, City, Forest, City, Crag, Volcano, Crag, Volcano, Beach, Seafloor, Beach, Seafloor, Polka Dot, PokeCenter (from Boxes 1-14 respectively)... Shortly, it skips the third and fourth, used the first and second wallpapers again. Divisible by "4" (digits 0x3, 0x7, 0xB, 0xF) results better, otherwise like I said before.
    __________________

    Xencleamas Untitled Pokémon Fan Game (Coming Soon!) Untitled Region (Coming Soon!)
    Reply With Quote

    Relevant Advertising!

      #827    
    Old March 28th, 2016 (7:21 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: 347
      PokeDex Search Functions

      In Fire Red, there are four "Search Modes" for the PokeDex. Alphabetical Mode, Type Mode, Lightest Mode and Smallest Mode.

      The PokeDex determines the order of the Pokemon in these modes by looking at a table. There are four tables, one for each mode.

      So let's say you change the heights and weights for any number of Pokemon, or you change the types. Maybe you have new Pokemon and the Alphabetical Order table is now out of date.

      These tables can be edited and re pointed to accommodate new Pokemon. It may be a small thing, but the little things can go a long way into making a hack more professional.

      The Alphabetical Mode Table starts at 0x443FC0.
      The Lightest Mode Table starts at 0x4442F6.
      The Smallest Mode Table starts at 0x4445FA.
      The Type Mode Table starts at 0x4448FE.

      The pointer to the Alphabetical Mode Table is at 0x103694.
      The pointer to the Type Mode Table is at 0x103734.
      The pointer to the Lightest Mode Table is at 0x1037CC.
      The pointer to the Smallest Mode Table is at 0x103868.

      Some Notes:

      Each table consists of one entry per Pokemon, with two bytes per entry. These two bytes are the reverse index number of the Pokemon. For example, Bulbasaur's Index Number is 0001, which would be shown in the table as 0100.

      The Alphabetical table truly begins at 0x443FF2. There are some entries that begin at 0x443FC0 that do not appear in the actual game. They are after the "PokeDex index numbers" for Deoxys, which I will explain later. Not sure why they are there, but unless you expanded the number of Pokemon in the PokeDex I would leave them alone. (Although if you expanded the number of Pokemon in the PokeDex you would have to repoint anyway.)

      Also, the Type Mode table uses the "true index numbers", which are the ones given by programs such as Gen III Hacking Suite and are the ones used by nearly every other function of the game (Wild Battles, Trainer Parties, Give Pokemon Scripts, etc.)

      HOWEVER

      Every other table here uses the PokeDex numbers as the index numbers. For example, Abra is 63 in the PokeDex, and appears in the table as 3F 00.

      This is really only important for the Hoenn Pokemon, as their internal order and PokeDex order are drastically different. The Type Mode Table includes the 25 Unused Slots between Celebi and Treecko in the table (though they are not shown in game), but the other three do not.

      This is likely related to the entries in the Alphabetical Mode before the true table starts. The 25 entries before the table truly starts are after Deoxys (who is 0x182 in the PokeDex Order) and are not shown in the Vanilla game.

      Below is a list of the Hoenn Pokemon and their co responding PokeDex Index Numbers. You could go onto Bulbapedia and translate the PokeDex Number there into hex, but that's really tedious.

      Spoiler:
      Treecko - FC 00
      Grovyle - FD 00
      Sceptile - FE 00
      Torchic - FF 00
      Combusken - 00 01
      Blaziken - 01 01
      Mudkip - 02 01
      Marshtomp - 03 01
      Swampert - 04 01
      Poochyena - 05 01
      Mightyena - 06 01
      Zigzagoon - 07 01
      Linoone - 08 01
      Wurmple - 09 01
      Silcoon - 0A 01
      Beautifly - 0B 01
      Cascoon - 0C 01
      Dustox - 0D 01
      Lotad - 0E 01
      Lombre - 0F 01
      Ludicolo - 10 01
      Seedot - 11 01
      Nuzleaf - 12 01
      Shiftry - 13 01
      Taillow - 14 01
      Swellow - 15 01
      Wingull - 16 01
      Pelipper - 17 01
      Ralts - 18 01
      Kirlia - 19 01
      Gardevoir - 1A 01
      Surskit - 1B 01
      Masquerain - 1C 01
      Shroomish - 1D 01
      Breloom - 1E 01
      Slakoth - 1F 01
      Vigoroth - 20 01
      Slaking - 21 01
      Nincada - 22 01
      Ninjask - 23 01
      Shedinja - 24 01
      Whismur - 25 01
      Loudred - 26 01
      Exploud - 27 01
      Makuhita - 28 01
      Hariyama - 29 01
      Azurill - 2A 01
      Nosepass - 2B 01
      Skitty - 2C 01
      Delcatty - 2D 01
      Sableye - 2E 01
      Mawile - 2F 01
      Aron - 30 01
      Lairon - 31 01
      Aggron - 32 01
      Meditite - 33 01
      Medicham - 34 01
      Electrike - 35 01
      Manectric - 36 01
      Plusle - 37 01
      Minun - 38 01
      Volbeat - 39 01
      Illumise - 3A 01
      Roselia - 3B 01
      Gulpin - 3C 01
      Swalot - 3D 01
      Carvanha - 3E 01
      Sharpedo - 3F 01
      Wailmer - 40 01
      Wailord - 41 01
      Numel - 42 01
      Camerupt - 43 01
      Torkoal - 44 01
      Spoink - 45 01
      Grumpig - 46 01
      Spinda - 47 01
      Trapinch - 48 01
      Vibrava - 49 01
      Flygon - 4A 01
      Cacnea - 4B 01
      Cacturne - 4C 01
      Swablu - 4D 01
      Altaria - 4E 01
      Zangoose - 4F 01
      Seviper - 50 01
      Lunatone - 51 01
      Solrock - 52 01
      Barboach - 53 01
      Whiscash - 54 01
      Corphish - 55 01\
      Crawdaunt - 56 01
      Baltoy - 57 01
      Claydol - 58 01
      Lileep - 59 01
      Cradily - 5A 01
      Anorith - 5B 01
      Armaldo - 5C 01
      Feebas - 5D 01
      Milotic - 5E 01
      Castform - 5F 01
      Kecleon - 60 01
      Shuppet - 61 01
      Banette - 62 01
      Duskull - 63 01
      Dusclops - 64 01
      Tropius - 65 01
      Chimecho - 66 01
      Absol - 67 01
      Wynaut - 68 01
      Snorunt - 69 01
      Glalie- 6A 01
      Spheal - 6B 01
      Sealeo - 6C 01
      Walrein - 6D 01
      Clamperl - 6E 01
      Huntail - 6F 01
      Gorebyss - 70 01
      Relicanth - 71 01
      Luvdisc - 72 01
      Bagon - 73 01
      Shelgon - 74 01
      Salamence - 75 01
      Beldum - 76 01
      Metang - 77 01
      Metagross - 78 01
      Regirock - 79 01
      Regice - 7A 01
      Registeel - 7B 01
      Latias - 7C 01
      Latios - 7D 01
      Kyogre - 7E 01
      Groudon - 7F 01
      Rayquaza - 80 01
      Jirachi - 81 01
      Deoxys - 81 01


      The Lightest and Smallest Tables have a limiter of 386 (or 0x181), so if the tables are extended they will have to be changed. The Type Mode Table does not have a limiter and ends at FF followed by anything that's not 00 (as FF 00 is an index number for a Pokemon.) I haven't looked into the Alphabetical Table much, but it doesn't appear to have a limiter either. I don't know how it measures the size of the table but the unused entries at the beginning might have something to do with 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
        #828    
      Old April 1st, 2016 (7:48 PM). Edited April 21st, 2018 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: 347


        Ah, the Teachy TV. This item is given to you by the Old Man in Viridian City to teach the player about Pokemon. I find it to be completely useless, but one can hack the text to make it more useful if they wish.

        There is a table at 0x479308 that determines the text that is displayed on the Teachy TV menu and which video it plays when the option is picked.

        There is another table right after it that the TV uses at first.

        The length of this table is at 0x479374.

        Format

        Each entry is eight bytes long. The first four are a pointer to the string of the menu option, for example "How do I catch a Pokemon?"

        The fifth byte is the video that it will play. The valid numbers for this byte are 00 to 05. This is the order of the videos associated with each number.

        00 - How to battle
        01 - Status conditions
        02 - Type matchups
        03 - Catching Pokemon
        04 - TMs
        05 - Registering Items

        Offsets for Text

        The intro to each video is at 0x41B83D.

        Offsets for How to Battle
        Spoiler:

        Part 1: 0x41B8BF ("Today, the POKé DUDE's here to...")
        Part 2: 0x1C5F69 ("The speedier of the battlers gets to attack first...")
        Part 3: 0x1C5FA7 ("It looks like my RATTATA was faster...")
        Part 4: 0x1C5FDC ("The battlers take turns...")
        Part 5: 0x1C601C ("My RATTATA reduced the foe's...")
        Part 6: 0x41BA41 ("Well, did you get that? Even if your own...")


        Offsets for Status Conditions
        Spoiler:

        Part 1: 0x41BB40 ("Today, the POKé DUDE's here to...")
        Part 2: 0x1C60FA ("POKé DUDE: Uh-oh[...] My RATTATA has...")
        Part 3: 0x1C615A ("...It's best to heal it right away")
        Part 4: 0x1C61EA ("Yay! We managed to win!")
        Part 5: 0x41BD10 ("Poisoning or paralysis don't go...")


        Offsets for Type Matchup
        Spoiler:

        Part 1: 0x41BE76 ("Does everyone know about...")
        Part 2: 0x1C6202 ("POKé DUDE: The move BUBBLE is...")
        Part 3: 0x1C6301 ("Uh-oh, this is not good! The ABSORB...")
        Part 4: 0x1C63A9 ("BUTTERFREE is a BUG/FLYING-type...")
        Part 5: 0x1C63F9 ("ODDISH is a GRASS/POISON-type...")
        Part 6: 0x41C0AF ("Is it possible to launch an attack...")


        Offsets for Catching Pokemon
        Spoiler:

        Part 1: 0x41C23B ("Today the POKé DUDE's going to show...")
        Part 2: 0x1C6645 ("POKé DUDE: When you're trying to...")
        Part 3: 0x1C66F1 ("Okay, that should be good enough...")
        Part 4: 0x1C6787 ("This will make the POKéMON a lot...")
        Part 5: 0x1C684B ("Okay! Let me throw my...")
        Part 6: 0x1C686C ("Before you throw a POKé BALL, consider...")
        Part 7: 0x41C384 ("If your first POKé BALL fails...")


        Offsets for TMs
        Spoiler:

        Part 1: 0x41C459 ("Hey, everyone! Do you all have...")
        Part 2: 0x41C587 ("POKé DUDE: NORMAL, WATER...")
        Part 3: 0x41C693 ("Don't just look at the type, read...")
        Part 4: 0x41C7B4 ("Wow, I talked a lot today! All righty...")


        Offsets for Item Registration
        Spoiler:

        Part 1: 0x41C82A ("A TRAINER's BAG has a bunch...")
        Part 2: 0x41C994 ("And now, your TEACHY TV is...")
        __________________
        "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
          #829    
        Old April 2nd, 2016 (5:16 PM).
        Sea Dragon's Avatar
        Sea Dragon Sea Dragon is offline
           
          Join Date: Mar 2016
          Location: Maine
          Gender: Male
          Nature: Quiet
          Posts: 22
          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:
          nature power table: 31c414 - 31c427 2 bytes per move in this order: tall grass, long grass, sand, underwater, sea water, pond water, rock, cave, building + plain terrain
          limiter: 14ef4a Replace B1 20 40 00 81 42 with 00 00 00 00 00 00
          callterrainattack(battle script command): 054bec

          Fix Shedinja's evolution for expanded evolution table:
          @13e3f6 change 80 to c0
          @13e3fa change 4450 to 0000
          Explanation:
          Spoiler:
          increasing the number of evolutions per pokemon may break Shedinja's ("spawn a second") evolution because of the way it searches the evolution table. The equation it uses must be modified to make sure it points to the right offset.

          0813e3f4 4650 mov r0, r10 *evolving pokemons index in r0 (nincada = 12d)
          0813e3f6 0080 lsl r0, r0, #0x02 *shifts r0 left by 0x02 (=4b4) - shift by 0x03 instead (=968)
          0813e3f8 9002 str r0, [sp, #0x8]
          0813e3fa 4450 add r0, r10 *adds pokemons index (4b4+12d=5e1) -remove this
          0813e3fc 00c7 lsl r7, r0, #0x03 *shifts r0 by 0x03 and puts it in r7 (this should be the number of bytes from the beginning of the evolution table to nincadas evolution: default = 2f08, expanded =4b40)

          0813e3fe 4956 ldr r1, [$0813e558] (=$08AAAAAA) *location of your evolution table
          0813e400 19c9 add r1, r1, r7
          0813e402 4688 mov r8, r1
          0813e404 8808 ldrh r0, [r1, #0x0]
          0813e406 280d cmp r0, #0xd
          0813e408 d000 beq $0813e40c
          0813e40a e09c b $0813e546

          Bitwise calculator: http://www.miniwebtool.com/bitwise-calculator/bit-shift/

          This change works for 8 evolutions. If you have more then it likely uses a similar pattern (shift bytes by a higher number and alternate whether or not you add the pokemon's index).
          Reply With Quote
            #830    
          Old April 4th, 2016 (10:48 AM).
          LCCoolJ95's Avatar
          LCCoolJ95 LCCoolJ95 is online now
          Limited Capacity
             
            Join Date: May 2009
            Location: The World That Never Was
            Age: 23
            Gender: Male
            Nature: Naive
            Posts: 542
            Quote:
            Originally Posted by AkameTheBulbasaur View Post
            PokeDex Search Functions

            In Fire Red, there are four "Search Modes" for the PokeDex. Alphabetical Mode, Type Mode, Lightest Mode and Smallest Mode.

            The PokeDex determines the order of the Pokemon in these modes by looking at a table. There are four tables, one for each mode.

            So let's say you change the heights and weights for any number of Pokemon, or you change the types. Maybe you have new Pokemon and the Alphabetical Order table is now out of date.

            These tables can be edited and re pointed to accommodate new Pokemon. It may be a small thing, but the little things can go a long way into making a hack more professional.

            The Alphabetical Mode Table starts at 0x443FC0.
            The Lightest Mode Table starts at 0x4442F6.
            The Smallest Mode Table starts at 0x4445FA.
            The Type Mode Table starts at 0x4448FE.

            The pointer to the Alphabetical Mode Table is at 0x103694.
            The pointer to the Type Mode Table is at 0x103734.
            The pointer to the Lightest Mode Table is at 0x1037CC.
            The pointer to the Smallest Mode Table is at 0x103868.

            Some Notes:

            Each table consists of one entry per Pokemon, with two bytes per entry. These two bytes are the reverse index number of the Pokemon. For example, Bulbasaur's Index Number is 0001, which would be shown in the table as 0100.

            The Alphabetical table truly begins at 0x443FF2. There are some entries that begin at 0x443FC0 that do not appear in the actual game. They are after the "PokeDex index numbers" for Deoxys, which I will explain later. Not sure why they are there, but unless you expanded the number of Pokemon in the PokeDex I would leave them alone. (Although if you expanded the number of Pokemon in the PokeDex you would have to repoint anyway.)

            Also, the Type Mode table uses the "true index numbers", which are the ones given by programs such as Gen III Hacking Suite and are the ones used by nearly every other function of the game (Wild Battles, Trainer Parties, Give Pokemon Scripts, etc.)

            HOWEVER

            Every other table here uses the PokeDex numbers as the index numbers. For example, Abra is 63 in the PokeDex, and appears in the table as 3F 00.

            This is really only important for the Hoenn Pokemon, as their internal order and PokeDex order are drastically different. The Type Mode Table includes the 25 Unused Slots between Celebi and Treecko in the table (though they are not shown in game), but the other three do not.

            This is likely related to the entries in the Alphabetical Mode before the true table starts. The 25 entries before the table truly starts are after Deoxys (who is 0x182 in the PokeDex Order) and are not shown in the Vanilla game.

            Below is a list of the Hoenn Pokemon and their co responding PokeDex Index Numbers. You could go onto Bulbapedia and translate the PokeDex Number there into hex, but that's really tedious.

            Spoiler:
            Treecko - FC 00
            Grovyle - FD 00
            Sceptile - FE 00
            Torchic - FF 00
            Combusken - 00 01
            Blaziken - 01 01
            Mudkip - 02 01
            Marshtomp - 03 01
            Swampert - 04 01
            Poochyena - 05 01
            Mightyena - 06 01
            Zigzagoon - 07 01
            Linoone - 08 01
            Wurmple - 09 01
            Silcoon - 0A 01
            Beautifly - 0B 01
            Cascoon - 0C 01
            Dustox - 0D 01
            Lotad - 0E 01
            Lombre - 0F 01
            Ludicolo - 10 01
            Seedot - 11 01
            Nuzleaf - 12 01
            Shiftry - 13 01
            Taillow - 14 01
            Swellow - 15 01
            Wingull - 16 01
            Pelipper - 17 01
            Ralts - 18 01
            Kirlia - 19 01
            Gardevoir - 1A 01
            Surskit - 1B 01
            Masquerain - 1C 01
            Shroomish - 1D 01
            Breloom - 1E 01
            Slakoth - 1F 01
            Vigoroth - 20 01
            Slaking - 21 01
            Nincada - 22 01
            Ninjask - 23 01
            Shedinja - 24 01
            Whismur - 25 01
            Loudred - 26 01
            Exploud - 27 01
            Makuhita - 28 01
            Hariyama - 29 01
            Azurill - 2A 01
            Nosepass - 2B 01
            Skitty - 2C 01
            Delcatty - 2D 01
            Sableye - 2E 01
            Mawile - 2F 01
            Aron - 30 01
            Lairon - 31 01
            Aggron - 32 01
            Meditite - 33 01
            Medicham - 34 01
            Electrike - 35 01
            Manectric - 36 01
            Plusle - 37 01
            Minun - 38 01
            Volbeat - 39 01
            Illumise - 3A 01
            Roselia - 3B 01
            Gulpin - 3C 01
            Swalot - 3D 01
            Carvanha - 3E 01
            Sharpedo - 3F 01
            Wailmer - 40 01
            Wailord - 41 01
            Numel - 42 01
            Camerupt - 43 01
            Torkoal - 44 01
            Spoink - 45 01
            Grumpig - 46 01
            Spinda - 47 01
            Trapinch - 48 01
            Vibrava - 49 01
            Flygon - 4A 01
            Cacnea - 4B 01
            Cacturne - 4C 01
            Swablu - 4D 01
            Altaria - 4E 01
            Zangoose - 4F 01
            Seviper - 50 01
            Lunatone - 51 01
            Solrock - 52 01
            Barboach - 53 01
            Whiscash - 54 01
            Corphish - 55 01\
            Crawdaunt - 56 01
            Baltoy - 57 01
            Claydol - 58 01
            Lileep - 59 01
            Cradily - 5A 01
            Anorith - 5B 01
            Armaldo - 5C 01
            Feebas - 5D 01
            Milotic - 5E 01
            Castform - 5F 01
            Kecleon - 60 01
            Shuppet - 61 01
            Banette - 62 01
            Duskull - 63 01
            Dusclops - 64 01
            Tropius - 65 01
            Chimecho - 66 01
            Absol - 67 01
            Wynaut - 68 01
            Snorunt - 69 01
            Glalie- 6A 01
            Spheal - 6B 01
            Sealeo - 6C 01
            Walrein - 6D 01
            Clamperl - 6E 01
            Huntail - 6F 01
            Gorebyss - 70 01
            Relicanth - 71 01
            Luvdisc - 72 01
            Bagon - 73 01
            Shelgon - 74 01
            Salamence - 75 01
            Beldum - 76 01
            Metang - 77 01
            Metagross - 78 01
            Regirock - 79 01
            Regice - 7A 01
            Registeel - 7B 01
            Latias - 7C 01
            Latios - 7D 01
            Kyogre - 7E 01
            Groudon - 7F 01
            Rayquaza - 80 01
            Jirachi - 81 01
            Deoxys - 81 01


            The Lightest and Smallest Tables have a limiter of 386 (or 0x181), so if the tables are extended they will have to be changed. The Type Mode Table does not have a limiter and ends at FF followed by anything that's not 00 (as FF 00 is an index number for a Pokemon.) I haven't looked into the Alphabetical Table much, but it doesn't appear to have a limiter either. I don't know how it measures the size of the table but the unused entries at the beginning might have something to do with it.
            Here are the Emerald equivalents:

            The Alphabetical Mode Table starts at 0x55C6A4
            The Lightest Mode Table starts at 0x55C9DA
            The Smallest Mode Table starts at 0x55CCDE

            The pointer to the Alphabetical Mode Table is at 0xBCB74
            The pointers to the Lightest Mode Table are at 0xBCC00 AND 0xBCC9C
            The pointers to the Smallest Mode Table are at 0xBCD28 AND 0xBCE24

            I have been expanding Emerald for a while, and I can conclude that these tables MUST be expanded in order for an expanded Pokemon to be shown in the Pokedex. I didn't include the types because these isn't a function like that in Emerald. Plus, when looking for a certain type of Pokemon, any Pokemon can be found, regardless if expanded or not...
            __________________
            "The greatest obstacle in life is Yourself. Overcome it, and you will achieve the greatest accomplishment of all." -Art Beins, 1982

            Pokémon Theta Emerald EX: https://www.pokecommunity.com/showthread.php?t=386240
            Reply With Quote
              #831    
            Old April 5th, 2016 (3:43 AM).
            DizzyEgg's Avatar
            DizzyEgg DizzyEgg is offline
               
              Join Date: Feb 2014
              Location: Poland
              Age: 20
              Gender: Male
              Nature: Quiet
              Posts: 732
              Fun fact: STAB doesn't actually affect the move power. It affects the damage directly after the move power and attacker/defender stats, but before the type multipliers. Posting this, because everywhere on web you can read that stab multiplies the move base power by 1.5, it doesn't. At least, not in gen3. :P
              __________________
              Support Pokeruby!

              My works:
              Battle Engine Upgrade
              Pokemon Expansion
              Items/TMs/Tutors Expansion
              Various Features(Evo Methods, BW Repel, Levels Above 100, Trainers with EV, Nature Colored Stats)

              Emerald Features:
              Form Changes (KDS)
              Reply With Quote
                #832    
              Old April 5th, 2016 (2:59 PM).
              64smashmaster3ds's Avatar
              64smashmaster3ds 64smashmaster3ds is offline
                 
                Join Date: Jun 2013
                Location: ???
                Gender: Male
                Nature: Quiet
                Posts: 58
                Quote:
                Originally Posted by GoGoJJTech View Post
                I know a few of you were looking for this, but track 83 (53 in hex) plays the low HP sound. Hacking this could mean that we could have BW's low HP song playing as a fanfare.
                The low HP sound for Emerald is located at track 90 (not sure what hex). Hoping to put together the BW's critical damage as well. But would the battle theme pause when the low HP song starts and the battle music resume at the same track before the low HP song?
                Reply With Quote
                  #833    
                Old April 5th, 2016 (3:35 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 64smashmaster3ds View Post
                The low HP sound for Emerald is located at track 90 (not sure what hex). Hoping to put together the BW's critical damage as well. But would the battle theme pause when the low HP song starts and the battle music resume at the same track before the low HP song?
                No.
                __________________
                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
                  #834    
                Old April 8th, 2016 (7:22 AM).
                Spherical Ice's Avatar
                Spherical Ice Spherical Ice is online now
                 
                Join Date: Nov 2007
                Location: Bristol, UK
                Age: 20
                Posts: 5,220
                Quote:
                Originally Posted by DoesntKnowHowToPlay View Post
                Supposedly someone else documented this, but I couldn't find it in the thread index so I'm posting it again.

                FR's Vs. Seeker table is at x45318C. Each entry is 16 (0x10) bytes, as follows:

                0x0: half-word, denotes the trainer's ID in the first fight with them
                0x2: up to five half-words denoting rematch IDs. FFFF is used as filler if more is coming, 0000 to terminate early.
                0xC: half-word, seems to always be 3.
                0xE: half-word, ranges from x15 to x41. Never seemed to be read in my tests. Appears to scale with trainer's levels in the base game (and by extension position).

                The table has xDD entries and no terminator; the (a?) limiter is at x10d09c.
                Looks like there's another limiter at x10CEE4, which is a part of special 0x3A.
                __________________

                A Pokemon that is discriminated!
                Support squirtle and make it everyone's favourite.
                Reply With Quote
                  #835    
                Old April 8th, 2016 (11:35 AM).
                Spherical Ice's Avatar
                Spherical Ice Spherical Ice is online now
                 
                Join Date: Nov 2007
                Location: Bristol, UK
                Age: 20
                Posts: 5,220
                I haven't seen this documented anywhere: special 0x96 will set the flag named in var 0x8004.

                For example, the following code:

                setvar 0x8004 0x29D
                special 0x96

                Is equivalent to:

                setflag 0x29D
                __________________

                A Pokemon that is discriminated!
                Support squirtle and make it everyone's favourite.
                Reply With Quote
                  #836    
                Old April 8th, 2016 (11:43 AM).
                Gamer2020's Avatar
                Gamer2020 Gamer2020 is offline
                Accept no Imitations!
                   
                  Join Date: Jun 2008
                  Location: Distant Land
                  Gender: Male
                  Nature: Bold
                  Posts: 934
                  Quote:
                  Originally Posted by AkameTheBulbasaur View Post
                  The Lightest and Smallest Tables have a limiter of 386 (or 0x181), so if the tables are extended they will have to be changed. The Type Mode Table does not have a limiter and ends at FF followed by anything that's not 00 (as FF 00 is an index number for a Pokemon.) I haven't looked into the Alphabetical Table much, but it doesn't appear to have a limiter either. I don't know how it measures the size of the table but the unused entries at the beginning might have something to do with it.

                  Alphabet does seem to have a limiter?
                  Code:
                  ROM:08103682 loc_8103682:                            @ CODE XREF: sub_8103518+102j
                  ROM:08103682                                         @ sub_8103518+122j
                  ROM:08103682                 MOVS    R0, #1
                  ROM:08103684                 ADD     R8, R0
                  ROM:08103686                 MOVS    R0, #0x19A
                  ROM:0810368A                 CMP     R8, R0
                  ROM:0810368C                 BLE     loc_810360C
                  ROM:0810368E                 B       loc_8103906
                  ROM:0810368E @ ---------------------------------------------------------------------------
                  ROM:08103690 off_8103690:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+F0r
                  ROM:08103694 off_8103694:    .long Pokedex_Alphabetical_Mode
                  ROM:08103694                                         @ DATA XREF: sub_8103518:loc_810360Cr
                  ROM:08103698 off_8103698:    .long pokemon_names     @ DATA XREF: sub_8103518+13Er
                  So does Type mode?
                  Code:
                  ROM:08103722 loc_8103722:                            @ CODE XREF: sub_8103518+1A2j
                  ROM:08103722                                         @ sub_8103518+1C2j
                  ROM:08103722                 MOVS    R0, #1
                  ROM:08103724                 ADD     R8, R0
                  ROM:08103726                 MOVS    R0, #0x19A
                  ROM:0810372A                 CMP     R8, R0
                  ROM:0810372C                 BLE     loc_81036A4
                  ROM:0810372E                 B       loc_8103906
                  ROM:0810372E @ ---------------------------------------------------------------------------
                  ROM:08103730 off_8103730:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+188r
                  ROM:08103734 off_8103734:    .long Pokedex_Type_Mode @ DATA XREF: sub_8103518:loc_81036A4r
                  ROM:08103738 off_8103738:    .long pokemon_names     @ DATA XREF: sub_8103518+1DEr
                  I might as well post these as well.
                  Code:
                  ROM:08103856 loc_8103856:                            @ CODE XREF: sub_8103518+2D6j
                  ROM:08103856                                         @ sub_8103518+2F6j
                  ROM:08103856                 MOVS    R0, #1
                  ROM:08103858                 ADD     R8, R0
                  ROM:0810385A                 LDR     R0, =0x181
                  ROM:0810385C                 CMP     R8, R0
                  ROM:0810385E                 BLE     loc_81037E0
                  ROM:08103860                 B       loc_8103906
                  ROM:08103860 @ ---------------------------------------------------------------------------
                  ROM:08103862                 .align 4
                  ROM:08103864 off_8103864:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+2C4r
                  ROM:08103868 off_8103868:    .long Pokedex_Smallest_Mode
                  ROM:08103868                                         @ DATA XREF: sub_8103518:loc_81037E0r
                  ROM:0810386C off_810386C:    .long pokemon_names     @ DATA XREF: sub_8103518+312r
                  ROM:08103870 dword_8103870:  .long 0x181             @ DATA XREF: sub_8103518+342r
                  Code:
                  ROM:081037BA loc_81037BA:                            @ CODE XREF: sub_8103518+23Aj
                  ROM:081037BA                                         @ sub_8103518+25Aj
                  ROM:081037BA                 MOVS    R0, #1
                  ROM:081037BC                 ADD     R8, R0
                  ROM:081037BE                 LDR     R0, =0x181
                  ROM:081037C0                 CMP     R8, R0
                  ROM:081037C2                 BLE     loc_8103744
                  ROM:081037C4                 B       loc_8103906
                  ROM:081037C4 @ ---------------------------------------------------------------------------
                  ROM:081037C6                 .align 4
                  ROM:081037C8 off_81037C8:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+228r
                  ROM:081037CC off_81037CC:    .long Pokedex_Lightest_Mode
                  ROM:081037CC                                         @ DATA XREF: sub_8103518:loc_8103744r
                  ROM:081037D0 off_81037D0:    .long pokemon_names     @ DATA XREF: sub_8103518+276r
                  ROM:081037D4 dword_81037D4:  .long 0x181             @ DATA XREF: sub_8103518+2A6r
                  __________________

                  The new home for ROM Hacking!
                  Reply With Quote
                    #837    
                  Old April 8th, 2016 (12:08 PM).
                  Spherical Ice's Avatar
                  Spherical Ice Spherical Ice is online now
                   
                  Join Date: Nov 2007
                  Location: Bristol, UK
                  Age: 20
                  Posts: 5,220
                  Quote:
                  Originally Posted by Sea Dragon View Post
                  Fix Shedinja's evolution for expanded evolution table:
                  @13e3f6 change 80 to c0
                  @13e3fa change 4450 to 0000
                  Explanation:
                  Spoiler:
                  increasing the number of evolutions per pokemon may break Shedinja's ("spawn a second") evolution because of the way it searches the evolution table. The equation it uses must be modified to make sure it points to the right offset.

                  0813e3f4 4650 mov r0, r10 *evolving pokemons index in r0 (nincada = 12d)
                  0813e3f6 0080 lsl r0, r0, #0x02 *shifts r0 left by 0x02 (=4b4) - shift by 0x03 instead (=968)
                  0813e3f8 9002 str r0, [sp, #0x8]
                  0813e3fa 4450 add r0, r10 *adds pokemons index (4b4+12d=5e1) -remove this
                  0813e3fc 00c7 lsl r7, r0, #0x03 *shifts r0 by 0x03 and puts it in r7 (this should be the number of bytes from the beginning of the evolution table to nincadas evolution: default = 2f08, expanded =4b40)

                  0813e3fe 4956 ldr r1, [$0813e558] (=$08AAAAAA) *location of your evolution table
                  0813e400 19c9 add r1, r1, r7
                  0813e402 4688 mov r8, r1
                  0813e404 8808 ldrh r0, [r1, #0x0]
                  0813e406 280d cmp r0, #0xd
                  0813e408 d000 beq $0813e40c
                  0813e40a e09c b $0813e546

                  Bitwise calculator: http://www.miniwebtool.com/bitwise-calculator/bit-shift/

                  This change works for 8 evolutions. If you have more then it likely uses a similar pattern (shift bytes by a higher number and alternate whether or not you add the pokemon's index).
                  Same principles apply for FireRed, but the offsets are as follows:

                  @ CE762 change 80 00 to C0 00 (00 01 if you expanded to 16 evolution methods, etc.)
                  @ CE766 change 44 50 to 00 00
                  __________________

                  A Pokemon that is discriminated!
                  Support squirtle and make it everyone's favourite.
                  Reply With Quote
                    #838    
                  Old April 9th, 2016 (12:31 PM).
                  esperance's Avatar
                  esperance esperance is offline
                   
                  Join Date: Mar 2010
                  Location: Ohio
                  Age: 21
                  Gender: Male
                  Nature: Relaxed
                  Posts: 3,820
                  Braille Encoding
                  I didn't see it documented in the index, and I'm not sure if this has been posted before. In the Gen 3 games braille text uses a special encoding, which I've listed below:
                  Code:
                  00= 
                  01=A
                  04=,
                  03=C
                  05=B
                  06=I
                  07=F
                  09=E
                  0B=D
                  0D=H
                  0E=J
                  0F=G
                  11=K
                  13=M
                  15=L
                  16=S
                  17=P
                  19=O
                  1B=N
                  1D=R
                  1E=T
                  1F=Q
                  2C=.
                  2E=W
                  31=U
                  33=X
                  35=V
                  39=Z
                  3B=Y
                  
                  FF=\x
                  0xFF terminates a braille string, while 0x00 is a space character. I'm not sure what other values not listed will show (if anything).
                  __________________
                  What are you so afraid of?
                  Reply With Quote
                    #839    
                  Old April 9th, 2016 (12:46 PM).
                  Telinc1's Avatar
                  Telinc1 Telinc1 is offline
                  Weirdo Extraordinaire
                     
                    Join Date: Jun 2013
                    Location: Sofia, Bulgaria
                    Gender: Male
                    Nature: Bold
                    Posts: 167
                    Quote:
                    Originally Posted by Youmu View Post
                    Braille Encoding
                    I didn't see it documented in the index, and I'm not sure if this has been posted before. In the Gen 3 games braille text uses a special encoding, which I've listed below:
                    -snip-
                    0xFF terminates a braille string, while 0x00 is a space character. I'm not sure what other values not listed will show (if anything).
                    This is probably common knowledge, but having it here doesn't hurt. Braille strings don't support the \p, \n and \l control codes, so to display multiline braille strings, the braille2 command together with special 0x1B2 is used. braille2 calculates the length of a braille string and sets 0x8006 to it. special 0x1B2 displays an arrow (you know, the one which is always used in messages) at the coordinates specified by 0x8005 and 0x8006 (0x8005 is set 0x82 = 130 at the beginning of braille scripts). To see how GameFreak used these, open up script 0x163BAB from FireRed.
                    __________________

                    Check out my hacks by clicking on the userbar!
                    Check out my new website (this link now works!)!
                    Reply With Quote
                      #840    
                    Old May 2nd, 2016 (4:35 PM).
                    DoesntKnowHowToPlay's Avatar
                    DoesntKnowHowToPlay DoesntKnowHowToPlay is offline
                    Tiny Umbrella with Lots and Lots of Good
                       
                      Join Date: Jan 2012
                      Posts: 258
                      To change the Zigzagoon you fight in Emerald immediately after picking your starter to a different mon, change the 0x90 at x32706 to half the index number of the mon you want. If you want a mon who index number isn't a multiple of two, simply put its (single-byte) index number there and replace the x49 at x32708 with an x00. To change the mon to a non-even index number that is greater than one byte, learn ASM and do your own stuff now that you have the relevant offset.

                      To change its level, change the x2 at x32714 to the desired value.
                      __________________

                      Yet Another Fire Red Hack

                      Physical/Special Split
                      Reply With Quote
                        #841    
                      Old May 13th, 2016 (7:54 AM). Edited August 24th, 2017 by Sagiri.
                      Sagiri's Avatar
                      Sagiri Sagiri is offline
                         
                        Join Date: Mar 2007
                        Posts: 741
                        Pokemon Center Doesn't Count Eggs [FR]

                        When healing at a Pokemon Center, the healing machine will light up with the number of Pokemon in your party. Starting in DP, eggs don't count - if you have two Pokemon and an egg, in RSEFRLG, you get three lights, in DP, you get two.

                        To get this behavior in FR, just change:

                        Code:
                        0x08083B8E : 0xbd 0xf7 0x55 0xf8
                        to

                        Code:
                        0x08083B8E : 0x08 0xf0 0xd5 0xfa
                        Spoiler:
                        0x08083B8C is a function called as part of doanimation 0x19 (the healing machine). At 0x08083B8E, that function branch-links to call another function at 0x08083BD1, which itself counts the number of Pokemon in the party.

                        0x0808C13C is a built-in function to count Pokemon (and not eggs), so basically I just changed the target of the branch-link to this function.


                        Pokeblock Research [EM]

                        This may already be known, but I looked and couldn't find it. If this is known already, I apologize.

                        In Emerald, the contents of the Pokeblock Case are stored starting at [0x03005d8c] + 0x848. It is encrypted using the Security Key. Information on the Security Key, and how to disable it for Emerald can be found here.

                        The Pokeblock Case has room for 40 Pokeblocks, each in the same 8-byte format:

                        Spoiler:
                        Code:
                        0x00: Color
                        0x01: Spicy
                        0x02: Dry
                        0x03: Sweet
                        0x04: Bitter
                        0x05: Soul
                        0x06: Feel
                        0x07: unk_0x07


                        I believe unk_0x7 is either just padding or some sort of terminator. In my experimentation, it was always 0x03. The available colors are:

                        Spoiler:
                        Code:
                        0x01 - Red
                        0x02 - Blue
                        0x03 - Pink
                        0x04 - Green
                        0x05 - Yellow
                        0x06 - Purple
                        0x07 - Indigo
                        0x08 - Brown
                        0x09 - Light Blue
                        0x0a - Olive
                        0x0b - Gray
                        0x0c - Black
                        0x0d - White
                        0x0e - Gold


                        How could you use this? Well, I guess you could use this to, say, make NPCs that give out Pokeblocks, but seeing as most hacks don't feature contests anyway, that seems unlikely.

                        It's actually more useful for Emerald hacks that don't use the Pokeblock Case at all. The space reserved for the Pokeblock Case is persistent; it will be saved and loaded. If you don't use the Pokeblock case, you have (8 bytes/pokeblock)(40 pokeblocks) = 320 bytes to persistently store whatever you want.

                        Constant Base Power For Hidden Power [FR]

                        Starting with XY, Hidden Power's base power was fixed at 60. Prior to this, it varied between 30 and 70, based on the Pokemon's IVs. To force the game to read the base power from the move data table, null out the strh at 0x0802B722.

                        Basically, replace:
                        Code:
                        0x0802B722: 28 80
                        with:
                        Code:
                        0x0802B722: C0 46
                        After you've done that, HP will use the base power in the table as its base power. Unfortunately, in a vanilla FR it is listed as 0x01, so it will be very weak until you change it. The byte you need to change is at move_data + 0xED * 12 + 1. As said before, it should be 0x01, and, if you want to set to set to 60 (as in XY), change it to 0x3C. If you haven't repointed it, move_data is at 0x08250c04.

                        This effects both the actual damage calculation and when you view the Known Moves screen.

                        (Not So) Hidden Power [FR]

                        By default, Hidden Power will always display as a Normal-type move. By modifying the routines for displaying the types of moves, we can force it to display as the actual type.

                        Unlike the earlier parts of this post, this requires some free space. Here's the code:

                        Spoiler:
                        Code:
                        .text
                        .align 2
                        .thumb
                        .thumb_func
                        
                        write_type_hook:					@ r1 := move_id
                        	push {r3-r7}
                        	mov r7, lr
                        	
                        	lsl r0, r1, #2
                        	lsl r1, r1, #3
                        	add r0, r1						@ r0 := 12 * move_id
                        	ldr r1, move_data
                        	add r1, r0						@ [r1] := data for current move
                        	ldrb r0, [r1, #2]				@ r0 := recorded type
                        	
                        	ldrb r2, [r1, #0]				@ r2 := move effect id
                        	cmp r2, #0x87					@ HIDDEN_POWER_EFFECT
                        	bne return0
                        	
                        	ldrb r0, [r5]					@ r0 := slot
                        	lsl r0, #1						@ r0 := slot << 1
                        	ldr r1, battle_slot_mapping
                        	add r0, r1
                        	ldrb r0, [r0]					@ r0 := index in party
                        	mov r1, #100
                        	mul r0, r1						@ r0 := offset from party_player
                        	ldr r1, party_player
                        	add r0, r1						@ [r0] := pokemon
                        	
                        	bl hp_type_decode
                        	
                        return0:
                        	mov lr, r7
                        	pop {r3-r7}
                        	ldr r1, write_type
                        	bx r1
                        
                        @ return value on r1
                        display_type_hook:					@ r2, r5 := move_id, move_data
                        	push {r0, r3-r7}
                        	mov r7, lr
                        	
                        	lsl r0, r2, #2
                        	lsl r1, r2, #3
                        	add r0, r1						@ r0 := 12 * move_id
                        	add r0, r5						@ [r0] := data for current move
                        	
                        	ldrb r1, [r0, #2]				@ r1 := type
                        	ldrb r2, [r0, #0]				@ r2 := effect_id
                        	cmp r2, #0x87
                        	bne return1
                        	
                        	ldr r0, pkmn_status_data
                        	ldr r0, [r0]
                        	mov r1, #0x32
                        	lsl r1, r1, #8
                        	add r1, #0x90
                        	add r0, r1						@ [r0] := pokemon
                        	bl hp_type_decode
                        	mov r1, r0
                        
                        return1:
                        	mov lr, r7
                        	pop {r0, r3-r7}
                        	ldr r2, display_type
                        	bx r2
                        
                        @ uint8_t hp_type_decode(pokemon_t*)
                        hp_type_decode:
                        	push {r4-r7, lr}
                        	mov r6, r0									@ [r6] := pokemon
                        	mov r4, #0									@ r4 := type calculation
                        	mov r7, #0									@ r7 := iv index
                        	ldr r5, pokemon_getattr
                        	b test
                        	
                        loop:
                        	mov r0, r6									@ [r0] := pokemon
                        	mov r1, #0x27								@ GET_HP_IV
                        	add r1, r7
                        	bl call
                        	mov r1, #1
                        	and r0, r1
                        	lsl r0, r7
                        	orr r4, r0
                        	add r7, #1
                        	
                        test:
                        	cmp r7, #6
                        	bne loop
                        	
                        floor:
                        	mov r0, #15
                        	mul r0, r4
                        	mov r1, #63
                        	swi #0x6
                        	
                        decode:						@ add 2 if below 8, 1 otherwise
                        	cmp r0, #8
                        	blo L1
                        	add r0, #1
                        	
                        L1:
                        	add r0, #1
                        	pop {r4-r7, pc}
                        	
                        call:
                        	bx r5
                        
                        .align 2
                        
                        write_type: .word 0x0803098E +1
                        battle_slot_mapping: .word 0x02023BCE
                        party_player: .word 0x02024284
                        move_data: .word 0x08250C04
                        pokemon_getattr: .word 0x0803FBE8 +1
                        display_type: .word 0x081368D6 +1
                        pkmn_status_data: .word 0x0203B140


                        And, this is what it looks like already assembled:
                        Code:
                        F8 B4 77 46 88 00 C9 00 40 18 27 49 09 18 88 78 0A 78 87 2A 0A D1 28 78 40 00 21 49 40 18 00 78 64 21 48 43 1F 49 40 18 00 F0 1B F8 BE 46 F8 BC 1A 49 08 47 F9 B4 77 46 90 00 D1 00 40 18 40 19 81 78 02 78 87 2A 08 D1 1A 48 00 68 32 21 09 02 90 31 40 18 00 F0 05 F8 01 1C BE 46 F9 BC 14 4A 10 47 F0 B5 06 1C 00 24 00 27 10 4D 09 E0 30 1C 27 21 C9 19 00 F0 10 F8 01 21 08 40 B8 40 04 43 01 37 06 2F F3 D1 0F 20 60 43 3F 21 06 DF 08 28 00 D3 01 30 01 30 F0 BD 28 47 C0 46 8F 09 03 08 CE 3B 02 02 84 42 02 02 04 0C 25 08 E9 FB 03 08 D7 68 13 08 40 B1 03 02
                        If you have repointed the move_data table, you need to change the definition in the code and reassemble it. If you haven't done that, you can insert it as is.

                        As usual, insert it at an offset ending in 0x0, 0x4, 0x8, or 0xC. For simplicity, I'll refer to this offset as A.

                        Now, we need to modify the routines to call this new code. There are two places to modify.

                        Code:
                        0x08030984: 00 48 00 47 xx xx xx xx
                        Code:
                        0x081368CC: 00 49 08 47 yy yy yy yy
                        The x's are A + 0x01, in reverse hex, while the y's are A + 0x35, also in reverse hex.

                        This affects the type icons on the party menu (as well as when learning a new move), and the type listed when selecting an attack.

                        This does not affect the type displayed by the TM Case. As that's not associated with a particular Pokemon, it just reads the type from the move data table. I actually suggest changing Hidden Power's entry in the table to be ???-type, so that it will show as that in the TM Case, and the actual type everywhere else. To do this, change the byte at move_data + 0xED * 12 + 2 from 0x00 (Normal-type) to 0x09 (???-type).

                        I didn't bother to force it to calculate and display the base power for Hidden Power, as I prefer the constant base power anyway, but if this was any indication, it would be pretty easy to do.

                        Disable "The Pokemon Stopped Evolving." [FR]

                        FR has a feature that if you attempt to evolve a Pokemon into something not in the Kanto Dex (and you don't have the National Dex), it will mysteriously stop evolving. You could just give the player the National Dex at the beginning of the game, but if you don't want to do that, you can easily disable this.

                        Basically, this will turn some conditional jumps into unconditional jumps, and remove some checks. No free space required.

                        Code:
                        0x08043156: 02 E0
                        0x080CE90C: 1C E0
                        0x080CF566: 17 E0
                        0x08126C26: C0 46 C0 46 C0 46 C0 46
                        0x08126C4C: 08 E0
                        The code explaining the above byte changes is:

                        Spoiler:
                        Code:
                        .text
                        .align 2
                        .thumb
                        .thumb_func
                        
                        @ trade item removal
                        .org 0x043156
                        b 0x04315E
                        
                        @ all three
                        .org 0x0CE90C
                        b 0x0CE948
                        
                        @ trade
                        .org 0x0CF566
                        b 0x0CF598
                        
                        @ stone
                        .org 0x126C26
                        nop
                        nop
                        nop
                        nop
                        
                        @ stone
                        .org 0x126C4C
                        b 0x126C60


                        Disable Item Removal During Trade With Held Item Evolutions [FR]

                        Trade With Held Item evolutions, such as Onix into Steelix, remove the required held item. As part of the above, I realized you could easily disable this entirely (and, yes, it is compatible with the above) by nulling out a call to pokemon_setattr. The held item will still be required, it just won't be removed. Why you would want to do this I don't really know, but if you do, I'm putting it here.

                        Code:
                        0x0804316A: C0 46 C0 46
                        Disable Trade Restrictions [FR]

                        FR has three distinct types of trade restrictions:
                        • You can't trade or be traded an egg (even an egg of a Kanto Pokemon)
                        • You can't trade in a Pokemon not in the Kanto Dex (even from another FRLG)
                        • You can't trade with RSE

                        Normally, the first two restrictions are lifted after getting the National Dex, while trading with RSE is unlocked by the Sevii Island stuff in the post-game.

                        This removes all three of those restrictions.

                        Code:
                        0x08009754: C0 46 01 20
                        0x0800975C: C0 46 01 20
                        0x0804FA4E: C0 46 01 20
                        Those byte changes correspond to the following ASM:

                        Spoiler:
                        Code:
                        .text
                        .align 2
                        .thumb
                        .thumb_func
                        
                        .org 0x009754
                        nop
                        mov r0, #1
                        
                        @ RSE trading
                        .org 0x00975C
                        nop
                        mov r0, #1
                        
                        .org 0x04FA4E
                        nop
                        mov r0, #1
                        Reply With Quote
                          #842    
                        Old May 18th, 2016 (8:35 AM).
                        Reshiram white as snow Reshiram white as snow is offline
                           
                          Join Date: Feb 2016
                          Location: New York
                          Gender: Other
                          Nature: Timid
                          Posts: 131
                          Do anyone now how to make the Pokemon not lose HP in overworld when it is poisoned? How to disable electricity type Pokemon be paralyzed? And how to change the weather ability such as snow warning, drought from infinty turns to 5 turns? (Emerald)
                          __________________

                          Welcome everybody to play 《Pokemon Eternal Snow》
                          website:
                          http://pan.baidu.com/s/1qY7p9bY
                          password:
                          4pqq
                          The website of Pokemon Eternal Snow pokecommunity:
                          http://www.pokecommunity.com/showthread.php?p=9200526
                          Reply With Quote
                            #843    
                          Old May 18th, 2016 (8:57 AM).
                          Reshiram white as snow Reshiram white as snow is offline
                             
                            Join Date: Feb 2016
                            Location: New York
                            Gender: Other
                            Nature: Timid
                            Posts: 131
                            Quote:
                            Originally Posted by GoGoJJTech View Post


                            I guess I'm just on a roll, huh?
                            I'll post the code to Github when I learn how to use it (and the code for follow me as well)
                            How to make double wild battle?
                            __________________

                            Welcome everybody to play 《Pokemon Eternal Snow》
                            website:
                            http://pan.baidu.com/s/1qY7p9bY
                            password:
                            4pqq
                            The website of Pokemon Eternal Snow pokecommunity:
                            http://www.pokecommunity.com/showthread.php?p=9200526
                            Reply With Quote
                              #844    
                            Old May 21st, 2016 (4:34 AM).
                            Le pug's Avatar
                            Le pug Le pug is offline
                            Creator of Pokémon: Discovery / Fat Kid
                             
                            Join Date: Aug 2013
                            Location: Le bed
                            Age: 25
                            Gender: Male
                            Nature: Bold
                            Posts: 859
                            Quote:
                            Originally Posted by Touched View Post
                            There is

                            Code:
                            .text
                            .align 2
                            .thumb_func
                            
                            main:
                            	push {lr}
                            	ldr r0, player_data
                            	ldr r0, [r0]
                            	ldr r1, chosen_name
                            	bl strcpy
                            	pop {pc}
                            
                            strcpy:
                            	ldr r2, =(0x08008BA0 + 1)
                            	bx r2
                            
                            .align 2
                            player_data: .word 0x03005D90
                            chosen_name: .word 0xDEADBEEF
                            That's untested, but you can callasm that, set the pointer that says 0xDEADBEEF to the pointer to a name of your choice (in Emerald). It must be 7 characters long and end in FF.
                            anyone know the pointer to call that allows you to open up the name player feature? i dont want to name the player but if the intro is skipped, later on I want to have it to where the player sets his name
                            __________________




                            /// Pokémon: Discovery
                            /// Pokémon: Fat Kid
                            /// Tile Insertion Tutorial For AdvanceMap
                            /// Pokémon Emerald Specials Resource Thread
                            /// Pokémon Emerald Decapitalization Patch
                            /// Emerald Titlescreen Cloud Removal Tutorial
                            /// Tutorial For Fixing Any ROM-related Bug
                            Reply With Quote
                              #845    
                            Old May 26th, 2016 (7:01 AM).
                            Epsilon's Avatar
                            Epsilon Epsilon is online now
                            Shiny Scizor
                               
                              Join Date: Jun 2006
                              Location: Johto
                              Nature: Adamant
                              Posts: 248
                              Quote:
                              Originally Posted by Gamer2020 View Post
                              Alphabet does seem to have a limiter?
                              Code:
                              ROM:08103682 loc_8103682:                            @ CODE XREF: sub_8103518+102j
                              ROM:08103682                                         @ sub_8103518+122j
                              ROM:08103682                 MOVS    R0, #1
                              ROM:08103684                 ADD     R8, R0
                              ROM:08103686                 MOVS    R0, #0x19A
                              ROM:0810368A                 CMP     R8, R0
                              ROM:0810368C                 BLE     loc_810360C
                              ROM:0810368E                 B       loc_8103906
                              ROM:0810368E @ ---------------------------------------------------------------------------
                              ROM:08103690 off_8103690:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+F0r
                              ROM:08103694 off_8103694:    .long Pokedex_Alphabetical_Mode
                              ROM:08103694                                         @ DATA XREF: sub_8103518:loc_810360Cr
                              ROM:08103698 off_8103698:    .long pokemon_names     @ DATA XREF: sub_8103518+13Er
                              So does Type mode?
                              Code:
                              ROM:08103722 loc_8103722:                            @ CODE XREF: sub_8103518+1A2j
                              ROM:08103722                                         @ sub_8103518+1C2j
                              ROM:08103722                 MOVS    R0, #1
                              ROM:08103724                 ADD     R8, R0
                              ROM:08103726                 MOVS    R0, #0x19A
                              ROM:0810372A                 CMP     R8, R0
                              ROM:0810372C                 BLE     loc_81036A4
                              ROM:0810372E                 B       loc_8103906
                              ROM:0810372E @ ---------------------------------------------------------------------------
                              ROM:08103730 off_8103730:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+188r
                              ROM:08103734 off_8103734:    .long Pokedex_Type_Mode @ DATA XREF: sub_8103518:loc_81036A4r
                              ROM:08103738 off_8103738:    .long pokemon_names     @ DATA XREF: sub_8103518+1DEr
                              I might as well post these as well.
                              Code:
                              ROM:08103856 loc_8103856:                            @ CODE XREF: sub_8103518+2D6j
                              ROM:08103856                                         @ sub_8103518+2F6j
                              ROM:08103856                 MOVS    R0, #1
                              ROM:08103858                 ADD     R8, R0
                              ROM:0810385A                 LDR     R0, =0x181
                              ROM:0810385C                 CMP     R8, R0
                              ROM:0810385E                 BLE     loc_81037E0
                              ROM:08103860                 B       loc_8103906
                              ROM:08103860 @ ---------------------------------------------------------------------------
                              ROM:08103862                 .align 4
                              ROM:08103864 off_8103864:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+2C4r
                              ROM:08103868 off_8103868:    .long Pokedex_Smallest_Mode
                              ROM:08103868                                         @ DATA XREF: sub_8103518:loc_81037E0r
                              ROM:0810386C off_810386C:    .long pokemon_names     @ DATA XREF: sub_8103518+312r
                              ROM:08103870 dword_8103870:  .long 0x181             @ DATA XREF: sub_8103518+342r
                              Code:
                              ROM:081037BA loc_81037BA:                            @ CODE XREF: sub_8103518+23Aj
                              ROM:081037BA                                         @ sub_8103518+25Aj
                              ROM:081037BA                 MOVS    R0, #1
                              ROM:081037BC                 ADD     R8, R0
                              ROM:081037BE                 LDR     R0, =0x181
                              ROM:081037C0                 CMP     R8, R0
                              ROM:081037C2                 BLE     loc_8103744
                              ROM:081037C4                 B       loc_8103906
                              ROM:081037C4 @ ---------------------------------------------------------------------------
                              ROM:081037C6                 .align 4
                              ROM:081037C8 off_81037C8:    .long pokedex_state_maybe @ DATA XREF: sub_8103518+228r
                              ROM:081037CC off_81037CC:    .long Pokedex_Lightest_Mode
                              ROM:081037CC                                         @ DATA XREF: sub_8103518:loc_8103744r
                              ROM:081037D0 off_81037D0:    .long pokemon_names     @ DATA XREF: sub_8103518+276r
                              ROM:081037D4 dword_81037D4:  .long 0x181             @ DATA XREF: sub_8103518+2A6r
                              So have you found the offsets of these limiters?
                              Reply With Quote
                                #846    
                              Old May 26th, 2016 (10:29 AM).
                              azurile13 azurile13 is offline
                                 
                                Join Date: Mar 2015
                                Posts: 420
                                Quote:
                                Originally Posted by Epsilon View Post
                                So have you found the offsets of these limiters?
                                The cmp r8, r0.

                                r0 has the limit in all four screenshots.
                                Reply With Quote
                                  #847    
                                Old May 26th, 2016 (10:48 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 azurile13 View Post
                                The cmp r8, r0.

                                r0 has the limit in all four screenshots.
                                You keep beating me to the answer in each thread >.>

                                Anyway, the routines are right there, but they aren't actually "MOV r0, #0x19A" because 0x19A is over a byte. You wouldn't see that in the rom, you'd see an lsl operation that basically doubles a value to get 0x19A.
                                It'd look like:
                                MOV r0, #0xCD
                                LSL r0, r0, #1
                                __________________
                                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
                                  #848    
                                Old May 28th, 2016 (12:51 PM).
                                ~SAGE's Avatar
                                ~SAGE ~SAGE is offline
                                Spanish Rom Hacker
                                   
                                  Join Date: Jul 2014
                                  Location: Italia
                                  Age: 23
                                  Gender: Male
                                  Nature: Lonely
                                  Posts: 35
                                  Quote:
                                  Originally Posted by MrDollSteak View Post
                                  I've just got some very quick offsets for Pokedex hacking.

                                  I'm not sure whether it's already been posted, I don't think so, as I had to discover these on my own.

                                  I've found 2 limiters for the Kantodex that are quite useful, which when combined with Jambo51's already posted offsets, can allow for the Kantodex to act as a national dex.

                                  Even though Jambo already found the limiter for the Kantodex itself, it would still not display the correct seen/caught numbers as they were still limited to 150 as were the habitats.

                                  By changing the number 96 at the offset: 104BF2
                                  You can extend the limit to the seen/caught text. Eg. changing 96 to FA will allow for a max of 250 seen/caught Pokemon.

                                  By changing the number 97 at the offset: 106828
                                  You can extend the number of Pokemon that will be correctly featured in the habitat pages. Eg. changing 97 to FA will allow for the first 250 Pokemon in your pokedex to be displayed in the habitat pages before receiving the national dex.

                                  This can be helpful as it stops people from having to give the national dex at the start of the game.

                                  I'll just repost Jambo's limiters from his thread here

                                  0x10352C - mov r1, #0x97
                                  0x1035F6 - cmp r0, #0x96

                                  Just change those 2 bytes at that offset to the number of Pokemon you want in.



                                  I have a question
                                  I had expanded the pokedex of my rom
                                  but i can't reach to view the habitat's pages correctly

                                  what i should to do?
                                  __________________

                                  El inteligente no es aquel que lo sabe todo

                                  Si no aquel que sabe utilizar lo poco que sabe
                                  Reply With Quote
                                    #849    
                                  Old June 1st, 2016 (1:27 PM). Edited July 14th, 2017 by Sagiri.
                                  Sagiri's Avatar
                                  Sagiri Sagiri is offline
                                     
                                    Join Date: Mar 2007
                                    Posts: 741
                                    My other post was getting kind of long, so I'm putting this here instead of adding to it again.

                                    Disable Trade Restrictions [EM]

                                    Emerald has the same trade restrictions as FR.
                                    • You can't trade or be traded an egg (even of a Hoenn Pokemon)
                                    • You can't trade or be traded a Pokemon not in the Hoenn Dex (even from another RSE)
                                    • You can't trade with FRLG
                                    All three of these are unlocked by enabling the National Dex. However, if you want to disable those restrictions without giving out the National Dex:

                                    Spoiler:
                                    Code:
                                    .text
                                    .align 2
                                    .thumb
                                    .thumb_func
                                    
                                    @ foreign Pokemon / eggs
                                    .org 0x009684
                                    nop
                                    mov r0, #1
                                    
                                    @ FRLG trading
                                    .org 0x00968C
                                    nop
                                    mov r0, #1
                                    
                                    @ foreign Pokemon / eggs
                                    .org 0x08079138
                                    nop
                                    mov r0, #1
                                    
                                    @ foreign Pokemon / eggs
                                    .org 0x0807A62E
                                    nop
                                    mov r0, #1


                                    Constant Base Power For Hidden Power [EM]

                                    Just null out the relevant strh.

                                    Code:
                                    0x080544D0: C0 46
                                    Just as in Fire Red, the move data table lists HP's base power as 0x01 (that's so the game displays hyphens for the power). To fix this, just change the recorded base power in the table.

                                    Code:
                                    move_data + 0xB1D: 3C
                                    This will change it to a base power of 60. Unless you've moved it, Emerald's move data table is at 0x0831C898.
                                    Reply With Quote
                                      #850    
                                    Old June 4th, 2016 (6:45 AM).
                                    Telinc1's Avatar
                                    Telinc1 Telinc1 is offline
                                    Weirdo Extraordinaire
                                       
                                      Join Date: Jun 2013
                                      Location: Sofia, Bulgaria
                                      Gender: Male
                                      Nature: Bold
                                      Posts: 167
                                      NOPing out the bl at 0x080BD614 (bl sub_8055F48) will disable the bicycle music (in layman terms, put C0 46 C0 46 at BD614).
                                      A bl to the same location (sub_8055F48) also exists at 0x080CA650, which is part of sp157_activate_bike. I haven't tested nuking that, though.
                                      __________________

                                      Check out my hacks by clicking on the userbar!
                                      Check out my new website (this link now works!)!
                                      Reply With Quote
                                      Reply

                                      Quick Reply

                                      Join the conversation!

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

                                      Create a PokéCommunity Account

                                      Sponsored Links
                                      Thread Tools

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

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

                                      Forum Jump


                                      All times are GMT -8. The time now is 11:49 AM.