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

Move errors

orangejediman

Snivy's the badass of Gen V!
81
Posts
15
Years
  • Hello! I was putting in some custom things, when moves stopped working. It shows ___ used ____! but no effect happens - this also does not apply to anything that is not targeting an opponent.

    I identified where it happens- basically the first pbDisplay (q) shows up when testing, but the second one (the r) does not. which means the issue has to happen in here:

    Code:
    def pbProcessNonMultiHitMove(thismove,user,target,nocheck=false,alltargets=nil,showanimation=true)
        @battle.pbDisplay(_INTL("q"))
        if !nocheck && !pbSuccessCheck(thismove,user,target,true)
          if thismove.function==0x10B # Hi Jump Kick, Jump Kick
            #TODO: Not shown if message is "It doesn't affect XXX..."
            @battle.pbDisplay(_INTL("{1} kept going and crashed!",user.pbThis))
            damage=[1,(user.totalhp/2).floor].max
            if damage>0
              @battle.scene.pbDamageAnimation(user,0)
              user.pbReduceHP(damage)
            end
            user.pbFaint if user.hp<=0
          end
          user.effects[PBEffects::Outrage]=0 if thismove.function==0xD2 # Outrage
          user.effects[PBEffects::Rollout]=0 if thismove.function==0xD3 # Rollout
          user.effects[PBEffects::FuryCutter]=0 if thismove.function==0x91 # Fury Cutter
          user.effects[PBEffects::EchoedVoice]=0 if thismove.function==0x92 # Echoed Voice
          user.effects[PBEffects::Stockpile]=0 if thismove.function==0x113 # Spit Up
          return
        else
          if thismove.function==0x91 # Fury Cutter
            user.effects[PBEffects::FuryCutter]+=1 if user.effects[PBEffects::FuryCutter]<4
          else
            user.effects[PBEffects::FuryCutter]=0
          end
          if thismove.function==0x92 # Echoed Voice
            user.effects[PBEffects::EchoedVoice]+=1 if user.effects[PBEffects::EchoedVoice]<5
          else
            user.effects[PBEffects::EchoedVoice]=0
          end
        end
        @battle.pbDisplay(_INTL("r"))
        damage=thismove.pbEffect(user,target,0,alltargets,showanimation) [...]

    this is in PokeBattle_Battler. Is there any problem that you all can see, or more that you need to help, please help me.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Why did you say you've added custom stuff, and then not show it to us to analyse?

    The problem is somewhere in def pbSuccessCheck, by the way.
     

    orangejediman

    Snivy's the badass of Gen V!
    81
    Posts
    15
    Years
  • Well, the changes are kind of spread out and I'd already boiled it down to in that section of code. The problem is that i have not actually changed anything in pbSuccessCheck, as can be seen here:

    Spoiler:

    So I'm not quite sure what's going on. I've added some ability effects in the damage calculation such as Fur Coat, but that part of the code isn't even reached.
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    Set the Internal flag (it's a Debug option, at the bottom of the list) and try again. Show us what the error message is.
     

    orangejediman

    Snivy's the badass of Gen V!
    81
    Posts
    15
    Years
  • This was the error message after an abomasnow used Icy Wind:

    Spoiler:
     
    Back
    Top