• 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

  • 5,256
    Posts
    16
    Years
    Just a reminder that this thread is not for asking questions, unless it is directly asking a question about a previous post. If you want help, use the Beginner's Lounge and its relevant stickied threads. If you have a small amount of (previously undocumented in this thread or forum) new research and want people to help with it, then that is probably the only acceptable case to ask questions here. Please keep this in mind!
     

    PurpleOrange

    still don't know what I'm doing
  • 367
    Posts
    10
    Years
    some useful RAM stuff

    emerald RAM offsets for map bank, map number, and x and y coordinates
    0x02025A0C stores the current player map bank
    0x02025A0D stores the current player map number
    0x02025A08 stores the player's x coordinate
    0x02025A0A stores the player's y coordinate

    roaming legendary RAM offsets for their current location
    RS: 0x02079303
    FRLG: 0x0203F3AE
    E: 0x0207BC86
     
    Last edited:

    Le pug

    Creator of Pokémon: Discovery / Fat Kid
  • 870
    Posts
    10
    Years
    some useful RAM stuff

    emerald RAM offsets for map bank, map number, and x and y coordinates
    0x02025A0C stores the current player map bank
    0x02025A0D stores the current player map number
    0x02025A08 stores the player's x coordinate
    0x02025A0A stores the player's y coordinate

    roaming legendary RAM offsets for their current location
    RS: 0x02079303
    FRLG: 0x0203F3AE
    E: 0x0207BC86

    good find on the legendary ram offsets but the previous map offsets have already been found and go hand in hand with the intro enhancement patch made by diegoisawesome found here: click
     
  • 275
    Posts
    9
    Years
    I know it's nothing hard, nothing WOOOOW, but that's something and my first alone-research-area collaboration. This is for Fire Red:

    INFINITE SAFARI TIME

    Simply go to 0xA0F1A and replace the 01 38 there, for 00 38.

    The game will still give you 600 steps, but it won't decrease, so you will be there until you retire or run out of Safari Balls.
    When I figure out how to hide the step count in the start menu, I'll edit this post.
     
    Last edited:
  • 275
    Posts
    9
    Years
    Well, this is what I did, while learning how to do stuff like debugging and doing new mechanics changes in the game.
    Thanks to Touched-sensei, who helped me through the entire process. Thanks to daniilS and kleenexfeu, who also helped in the very end. This is for Fire Red:

    REUSABLE POKÉBALLS

    - First, go to 0xA1E30. Change 01 21 to 00 21 (with this, Pokéballs won't be deleted when you select them in your bag);
    - Now, find some free space and insert this routine there:
    Spoiler:
    Here's a compiled version:
    Spoiler:

    This is the code that deletes the Pokéball;
    - Finally, go to 0x2D924 and paste write this "00 48 00 47 XX XX XX 08" there. It's a hook to the routine you just inserted. Change the XX XX XX for the pointer to the offset you placed the above routine. Remember to +1 the offset before changing it to a pointer.

    With this hack, you won't spend Pokéballs if you don't capture a wild Pokémon. I wanted to do it inspired in the anime.
    Again, simple, some people will think it's a broken functionality, but it will do well for that time when you encounter a shiny Pokémon with that one single Pokéball in your bag. =P
    Thanks again, everybody. Hope it's helpful.

    EDIT:
    Thanks to mbcn10ww, I fixed this hack.
    Unfortunately, I couldn't test it on the Safari area, as it's saying other saves are not compatible (but I don't know why, since I might have tried to use saves of games with other different hacks. It's been more than a semester I don't even see my games).
    Nevertheless, I tested it on regular places and areas, and it is still working. From the previous hack, I set a new condition before removing item from the bag.
    I call the removing routine anyway. The difference is that I pass on a 0 value as the number of items to be deleted if it's not a pokeball.
    The "cmp r0, #0xC" compares the last item used with the last pokeball index (Premier Ball). If it is lower or equal to that, it is a pokeball. Else, r1 receives 0 and no item should be deleted.
    Thanks for the heads up, mbcn10ww!
    If anyone can test the Safari part, jumping straight there, or anything, I would appreciate!
     
    Last edited:
  • 1,344
    Posts
    14
    Years
    • Seen Dec 10, 2021

    Player Names in Firered

    At 0x46308C, there is a table which lists all the generated player names for when you leave the name entry screen blank. There are 19 entries for each gender, and the table is simply made up of pointers to strings for each possible name.

    Spoiler:

    The name strings are all located at 0x1C574F if you wish to edit them without repointing. Note that there is also a string for LEAF which is not used in Firered.
     

    DoesntKnowHowToPlay

    Tiny Umbrella with Lots and Lots of Good
  • 265
    Posts
    12
    Years
    • Seen Feb 24, 2024
    The roamer in FR is released into the world by special 0x129, at x141D9C.

    Its species is chosen from the bytes at x141caa, x141cb4, or x141cb8 (xF3, xF4, xF5 respectively) based on your starter choice (var x4013).

    Its level is dependent on the bytes at x141cc8 and x141cdc. I advise changing both to the same value; if only the former is changed it gets generated as a level 50 mon with incorrect HP.

    The ability to track the roamer in the dex is specific to Raikou, Entei, and Suicune. There is a table at x4642F4 that maps values of var x4013 to dex entries that should instead check the roamer. To make the dex acknowledge one roamer and disregard starter choice, change the first value in the table to your roamer's ID, and put four 00s at x13cb80.
     

    Dionen

    deprived of sleep
  • 295
    Posts
    12
    Years
    Hi! If you are using a 32x32px overworld for the PALYER(NDS style) you will notice that it will look weird when you choose your name.

    Quick Research & Development Thread


    To fix it just go to the direction 083A3BC0 and put 18 instead 10
    It makes the PLAYER and Gary overworld look like a 32x32px.

    Quick Research & Development Thread


    Thanks and merits to daniilS, he literally made everything!

    Doing this will also fix the player's male reflection! :)
     
    Last edited:
  • 89
    Posts
    10
    Years
    Cap individual EVs to 252 instead of 255 Like in Gen VI
    Set 080439FC and 08043A02 to 0xFC (FireRed)
    To do the same in Emerald, place 0xFC at 0x6DC48 and 0x6DC4E.
    To elaborate for the people who don't understand what this is about, it is setting the limiters for the maximum number of EVs a Pokémon can have per stat. Because only four EVs translate into a single stat point, having 255 EVs per stat is pointless, as the last three EVs do not make any difference.
     

    C me

    Creator of Pokemon League Of Legends
  • 681
    Posts
    10
    Years
    • Seen Apr 9, 2021
    Emerald move effects command table 0x31BD10.
     
    Last edited:
  • 218
    Posts
    10
    Years
    • Seen Nov 12, 2021
    We (almost) all know how BSP is useful, though it can't decompile every battlescript in the game because all the commands haven't been implemented.

    To change that, I documented on what kind of argument each commands take, I don't know yet what they all do, but we can at least decompile every script. There's still few command undocumented, I'll update the post as I find what argument they take, and what the other commands do.

    UPDATE: Now we know the arguments taken by every single command. The only issue is that BSP doesn't prevent infinite loop.
    Other than that, you can decompile every single Battlescript in the game.

    The commands :
    Spoiler:
     
    Last edited:

    Blah

    Free supporter
  • 1,924
    Posts
    11
    Years
    Hey guys, I just wanted to post a warning about a PKSV bug which occurs quite commonly when testing out routines with callasm (perhaps it happens in XSE too, I haven't tried).

    Steps to produce bug:
    Write a routine and insert it into ROM
    Write Script with callasm which uses said routine, compile it
    Close PKSV

    - Normally around here, I give my routines a game test -

    Open a new PKSV and decompile the script
    Make modifications to the routine
    Make modification to the script and compile

    Result:
    Modification to the routine are undone. To avoid the bug you need to always reinsert the routine after compiling a script which uses the routine.

    Something more to add to this. PKSV can't compile money commands, except for showmoney. The coins seem to work, as well as decompiling scripts with these money commands work. However, DO NOT recompile scripts which have money commands. They will most likely break.

    In my eyes, with this bug and the ASM bug, PKSV has stopped becoming a viable script editor. XSE is bad too, but PKSV is currently worse. I recommend Red Alien atm. Of course, if you use PKSV for non-ASM projects and for non-money scripts it's still usable.
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
  • 409
    Posts
    11
    Years
    Something more to add to this. PKSV can't compile money commands, except for showmoney. The coins seem to work, as well as decompiling scripts with these money commands work. However, DO NOT recompile scripts which have money commands. They will most likely break.

    Adding on to the add-on, money commands CAN work, but you have to use the #raw format instead of the word format for them. I've gotten almost all of them to work using #raw 0x[number] except for "checkmoney" which I haven't gotten to work.
     

    Blah

    Free supporter
  • 1,924
    Posts
    11
    Years
    Quick Research & Development Thread
    Quick Research & Development Thread


    XY added a feature that gives experience points when you catch pokemon. To duplicate this in FR, do the following:

    Repoint the battle script at x1d9a42 to point to this:

    2A 00 68 3D 02 02 05 00 50 9A 1D 08 60 0B 10 0B 01 F1 XX XX XX XX 2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 10 0F 01 3A 2E 82 3E 02 02 00 F2 10 0D 01 3A 2E 82 3E 02 02 00 F3 80 9A 1D 08 F0 13 54 E6 3F 08 12 40 00 28 81 9A 1D 08

    where XX XX XX XX is a pointer to:

    2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 10 0D 01 3A 2E 82 3E 02 02 00 F3 80 9A 1D 08 F0 13 54 E6 3F 08 12 40 00 28 81 9A 1D 08

    To let the player's mons evolve from this experience, replace the bytes at x15A68 with A1 5A 01 08.

    Edit: Changed the scripts, I assumed they cut off earlier than they actually did. Should work with full party+no nickname now.

    I combined my work with the one from Doesnt. As a result, there are less bytes to write into freespace.
    So, here's what to do to give exp points when you catch a pokemon:
    1-The bytes to put into freespace: 2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 F1 63 9A 1D 08 28 58 9A 1D 08

    2-The bytes to replace at 1D9A53: 41 XX XX XX 08 (XX = pointer to the code above).

    3-Just like Doesnt wrote earlier, replace the bytes at 15A68 with A1 5A 01 08.

    It should work without problems, as I tested it before posting.

    Thanks to Doesnt for telling me how to fix a music issue.

    Hi, I think both of these solutions ONLY work if the Pokemon is not in the Pokedex already. Was that the intention? If not can someone confirm they've made it work for a Pokemon they've already caught and are in the dex?


    EDIT:
    Well, even if it is just me (which it isn't going to be looking at this code), it's pretty big of an issue in my eyes. I did a little bit of digging around, and figured out the source. I thought I'd post the fix here.

    Replace the bytes at 0x2D990 with:
    00 49 08 47 C7 D9 02 08
     
    Last edited:

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
  • 409
    Posts
    11
    Years
    Hi, I think both of these solutions ONLY work if the Pokemon is not in the Pokedex already. Was that the intention? If not can someone confirm they've made it work for a Pokemon they've already caught and are in the dex?

    It works just fine for me when I catch Pokemon I already caught before. I don't know if other people have had the same problem. I'd keep the fix up just in case other people had the same problem as you. Maybe I just got lucky.
     

    Blah

    Free supporter
  • 1,924
    Posts
    11
    Years
    It works just fine for me when I catch Pokemon I already caught before. I don't know if other people have had the same problem. I'd keep the fix up just in case other people had the same problem as you. Maybe I just got lucky.

    I doubt it's luck. I'm using MrDS's ROM base and I'm not using the national dex. I don't think it has anything to do with my ASM edits or the DS ROM base. I'm thinking it might be a problem with the normal ROM base. If it's just me, then w/e :P

    EDIT: Boys and girls. I did a +1 by accident and caused the bug. If you're having the same issue, don't +1 any of the offsets. This never happened btw <3
     
    Last edited:
  • 232
    Posts
    13
    Years
    • Seen Sep 10, 2019
    I believe I've found an interesting bug with this. Under normal circumstances it works fine: you battle, catch, gain xp, display Pokedex entry:
    Quick Research & Development Thread


    However if you level up from that xp, it causes the Pokedex to go wonky:
    Quick Research & Development Thread
    Quick Research & Development Thread


    EDIT: Found another small graphical bug, too. Learning a move on level-up after successfully catching a Pokemon will cause the wild Poke's sprite to re-appear after exiting the move learning screen. Unimportant in the long run, as the battle ends right after.
    Does anybody know how to not make the captured wild Pokemon's sprite reappear after exiting the move-learning screen? Perhaps if one were to remove the wild pokemon's HUD from the battle screen after catching it? HUD of an enemy Pokemon gets removed when it is defeated..
     

    Deokishisu

    Mr. Magius
  • 991
    Posts
    18
    Years
    This post is to make public some research I did trying to auto-decrypt the things that are encrypted with the security key and disable the DMA in Emerald based on the information in this post on doing the same to Firered. I believe I've also found where to disable the Pokemon Substructure Permutations as well, so that they will always be in the right order instead of shuffled around.

    Before anything, I'd like to thank FBI, Touched, GoGo, and kleenexfeu for showing me how to find what I was looking for (FBI), actually finding the security key routine (GoGo), showing me how to verify what I did was working (Touched), and just talking me through some stuff and letting me bounce things off of them (basically everyone, but mostly kleenexfeu). Thanks guys! And of course, thanks to Sagiri for the original research.

    To Automatically Decrypt Anything Encrypted with the Security Key in Emerald:
    Head to 076CD6 in your hex editor. Change the 24 08 that is there to 00 24. Upon the next map refresh, everything encrypted by the security key will be decrypted and remain that way. Your money, for example, will now sit unencrypted at 02025E90.

    To Disable the DMA in Emerald:
    Head to 076BEE in your hex editor. Change the 04 40 that is there to 00 24. Upon the next map refresh, your DMA protected information will be moved to a static location and remain there permanently.

    To Disable the Pokemon Substructure Permutations in Emerald:
    Head to 076BEC in your hex editor. Change the 7C that is there to 00.

    Incidentally, to disable the substructure permutations in Firered, head to 04C062 and change that 7C to 00 as well. Credits to Knizz's Firered.idb for that one, I'm posting it here because I haven't seen it anywhere other than the idb.

    The New Static Locations in RAM:
    All of these can be edited easily through the memory viewer now, none are encrypted or dynamically moved.
    Spoiler:
     
    Last edited:
  • 199
    Posts
    12
    Years
    • Seen Jul 18, 2016
    Been digging into the "easy-chat system" for Emerald and noting down what bytes make what word(s) and stuff like that. List is nowhere near done. Nor are they in any order.

    They are mostly used in the Battle Frontier/Tents and Trainers Hill too so if you look up a trainers name from those places in a hex editor you could find the intro/win/lose quotes (12 bytes each, should be just after trainer name) and edit them if you really wanted to.
    Not really useful but whatever.

    Spoiler:
     
    Last edited:
    Back
    Top