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

[Scripting Question] Form-specific wild encounters

Tigerfang98

Elite 4
44
Posts
11
Years
    • Seen Aug 28, 2017
    How do you make form-specific wild Pokemon encounters? For example, only a certain form of shells or unown
     
    Last edited by a moderator:
    1,682
    Posts
    8
    Years
    • Seen yesterday
    Oh, I had to do this in my own game!
    Code:
    "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:
    Randomly selected on certain maps (random number)
    Spoiler:
    Randomly selected on certain maps (Personal ID)
    Spoiler:
    Case block of map ids:
    Spoiler:
    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)
    }
    })
     
    Last edited:
    Back
    Top