• 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!
  • Scottie, Todd, Serena, Kris - 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.

Multiple Forms

  • 3
    Posts
    8
    Years
    • Seen May 28, 2017
    Hey guys, i'm making a Pokémon that change it's form and type based on the place it's caught, i want to do it for every single type, i'll do 17 different forms.
    I did this:
    MultipleForms.register(:ROLLERBOSTER,{
    "getFormOnCreation"=>proc{|pokemon|
    maps=[78] # Map IDs for second form
    if $game_map && maps.include?($game_map.map_id)
    next 1
    else
    next 0
    end
    },
    "getFormOnCreation"=>proc{|pokemon|
    maps=[80] # Map IDs for second form
    if $game_map && maps.include?($game_map.map_id)
    next 1
    else
    next 0
    end
    },


    I must say i'm a total newbie with scripts, and i don't know how to make this work.
    Right now the only place where it has another form is in map 80, it appears with form 0 in 78, how do i fix this?

    Thanks in advance.
     
    Last edited:
    You have two getFormOnCreations and that doesn't work. They overwrite each other.
    However since you have the two maps have the same effect, you can just put them in the same array.
    Tah dah!
    Code:
      maps=[78,80] # Map IDs for second form
      if $game_map && maps.include?($game_map.map_id)
        next 1
      else
        next 0
      end

    PS, put your code in
    Code:
     tags, it preserves line indentations.
     
    Last edited:
    You have two getFormOnCreations and that doesn't work. They overwrite each other.
    However since you have the two maps have the same effect, you can just put them in the same array.
    Tah dah!
    Code:
      maps=[78,80] # Map IDs for second form
      if $game_map && maps.include?($game_map.map_id)
        next 1
      else
        next 0
      end

    PS, put your code in
    Code:
     tags, it preserves line indentations.[/QUOTE]
    
     Thanks dude, i'll try this out
     
    You have two getFormOnCreations and that doesn't work. They overwrite each other.
    However since you have the two maps have the same effect, you can just put them in the same array.
    Tah dah!
    Code:
      maps=[78,80] # Map IDs for second form
      if $game_map && maps.include?($game_map.map_id)
        next 1
      else
        next 0
      end

    PS, put your code in
    Code:
     tags, it preserves line indentations.[/QUOTE]
    
      This work but just for the 1st form, how do i make this for the other forms and don't overwrite the other?
     
    So, you want it so some maps have form 1, some have form 2, some form 3, etc.
    I would use a multi-dimensional array.
    Code:
      maps=[[78,80],[1,2],[3,4],[5,6],[7,8],[9,10],[11,12],[13,14],[15,16],[17,18],[19,20],[21,22],[23,24],[25,26],[27,28],[29,30]] # Map IDs for other forms (1-17)
      form = 0
      maps.each_index  {|index|
        form = (index + 1) if $game_map && maps[index].include?($game_map.map_id)
      }
      next form

    This is tested, just so you know.
     
    Back
    Top