• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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
  • 37
    Posts
    17
    Years
    • Seen Oct 31, 2024
    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?
     
    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