• 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

Venomous_Zero86

Pokemon Chosen Ones (Coming Soon)
120
Posts
8
Years
  • Age 21
  • Seen Feb 11, 2022
PokeBattle_Battler:
9eKEv4F.png

PokeBattle_Battle:
DSmMJlB.png

is there a way to make it if the pokemon is holding it evolutionary item it will evole with it using the item
 
1,677
Posts
8
Years
  • Age 23
  • Seen today
is there a way to make it if the pokemon is holding it evolutionary item it will evole with it using the item

Given the fact that my script uses pbCheckEvolution, it should already take into account held items, as seen in pbMiniCheckEvolution, the checking method that is fed the evolution data. There shouldn't be a need to manually add the feature. Do you have a specific example of a pokemon failing to evolve with a held item?
Or are you asking to add in evolutionary stones being able to evolve in battle?
 

Venomous_Zero86

Pokemon Chosen Ones (Coming Soon)
120
Posts
8
Years
  • Age 21
  • Seen Feb 11, 2022
Given the fact that my script uses pbCheckEvolution, it should already take into account held items, as seen in pbMiniCheckEvolution, the checking method that is fed the evolution data. There shouldn't be a need to manually add the feature. Do you have a specific example of a pokemon failing to evolve with a held item?
Or are you asking to add in evolutionary stones being able to evolve in battle?

asking to add in evolutionary stones being able to evolve in battle
 
1,677
Posts
8
Years
  • Age 23
  • Seen today
asking to add in evolutionary stones being able to evolve in battle

Looking around, you just need to add an item handler for BattleUseOnPokemon, then set the evo stones to be able to be used on a pokemon, like a potion.

Code:
ItemHandlers::BattleUseOnPokemon.addIf(proc{|item| pbIsEvolutionStone?(item)},
   proc{|item,pokemon,battler,scene|
     if (pokemon.isShadow? rescue false)
       scene.pbDisplay(_INTL("It won't have any effect."))
       next false
     end
     newspecies=pbCheckEvolution(pokemon,item)
     if newspecies<=0
       scene.pbDisplay(_INTL("It won't have any effect."))
       next false
     else
       pbFadeOutInWithMusic(99999){
          evo=PokemonEvolutionScene.new
          evo.pbStartScreen(pokemon,newspecies)
          evo.pbEvolution(false)
          evo.pbEndScreen
          if battler
              scene.pbChangePokemon(battler,battler.pokemon)
              battler.name=pokemon.name
          end
       }
       next true
     end
})
Toss this in PItem_ItemEffects, give your evo stones in battle useability, and bam, evo stones in battle.
Mind you I only tested this on v17.2.
 

Venomous_Zero86

Pokemon Chosen Ones (Coming Soon)
120
Posts
8
Years
  • Age 21
  • Seen Feb 11, 2022
Looking around, you just need to add an item handler for BattleUseOnPokemon, then set the evo stones to be able to be used on a pokemon, like a potion.

Code:
ItemHandlers::BattleUseOnPokemon.addIf(proc{|item| pbIsEvolutionStone?(item)},
   proc{|item,pokemon,battler,scene|
     if (pokemon.isShadow? rescue false)
       scene.pbDisplay(_INTL("It won't have any effect."))
       next false
     end
     newspecies=pbCheckEvolution(pokemon,item)
     if newspecies<=0
       scene.pbDisplay(_INTL("It won't have any effect."))
       next false
     else
       pbFadeOutInWithMusic(99999){
          evo=PokemonEvolutionScene.new
          evo.pbStartScreen(pokemon,newspecies)
          evo.pbEvolution(false)
          evo.pbEndScreen
          if battler
              scene.pbChangePokemon(battler,battler.pokemon)
              battler.name=pokemon.name
          end
       }
       next true
     end
})
Toss this in PItem_ItemEffects, give your evo stones in battle useability, and bam, evo stones in battle.
Mind you I only tested this on v17.2.


thank so much ill try this when i get home
 
1,677
Posts
8
Years
  • Age 23
  • Seen today
What program do I use to get to that script

we are using a heavily modified rpg maker xp project called Pokemon essentials. Pokecommunity no longer allows linking to Essentials downloads.
 
18
Posts
5
Years
  • Age 36
  • Seen Sep 4, 2019
How can I find the battle_battler script

we are using a heavily modified rpg maker xp project called Pokemon essentials. Pokecommunity no longer allows linking to Essentials downloads.

I'm using xse but I don't know how to find the battle_battler script I don't know how to get into the games battle script

evobattlev4.gif

Place on Line 2050, PokeBattle_Battle, end of def pbGainExpOne or find "# Finding all moves learned at this level" after the 2nd end

