• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - 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.

[Scripting Question] This script should increase the stat base of the shinys by 10% and that's it. But every time they go up a level, the base stats increase and multiply

def baseStats
ret = pbGetSpeciesData(@species,formSimple,SpeciesBaseStats)
if shiny?
ret[PBStats::ATTACK] *= 1.2
ret[PBStats::SPATK] *= 1.2
end
return ret.clone
end
You can change the 1.2 if you want.

This script should increase the stat base of the shinys by 10% and that's it. But every time they go up a level, the base stats increase and multiply infinitely ...

know how to fix?
 
def baseStats
ret = pbGetSpeciesData(@species,formSimple,SpeciesBaseStats)
if shiny?
ret[PBStats::ATTACK] *= 1.2
ret[PBStats::SPATK] *= 1.2
end
return ret.clone
end
You can change the 1.2 if you want.

This script should increase the stat base of the shinys by 10% and that's it. But every time they go up a level, the base stats increase and multiply infinitely ...

know how to fix?

Sorry, it's my mistake.
Actually it's not the base stat that you need to modify, but the actual stats. So, remove these lines:
Code:
    if shiny?
      ret[PBStats::ATTACK] *= 1.2
      ret[PBStats::SPATK] *= 1.2
    end
from the function def baseStats.

Go to the file PokeBattle_Pokemon, and find the function:
Code:
  def calcStats
Just at the end of the function, add these lines:
Code:
    if self.isShiny?
      @attack = (@attack * 1.1).floor 
      @spatk = (@spatk * 1.1).floor 
    end
Note: if you're using the ZUD plugin by Lucidious and myself, then it's not in PokeBattle_Pokemon, but in ZUD_01_Settings_Misc.
 
Back
Top