• 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.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Akari, Selene, Mint, Solana - 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.

Adding EFFECTMESSAGES from Gen 6 Project to clean Essentials

  • 79
    Posts
    9
    Years
    • Seen Jan 17, 2017
    The title stands for itself.
    I tried to copy and paste it to KleinsBWKit but it wont work.
    I would be very grateful if anybody can help me.
     
    You need to do the following things:

    1.) Paste this code in PokeBattle_Scene, underneath def pbDisplayConfirmMessage:
    Code:
      def pbDisplayEffect(battler,hide=true)
        return if !EFFECTMESSAGES
        battleEffect = @battle.pbIsOpposing?(battler.index) ? @sprites["EffectFoe"] : @sprites["EffectPlayer"]
        if battleEffect==@sprites["EffectFoe"]
          battleEffect.x-=192
          battleEffect.visible=true
          battleEffect.zoom_y=0.5
          while battleEffect.x < 0
            battleEffect.x+=24
            battleEffect.zoom_y+=0.625 if battleEffect.zoom_y<=1.0
            battleEffect.update
            pbGraphicsUpdate
            pbFrameUpdate(nil)
          end
        elsif battleEffect==@sprites["EffectPlayer"]
          battleEffect.x+=192
          battleEffect.visible=true
          battleEffect.zoom_y=0.5
          while battleEffect.x > Graphics.width-192
            battleEffect.x-=24
            battleEffect.zoom_y+=0.625 if battleEffect.zoom_y<=1.0
            battleEffect.update
            pbGraphicsUpdate
            pbFrameUpdate(nil)
          end
        end  
        effect=PBAbilities.getName(battler.ability)
        textbitmap=BitmapSprite.new(Graphics.width,Graphics.height,@viewport)
        textbitmap.z = battleEffect.z+1
        textbitmap.bitmap.font.name=MessageConfig.pbGetSystemFontName()
        if battleEffect==@sprites["EffectFoe"]
          pbDrawOutlineText(textbitmap.bitmap,battleEffect.x+6,battleEffect.y-9,192,48,battler.name+"'s",Color.new(255,255,255,255),Color.new(150,150,150,150),0)
          pbDrawOutlineText(textbitmap.bitmap,battleEffect.x+6,battleEffect.y+9,192,48,effect,Color.new(255,255,255,255),Color.new(150,150,150,150),0)
        elsif battleEffect==@sprites["EffectPlayer"]
          pbDrawOutlineText(textbitmap.bitmap,battleEffect.x-6,battleEffect.y-9,192,48,battler.name+"'s",Color.new(255,255,255,255),Color.new(150,150,150,150),2)
          pbDrawOutlineText(textbitmap.bitmap,battleEffect.x-6,battleEffect.y+9,192,48,effect,Color.new(255,255,255,255),Color.new(150,150,150,150),2)
        end
        j= hide ? 60 : 15
        j.times do
          pbGraphicsUpdate
          pbFrameUpdate(nil)
        end
        @textbitmap=textbitmap
        pbHideEffect(battler) if hide
      end
      
      def pbHideEffect(battler)
        return if !(EFFECTMESSAGES)
        battleEffect = @battle.pbIsOpposing?(battler.index) ? @sprites["EffectFoe"] : @sprites["EffectPlayer"]
        if @textbitmap
          @textbitmap.bitmap.clear
          @textbitmap.bitmap.dispose
        end
        if battleEffect==@sprites["EffectFoe"]
          while battleEffect.x > -192
            battleEffect.x-=24
            battleEffect.zoom_y-=0.4 if battleEffect.zoom_y>0.2
            battleEffect.update
            pbGraphicsUpdate
            pbFrameUpdate(nil)
          end
        elsif battleEffect==@sprites["EffectPlayer"]
          while battleEffect.x < Graphics.width
            battleEffect.x+=24
            battleEffect.zoom_y-=0.4 if battleEffect.zoom_y>0.2
            battleEffect.update
            pbGraphicsUpdate
            pbFrameUpdate(nil)
          end
        end
        battleEffect.zoom_y=1.0
        battleEffect.visible=false
      end

    2.) Paste this code in PokeBattle_Battle, underneath def pbCommonAnimation:
    Code:
      def pbDisplayEffect(battler,hide=true)
        @scene.pbDisplayEffect(battler,hide)
      end

    3.) Use this code whenever you want to display a battler's effect:
    Code:
    @battle.pbDisplayEffect(battler)
    Sometimes, the word "battler" might be replaced by any of the following:
    - attacker
    - opponent
    - user
    - target
    - attacker.pbPartner
    - opponent.pbPartner
    - user.pbPartner
    - target.pbPartner

    Be mindful of the context. Also note that if you're using this in the script section PokeBattle_Battle, you use
    Code:
    self.pbDisplayEffect(battler)
    instead.
     
    Hmm thanks ^^
    But the abilitymessage.png doesnt show up and I cant see the script
    calling the picture "abilitymessages.png."

    And if I want it to work for the ability "Pressure" do I have to do it like this?:

    # Pressure message
    if self.hasWorkingAbility(:PRESSURE) && onactive
    @battle.pbDisplayEffect(battler)
    end
     
    Hmm thanks ^^
    But the abilitymessage.png doesnt show up and I cant see the script
    calling the picture "abilitymessages.png."

    And if I want it to work for the ability "Pressure" do I have to do it like this?:

    Code:
     # Pressure message
        if self.hasWorkingAbility(:PRESSURE) && onactive
          @battle.pbDisplayEffect(self)
          @battle.pbDisplay(_INTL("{1} is exerting its Pressure!",self.pbThis))
        end

    Yes, that's how you do it.

    Also, I attached what should be in abilitymessages.png
     

    Attachments

    • [PokeCommunity.com] Adding EFFECTMESSAGES from Gen 6 Project to clean Essentials
      abilityMessage.png
      2.9 KB · Views: 12
    Yeah I tried both and I still get this error.

    Well I give up.
    Dont know why this isnt working
    Thought it would be easy but im an idiot
     
    Last edited by a moderator:
    Back
    Top