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

Evo During Battle

Braze

TQ Supremacy
  • 138
    Posts
    6
    Years
    And what if the Pokemon is holding ever stone or something which is blocking the Pokemon from evolving? Sorry if this is already answered somewhere in the world.
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    And what if the Pokemon is holding ever stone or something which is blocking the Pokemon from evolving? Sorry if this is already answered somewhere in the world.
    ? What do you mean?

    Well, simple, won't evolve:
    Code:
    # Checks whether a Pokemon can evolve now. If a block is given, calls the block
    # with the following parameters:
    #  Pokemon to check; evolution type; level or other parameter; ID of the new Pokemon species
    def pbCheckEvolutionEx(pokemon)
      return -1 if pokemon.species<=0 || pokemon.egg?
    [B][I][U]  return -1 if isConst?(pokemon.item,PBItems,:EVERSTONE)[/U][/I][/B]
      return -1 if isConst?(pokemon.species,PBSpecies,:PICHU) && pokemon.form==1
      return -1 if isConst?(pokemon.species,PBSpecies,:PIKACHU) && pokemon.form>0
      ret=-1
      for form in pbGetEvolvedFormData(pbGetFSpeciesFromForm(pokemon.species,pokemon.form))
        ret = yield pokemon,form[0],form[1],form[2]
        break if ret>0
      end
      return ret
    end
     

    Braze

    TQ Supremacy
  • 138
    Posts
    6
    Years
    ? What do you mean?

    Well, simple, won't evolve:
    Code:
    # Checks whether a Pokemon can evolve now. If a block is given, calls the block
    # with the following parameters:
    #  Pokemon to check; evolution type; level or other parameter; ID of the new Pokemon species
    def pbCheckEvolutionEx(pokemon)
      return -1 if pokemon.species<=0 || pokemon.egg?
    [B][I][U]  return -1 if isConst?(pokemon.item,PBItems,:EVERSTONE)[/U][/I][/B]
      return -1 if isConst?(pokemon.species,PBSpecies,:PICHU) && pokemon.form==1
      return -1 if isConst?(pokemon.species,PBSpecies,:PIKACHU) && pokemon.form>0
      ret=-1
      for form in pbGetEvolvedFormData(pbGetFSpeciesFromForm(pokemon.species,pokemon.form))
        ret = yield pokemon,form[0],form[1],form[2]
        break if ret>0
      end
      return ret
    end

    Edit : (Forgot to add reply lol)

    Well i figured it out already, thanks tho.
     
    Last edited:
  • 16
    Posts
    11
    Years
    • Seen Apr 25, 2020
    love this script! everything works great but it seems my back ground music in the over world stops playing after a pokemon evolves during battle. it starts up after entering a new map, but immediately after the battle its silent. any ideas? using 17.2, thanks in advance!
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    love this script! everything works great but it seems my back ground music in the over world stops playing after a pokemon evolves during battle. it starts up after entering a new map, but immediately after the battle its silent. any ideas? using 17.2, thanks in advance!

    Always read all post into the threads. I made a fix for that. Read the posts.
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    During battle, if my pokémon evolves and I cancel to evolution, after battle 'pbEvolution' will trigger again. How can fix that?
     
  • 1,682
    Posts
    8
    Years
    • Seen May 29, 2024
    During battle, if my pokémon evolves and I cancel to evolution, after battle 'pbEvolution' will trigger again. How can fix that?

    Im on my phone but heres a start. you'll want to add a second array like evolutionLevels that record if the pokemon canceled evolution. then in pbEvolutionCheck cross reference with that array to see if you should abort the attampt ant evolving because it already happened.

    the catch is, im not sure if the evolution code returns anything if you cancel it, though i guess ypu could always check if the pokemon species matches the newspecies it was supposed to be.
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    Hmmm, we don't need double check for battle, right? So, I made this (more simple, IMO):
    In 'PField_Battles', inside 'Events.onEndBattle+=proc {|sender,e|' remove these lines:
    Code:
    if USENEWBATTLEMECHANICS || (decidion!=2 && decision!=5)
      if $PokemonTemp.evolutionLevels
        pbEvolutionCheck($PokemonTemp.evolutionLevels)
        $PokemonTemp.evolutionLevels = nil
      end
    end
    Now, search 'Pokemon_Evolution' script, inside 'def pbEvolution(cancancel=true)', you will find 'if canceled'. Above 'else', add:
    Code:
    $game_map.autoplayAsCue
     
    Last edited:
  • 163
    Posts
    7
    Years
    • Seen today
    Ok, I followed everything but I can't make it work. My metapod didn't evolve to Butterfree in battle. Does the fact that i'm using EBS have anything to do with it? (I'm also using Following Pokemon and my sprite didn't update after the battle either, even with the add on).
     

    WolfPP

    Spriter/ Pixel Artist
  • 1,309
    Posts
    5
    Years
    You need to add that code inside EBS script instead Essentials script (vanilla version).
     
  • 163
    Posts
    7
    Years
    • Seen today
    You need to add that code inside EBS script instead Essentials script (vanilla version).

    I just tried, i put this code...

    #Evo During Battle by Zeak6464
    newspecies=pbCheckEvolution(thispoke)#edit
    if newspecies>0
    pbFadeOutInWithMusic(99999){
    if battler
    oldmoves=[]
    for i in 0...4
    oldmoves.push(battler.moves.id)
    end
    end
    evo=PokemonEvolutionScene.new
    evo.pbStartScreen(thispoke,newspecies)
    evo.pbEvolution
    evo.pbEndScreen
    if battler
    for i in 0...4
    if oldmoves!=thispoke.moves.id
    battler.moves=PokeBattle_Move.pbFromPBMove(self,thispoke.moves)
    end
    end
    @scene.pbChangePokemon(@battlers[battler.index],@battlers[battler.index].pokemon)
    battler.name=thispoke.name
    end
    }
    end


    ...On EBS but it seems it has trouble reading "Thispoke" because the game crashed :_C
     
    Last edited:
  • 163
    Posts
    7
    Years
    • Seen today
    I finally got it to work (At least the evolution screen), but it generates problems particularly with the following error.

    ---------------------------

    [Pokémon Essentials version 17.2]

    Exception: NoMethodError

    Message: undefined method `addUserAnimation' for nil:NilClass

    Following Pokemon:311:in `refresh_sprite'

    Following Pokemon:310:in `each'

    Following Pokemon:310:in `refresh_sprite'

    EliteBattle_1:2455:in `createEvolved'

    EliteBattle_1:2441:in `pbEvolution'

    Birthsigns:5106:in `pbGainExpOne'

    Birthsigns:5097:in `pbFadeOutInWithMusic'

    PSystem_Utilities:142:in `pbFadeOutIn'

    PSystem_Utilities:142:in `pbFadeOutInWithMusic'

    Birthsigns:5097:in `pbGainExpOne'

    -

    Perhaps the problem is with the Following script, or EBS or particularly that of Birthsigns, because although I applied all the add ons, the music does not return and the evolved Pokemon is not updated... Still a Caterpie :C ... ...
     
  • 4
    Posts
    4
    Years
    • Seen Apr 25, 2021
    Hey I added scripts and for some reason the evo starts after the fight

    Here the scripts

    PokeBattle_Battler:
    def item=(value)
    @item=value
    @pokemon.setItem(value) if @pokemon
    end

    def weight(attacker=nil)
    w=(@pokemon) ? @pokemon.weight : 500
    if !attacker || !attacker.hasMoldBreaker
    w*=2 if self.hasWorkingAbility(:HEAVYMETAL)
    w/=2 if self.hasWorkingAbility(:LIGHTMETAL)
    end
    w/=2 if self.hasWorkingItem(:FLOATSTONE)
    w+=@effects[PBEffects::WeightChange]
    w=w.floor
    w=1 if w<1
    return w
    end

    def name
    if @effects[PBEffects::Illusion]
    return @effects[PBEffects::Illusion].name
    end
    return @name
    end

    def name=(value)
    @name=value
    end

    def displayGender
    if @effects[PBEffects::Illusion]
    return @effects[PBEffects::Illusion].gender
    end
    return self.gender
    end

    def isShiny?
    if @effects[PBEffects::Illusion]
    return @effects[PBEffects::Illusion].isShiny?

    PokeBattle_Battle:

    return
    elsif pbDisplayConfirm(_INTL("Should {1} stop learning {2}?",pkmnname,movename))
    pbDisplayPaused(_INTL("{1} did not learn {2}.",pkmnname,movename))
    return
    end
    elsif pbDisplayConfirm(_INTL("Should {1} stop learning {2}?",pkmnname,movename))
    pbDisplayPaused(_INTL("{1} did not learn {2}.",pkmnname,movename))
    return
    # Finding all moves learned at this level
    movelist=thispoke.getMoveList
    for k in movelist
    if k[0]==thispoke.level # Learned a new move
    pbLearnMove(index,k[1])
    end
    end
    # Finding all moves learned at this level
    movelist=thispoke.getMoveList
    for k in movelist
    if k[0]==thispoke.level # Learned a new move
    pbLearnMove(index,k[1])
    end
    end
    #Evo During Battle
    newspecies=pbCheckEvolution(thispoke)#edit
    if newspecies>0
    pbFadeOutInWithMusic(99999){
    evo=PokemonEvolutionScene.new
    evo.pbStartScreen(thispoke,newspecies)
    evo.pbEvolution
    evo.pbEndScreen
    if battler
    @scene.pbChangePokemon(@battlers[battler.index],@battlers[battler.index].pokemon)
    battler.name=thispoke.name
    end
    }
    end

    end
    end
    end


    I don't know maybe it is because these scripts?
    LukaUtilities
    Yankas' Radial Menu Script
    PokéCenter Monitor Icons
    Follow Pokemon
    Easy Mouse System
    Fancy Badges
     
  • 163
    Posts
    7
    Years
    • Seen today
    I've finally made this work organically in the game ... I only have one problem ...

    I am using Elite Battle System and when a Pokemon evolves, the combat HUD does not disappear ...

    does anybody know how I can fix it?

    Evo During Battle
     

    thepsynergist

    Vinemon: Sauce Edition Programmer and Composer
  • 795
    Posts
    15
    Years
    I added the change to allow for evolution stones to work in battle, however, if it learns a move as a result of the evolution, it won't actually learn it until after the battle resolves. I tested this by replacing an existing move on evolution, but the replaced move didn't change until after the battle.
     
    Last edited:
  • 39
    Posts
    8
    Years
    • Seen May 24, 2024
    I'm having a strange issue, I'm using V17. 2 and before starting the evolution the msg box places in the top of the screen, I guess this is because the stats message tells the text box to place in the upper part of the screen. How can I tell the message box to place in the lower part of the screen from the scripts? I'm sure there's a command, but I don't know which one (and I assume the battle message text has it as the text box returns to the lower part after the evolution)
     

    thepsynergist

    Vinemon: Sauce Edition Programmer and Composer
  • 795
    Posts
    15
    Years
    Not sure how to do it via scripts, but if you select "Change Text Options" and select 'Bottom' on the window, before the battle starts in the event, it should fix it.
     
  • 39
    Posts
    8
    Years
    • Seen May 24, 2024
    Not sure how to do it via scripts, but if you select "Change Text Options" and select 'Bottom' on the window, before the battle starts in the event, it should fix it.

    Not really because the stats changes when leveling up is a script inside the battle and there's where there's a command that puts the text box in the upper part, so I need the piece of code to put it down again.

    What is more strange to me is that no one has reported this so I don't know why this is happening to me.
     
    Back
    Top