• 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.

Wild Mega Evolved Pok?mon

  • 23
    Posts
    9
    Years
    • Seen Mar 20, 2017
    Wild Mega Evolved Pokémon

    Hello! :)

    There is a way to make a Mega Evolution to appear using an event encounter?

    What I want to do doesn't have a trainer related, only the Pokémon. There is a way to make it appear directly on Mega Form, or change to mega during the first turn?
     
    I may be making a horrible assumption here, but I'm assuming you want to make a sort of "wild Mega" Pokemon, that's using the power of their Mega Stone to rampage or something. The player has to calm this Mega down, by either catching or defeating it.

    If this is true, then it'd make more sense for the Pokemon to be in its Mega form as the battle starts. If that's true, then it should be easy. Set up an event that turns on a switch that's otherwise unused. Then, add this script to Encounter Modifiers:

    Code:
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
       if $game_switches[[COLOR="purple"]>Number of switch you used here<[/COLOR]] && isConst?(pokemon.species,PBSpecies,:[COLOR="purple"]>Internal name of species of this event Pokemon here<[/COLOR])
         pokemon.form=1
         pokemon.item=getConst(PBItems,:[COLOR="Purple"]>Internal name of Mega Stone here<[/COLOR])
       end
    }

    If you want the Pokemon to start off the battle non-Mega and become Mega first turn, I think it'd require more of a alteration to the scripts.
     
    I may be making a horrible assumption here, but I'm assuming you want to make a sort of "wild Mega" Pokemon, that's using the power of their Mega Stone to rampage or something. The player has to calm this Mega down, by either catching or defeating it.

    If this is true, then it'd make more sense for the Pokemon to be in its Mega form as the battle starts. If that's true, then it should be easy. Set up an event that turns on a switch that's otherwise unused. Then, add this script to Encounter Modifiers:

    Code:
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
       if $game_switches[[COLOR="purple"]>Number of switch you used here<[/COLOR]] && isConst?(pokemon.species,PBSpecies,:[COLOR="purple"]>Internal name of species of this event Pokemon here<[/COLOR])
         pokemon.form=1
         pokemon.item=getConst(PBItems,:[COLOR="Purple"]>Internal name of Mega Stone here<[/COLOR])
       end
    }

    If you want the Pokemon to start off the battle non-Mega and become Mega first turn, I think it'd require more of a alteration to the scripts.
    That worked! Thank you! :D

    I assume that I will have to repeat this code, with different values, for each one that I want, right? Or maybe there is a way to make it more generic?
     
    That worked! Thank you! :D

    I assume that I will have to repeat this code, with different values, for each one that I want, right? Or maybe there is a way to make it more generic?

    there's not really a way to make it more generic. But you could alter it like so:

    Code:
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
       if $game_switches[[COLOR="Lime"]>Number of switch you used here<[/COLOR]] 
         if isConst?(pokemon.species,PBSpecies,:[COLOR="lime"]>Internal name of species of this event Pokemon here<[/COLOR])
           pokemon.form=1
           pokemon.item=getConst(PBItems,:[COLOR="lime"]>Internal name of Mega Stone here<[/COLOR])
         elsif isConst?(pokemon.species,PBSpecies,:[COLOR="lime"]>Internal name of species of this event Pokemon here<[/COLOR])
           pokemon.form=1
           pokemon.item=getConst(PBItems,:[COLOR="lime"]>Internal name of Mega Stone here<[/COLOR])
         elsif isConst?(pokemon.species,PBSpecies,:[COLOR="lime"]>Internal name of species of this event Pokemon here<[/COLOR])
           pokemon.form=1
           pokemon.item=getConst(PBItems,:[COLOR="lime"]>Internal name of Mega Stone here<[/COLOR])
         end
       end
    }

    Note that for Mewtwo and Charizard, the X forms are form #1, and the Y forms are form #2.
     
    Last edited:
    there's not really a way to make it more generic. But you could alter it like so:

    Code:
    Events.onWildPokemonCreate+=proc {|sender,e|
       pokemon=e[0]
       if $game_switches[[COLOR="Lime"]>Number of switch you used here<[/COLOR]] 
         if isConst?(pokemon.species,PBSpecies,:[COLOR="lime"]>Internal name of species of this event Pokemon here<[/COLOR])
           pokemon.form=1
           pokemon.item=getConst(PBItems,:[COLOR="lime"]>Internal name of Mega Stone here<[/COLOR])
         elsif isConst?(pokemon.species,PBSpecies,:[COLOR="lime"]>Internal name of species of this event Pokemon here<[/COLOR])
           pokemon.form=1
           pokemon.item=getConst(PBItems,:[COLOR="lime"]>Internal name of Mega Stone here<[/COLOR])
         elsif isConst?(pokemon.species,PBSpecies,:[COLOR="lime"]>Internal name of species of this event Pokemon here<[/COLOR])
           pokemon.form=1
           pokemon.item=getConst(PBItems,:[COLOR="lime"]>Internal name of Mega Stone here<[/COLOR])
         end
       end
    }

    Note that for Mewtwo and Charizard, the X forms are form #1, and the Y forms are form #2.
    Working perfectly fine. Thank you! ;)
     
    I'm going to piggyback a bit here, but how would one go about allowing a wild Pokemon to mega evolve in the regular context(start off normal, then mega evolve in-battle)?
     
    I'm going to piggyback a bit here, but how would one go about allowing a wild Pokemon to mega evolve in the regular context(start off normal, then mega evolve in-battle)?

    From what I can tell, it should work fine from the coding perspective and the actual effects, as long as the Pokemon in question is holding the proper Mega Stone. The issue is the fact that is doesn't have an owner, so "The wild (pokemon name here)'s (Mega Stone name here) is reacting (owner name)'s Key Ring!" doesn't make sense.
     
    From what I can tell, it should work fine from the coding perspective and the actual effects, as long as the Pokemon in question is holding the proper Mega Stone. The issue is the fact that is doesn't have an owner, so "The wild (pokemon name here)'s (Mega Stone name here) is reacting (owner name)'s Key Ring!" doesn't make sense.
    Right, the mega ring context is a bit of an issue, but could be worked around fairly easily based on whatever fluff needs are present, but is the only code block preventing a wild Pokemon from mega evolving from pbCanMegaEvolve or elsewhere?
     
    Okay, I just tested it in my own game. It actually throws up an error and doesn't Mega Evolve. But...

    (PokeBattle_Battle, Essentials v16)
    Code:
      def pbMegaEvolve(index)
        return if !@battlers[index] || !@battlers[index].pokemon
        return if !(@battlers[index].hasMega? rescue false)
        return if (@battlers[index].isMega? rescue true)[COLOR="red"]
        if pbGetOwner(index)==nil
          case (@battlers[index].pokemon.megaMessage rescue 0)
          when 1 # Rayquaza
            pbDisplay(_INTL("{1}'s fervent wish is reacting to its body!",@battlers[index].pbThis))
          else
            pbDisplay(_INTL("{1}'s {2} is reacting to its inner power!",
               @battlers[index].pbThis,PBItems.getName(@battlers[index].item)))
          end
        else[/COLOR]
          ownername=pbGetOwner(index).fullname
          ownername=pbGetOwner(index).name if pbBelongsToPlayer?(index)
          case (@battlers[index].pokemon.megaMessage rescue 0)
          when 1 # Rayquaza
            pbDisplay(_INTL("{1}'s fervent wish has reached {2}!",ownername,@battlers[index].pbThis))
          else
            pbDisplay(_INTL("{1}'s {2} is reacting to {3}'s {4}!",
               @battlers[index].pbThis,PBItems.getName(@battlers[index].item),
               ownername,pbGetMegaRingName(index)))
          end[COLOR="Red"]
        end[/COLOR]
        pbCommonAnimation("MegaEvolution",@battlers[index],nil)
        @battlers[index].pokemon.makeMega
        @battlers[index].form=@battlers[index].pokemon.form
        @battlers[index].pbUpdate(true)
        @scene.pbChangePokemon(@battlers[index],@battlers[index].pokemon)
        pbCommonAnimation("MegaEvolution2",@battlers[index],nil)
        meganame=(@battlers[index].pokemon.megaName rescue nil)
        if !meganame || meganame==""
          meganame=_INTL("Mega {1}",PBSpecies.getName(@battlers[index].pokemon.species))
        end
        pbDisplay(_INTL("{1} has Mega Evolved into {2}!",@battlers[index].pbThis,meganame))
        PBDebug.log("[Mega Evolution] #{@battlers[index].pbThis} Mega Evolved")
        side=(pbIsOpposing?(index)) ? 1 : 0
        owner=pbGetOwnerIndex(index)
        @megaEvolution[side][owner]=-2
      end

    These additions fix that problem. You can change the messages if you want.
     
    Okay, I just tested it in my own game. It actually throws up an error and doesn't Mega Evolve. But...

    (PokeBattle_Battle, Essentials v16)
    Code:
      def pbMegaEvolve(index)
        return if !@battlers[index] || !@battlers[index].pokemon
        return if !(@battlers[index].hasMega? rescue false)
        return if (@battlers[index].isMega? rescue true)[COLOR=red]
        if pbGetOwner(index)==nil
          case (@battlers[index].pokemon.megaMessage rescue 0)
          when 1 # Rayquaza
            pbDisplay(_INTL("{1}'s fervent wish is reacting to its body!",@battlers[index].pbThis))
          else
            pbDisplay(_INTL("{1}'s {2} is reacting to its inner power!",
               @battlers[index].pbThis,PBItems.getName(@battlers[index].item)))
          end
        else[/COLOR]
          ownername=pbGetOwner(index).fullname
          ownername=pbGetOwner(index).name if pbBelongsToPlayer?(index)
          case (@battlers[index].pokemon.megaMessage rescue 0)
          when 1 # Rayquaza
            pbDisplay(_INTL("{1}'s fervent wish has reached {2}!",ownername,@battlers[index].pbThis))
          else
            pbDisplay(_INTL("{1}'s {2} is reacting to {3}'s {4}!",
               @battlers[index].pbThis,PBItems.getName(@battlers[index].item),
               ownername,pbGetMegaRingName(index)))
          end[COLOR=Red]
        end[/COLOR]
        pbCommonAnimation("MegaEvolution",@battlers[index],nil)
        @battlers[index].pokemon.makeMega
        @battlers[index].form=@battlers[index].pokemon.form
        @battlers[index].pbUpdate(true)
        @scene.pbChangePokemon(@battlers[index],@battlers[index].pokemon)
        pbCommonAnimation("MegaEvolution2",@battlers[index],nil)
        meganame=(@battlers[index].pokemon.megaName rescue nil)
        if !meganame || meganame==""
          meganame=_INTL("Mega {1}",PBSpecies.getName(@battlers[index].pokemon.species))
        end
        pbDisplay(_INTL("{1} has Mega Evolved into {2}!",@battlers[index].pbThis,meganame))
        PBDebug.log("[Mega Evolution] #{@battlers[index].pbThis} Mega Evolved")
        side=(pbIsOpposing?(index)) ? 1 : 0
        owner=pbGetOwnerIndex(index)
        @megaEvolution[side][owner]=-2
      end
    These additions fix that problem. You can change the messages if you want.
    Strange, implementing it as you've suggested, it still doesn't seem that wild Pokemon are mega evolving. Is there a check elsewehre that needs to be amended? I tried setting pbCanMegaEvolve to only return true, but I'm not getting a reaction.
     
    Back
    Top