Advertiser Content

mgriffin

Online now
Posted 1 Minute Ago
766 posts
5.6 Years
Primordial weather is immediately canceled in double battles (and probably doesn't work in singles if only the foe has the ability).
The code currently looks like this. The "if !hasabil" is inside the for loop, which means we'll potentially cancel the weather on each iteration.
Spoiler:

  def pbPrimordialWeather
    # End Primordial Sea, Desolate Land, Delta Stream
    hasabil=false
    case @weather
    when PBWeather::HEAVYRAIN
      for i in 0...4
        if isConst?(@battlers[i].ability,PBAbilities,:PRIMORDIALSEA) &&
           !@battlers[i].isFainted?
          hasabil=true; break
        end
        if !hasabil
          @weather=0
          pbDisplayBrief("The heavy rain has lifted!")
        end
      end
    when PBWeather::HARSHSUN
      for i in 0...4
        if isConst?(@battlers[i].ability,PBAbilities,:DESOLATELAND) &&
           !@battlers[i].isFainted?
          hasabil=true; break
        end
        if !hasabil
          @weather=0
          pbDisplayBrief("The harsh sunlight faded!")
        end
      end

I think it should look like this (untested):
Spoiler:

  def pbPrimordialWeather
    # End Primordial Sea, Desolate Land, Delta Stream
    hasabil=false
    case @weather
    when PBWeather::HEAVYRAIN
      for i in 0...4
        if isConst?(@battlers[i].ability,PBAbilities,:PRIMORDIALSEA) &&
           !@battlers[i].isFainted?
          hasabil=true; break
        end
      end
      if !hasabil
        @weather=0
        pbDisplayBrief("The heavy rain has lifted!")
      end
    when PBWeather::HARSHSUN
      for i in 0...4
        if isConst?(@battlers[i].ability,PBAbilities,:DESOLATELAND) &&
           !@battlers[i].isFainted?
          hasabil=true; break
        end
      end
      if !hasabil
        @weather=0
        pbDisplayBrief("The harsh sunlight faded!")
      end
Male
Seen 23 Hours Ago
Posted 1 Week Ago
22 posts
5.1 Years
I don't know if this has been reported before, but these moves don't work correctly.
I'm using unmodified 17.2 Essentials with USENEWBATTLEMECHANICS = true
First Flying Press doesn't add the Flying-type damage, to fix this change class PokeBattle_Move_144 in PokeBattle_MoveEffects from this:
Spoiler:
class PokeBattle_Move_144 < PokeBattle_Move
  def pbModifyDamage(damagemult,attacker,opponent)
    type=getConst(PBTypes,:FLYING) || -1
    if type>=0
      mult=PBTypes.getCombinedEffectiveness(type,
         opponent.type1,opponent.type2,opponent.effects[PBEffects::Type3])
      return ((damagemult*mult)/8).round
    end
    return damagemult
  end
  def tramplesMinimize?(param=1)
    return true if param==1 && USENEWBATTLEMECHANICS # Perfect accuracy
    return true if param==2 # Double damage
    return false
  end
end

to this:
Spoiler:
class PokeBattle_Move_144 < PokeBattle_Move
  def pbAdditionalEffect(attacker,opponent)
    return false
  end
  def tramplesMinimize?(param=1)
    return true if param==1 && USENEWBATTLEMECHANICS # Perfect accuracy
    return true if param==2 # Double damage
    return false
  end
end

Then add this block to PokeBattle_Move right after the Freeze-Dry block and before this line
return mod1*mod2*mod3*(mult/8.0)
Spoiler:
          #Flying Press.  Add secondary move type modifier
    if @function==0x144 
      type2=getConst(PBTypes,:FLYING) || -1
      if type2>=0
        mult=PBTypes.getCombinedEffectiveness(type2,
         opponent.type1,opponent.type2,opponent.effects[PBEffects::Type3])
    end

Thanks to mgriffin for this solution.

The next move is King's Shield. The problem with it is it will continue to protect and never fails when used consecutively.
It worked for me by changing this line in PokeBattle_MoveEffects in the King's Shield block
(!USENEWBATTLEMECHANICS &&
       @battle.pbRandom(65536)>=(65536/attacker.effects[PBEffects::ProtectRate]).floor)
to this:
@battle.pbRandom(65536)>=(65536/attacker.effects[PBEffects::ProtectRate]).floor
And finally Knock Off does the same damage whether the opponent loses its item or not, I still don't know how to fix this yet since I haven't messed around with it.
Male
Seen 23 Hours Ago
Posted 1 Week Ago
22 posts
5.1 Years
The import all battle animations option always gives this error when it finishes importing:
Spoiler:
---------------------------
Pokemon Test
---------------------------
[Pokémon Essentials version 17.2]

Exception: NameError

Message: undefined local variable or method `index' for #<PokemonLoadScreen:0x9be9158>

Debug_Actions:798:in `pbImportAllAnimations'

Debug_Menu:668:in `pbDebugMenuActions'

Debug_Menu:744:in `pbDebugMenu'

Debug_Menu:710:in `loop'

Debug_Menu:746:in `pbDebugMenu'

PScreen_Load:456:in `pbStartLoadScreen'

PScreen_Load:456:in `pbFadeOutIn'

PScreen_Load:456:in `pbStartLoadScreen'

PScreen_Load:322:in `loop'

PScreen_Load:462:in `pbStartLoadScreen'



This exception was logged in

C:\Users\fifty\Saved Games\Pokemon Test\errorlog.txt.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------

DjinnAndTonic

Disgaeamon

Nagoya
Seen 1 Day Ago
Posted 3 Days Ago
5 posts
6 Years
It seems that trying to search the PokeDex by Weight while having your computer set to a US Country setting will produce a crash. It's an easy fix should you run into this:

On line ~595 in PScreen_PokedexMain
simply change the params[6] and params[7] to sel[0] and sel[1] , respectively.

From this:
      if pbGetCountry==0xF4   # If the user is in the United States
        wt1 = (parama[6]>=@weightCommands.length) ? 99990 : (wt1/0.254).round
        wt2 = (params[7]]<0) ? 99990 : (wt2/0.254).round
        txt1 = sprintf("%.1f",wt1/10.0)
        txt2 = sprintf("%.1f",wt2/10.0)
        hwoffset = true
      else
to this:

      if pbGetCountry==0xF4   # If the user is in the United States
        wt1 = (sel[0]>=@weightCommands.length) ? 99990 : (wt1/0.254).round
        wt2 = (sel[1]<0) ? 99990 : (wt2/0.254).round
        txt1 = sprintf("%.1f",wt1/10.0)
        txt2 = sprintf("%.1f",wt2/10.0)
        hwoffset = true
      else
Advertiser Content