• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Quick Research & Development Thread

76
Posts
9
Years
  • Option presets

    I don't know if this has already been posted before but I'll share it anyway.

    Something that has always annoyed me about the games were the presets in the option menu. Every time I start a new game, the first thing I'm doing is change the options. So I did a little research on them and found out how you can change the preset values.

    Write "XX 20" at offset 0x5496C, where XX = [text speed] + [frame] * 8
    Text speed: 0 = slow, 1 = mid, 2 = fast
    Frame: 0 = type 1, 1 = type 2, etc.

    Write "XX 20" at offset 0x5499C, where XX = [sound] + [battle style] * 2 + [battle scene] * 4
    Sound: 0 = mono, 1 = stereo
    Battle style: 0 = shift, 1 = set
    Battle scene: 0 = on, 1 = off

    Write "XX" at offset 0x549A2, where XX = [button mode]
    Button mode: 0 = help, 1 = LR, 2 = L=A

    These offsets work for both FR and LG.

    Edit: Here are the offsets for Emerald:
    84354: XX 20 for text speed and frame
    84378: XX 20 for sound, battle style and battle scene
    84384: XX 20 D0 74 for button mode
    The XX values are the same as above.
     
    Last edited:

    Shiny Quagsire

    I'm Still Alive, Elsewhere
    697
    Posts
    14
    Years
  • OK, happy fun time again. So over on #GoGo Le Pug was curious as to how to get rid of Spinda's spots. Turns out the fix was easy:

    So in Fire Red one routine actively handle's doing Spinda's spots, located at 08043458. This routine does a few checks: First if it's Spinda, then it goes through each bit of the PID and extract info from that and does its thing on the sprite, adding 4 to a certain range of colors. To get rid of the Spinda check, simply write E0 to 08043475 for Fire Red, or 0806D681 for Emerald. Likewise, if you wanted to make every Pokemon have Spinda spots, just write 00 00 to 08043474 (FR) or 0806D680 (EM). Spinda's spots are located at 0825265C and 0825265E, interlaced I believe with two bytes for the smaller two dot designs and two bytes for the larger ones (maybe, I haven't fully looked into it), hence the 2 bytes difference between the two offsets. If anyone is curious on the actual dot placement stuff this is a nice read. Also gives you the plain dot designs.
     

    PurpleOrange

    still don't know what I'm doing
    367
    Posts
    10
    Years
  • As sonic1 said earlier in this thread, the offset for the table that determines which pokemon are banned in the battle frontier in emerald is at x611C9A. there are 3 pointers to this table.

    the first pointer is at x1A3FCC, this seems to be used to see if you have enough non-banned pokemon in your party.

    the second pointer is at x1A418C, this seems to be used in the script that tells you which pokemon are banned

    the third pointer is at x1B8654, this seems to be used to see which pokemon are actually not able to enter

    so to add more just repoint the table at x611C9A, expand it (making sure it ends with FF FF) and put the pointer to the new table in reverse hex at the three offsets
     
    Last edited:

    El Diabeetus

    Amateur Voice Actor / ROM Editor ('Hacker')
    1,064
    Posts
    17
    Years
    • Age 30
    • Seen Jun 10, 2020
    I know some amount of page back, the help system could be removed but you needed to mess with the titlescreen. Is there a way to remove it without messing with the titlescreen function?
     

    GoGoJJTech

    (☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
    2,475
    Posts
    11
    Years
  • I know some amount of page back, the help system could be removed but you needed to mess with the titlescreen. Is there a way to remove it without messing with the titlescreen function?

    *Changed the bytes at 0x13B8C2 to 1D E0 to remove the help system

    - From the PRPB log
     

    El Diabeetus

    Amateur Voice Actor / ROM Editor ('Hacker')
    1,064
    Posts
    17
    Years
    • Age 30
    • Seen Jun 10, 2020
    *Changed the bytes at 0x13B8C2 to 1D E0 to remove the help system

    - From the PRPB log
    Thank you Gogo! The help system is probably one of the most unneeded things to come out of FR/LG, next to the Teachy TV.
     
    10,078
    Posts
    15
    Years
    • Age 32
    • UK
    • Seen Oct 17, 2023
    To anyone who is interested, callasm 0x09FC91 to name yourself in overworld.
    FireRed Only.

    ~Sonic1

    (Quoting super old post, woo).

    When using this the start menu seems to pop up randomly at the end, which glitches out the script a bit (it will continue to run, but yeah... not the best).

    Any ideas why? Or an alternative? ):


    // Tested on another ROM incase it was compatibility with other bits and pieces - on a near-blank FR it does the same.
     
    Last edited:

    Chronosplit

    I play for keeps!
    492
    Posts
    13
    Years
    • Seen yesterday
    By nulling out the function call at 0805BA3A, you can remove the flag check for running shoes. So removing it is as simple as writing 00 00 00 00 over the bytes there!
    Would anyone happen to know where this is for Emerald, if it's possible? I've tried to search it out, and I failed.
     

    PokéMew1

    Pokémon Fuchsia
    484
    Posts
    10
    Years
  • After my post being deleted, I decided to figure it out myself. I'm not sure if this has already been documented, but the bike bell's location is at 0x06B57D8. If you want to use the bike for something else like I am, to get rid of it completely its as easy as replacing the BC with a 00 :)
     
    Last edited:

    Blah

    Free supporter
    1,924
    Posts
    11
    Years
  • Looks like there's a table of boxes and pals which are used for the FIGHT menu. The table is located at 08471E8C.

    The routine which determines which box to show during battle is at 0814FFC4. In the same routine, down at 0814FFEE there's a table switch which happens depending on the value in R4. It's used to select a specific text box style.

    The same subroutine seems be to used at places like text messages, signs, start menu, and Pokemon selection menu too.
     

    PokéMew1

    Pokémon Fuchsia
    484
    Posts
    10
    Years
  • After a while of searching, I've found the offset needed to change the palette for the head on the world map in FireRed. I've noticed a lot of hacks haven't changed this, so its 003EF27C.
    You can just go to APE with that offset and edit it to the palettes as you please. And, if anyone was wondering, the offset for the image itself in UNLZ is 188 ;)
    2ebhl3l.jpg


    Yay :)
     
    Last edited:

    Mystery Man

    Don't be like me!
    207
    Posts
    12
    Years
    • Age 28
    • Seen Aug 21, 2023
    In emerald, at the offset 0x611C9A, there's a table with 10 entries of 2 bytes (shorts), followed by an FFFF at the end of the table, which marks the pokemon restricted for entry in Battle Tower. To add or remove entries, add the pokemon number reversed in hex, and end the table with FFFF. If you want to remove all the limitations, just write FFFF to the beginning of the table (offset 611C9A).

    ~Sonic1

    For Firered, it is 0x4020C4. It determines what Pokemon are allowed through special 0xF5.
     
    Last edited:
    218
    Posts
    10
    Years
    • Seen Nov 12, 2021
    But the only place where there could be restriction is the train tower, though there is no restriction, so what it is for ?
     

    jToTheAvacola

    Banned
    18
    Posts
    9
    Years
    • Age 32
    • Seen Sep 4, 2016
    But the only place where there could be restriction is the train tower, though there is no restriction, so what it is for ?

    Is it possible that it's somehow used in connection with skipping certain pokemon when checking the pokedex completion? Its the same pokemon for both lists I think.
     

    Deokishisu

    Mr. Magius
    990
    Posts
    18
    Years
  • This is for Firered.

    The Lavender Tower Ghost palette is in a weird, compressed format. The first color of the palette is at 0xE93B19. If you open up VBA's palette viewer with the Ghost onscreen, its entry is the second row on the sprite side. By following along carefully (and remembering that VBA switches the color values; FF7F becomes 7FFF) you should be able to figure out which bytes in your hex editor are the Ghost's colors and which aren't.

    And I guess as a well known bonus the actual Ghost's image is compressed at 0xE93B38 (credit to NSE's bookmarks). The pointer to the image is at 0x0346B8, if you'd rather change the pointer to another image like I did. Just remember to compress the image you want to change it to when you insert it, as the game will crash if it isn't compressed.

    And some keywords so that anyone searching for this can find it:

    unidentified ghost palette lavender town ghost palette ghost marowak palette ghost marowak's mother palette lavender ghost palette silph scope lavander lavandar FR
     
    Last edited:

    Deokishisu

    Mr. Magius
    990
    Posts
    18
    Years
  • This is probably pretty basic but I didn't realize it until now, so I'm posting it.

    If two of the same type of event are stacked on top of each other (for example, two person events on the same tile), the player will always interact with the one with the lower event number first. Changing around the person numbers will not affect this.

    I discovered this because I had to hide an item ball on a cut tree and was fiddling around to make it work so that the player interacted with the hidden item ball before the cut tree. Making it so that the item ball had a lower event number than the cut tree worked.
     

    C me

    Creator of Pokemon League Of Legends
    681
    Posts
    10
    Years
    • Age 27
    • Seen Apr 9, 2021
    FINALLY SOLVED IT!!!!!

    To remove the need for a Pokemon to have learned surf to be able to surf in the overworld in Emerald, replace the bytes at 9C80A-9C80B to 00 00.
    (You need to change the script that Dark Sneasel found aswell but that's easy - page 22)

    Thanks to FBI agent, I could not have found them without his research on FireRed.

    Edit: This doesn't change the badge requirement, I'm using the 5th badge to activate surf anyway so I didn't have to. Check the first page of this thread for how to change the badge requirement.
     
    5,256
    Posts
    16
    Years
  • Okay, so you can control which map out of a pre-determined list of maps the Seagallop Ferry (special 0x17B) will take you to, but how would you change what map the values of the variables correspond to?

    There a list of maps and co-ordinates at 0x46AEFC:

    Code:
    [FONT="Courier New"]03 05 17 20
    20 04 08 05
    21 04 08 05
    26 00 08 05
    23 05 08 05
    24 02 08 05
    25 02 08 05
    1F 06 08 05
    03 08 15 07
    02 3B 08 05
    02 3A 08 05[/FONT]

    which can be represented as BB MM XX YY, where BB is the map bank, MM is the map number, XX is the x co-ordinate and YY is the y co-ordinate. Each set of four bytes corresponds to the value in 0x8006, so if 0x8006 is 0x0, the seagallop ferry will warp you to map 3.5 (Vermillion City) at the co-odinates (17,20). The routine at 0x08147140 controls all of this, and in it is it clear that if 0x8006 is over 0xA, it will instead warp to the first entry in the table. This means that, theoretically, one can remove or adjust this bolded section to allow for more locations for the Seagallop Ferry.

    Code:
    [FONT="Courier New"]ROM:08147140                 PUSH    {R4,LR}
    ROM:08147142                 SUB     SP, SP, #4
    ROM:08147144                 LDR     R1, =var_8006
    ROM:08147146                 LDRH    R0, [R1]
    ROM:08147148                 [B]CMP     R0, #0xA[/B]
    ROM:0814714A                 [B]BLS     loc_8147150[/B]
    ROM:0814714C                 [B]MOVS    R0, #0[/B]
    ROM:0814714E                 [B]STRH    R0, [R1][/B]
    ROM:08147150
    ROM:08147150 loc_8147150:                            @ CODE XREF: sub_8147140+Aj
    ROM:08147150                 LDRH    R4, [R1]
    ROM:08147152                 LSLS    R4, R4, #2
    ROM:08147154                 LDR     R0, =unk_846AEFC @ this is the location of the list above, so you could repoint this to have more entries
    ROM:08147156                 ADDS    R4, R4, R0
    ROM:08147158                 MOVS    R0, #0
    ROM:0814715A                 LDRSB   R0, [R4,R0]
    ROM:0814715C                 MOVS    R1, #1
    ROM:0814715E                 LDRSB   R1, [R4,R1]
    ROM:08147160                 MOVS    R2, #1
    ROM:08147162                 NEGS    R2, R2
    ROM:08147164                 MOVS    R3, #2
    ROM:08147166                 LDRSB   R3, [R4,R3]
    ROM:08147168                 LDRB    R4, [R4,#3]
    ROM:0814716A                 LSLS    R4, R4, #0x18
    ROM:0814716C                 ASRS    R4, R4, #0x18
    ROM:0814716E                 STR     R4, [SP,#0xC+var_C]
    ROM:08147170                 BL      warp0_set
    ROM:08147174                 BL      play_some_sound
    ROM:08147178                 MOVS    R0, #9          @ song_id
    ROM:0814717A                 BL      audio_play
    ROM:0814717E                 LDR     R1, =map_post_load_hook
    ROM:08147180                 LDR     R0, =(mapldr_default+1)
    ROM:08147182                 STR     R0, [R1]
    ROM:08147184                 BL      warp_in_metadata
    ROM:08147188                 LDR     R0, =(c2_temp_0805671C+1) @ func
    ROM:0814718A                 BL      set_callback2
    ROM:0814718E                 BL      player_avatar_init_params_reset
    ROM:08147192                 BL      sub_81473A0
    ROM:08147196                 LDR     R0, =dword_203F3D0
    ROM:08147198                 LDR     R0, [R0]
    ROM:0814719A                 BL      free
    ROM:0814719E                 BL      rboxes_free
    ROM:081471A2                 ADD     SP, SP, #4
    ROM:081471A4                 POP     {R4}
    ROM:081471A6                 POP     {R0}
    ROM:081471A8                 BX      R0[/FONT]
     
    Last edited:

    Deokishisu

    Mr. Magius
    990
    Posts
    18
    Years
  • So, I'm posting some research done by daniilS. The content of this whole post should be credited to him. The offsets here are for Firered.

    In order to change the xy position and the height and width of the textbox in the overworld, you just have to make some simple byte changes. Keep in mind, the positions and sizes are in tiles, so you may need to divide your needed dimensions by eight for things to line up.

    To change the x coordinate, change the byte at 0x41F42D.
    To change the y coordinate, change the byte at 0x41F42E.
    To change the width, change the byte at 0x41F42F.
    To change the height, change the byte at 0x41F430.

    Fortunately, the text itself will automatically adjust to its relative new position in the box. Here's a link to the rboxbase's code.
     
    Back
    Top