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

Setting forms for wild Pokémon

KID VEGITO

Charmareian
3
Posts
9
Years
  • Age 36
  • Seen Oct 15, 2015
Hi I need help with Pokemon Essentials scripting. How do you script a wild pokemon event to be in a different form. Ex) A wild battle event with Black Kyurem or shaymin in its second form in a wild battle.
 
188
Posts
9
Years
  • Age 39
  • Seen Jan 21, 2024
In Pokemon_MultipleForms you can add the following (in red) to the script:
Code:
MultipleForms.register(:SHAYMIN,{
[COLOR=Red]"getFormOnCreation"=>proc{|pokemon|
   next 1
},
[/COLOR]"type2"=>proc{|pokemon|
   next if pokemon.form==0     # Land Forme
   next getID(PBTypes,:FLYING) # Sky Forme
},
"ability"=>proc{|pokemon|
   next if pokemon.form==0              # Land Forme
   next getID(PBAbilities,:SERENEGRACE) # Sky Forme
},
"weight"=>proc{|pokemon|
   next if pokemon.form==0 # Land Forme
   next 52                 # Sky Forme
},
"getBaseStats"=>proc{|pokemon|
   next if pokemon.form==0      # Land Forme
   next [100,103,75,127,120,75] # Sky Forme
},
"evYield"=>proc{|pokemon|
   next if pokemon.form==0 # Land Forme
   next [0,0,0,3,0,0]      # Sky Forme
},
"getForm"=>proc{|pokemon|
   next 0 if PBDayNight.isNight?(pbGetTimeNow) ||
             pokemon.hp<=0 || pokemon.status==PBStatuses::FROZEN
   next nil
},
"getMoveList"=>proc{|pokemon|
   next if pokemon.form==0
   movelist=[]
   case pokemon.form
   when 1; movelist=[[1,:GROWTH],[10,:MAGICALLEAF],[19,:LEECHSEED],
                     [28,:QUICKATTACK],[37,:SWEETSCENT],[46,:NATURALGIFT],
                     [55,:WORRYSEED],[64,:AIRSLASH],[73,:ENERGYBALL],
                     [82,:SWEETKISS],[91,:LEAFSTORM],[100,:SEEDFLARE]]
   end
   for i in movelist
     i[1]=getConst(PBMoves,i[1])
   end
   next movelist
},
"onSetForm"=>proc{|pokemon,form|
   pbSeenForm(pokemon)
}
})
This particular code ensures the Shaymin you encounter will be in its Sky Forme.
 
1,224
Posts
10
Years
A better way is to use a switch and an encounter modifier.

Code:
Events.onWildPokemonCreate+=proc {|sender,e|
   pokemon=e[0]
   if $game_switches[XX] #Where XX is whatever switch ID you use
     pokemon.form=1
   end
}
 
Back
Top