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

[Question] DAYCARE Error - Stack Level

Takako Rune

Hack Player
51
Posts
7
Years
    • Seen Sep 8, 2021
    Hi there.
    Whenever I receive an egg from the daycare I get the error below.
    The daycare script is untouched. Perhaps the problem is in the Pokemon PBS?
    I tried several Pokémon, with and without ditto. Always the same.
    Any ideas? Googling didn't turn up anything useful.

    I'm using Essentials 16.2


    The error log:
    -------------------------
    Code:
    Exception: RuntimeError
    Message: Script error within event 1, map 118 (ROUTE 510):
    Exception: SystemStackError
    Message: Section126:202:in `pbGetBabySpecies'stack level too deep
    ***Full script:
    pbDayCareGenerateEgg
    $PokemonGlobal.daycareEgg=0
    $PokemonGlobal.daycareEggSteps=0
     
    Interpreter:243:in `pbExecuteScript'
    Pokemon_Evolution:197:in `loop'
    Pokemon_Evolution:215:in `pbGetBabySpecies'
    Pokemon_Evolution:191:in `pbRgssOpen'
    SpriteWindow:1776:in `open'
    SpriteWindow:1776:in `pbRgssOpen'
    Pokemon_Evolution:191:in `pbGetBabySpecies'
    Pokemon_Evolution:219:in `pbGetBabySpecies'
    Pokemon_Evolution:219:in `pbGetBabySpecies'
    Pokemon_Evolution:219:in `pbGetBabySpecies'
     
    Interpreter:276:in `pbExecuteScript'
    Interpreter:1606:in `command_355'
    Interpreter:494:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'
    Scene_Map:101:in `loop'
    Scene_Map:114:in `update'
    Scene_Map:68:in `main'
     

    Takako Rune

    Hack Player
    51
    Posts
    7
    Years
    • Seen Sep 8, 2021
    I found the problem.

    How Essentials generates eggs is by checking what the earliest pre-evolution of the parent pokemon is.

    Well, in my game I gave them the ability to "de-evolve" by using an item, which is technically still an evolution.

    What this means is that the program will loop around the same evolution line eternally, never finding the earliest evolution.

    So either I'll have to find a different method of de-evolving or sacrifice either this function or the day-care altogether. :/
     
    277
    Posts
    15
    Years
  • I found the problem.

    How Essentials generates eggs is by checking what the earliest pre-evolution of the parent pokemon is.

    Well, in my game I gave them the ability to "de-evolve" by using an item, which is technically still an evolution.

    What this means is that the program will loop around the same evolution line eternally, never finding the earliest evolution.

    So either I'll have to find a different method of de-evolving or sacrifice either this function or the day-care altogether. :/

    How does your "de-evolve" work?

    I managed to get this working, and I had no issues breeding.
    paste in PItem_ItemEffects
    Code:
    ItemHandlers::UseOnPokemon.add(:DEVOLUTIONSTONE,proc{|item,pokemon,scene|
       if isConst?(pokemon.species,PBSpecies,:NINETALES)
         pokemon.species=PBSpecies::VULPIX
         pokemon.calcStats
         scene.pbDisplay(_INTL("NINETALES devolved into VULPIX."))
         scene.pbHardRefresh
       else
         scene.pbDisplay(_INTL("It won't have any effect."))
       end
     })

    Change a Ninetales back into a Vulpix.
     
    Last edited:

    Takako Rune

    Hack Player
    51
    Posts
    7
    Years
    • Seen Sep 8, 2021
    How does your "de-evolve" work?

    I managed to get this working, and I had no issues breeding.
    paste in PItem_ItemEffects
    Code:
    ItemHandlers::UseOnPokemon.add(:DEVOLUTIONSTONE,proc{|item,pokemon,scene|
       if isConst?(pokemon.species,PBSpecies,:NINETALES)
         pokemon.species=PBSpecies::VULPIX
         pokemon.calcStats
         scene.pbDisplay(_INTL("NINETALES devolved into VULPIX."))
         scene.pbHardRefresh
       else
         scene.pbDisplay(_INTL("It won't have any effect."))
       end
     })

    Change a Ninetales back into a Vulpix.

    Thank you! This line of code works exactly how I wanted it to. I've been trying to figure this out for hours now. ^^ Now I just need to do this for every mon in the game. :p

    How my de-evolution worked is that in the pokemon.txt each evolved pokemon could evolve into the previous evolution via an item. It worked really nicely until I discovered the overflow bug with the breading.

    Thanks again. :) I should be able to get it to work now with a couple of hours work.

    ~TJ
     
    Back
    Top