• 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.

[ASM & Hex] [Gen II] Adjusting the EXP formula in Gold/Silver/Crystal?

rusticolus

Grass/Flying
  • 36
    Posts
    16
    Years
    • Seen Jun 19, 2023
    Hi there!

    I'm trying to modify the exp gain formula in Gold/Silver/Crystal. I figure there are no tools for this, and thus requires hex editing, which I'm moderately familiar with. The issue is I don't know how to go about finding the location of the exp formula in the hex code. Any advice on where to start?
     
  • 171
    Posts
    11
    Years
    In Crystal it's at 0x50efa but I'd have to check in Gold/Silver. There are six growth rate formulas, two of which are unused (second and third). Each formula is four bytes.

    The exact structure of each formula is as follows:

    Code:
    { ([COLOR="Red"]\1[/COLOR] >> 4) / ([COLOR="red"]\1[/COLOR] & 0xf) } * Lv[SUP]3[/SUP] + [COLOR="red"]\2[/COLOR]*Lv[SUP]2[/SUP] +[COLOR="red"] \3[/COLOR]*n - [COLOR="red"]\4[/COLOR]

    Where the numbers in red correspond to each of the four arguments of each formula. [2] is signed. For example, the medium slow (parabolic) exp rate entry reads as:

    Code:
    0x65 0x8f 0x64 0x8c

    Which means:

    Code:
    (6/5)*Lv[SUP]3[/SUP] - 15*Lv[SUP]2[/SUP] + 100*Lv + 140

    Information taken from the pokecrystal disassembly: https://github.com/pret/pokecrystal/blob/4e2487c/main.asm#L4477
     
    Back
    Top