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

All Pokémon Mega Evolve, even without a Mega Stone

6
Posts
4
Years
    • Seen Oct 1, 2023
    Hello guys,
    I'm using Essentials v17 and I have an issue with the mega evolution script. All the pokémon that have an alternative form are mega evolving and they evolve regardless they are using a mega stone or not. Does anyone know how to solve this problem?
     

    Diegou18

    Forever Chandelure lover.
    75
    Posts
    6
    Years
    • Seen Aug 16, 2021
    Hello guys,
    I'm using Essentials v17 and I have an issue with the mega evolution script. All the pokémon that have an alternative form are mega evolving and they evolve regardless they are using a mega stone or not. Does anyone know how to solve this problem?

    Have you modified anything in "def pbCanMegaEvolve?(index)" or in "def pbEnemyShouldMegaEvolve?(index)"?
     
    6
    Posts
    4
    Years
    • Seen Oct 1, 2023
    Have you modified anything in "def pbCanMegaEvolve?(index)" or in "def pbEnemyShouldMegaEvolve?(index)"?

    No. The code looks like this:

    ################################################################################
    # Mega Evolve battler.
    ################################################################################
    def pbCanMegaEvolve?(index)
    return false if $game_switches[NO_MEGA_EVOLUTION]
    return false if !@battlers[index].hasMega?
    return false if pbIsOpposing?(index) && !@opponent
    return true if $DEBUG && Input.press?(Input::CTRL)
    return false if !pbHasMegaRing?(index)
    side=(pbIsOpposing?(index)) ? 1 : 0
    owner=pbGetOwnerIndex(index)
    return false if @megaEvolution[side]!=-1
    return false if @battlers[index].effects[PBEffects::SkyDrop]
    return true
    end

    def pbRegisterMegaEvolution(index)
    side=(pbIsOpposing?(index)) ? 1 : 0
    owner=pbGetOwnerIndex(index)
    @megaEvolution[side]=index
    end

    def pbMegaEvolve(index)
    return if !@battlers[index] || !@battlers[index].pokemon
    return if !(@battlers[index].hasMega? rescue false)
    return if (@battlers[index].isMega? rescue true)
    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
    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} became #{meganame}")
    side=(pbIsOpposing?(index)) ? 1 : 0
    owner=pbGetOwnerIndex(index)
    @megaEvolution[side]=-2
    end
     

    Diegou18

    Forever Chandelure lover.
    75
    Posts
    6
    Years
    • Seen Aug 16, 2021
    No. The code looks like this:

    Spoiler:

    Mine is here:
    Spoiler:

    But I think that you should check this one, maybe you have it different. (Btw, I'm using v17.2 and I don't know if there's any difference in this case with v17).
    Code:
    ################################################################################
    # Decide whether the opponent should Mega Evolve their Pokémon.
    ################################################################################
      def pbEnemyShouldMegaEvolve?(index)
        # Simple "always should if possible"
        return pbCanMegaEvolve?(index)
      end

    If you need it, there you have my Pokemon_MegaEvolution script.
    Spoiler:

    Be careful, I have some scripts that aren't in an Essentials without modifying (like Mimikyu's parts).
     
    Last edited:
    6
    Posts
    4
    Years
    • Seen Oct 1, 2023
    It works perfectly now. It looks like the problem was in the Pokemon_MegaEvolution script. Some things were missing. Thank you so much!
     
    Back
    Top