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

[Eventing Question] Setting Abilities on event encounters?

172
Posts
7
Years
  • Age 31
  • Seen Sep 6, 2022
Is there a way to do this? I have some event Pok?mon that I want to have specific abilities, but as far as I've seen the only info you can enter is the species and the level. How can I make that pokemon have ability 1, 2 or HA?
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Is there a way to do this? I have some event Pokémon that I want to have specific abilities, but as far as I've seen the only info you can enter is the species and the level. How can I make that pokemon have ability 1, 2 or HA?

Take a look to example in Lerucean Town> Pokemon Fan Club (map). open event to the girl into the left and you will see this:

Code:
p=PokeBattle_Pokemon.new(:DODRIO,
   pbGetPokemon(1).level,$Trainer)
p.setItem(:SMOKEBALL)
p.makeFemale
[B]p.setAbility(0)         # Run Away[/B]
p.setNature(:IMPISH)
p.iv=[20,20,20,15,15,15]
p.ballused=10           # Luxury Ball
p.pbLearnMove(:SURF)
p.calcStats

'p.setAbility(0)' to the first ability; (1) to the second (normal) ability.
So put (2) to Hidden Ability.

If you want a wild encounter, or add to the event create (into the game) or search PField_EncounterModifiers and add this in somewhere:
Code:
Events.onWildPokemonCreate+=proc {|sender,e|
   pokemon=e[0]
   if $game_switches[276] #change the number if you want
     if isConst?(pokemon.species,PBSpecies,:PIDGEOT) #pokemon name
       pokemon.item=getConst(PBItems,:PIDGEOTITE) #holdin item
       pokemon.setAbility(2) #(2) is hidden ability; (0) and (1) is normal abilities
    elsif isConst?(pokemon.species,PBSpecies,:KYOGRE)
       pokemon.form=1 #will appears PRIMAL KYOGRE
       pokemon.item=getConst(PBItems,:BLUEORB) #CUZ HES HOLDIN THIS BUT IF YOU REMOVE THIS AND NOT 'pokemon.form=1' HES STILL APPEARS PRIMAL CUZ YOU 'FORCE' USIN 'pokemon.form=1' AND IF YOU STAY HOLDIN 'BLUEORB' HE WILL TRANSFORM TO PRIMAL MODE CUZ THE LOGIC.
     end
   end
}
 
Last edited:
Back
Top