• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • 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.

[Battle✓] Changing Stat Calculations

  • 2
    Posts
    2
    Years
    • Seen Apr 10, 2023
    I'm trying to make a ROM hack which changes how stats are calculated. I want the Pokemon levels to be irrelevant to their stats, so basically every Pokemon will have stats as if they were level 50. For the life of me I cannot find where stats are calculated. Would someone mind pointing me to the right place, or perhaps a resource on the topic? Thank you in advance! <3
    (I'm using pokeemerald-expansion btw)
     
    I'm trying to make a ROM hack which changes how stats are calculated. I want the Pokemon levels to be irrelevant to their stats, so basically every Pokemon will have stats as if they were level 50. For the life of me I cannot find where stats are calculated. Would someone mind pointing me to the right place, or perhaps a resource on the topic? Thank you in advance! <3
    (I'm using pokeemerald-expansion btw)

    The mon's stats are calculated in CalculateMonStats, sensibly enough. This function is found in src/pokemon.c. To have each mon treated as a level 50 mon, I think you would have to do something like this:
    Code:
    void CalculateMonStats(struct Pokemon *mon)
    {
    ...................................................................................
        s32 newMaxHP;
    
        SetMonData(mon, MON_DATA_LEVEL, &level);
    
        level = 50; ← ← ← ← ← ← ADD THIS HERE
    
        if (species == SPECIES_SHEDINJA)
        {
            newMaxHP = 1;
    ............................................
    This way, the mon will still increase in level for the sake of level-up learnsets, but as it calculates current attack, hp, etc, it will treat the mon as level 50. At least I think. I didn't test this, but it seems right.
     
    Back
    Top