• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Akari, Selene, Mint, Solana - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

Make Deerling and Sawsbuck's Forms based on location?

PunkPhantom

"midna's a cat" -vinny, vinesauce
  • 77
    Posts
    11
    Years
    • Age 30
    • Seen Nov 20, 2016
    I wanted to have Deerling and Sawsbuck's forms be based on location in my game, but I wasn't really sure how to do it. I tried to use Shellos's form scripting as a base, but since I don't really know how to script in Ruby, I couldn't figure how to get the syntax right for 4 different forms.

    This was my start
    Code:
    MultipleForms.register(:DEERLING,{
    "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 3
       else
         maps=[86,43]   # Map IDs for autumn form
       if $game_map && maps.include?($game_map.map_id)
         next 2
       else
         next 1
        else
         next 0
       end
    }
    })
    
    MultipleForms.copy(:DEERLING,:SAWSBUCK)
    and it obviously doesn't work.

    I don't think it would be something too complicated though.
     
    Your code is a little wonky
    Code:
    MultipleForms.register(:DEERLING,{
    "getFormOnCreation"=>proc{|pokemon|
       winter_maps=[2,5,39,41,44,69]   # Map IDs for winter form
       autumn_maps=[86,43]   # Map IDs for autumn form
       summer_maps=[]
       if $game_map && winter_maps.include?($game_map.map_id)
         next 3
       elsif $game_map && autumn_maps.include?($game_map.map_id)
         next 2
       elsif $game_map && summer_maps.include?($game_map.map_id)
         next 1
       else
         next 0
       end
       end[/COLOR]
    }
    })
    
    MultipleForms.copy(:DEERLING,:SAWSBUCK)
     
    Back
    Top