• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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

New moves after evolution need to be fixed else thanks.

???
Did you read all post here?
Vendily mades a script to att pokemon battler's moveset after evolves during battle.
 
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.
 
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
 
? 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:
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!
 
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.
 
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.
 
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:
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).
 
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:
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 ... ...
 
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
 
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?

[PokeCommunity.com] Evo During Battle
 
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:
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)
 
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