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

Battle different form

tasmania12

Mewtwo Master
57
Posts
16
Years
:2: Is there a way to event battle a different form of a pokemon?
I did this:

pbWildBattle(PBSpecies::GIRATINA,25)
poke.form=2

I tested it and it errored:



Spoiler:


It doesn't like the 'poke' part of 'poke.form=2'
 
199
Posts
14
Years
  • Seen Jul 6, 2022
:2: Is there a way to event battle a different form of a pokemon?
I did this:

pbWildBattle(PBSpecies::GIRATINA,25)
poke.form=2

I tested it and it errored:



Spoiler:


It doesn't like the 'poke' part of 'poke.form=2'

Read here the "Wild Pokemon with equipped item":
http://www.pokecommunity.com/showthread.php?p=6852512#post6852512
It adds these lines in an empty script above of the script Main.

It uses the item "GRISEOUSORB" for Giratina's alternative form and the number of switch that you want, 80 for example. This does that the Pokemon always has this equipped item. Giratina changes form taking this item.

Then in the window of Giratina's event put:

Switch: [80 for example] = ON
Script: pbWildBattle(
::PBSpecies::GIRATINA,25,1)
Switch: [80 for example] = OFF

I do not know do it without forcing that it takes the item to transform.
 

tasmania12

Mewtwo Master
57
Posts
16
Years
Read here the "Wild Pokemon with equipped item":
http://www.pokecommunity.com/showthread.php?p=6852512#post6852512
It adds these lines in an empty script above of the script Main.

It uses the item "GRISEOUSORB" for Giratina's alternative form and the number of switch that you want, 80 for example. This does that the Pokemon always has this equipped item. Giratina changes form taking this item.
Can I do it using a variable if I wanted to use it on a pokemon that I want to battle with several forms throughout my game instead of using a switch linked to the item that changes Giratina's form? (If you can follow that... :D)
 
199
Posts
14
Years
  • Seen Jul 6, 2022
Can I do it using a variable if I wanted to use it on a pokemon that I want to battle with several forms throughout my game instead of using a switch linked to the item that changes Giratina's form? (If you can follow that... :D)

OK.
Already I have managed to put a form of a Pokemon without depending on the item.

In script:
Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_variables[80]=1
pokemon.form=1
end
}

Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_variables[80]=2
pokemon.form=2
end
}

Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_variables[80]=3
pokemon.form=3
end
}

Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_variables[80]=4
pokemon.form=4
end
}

Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_variables[80]=5
pokemon.form=5
end
}
pokemon.form=1, 2, 3, 4, or 5... It depends on all the forms has the pokemon

In event:
Variable: [80] = 1, 2, 3, 4 or 5.
Script: pbWildBattle(
::PBSpecies::ROTOM,25,1)
Variable: [80] = 0
I suppose that it will work, but I have not used it.

PD: I believe that everything does not work with trainers
 
Last edited:

tasmania12

Mewtwo Master
57
Posts
16
Years
I tested it and it said:
Spoiler:


Line 40 is the last line in:

Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_variables[80]=6
pokemon.form=6
end
} <- line 40
 
199
Posts
14
Years
  • Seen Jul 6, 2022
I tested it and it said:
Spoiler:


Line 40 is the last line in:

Events.onWildPokemonCreate+=proc {|sender,e|
pokemon=e[0]
if $game_variables[80]=6
pokemon.form=6
end
} <- line 40

The same thing happens to me, and I discovered the error:

I forgot to put one } in the second form. :surprised: Now I edit my post.
 
10,673
Posts
15
Years
  • Age 30
  • Seen Dec 30, 2023
tasmania12, in future post a thread for a question, Bugs & Error Reporting is not for questions. So I have moved your posts into a new thread.
 

tasmania12

Mewtwo Master
57
Posts
16
Years
It still doesn't give me the correct form...

tasmania12, in future post a thread for a question, Bugs & Error Reporting is not for questions. So I have moved your posts into a new thread.

Sorry about that, I'll keep that in mind.

--------------------------------------
BUMP
 
Last edited:
Back
Top