• 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.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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!
  • 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] Mega evolution messing with Forms (16.2)

  • 465
    Posts
    8
    Years
    • Seen Jun 17, 2024
    So trying to adjust how shadow pokemon work (not at all relevent, it happens in general)

    but if a pokemon has forms but has a mega, the form will act oddly.

    the sprite will match the right form but no data changes (type, ability etc.)

    i know it works without mega but when i add that back in it breaks (used on an existing mega)

    Code:
    MultipleForms.register(:SHARPEDO,{
    "getForm"=>proc{|pokemon|
       next if pokemon.form==0
       next if pokemon.form==1
       next 33 if pokemon.isShadow?
       next 0
    },
    "type2"=>proc{|pokemon|
       next if pokemon.form==0
       next if pokemon.form==1
       case pokemon.form
       when 33; next getID(PBTypes,:SHADOW)
       end
    }
    })

    then the mega code

    Code:
    MultipleForms.register(:SHARPEDO,{
    "getMegaForm"=>proc{|pokemon|
       next 1 if isConst?(pokemon.item,PBItems,:SHARPEDONITE) && !pokemon.form==33
       next 35 if pokemon.form==33 && pokemon.hypermode==true
       next
    },
    "getUnmegaForm"=>proc{|pokemon|
       next 33 if pokemon.form==35 && !pokemon.hypermode==true
       next
    },
    "megaMessage"=>proc{|pokemon|
       next 3 if pokemon.form==35
       next
    },
    "getMegaName"=>proc{|pokemon|
       next _INTL("Twilight Sharpedo") if pokemon.form==35
       next
    },
    "getBaseStats"=>proc{|pokemon|
       next [70,140,70,105,110,65] if pokemon.form==1
       next [70,140,70,105,110,65] if pokemon.form==35
       next
    },
    "type2"=>proc{|pokemon|
       next getID(PBTypes,:SHADOW) if pokemon.form==35
       next
    },
    "getAbilityList"=>proc{|pokemon|
       next [[getID(PBAbilities,:STRONGJAW),0]] if pokemon.form==1
       next [[getID(PBAbilities,:STRONGJAW),0]] if pokemon.form==35
       next
    },
    "height"=>proc{|pokemon|
       next 25 if pokemon.form==1
       next 25 if pokemon.form==35
       next
    },
    "weight"=>proc{|pokemon|
       next 1303 if pokemon.form==1
       next 1303 if pokemon.form==35
       next
    }
    })

    could be my altered code, but im unsure.

    any help will be great.
     
    Sorry for late reply, this does help in most cases, but it wont work if its with a pokemon with "get form on" stuff. cuz it'll either overwrite "get mega form" or vice versa, otherwise what you said is correct.
     
    Back
    Top