• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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] Different maps with different forms

  • 143
    Posts
    11
    Years
    • Seen Jun 11, 2021
    I'm trying to get certain forms of Pokemon to appear on certain maps, much like Shellos. It seemed easy enough, but I have more than two forms of a Pokemon. I tried to get it to work with the code below, but instead, the regular form of Grimer always shows up on the map:
    Code:
    MultipleForms.register(:GRIMER,{
    "getFormOnCreation"=>proc{|pokemon|
       maps=[[],         # Map IDs for Alola form
             [47,252]]   # Map IDs for Chion form
       for i in 0...maps.length
         if $game_map && maps[i].include?($game_map.map_id)
           next i+1
         end
       end
       next 0
    },
    I'm not sure what I'm doing wrong. Can anyone help me, please?
     
    Last edited by a moderator:
    I'm trying to get certain forms of Pokemon to appear on certain maps, much like Shellos. It seemed easy enough, but I have more than two forms of a Pokemon. I tried to get it to work with the code below, but instead, the regular form of Grimer always shows up on the map:
    Code:
    MultipleForms.register(:GRIMER,{
    "getFormOnCreation"=>proc{|pokemon|
       maps=[[],         # Map IDs for Alola form
             [47,252]]   # Map IDs for Chion form
       for i in 0...maps.length
         if $game_map && maps[i].include?($game_map.map_id)
           next i+1
         end
       end
       next 0
    },
    I'm not sure what I'm doing wrong. Can anyone help me, please?

    Try this, since it seems that no matter what,next 0 is forcing the grimer to have its form set to 0

    Code:
    MultipleForms.register(:GRIMER,{
    "getFormOnCreation"=>proc{|pokemon|
       maps=[[],         # Map IDs for Alola form
             [47,252]]   # Map IDs for Chion form
       for i in 0...maps.length
         if $game_map && maps[i].include?($game_map.map_id)
           next i+1
         elsif i==maps.length-1 
           next 0
         end
       end
    },
     
    Last edited:
    Gave it a shot. When encountering a Grimer on the map, it just gave me this error and crashed:
    Code:
    Exception: TypeError
    Message: cannot convert Range into Integer
    PSystem_Utilities:1512:in `sprintf'
    PSystem_Utilities:1512:in `pbCryFile'
    PSystem_Utilities:1495:in `pbPlayCry'
    PokeBattle_Scene:2508:in `pbStartBattle'
    *PokeBattle_Battle:2666:in `pbStartBattleCore'
    *PokeBattle_Battle:2633:in `pbStartBattle'
    InverseSkyBattles:49:in `pbWildBattle'
    InverseSkyBattles:48:in `pbSceneStandby'
    InverseSkyBattles:50:in `pbWildBattle'
    InverseSkyBattles:47:in `pbBattleAnimation'
     
    Have you had a look at Shellos?
    Because I never had this problem by c+ping that code and changing the map references.

    Edit: And with a bit of splicing from Bumary or whatever it's called.
     
    Last edited:
    Back
    Top