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

[Error] Fix for wrong pre-evolution calculation in v18

  • 13
    Posts
    4
    Years
    So it turns out that there's a problem in v18 with how the evolution data is stored and retrieved, where the retrieval expects pre-evolution data that isn't stored for fully evolved Pokémon. See the bug report thread for more info. This mostly affects breeding, in addition to the handful of us who dynamically adapt levels and evolution stages. Now this doesn't fix the underlying issue and it isn't pretty or efficient; it's simply a quick fix. If you want the species in a bred egg to be computed correctly, simply replace the definition of pbGetEvolutionData in Pokemon_Evolution with the following:

    def pbGetEvolutionData(species)
    species = getID(PBSpecies,species)
    evosData = pbLoadEvolutionsData

    if evosData[species] == nil #there is no evolution data present
    preEvo=-1
    for evoData in evosData: #cycle over all Pokémon to see if one is a pre-evolution to this one
    preEvo=preEvo+1
    if evoData:
    for evo in evoData:
    evolution = [preEvo,evo[1],evo[2],true] #reconstruct what the evolution data for a fully evolved Pokémon should have been
    return [evolution] if evo[0] == species && !evo[3] #return it if it is indeed this Pokémon's pre-evolution.
    end
    end
    end
    else
    return evosData[species] #there is evolution data present.
    end

    return [] #the Pokémon has no evolutionary relatives
    end
     
    Back
    Top