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

[Error] Alolan Sandshrew appearing where he shouldn't

  • 41
    Posts
    4
    Years
    • Seen Sep 19, 2023
    So I've got a snowy route in one section of the game and a regular cave in another. I put Alolan Sandshrew in the snowy route but wanted regular sandshrew in the cave.

    I put this in Pokemon Forms
    MultipleForms.register(:SANDSHREW,{
    "getFormOnCreation" => proc { |pkmn|
    maps = [108,123] # Map IDs for Alolan Sandshrew
    next 1

    However when I go to Map 88, one clearly not defined in the forms script above, the Alolan variant shows up. Any idea how to fix this?
     
    Your code will always return the Alolan variant. To fix it so only Map IDs 108 and 123 will yield the Alolan variant use this code:
    Code:
    MultipleForms.register(:SANDSHREW, {
      "getFormOnCreation" => proc { |pkmn|
        maps = [108,123] # Map IDs for Alolan Sandshrew
        if maps.include?($game_map.map_id)
          next 1
        end
        next 0
      }
    })
     
    Last edited:
    Back
    Top