• 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

AkameTheBulbasaur

Akame Marukawa of Iyotono
409
Posts
10
Years
  • The table that determines which stats are boosted/nerfed by different natures is at 0x252B48 in FireRed and 0x31E818 in Emerald.

    Each entry is five bytes long (one for each stat excluding HP). If the byte is 0x1 if it's boosted, 0xFF if it's nerfed and 0x0 if it is unaffected. The first entry is all zeroes (Hardy nature, which is neutral). The second entry is 00 01 FF 00 00, which boosts Attack and lowers Defence (Lonely nature).

    The table that contains the names of all the natures is at 0x463E60 in FireRed and at 0x61CB50 in Emerald.
     
    Last edited:

    __fred__40

    fred
    277
    Posts
    4
    Years
  • In Fire Red,
    at 416738 change
    BC CF D3 FF CD BF C6 C6 FF

    to

    BC E9 ED FF CD D9 E0 E0 FF

    to decapitalise the "BUY" and "SELL" text for the pokemart menu,or if you are using HMA then just go to the offset and you'll be able to change the text manually
     

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • To update Synchronise so that the opponent becomes Badly Poisoned when they Badly Poison you, put 06 instead of 02 at 0x1B404 and at 0x1B48A.

    This changes MOV r0, #0x2 to MOV r0, #0x6. Therefore instead of changing the Bad Poison effect to the regular Poison effect, it replaces the Bad Poison effect with the Bad Poison effect (essentially leaving it the way it was before).
     
    Last edited:
    15
    Posts
    3
    Years
  • Can someone help guide me to a tutorial or create a tutorial where I may achieve something closely related to this pseudocode? I know how to implement it on Ruby, but I want to implement it on ASM in Emerald and Fire Red.

    Pseudocode:
    It applies to all encounters and Pokemon trainer battles both NPC and Gym
    1. Check party pokemon's levels.

    2. Select the highest level pokemon in your team.

    3. Generate a pokemon wild or trainer based on the highest level pokemon possed. The limit would be two levels above or below. For example: You have a level 15 Mudkip. The Pokemon generated would range from level 13 to 17.

    4. Check how many badges you posses. Depending on the badge, the trainer will have a different set of people whose level match according to step 3.

    5. If the trainer possesses a Pokemon which has a level at or exceeding its evolutionary level, evolve the pokemon. For example: A grunt has a level 25 Zubat and Ratatta. Make the game have them become a Golbat and Raticate because they exceed their evolution levels of 22 and 20.

    Optional: With number 5 in place, is there a way I can have the trainer analyze your Pokemon party's type and then randomly pick a non legendary Pokemon from a provided list of pokemon of that type to own?
    Or can I set the trainer to pick a Pokemon from a type group randomly?
    Example:
    My team: Spinarak 16 & Mudkip 15
    Bug/Poison, Ground/Water
    Battler generates: Drowzee 15 and Paras 16
    Second Example:
    Bug catcher: generates bug types from level 14 to 18 (due to Spinarak's level) from only bug type pokemon.
    So one run he could have a Butterfree 18 and Dustox 15 but another run a Pinsir 16 and Beedrill 17.



    I am looking to make an open world game with replayability.
     

    Dreamaker

    Banned
    97
    Posts
    14
    Years
  • A quick edit to the IV System that will basically automatically set all wild Pokemon IVs to 30 or 31. I originally found it based on some original findings by azurile13 to set all IVs to 31 only.

    EDIT: Wait it isn't quite that simple unfortunately, will need branching to handle probably.

    Fire Red
    Spoiler:


    Emerald
    Spoiler:

    Amazing
     

    Dreamaker

    Banned
    97
    Posts
    14
    Years
  • Would it be possible to exchange the effect of Metal Powder for Quick Powder?

    Metal Powder:
    If held by a Ditto, doubles its Defense stat. It does not work when Ditto is transformed.

    Quick Powder:
    If held by a Ditto, doubles its Speed stat. It does not work when Ditto is transformed.

    In short, would anyone know which Byte to change Defense to Speed? Or even ASM codes for a new item?
     
    Last edited:

    AkameTheBulbasaur

    Akame Marukawa of Iyotono
    409
    Posts
    10
    Years
  • To make Wild Pokemon use AI scripts, (and therefore be as smart as a Trainer's Pokemon), put 97 21 at 0x385C0 and 24 20 at 0x106658.

    Explanation:
    The game has different Battle Types that are stored 0x02022B4C. For example, 0x1 is a Double Battle, 0x8 is a Trainer Battle, 0x4 is a Wild Encounter, etc. It works as a bitfield, so in a Double Trainer Battle, the Battle Type is 0xD (0x8 + 0x4 + 0x1).

    As far as I can tell, 0x20 is unused, or at the very least it doesn't seem to affect Wild Battles much when set, so I changed the "mov r0, #0x4" at 0x10658 (where the game sets the Wild Encounter bit) to "mov r0, #0x24" so that it sets Battle Type 0x20 as well.

    Later on, the game will AND the current Battle Type with 0x498 and if it's not equal to zero, it will eventually do the whole AI thing. 0x498 includes Battle Types 0x8 (Trainer Battle), 0x10 (Oak Tutorial Battle), 0x80 (Safari Zone Battle - uses AI Scripts to run away), and 0x400 (Old Man Catching Tutorial).

    We changed "mov r1, #0x93" to "mov r1, #0x97". After moving 0x93 to r1, it bit-shifts-left by three (aka multiplies it by 8). By changing it to 0x97, it ensures that Battle Type 0x20 is included in the number it performs the AND operation with.

    I tested this with SetWildBattle. I haven't fully tested it with random encounters but they should work the same.
     
    990
    Posts
    4
    Years
  • [FireRed]
    Not sure whether this has been posted or not, but the position of the PokéBall in Oak's introduction has two coordinates. The X and Y values are at 0x12FA50 and 0x12FA52 respectively. They're each one byte.

    -Originally found by the salvation phoenix on Discord.
     
    34
    Posts
    3
    Years
  • Remove flag check for running [FR]

    Code:
    0x0805BA3A: 01 20 C0 46

    Combine this with the Run Inside Buildings hack, and you'll get the same running mechanics as Gen VI and Gen VII (as in, run anywhere and start out with the ability to run).

    I've tried this but withou success:

    Quick Research & Development Thread


    I also tried zeroing those values (saw another post where it says that).

    When I start a new game I can't run, neither inside my house or outdoors. What am I doing wrong?

    Thanks!
     
    788
    Posts
    17
    Years
    • Seen May 8, 2024
    I've tried this but withou success:

    Quick Research & Development Thread


    I also tried zeroing those values (saw another post where it says that).

    When I start a new game I can't run, neither inside my house or outdoors. What am I doing wrong?

    Thanks!

    It works on an unmodified ROM, so some change you've added is to blame. My guess would be CFRU, which (based on a search of the repo) also modifies the functions responsible for running and has an equivalent FLAG_RUNNING_ENABLED build-time option.
     
    34
    Posts
    3
    Years
  • It works on an unmodified ROM, so some change you've added is to blame. My guess would be CFRU, which (based on a search of the repo) also modifies the functions responsible for running and has an equivalent FLAG_RUNNING_ENABLED build-time option.

    Thanks for answering, I'll see if I can work around this.
     
    34
    Posts
    3
    Years
  • nop the 8 bytes at 080484 to make trainerbattle 0x9 not have oak's text
    found by knizz

    Hi, can I have a little more info about this hex editing?

    I'm interested in turning off Oak's text during the first rival battle. I've zeroed this offset:

    Code:
    00080480     00 29 03 D0 00 00 00 00 00 00 00 00 05 49 06 48

    But Oak's text still appears. Any insight?

    Ok, solved. I'm using CFRU and had to comment a line before installing.
     
    Last edited:
    21
    Posts
    3
    Years
    • Seen Dec 29, 2020
    I'm having a problem with this and I'm unsure of how to fix it. Here's the relevant battle script, and the pointer I entered into it.

    Quick Research & Development Thread


    I've also tried formatting the pointer as 60C0EC08, 08ECC061, and 08ECC060. No changes, except for more oddities when I had formatted the pointers differently.

    1. If the thrown Pokeball fails, my game freezes.
    2. When the Pokemon is caught, Torchic does gain experience, but after the Pokedex information screen, I'm taken to a party select window, with the battle victory music still playing in the background. Torchic is the only Pokemon in the party, and I am unable to exit the window.

    At xECC060, I've pasted the second string of bytes exactly as you've posted:

    Quick Research & Development Thread


    I have also tried omitting the bytes at x3DE7C, with no change.

    If anyone could help me figure out what I have done wrong, I'd really appreciate it.

    I don't understand what to put in the xx xx xx, and does repoint is the same as replace?
     
    990
    Posts
    4
    Years
  • The main post has been updated for easier navigation.
    If any link is dead, goes to the wrong URL or is in the wrong section, please contact a Fan Games moderator to fix it.
     
    Last edited:

    Lunos

    Random Uruguayan User
    3,114
    Posts
    15
    Years
  • To anyone who is interested, callasm 0x09FC91 to name yourself in overworld.
    FireRed Only.

    ~Sonic1
    Was this added to the main post? I couldn't find it myself by Ctrl+F'ing words like "player's name", "player's" or "overworld".
    It should totally be added as "Setting the Player's name" in the FireRed section, imo.
     
    990
    Posts
    4
    Years
  • Was this added to the main post? I couldn't find it myself by Ctrl+F'ing words like "player's name", "player's" or "overworld".
    It should totally be added as "Setting the Player's name" in the FireRed section, imo.

    It already is present. Under Scripting Research > FireRed > Naming the player from the over world.
     

    Dreamaker

    Banned
    97
    Posts
    14
    Years
  • I need a little help with a hack for Fire Red.

    When I change these values, wild Pokémon will always be IVs 0.

    Offset: 03DCD0
    Original Values:
    07 F0 FA F8
    Modified Values:
    00 20 1E E0

    Offset: 03DD1A
    Original Values:
    07 F0 D5 F8
    Modified Values:
    00 20 1E E0

    Remembering that the original values is between 0 ~ 31.

    I would like them to be:
    0 ~ 1
    or
    30 ~ 31

    👍
     
    Last edited:
    39
    Posts
    5
    Years
  • 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.

    The limiter is at 0x10D1BC. The one you introduced does not extend the table.
     
    Back
    Top