rigbycwts
Hmm, hmm.
- 94
- Posts
- 12
- Years
- Seen Feb 22, 2019
In order to implement Vivillon's forms, first I modify the sample event that sets the player's location so that it downloads the country code to global variable 51:
Next, in MultipleForms, I added the following:
In this snippet, in order to test the form change (The form number in the Debug menu), I put the country code of my current location to the jungleCountries array.
However, after capturing a wild Scatterbug, then selecting the "form" in the Pokemon's Debug menu, the form number is 0 instead of being set to, in this example, 16. Is $game_variables similar to the global variables that can be accessed in the event editor?
EDIT: fixed internal name typo
Spoiler:
![[PokeCommunity.com] Implementing Vivillion's forms [PokeCommunity.com] Implementing Vivillion's forms](https://i.imgur.com/07QEWbe.png)
Next, in MultipleForms, I added the following:
Code:
MultipleForms.register(:SCATTERBUG,{
"getFormOnCreation"=>proc{|pokemon|
monsoonCountries = [] # Countries where this form can be obtained
jungleCountries = ["PH"]
oceanCountries = []
sunCountries = []
savannaCountries = []
riverCountries = []
sandstormCountries = []
highPlainsCountries = []
archipelagoCountries = []
marineCountries = []
modernCountries = []
icySnowCountries = []
elegantCountries = []
gardenCountries = []
continentalCountries = []
tundraCountries = []
polarCountries = []
if monsoonCountries.include?($game_variables[51])
next 17
elsif jungleCountries.include?($game_variables[51])
next 16
elsif oceanCountries.include?($game_variables[51])
next 15
elsif sunCountries.include?($game_variables[51])
next 14
elsif savannaCountries.include?($game_variables[51])
next 13
elsif riverCountries.include?($game_variables[51])
next 12
elsif sandstormCountries.include?($game_variables[51])
next 11
elsif highPlainsCountries.include?($game_variables[51])
next 10
elsif archipelagoCountries.include?($game_variables[51])
next 9
elsif marineCountries.include?($game_variables[51])
next 8
elsif modernCountries.include?($game_variables[51])
next 7
elsif icySnowCountries.include?($game_variables[51])
next 6
elsif elegantCountries.include?($game_variables[51])
next 5
elsif gardenCountries.include?($game_variables[51])
next 4
elsif continentalCountries.include?($game_variables[51])
next 3
elsif tundraCountries.include?($game_variables[51])
next 2
elsif polarCountries.include?($game_variables[51])
next 1
else # Meadow - Default
next 0
end
}
})
MultipleForms.copy(:SCATTERBUG,:SPEWPA)
MultipleForms.copy(:SCATTERBUG,:VIVILLON)
EDIT: fixed internal name typo
Last edited: