• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our 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.

[Scripting Question] Pokemon essentials change pokeball upon evolution

  • 17
    Posts
    4
    Years
    • Seen Feb 6, 2023
    I would like to ask for help figuring out how to change the ball a Pokémon is in after it evolves.

    let me explain: I have my own Pokémon designs and one of them is a possessed Poké Ball. however when it evolves it becomes a possessed great ball.
    and then in its third evolution a possessed ultra ball.

    I need to add a form of evolution like the ones set up already (eg. Level, Item, happiness) just for these Pokémon that checks for a level, checks for held item Great Ball / Ultra Ball then changes the ball the Pokémon is in. and gets rid of the held item.

    using RPG Maker XP & Pokémon essentials V18.1

    any help would be great. I've never posted in a forum before so please forgive if I've broken some etiquette.
     
    You can change ball type with the debug tools already, so I would just check out how thats done in Debug_Pokemon and then adapt it.
     
    I'm aware of the Pokémon_debug version, I have tried to copy it into a elocution type I created but it causes the game to crash or simply does nothing.

    To be clear the evolution takes place but when I try to check that the Pokémon is in a new ball it crashes or is still in the original ball.

    PBEvolution.register(:ToGreatAtLevel, {
    "levelUpCheck" => proc { |pkmn, parameter|

    balls = []
    for key in $BallTypes.keys
    item = getID(PBItems,$BallTypes[key])
    balls.push([key.to_i,PBItems.getName(item)]) if item && item>0
    end
    pkmn.ballused = balls[item][27]
    next pkmn.level >= parameter
    }
    })

    This is what I have and it doesnt work yet.
     
    Last edited:
    So I've simplified it and it works and changes the ball. Now just got to add the bit about checking for an held item. But solution without held item is:

    PBEvolution.register(:ToGreatAtLevel, {
    "levelUpCheck" => proc { |pkmn, parameter|

    next pkmn.level >= parameter && pkmn.ballused = 27
    }
    })
     
    posting if anyone wants to use this solution for anything similar. I only need this to work for 1 Pokemon.

    PBEvolution.register(:ToGreatAtLevel, {
    #check for level
    "levelUpCheck" => proc { |pkmn, parameter|
    #check for held item
    next true if pkmn.hasItem?(:SCRATCHEDBALL) && pkmn.level >= parameter
    },
    "afterEvolution" => proc { |pkmn, new_species, parameter, evo_species|
    next false if evo_species != new_species || !pkmn.hasItem?(:SCRATCHEDBALL)
    pkmn.setItem(0) # Item is now consumed
    #Set Ball pokemon is in.
    pkmn.ballused = 27
    next true
    }
    })

    (Pokémon.txt file evolution eg: Evolution = GREATGHOUL,ToGreatAtLevel,18 )
     
    Last edited:
    Back
    Top