Make sure to put this code outside of a method.
Code:
def name=(value)
    @name=value
  end
Code:
         [B]# Finding all moves learned at this level[/B]
          movelist=thispoke.getMoveList
          for k in movelist
            if k[0]==thispoke.level   # Learned a new move
              pbLearnMove(index,k[1])
            end
          end
[B]#Evo During Battle[/B]
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

Credit:
Vendily

How do I get to find this
 
Last edited by a moderator:
1,403
Posts
9
Years
  • Seen yesterday
I'm using xse but I don't know how to find the battle_battler script I don't know how to get into the games battle script

I think you might have misunderstood. XSE is a rom hacking tool, but the Game Development part of the forum is about anything but rom hacking. Mostly RPG Maker XP and Pok?mon Essentials, which is what this thread is about.
 

Venomous_Zero86

Pokemon Chosen Ones (Coming Soon)
120
Posts
8
Years
  • Age 21
  • Seen Feb 11, 2022
So I can't get pokemon essentials

well if you want to make your game on ROM hacking u go to the right section for that but if u want to make your game on Pokemon essentials sorry to say the have discontinued links if u want if u have discord i can send you the link for pokemon essentials version 17 but u have to get rpgxp by yourself when am home that am out right now
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Nice! i will use.

Cya "wait end battle to evolve"

EDIT: Im usin a script when pokemon evolves, learn a move. Example: Decidueye learns SPIRITSHACKLE after Dantrix evolves to him.
So, your script do not att this in battle. Can you make a class or def for that? Just a att, really

Ty ty! :D
 
Last edited:
1,677
Posts
8
Years
  • Age 23
  • Seen today
Nice! i will use.

Cya "wait end battle to evolve"

EDIT: Im usin a script when pokemon evolves, learn a move. Example: Decidueye learns SPIRITSHACKLE after Dantrix evolves to him.
So, your script do not att this in battle. Can you make a class or def for that? Just a att, really

Ty ty! :D

As you did not link to a script thread, I used the updated version from this thread to test. But I could not reproduce your results in v17.2 with the only modifications being this script and the updated evo moves.
I tested with both in battle stone evolution and regular exp gain evolution in a trainer battle.
you should check if you have the same problem with a regular evolution.
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
As you did not link to a script thread, I used the updated version from this thread to test. But I could not reproduce your results in v17.2 with the only modifications being this script and the updated evo moves.
I tested with both in battle stone evolution and regular exp gain evolution in a trainer battle.
you should check if you have the same problem with a regular evolution.

Oh, really sorry. But yearh, its that thread.

And i checked evolvin a ivysaur to venusaur (learns PETALDANCE) and i have the same problem: doenst show the move in battle, after evolution... Only after (win or lose).
 
1,677
Posts
8
Years
  • Age 23
  • Seen today
Oh, really sorry. But yearh, its that thread.

And i checked evolvin a ivysaur to venusaur (learns PETALDANCE) and i have the same problem: doenst show the move in battle, after evolution... Only after (win or lose).

Ah there we go, our problem was that the battler was not updating. Easy peasy.
Code:
          #Evo During Battle
          newspecies=pbCheckEvolution(thispoke)#edit
          if newspecies>0
            pbFadeOutInWithMusic(99999){
            if battler
              oldmoves=[]
              for i in 0...4
                oldmoves.push(battler.moves[i].id)
              end
            end
            evo=PokemonEvolutionScene.new
            evo.pbStartScreen(thispoke,newspecies)
            evo.pbEvolution
            evo.pbEndScreen
            if battler
              for i in 0...4
                if oldmoves[i]!=thispoke.moves[i].id
                  battler.moves[i]=PokeBattle_Move.pbFromPBMove(self,thispoke.moves[i])
                end
              end
              @scene.pbChangePokemon(@battlers[battler.index],@battlers[battler.index].pokemon)
              battler.name=thispoke.name
              
            end
          }
          end
