• 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] I need a guaranteed capture rate to catch a Pokemon.

  • 68
    Posts
    6
    Years
    • Seen Sep 19, 2023
    In my game I have a Pokemon battle that the player should capture, but I want to make it their decision to capture it rather than just give it to them. Giving it to them wouldn't work for the story, so instead I'm having the player battle the Pokemon. The Pokemon is high level and rather rare may I say, plus the face that the player only gets five pokeballs and has a relatively low level pokemon, so I need the capture rate to be 100%.

    Is there some kind of game switch, or script before the battle that will make the Pokemon's capture rate 100%? I've seen a threat like it, but for one: it was v.16, and two: they needed to make it a 100% capture rate with a Safari Ball, and I need it for a normal Pokeball. Any help would be great!
     
    Yeah! I think you can do it by editing here, inside 'def pbThrowPokeBall(idxPokemon,ball,rareness=nil,showplayer=false)':
    Code:
            shakes=0; critical=false
            if x>255 || BallHandlers.isUnconditional?(ball,self,battler)
              shakes=4
            else
              x=1 if x<1

    Just add a game switch here, like:
    Code:
            shakes=0; critical=false
            if x>255 || BallHandlers.isUnconditional?(ball,self,battler) || $game_switches[XX]
              shakes=4
            else
              x=1 if x<1
     
    To be fair, In my game in which the player has to catch his first pokemon (and so have a 100% catch rate), I gave him a special ball to use on the pokemon only;
    In Pitem_pokeballs just look for :

    Code:
    BallHandlers::IsUnconditional.add(:MASTERBALL,proc{|ball,battle,battler|
       next true
    })

    Then duplicate it, and replace MASTERBALL by your ball's name.
     
    Back
    Top