• 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!
  • It's time to vote for your favorite Pokémon Battle Revolution protagonist in our new weekly protagonist poll! Click here to cast your vote and let us know which PBR protagonist you like most.
  • 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
  • 78
    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