• 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] HELP with Undefined value in evolutions

  • 6
    Posts
    1
    Years
    • Seen Feb 3, 2023
    I was slightly changing the pokemon PBS file to add Sketch to MoveTutors for Smeargle, but after I finished editing it, I tried playing the game and the following error came out:

    [Pokémon Essentials version 20.1]
    [v20.1 Hotfixes 1.0.7]

    Exception: RuntimeError
    Message: Undefined value in GameData::Species
    File PBS/pokemon.txt, section GOLBAT, key Evolutions




    Backtrace:
    380:Compiler:345:in `checkEnumField'
    380:Compiler:320:in `csvEnumField!'
    381:Compiler_CompilePBS:750:in `block (2 levels) in compile_pokemon'
    381:Compiler_CompilePBS:742:in `each'
    381:Compiler_CompilePBS:742:in `block in compile_pokemon'
    103:GameData:117:in `block in each'
    103:GameData:117:in `each_value'
    103:GameData:117:in `each'
    381:Compiler_CompilePBS:740:in `compile_pokemon'
    380:Compiler:766:in `compile_pbs_files'

    After I tried changing Golbat to evolve by leveling up, the same issue came out wth Chansey. Basically all hapiness evolutions were bugged!
    I could make the game run again by changing all instances of Happiness evolution into HappinessDay because I don't really care about day/night cycle, but I also don't know how to disable night from basically making all happiness pokémon unable to evolve. So, ideally, if anyone could help me resolve the issue about the undefined value that would be awesome, but as long as I can make Hapiness Pokémon able to evolve somehow in all times of day, that would be enough. Thanks in advance! (btw my PBS file for Golbat looked like this)

    #-------------------------------
    [GOLBAT]
    Name = Golbat
    Types = POISON,FLYING
    BaseStats = 75,80,70,90,65,75
    GenderRatio = Female50Percent
    GrowthRate = Medium
    BaseExp = 159
    EVs = SPEED,2
    CatchRate = 90
    Happiness = 50
    Abilities = INNERFOCUS
    HiddenAbilities = INFILTRATOR
    Moves = 1,SCREECH,1,ABSORB,1,SUPERSONIC,1,ASTONISH,1,MEANLOOK,15,POISONFANG,20,QUICKGUARD,27,AIRCUTTER,34,BITE,41,HAZE,48,VENOSHOCK,55,CONFUSERAY,62,AIRSLASH,69,LEECHLIFE
    TutorMoves = ACROBATICS,AERIALACE,AGILITY,AIRSLASH,ASSURANCE,ATTRACT,BRAVEBIRD,CRUNCH,DEFOG,DOUBLETEAM,DUALWINGBEAT,ENDURE,FACADE,FLY,GIGADRAIN,GIGAIMPACT,HEATWAVE,HIDDENPOWER,HYPERBEAM,LEECHLIFE,NASTYPLOT,PAYBACK,PLUCK,PROTECT,RAINDANCE,REST,ROOST,ROUND,SCREECH,SHADOWBALL,SLEEPTALK,SLUDGEBOMB,SNORE,STEELWING,SUBSTITUTE,SUNNYDAY,SWAGGER,SWIFT,TAUNT,THIEF,TORMENT,UPROAR,UTURN,VENOMDRENCH,VENOSHOCK,ZENHEADBUTT
    EggGroups = Flying
    HatchSteps = 3840
    Height = 1.6
    Weight = 55.0
    Color = Purple
    Shape = Winged
    Habitat = Cave
    Category = Bat
    Pokedex = Its fangs easily puncture even thick animal hide. It loves to feast on the blood of people and Pokémon. It flits about in darkness and strikes from behind.
    Generation = 1
    Evolutions = CROBAT,Happiness,
    #-------------------------------

    PS: I had to also change the pokemonforms PBS because of the same error.
    Edit: Just in case, I tried redownloading Pokemon Essentials and replacing the pokemon PBS and still the same error which didn't use to happen.
     
    Last edited:

    Frost the Fox

    FroststormFrenzy
  • 16
    Posts
    2
    Years
    • Seen Jun 14, 2023
    The first thing that comes to mind is that the "Happiness" evolution method was somehow removed from the registered evolution IDs. Try using CTRL Shift F and searching for "Happiness", and look for the first line in the "Evolution" category; If it doesn't read
    Code:
    :id            => :Happiness,
    , it's missing
     
  • 6
    Posts
    1
    Years
    • Seen Feb 3, 2023
    GameData::Evolution.register({
    :id => :Happiness,
    :minimum_level => 1, # Needs any level up
    :level_up_proc => proc { |pkmn, parameter|
    next pkmn.happiness >= (Settings::APPLY_HAPPINESS_SOFT_CAP ? 160 : 220)
    }
    })

    That's what the Evolution in the Hardcored data section of the script editor says. I don't know if that's what you were refering to, but if it is the case, then it appears that it is registered in the ID. Thing is it's not the first thing in the category, I don't know if that's what you meant. At the very top of the category it says:
    GameData::Evolution.register({
    :id => :None
    })

    The happiness one is below the shedinja one.
     

    Frost the Fox

    FroststormFrenzy
  • 16
    Posts
    2
    Years
    • Seen Jun 14, 2023
    It's what I meant, yeah; By "Top of the category", I meant the first instance of "Happiness" in that script

    Not sure what the issue could be with this, then; It looks right
     
  • 6
    Posts
    1
    Years
    • Seen Feb 3, 2023
    Thanks for the help still, for now I've removed the if night=day or something like that to make it so HapinessDay is virtually Hapiness, and since I'm not using day/night cycle for evolutions, it works ok. Still bugs me that Hapiness evolutions just glitched out, but you know, those things happen. At least until I learn how to fix it properly, that's what I've done. Thanks!
     
    Back
    Top