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.
"getFormOnCreation"=>proc{|pokemon|
maps=[5] # Map IDs for form
if $game_map && maps.include?($game_map.map_id)
next 1
else
next 0
end
},
Just add the ids of the maps that you want the second form to appear on.
If you have multiple forms, you could either make multiple arrays, randomly select, or do a case block.
I'm in the mood to code, so have some examples.
Multiple arrays:
Spoiler:
Code:
"getFormOnCreation"=>proc{|pokemon|
maps1=[5] # Map IDs for form 1
maps2=[6] # Map IDs for form 2
if $game_map && maps1.include?($game_map.map_id)
next 1
elsif $game_map && maps2.include?($game_map.map_id)
next 2
else
next 0
end
},
Randomly selected on certain maps (random number)
Spoiler:
Code:
"getFormOnCreation"=>proc{|pokemon|
maps=[5] # Map IDs for form
if $game_map && maps.include?($game_map.map_id)
f = rand(3)
next (f +1) # Randomly picks forms 1, 2, or 3
else
next 0
end
},
Randomly selected on certain maps (Personal ID)
Spoiler:
Code:
"getFormOnCreation"=>proc{|pokemon|
maps=[5] # Map IDs for forms
if $game_map && maps.include?($game_map.map_id)
lowbyte=@personalID&0xFF00 #gets the second last pair of bytes of the PID (0xBE of 0xDEADBEEF)
case (lowbyte + (lowbyte % 5)) % 3 # Copied from older code, might have to play with numbers to get a good random result
when 2
next 3 # form 3
when 1
next 2 # form 2
else
next 1 # form 1
end
else
next 0
end
},
Case block of map ids:
Spoiler:
Code:
"getFormOnCreation"=>proc{|pokemon|
case $game_map.map_id
when 1
next 1
when 4
next 2
when 7
next 3
else
next 0
end
},
I didn't really test my examples, but the first one I pasted does work for a fact!
EDIT: By the way, this is the code for Shellos:
Code:
MultipleForms.register(:SHELLOS,{
"getFormOnCreation"=>proc{|pokemon|
maps=[2,5,39,41,44,69] # Map IDs for second form
if $game_map && maps.include?($game_map.map_id)
next 1
else
next 0
end
}
})
And this is the code for Unown:
Code:
MultipleForms.register(:UNOWN,{
"getFormOnCreation"=>proc{|pokemon|
next rand(28)
}
})