this is our new in exp code. And if you are using item evolutions, replace the old one with this
Code:
ItemHandlers::BattleUseOnPokemon.addIf(proc{|item| pbIsEvolutionStone?(item)},
   proc{|item,pokemon,battler,scene|
     if (pokemon.isShadow? rescue false)
       scene.pbDisplay(_INTL("It won't have any effect."))
       next false
     end
     newspecies=pbCheckEvolution(pokemon,item)
     if newspecies<=0
       scene.pbDisplay(_INTL("It won't have any effect."))
       next false
     else
       pbFadeOutInWithMusic(99999){
          if battler
            oldmoves=[]
            for i in 0...4
              oldmoves.push(battler.moves[i].id)
            end
          end
          evo=PokemonEvolutionScene.new
          evo.pbStartScreen(pokemon,newspecies)
          evo.pbEvolution(false)
          evo.pbEndScreen
          if battler
              for i in 0...4
                if oldmoves[i]!=pokemon.moves[i].id
                  battler.moves[i]=PokeBattle_Move.pbFromPBMove(self,pokemon.moves[i])
                end
              end
              scene.pbChangePokemon(battler,battler.pokemon)
              battler.name=pokemon.name
          end
       }
       next true
     end
})
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Ah there we go, our problem was that the battler was not updating. Easy peasy.
Code:
          #Evo During Battle
          newspecies=pbCheckEvolution(thispoke)#edit
          if newspecies>0
            pbFadeOutInWithMusic(99999){
            if battler
              oldmoves=[]
              for i in 0...4
                oldmoves.push(battler.moves[i].id)
              end
            end
            evo=PokemonEvolutionScene.new
            evo.pbStartScreen(thispoke,newspecies)
            evo.pbEvolution
            evo.pbEndScreen
            if battler
              for i in 0...4
                if oldmoves[i]!=thispoke.moves[i].id
                  battler.moves[i]=PokeBattle_Move.pbFromPBMove(self,thispoke.moves[i])
                end
              end
              @scene.pbChangePokemon(@battlers[battler.index],@battlers[battler.index].pokemon)
              battler.name=thispoke.name
              
            end
          }
          end
this is our new in exp code. And if you are using item evolutions, replace the old one with this
[/CODE]

Hm, i replace and give me a syntax error, maybe cause to "end". So, i put that script:

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

and give me that error
Code:
---------------------------
Pokemon Essentials
---------------------------
[Pokémon Essentials version 17.2]

Exception: NameError

Message: undefined local variable or method `oldmoves' for #<PokeBattle_Battle:0x9c10bc8>

PokeBattle_Battle:2014:in `pbGainExpOne'

PokeBattle_Battle:2013:in `each'

PokeBattle_Battle:2013:in `pbGainExpOne'

PokeBattle_Battle:2007:in `pbFadeOutInWithMusic'

PSystem_Utilities:142:in `pbFadeOutIn'

PSystem_Utilities:142:in `pbFadeOutInWithMusic'

PokeBattle_Battle:2007:in `pbGainExpOne'

PokeBattle_Battle:1967:in `loop'

PokeBattle_Battle:2023:in `pbGainExpOne'

PokeBattle_Battle:1817:in `pbGainEXP'

Ty to help me <3

EDIT: Im only editin 'PokeBattle_Battle' script


EDITED AND SOLVED
OMG. Im really newbie for this. But i got it! (i forget to put in upside):
FORGIVE ME PLS lol
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[i].id)
              end
            end
            evo=PokemonEvolutionScene.new
            evo.pbStartScreen(thispoke,newspecies)
            evo.pbEvolution
            evo.pbEndScreen
            if battler
              for i in 0...4
                if oldmoves[i]!=thispoke.moves[i].id
                  battler.moves[i]=PokeBattle_Move.pbFromPBMove(self,thispoke.moves[i])
                end
              end
              @scene.pbChangePokemon(@battlers[battler.index],@battlers[battler.index].pokemon)
              battler.name=thispoke.name
            end
          }
          end
        end
      end
    end
  end
 
Last edited:

thepsynergist

Vinemon: Sauce Edition Programmer and Composer
795
Posts
15
Years
Heya, just wanted to let you know, this script is amazing. I'm currently using it for my Vinemon game, but I had a quick question I'm hoping can be answered...

I'm using this in tandem with EBS, however, after the battle is complete, the overworld music doesn't play.
Moving into another route or using an event command to restart the music works, but what can I do to resume the overworld music after the battle in which a Pokemon evolves?
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Sorry about to necropost but I'm having the same problem. If i add this:
Spoiler:


After battle, in Overworld, the BGM won't play.

How can i fix that?

Thanks in advanced!

EDIT: SOLVED! Add the red line:
Spoiler:
 
Last edited:
18
Posts
5
Years
  • Age 36
  • Seen Sep 4, 2019
well if you want to make your game on ROM hacking u go to the right section for that but if u want to make your game on Pokemon essentials sorry to say the have discontinued links if u want if u have discord i can send you the link for pokemon essentials version 17 but u have to get rpgxp by yourself when am home that am out right now

Thank you i have gotten all of it now im just trying to get it figured out though im very bad at codin and even worse at making sprites. lol but im trying to learn!
 
Back
Top