• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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.

[v16.1] getUnmegaForm and multiple forms

  • 4
    Posts
    8
    Years
    • Seen May 2, 2017
    Hi. Long time lurker, first time poster and all that. This seems to be the only issue I've had that I couldn't solve by searching the forums.

    So I have this uniquely colored Lucario in my game. I want to make it so that it can Mega Evolve into a similarly uniquely colored Mega Lucario. The actual Mega Evolution itself works just fine. Here's what I've got.

    Regular Lucario is form 0 and the special one is form 1, while regular MEGA Lucario is form 3 and the special mega is form 2.

    Code:
    MultipleForms.register(:LUCARIO,{
    "getMegaForm"=>proc{|pokemon|
       next 3 if isConst?(pokemon.item,PBItems,:LUCARIONITE) && pokemon.form==0
       next 2 if isConst?(pokemon.item,PBItems,:LUCARIONITE) && pokemon.form==1
       next
    },

    This works fine. I can get the special Lucario to mega evolve into the special mega version with no issues. However, when the battle ends, it turns into a regular Lucario (form 0) instead of the special one (form 1).

    I attempted to fix this by adding

    Code:
    "getUnmegaForm"=>proc{|pokemon|
       next 1 if pokemon.form==2
       next 0 if pokemon.form==3
    },

    but that doesn't seem to help at all. All Mega Lucarios, regardless of form, revert to form 0 after a battle.

    Is there any way to get around this or should I just make my special Pokemon a different species?
     

    Sir_Tman

    Overworked game Dev
  • 201
    Posts
    8
    Years
    Code:
    "getUnmegaForm"=>proc{|pokemon|
       next 1 if pokemon.form==2
       next 0 if pokemon.form==3
       next
    },
    I think you forgot another next

    or

    Code:
    "getUnmegaForm"=>proc{|pokemon|
       if pokemon.form==2
    	next 1 
       elsif pokemon.form==3
    	next 0 
    },
     
  • 4
    Posts
    8
    Years
    • Seen May 2, 2017
    Code:
    "getUnmegaForm"=>proc{|pokemon|
       next 1 if pokemon.form==2
       next 0 if pokemon.form==3
       next
    },
    I think you forgot another next

    or

    Code:
    "getUnmegaForm"=>proc{|pokemon|
       if pokemon.form==2
    	next 1 
       elsif pokemon.form==3
    	next 0 
    },

    Nope, this doesn't change anything, and the second variation produces a syntax error. Thanks for the help though.
     
  • 824
    Posts
    9
    Years
    try this:
    Make normal nonMega form #0, colored nonMega form #1, normal Mega form #2, and colored Mega form #3

    Then use this code:
    Code:
    MultipleForms.register(:LUCARIO,{
    "getMegaForm"=>proc{|pokemon|
       next 2+pokemon.form%2 if isConst?(pokemon.item,PBItems,:LUCARIONITE)
       next
    },
    "getUnmegaForm"=>proc{|pokemon|
       next pokemon.form%2
       next
    },

    this tells the code that even-numbered forms are connected and that odd-numbered forms are connected.
     
  • 4
    Posts
    8
    Years
    • Seen May 2, 2017
    @Rot8er_ConeX: That doesn't seem to help either. The actual Mega Evolution itself works fine, but the special Lucario still becomes a regular one after the battle. :/
     
    Back
    Top