Rules: Editing Wild Pokemon

Section 2.G

These are rules related to editing certain attributes on wild Pokemon to customize encounters.

"editWildPokemon"

You can use this rule to edit various attributes of wild Pokemon prior to initiating battle. This allows you to customize their Natures, IV's, shinyness, and more. In double or triple wild battles, this only edits the attributes of the primary wild Pokemon that appears in the first slot. This is entered as setBattleRule("editWildPokemon", Attributes), where "Attributes" is a hash containing all the settings you want to apply to the wild Pokemon. More details on this found below.

"editWildPokemon2"

This rule functions identically to "editWildPokemon", ​accept this rule only edits the attributes of the second wild Pokemon in a double or triple battle.

"editWildPokemon3"

This rule functions identically to "editWildPokemon", accept this rule only edits the attributes of the third wild Pokemon in a triple battle.


Here are all of the possible attributes you may set in a hash for any of the above rules:

Key
Value
Description

:species

Species ID

Changes the species of the wild Pokemon.

:form

Integer

Sets the form of the wild Pokemon.

:form_simple

Integer

Sets the form of the wild Pokemon. Use this instead of :form to skip the move learning prompt for species like Rotom.

:name

String

Sets the nickname of the wild Pokemon.

:level

Integer

Sets the level of the wild Pokemon.

:gender

Integer

Sets the gender of the wild Pokemon (0 = Male, 1 = Female).

:hp

Integer

Sets the HP of the wild Pokemon (out of its total HP).

:status

Status ID

Sets the status condition of the wild Pokemon.

:statusCount

Integer

Sets the status counter of the wild Pokemon (for Sleep and Poison).

:shiny

Boolean

Sets whether this wild Pokemon should be shiny or not.

:super_shiny

Boolean

Sets whether this wild Pokemon should be super shiny or not.

:nature

Nature ID

Sets the Nature of the wild Pokemon.

:item

Item ID

Sets the Item of the wild Pokemon.

:mail

Mail Object

Sets the held mail of the wild Pokemon. You must create the mail object prior to this rule.

:ability

Ability ID

Sets the Ability of the wild Pokemon.

:ability_index

Integer

Sets the Ability index of the wild Pokemon.

:moves

Move ID (or Array)

Sets the moves this wild Pokemon will have.

:ribbons

Ribbon ID (or Array)

Sets the ribbons this wild Pokemon will have.

:pokerus

Boolean

Sets whether the wild Pokemon will have Pokerus or not.

:happiness

Integer

Sets the happiness level of this wild Pokemon (0-255).

:iv

Integer, Array or Hash

Sets the IV's of the wild Pokemon. When set as an integer, all of the Pokemon's IV's are set to the same number. When set as an array, each of the Pokemon's IV's are set to the number in the array (in PBS stat order). When set as a hash, directly sets the IV's of each stat ID in the hash.

:ev

Integer, Array or Hash

Sets the EV's of the wild Pokemon. When set as an integer, all of the Pokemon's EV's are set to the same number. When set as an array, each of the Pokemon's EV's are set to the number in the array (in PBS stat order). When set as a hash, directly sets the EV's of each stat ID in the hash.

:obtain_text

String

Sets the met location text that will appear in the memo page of the Summary once this wild Pokemon has been captured.


Example:

setBattleRule("editWildPokemon", {
  :name    => "Sparky",
  :shiny   => true,
  :ability => :VOLTABSORB,
  :item    => :LIGHTBALL,
  :nature  => :HASTY,
  :moves   => [:VOLTTACKLE, :SURF, :WISH, :ENCORE],
  :iv      => 31
})
WildBattle.start(:PIKACHU, 35)

Exclusive Attributes for Supported Plugins

Key
Value
Description

:shiny_leaf

Integer (0-6)

Sets a number of shiny leaves on the wild Pokemon. Six leaves will apply a shiny leaf crown.

Last updated