Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
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)
}
})