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

Battle Introductions

295
Posts
6
Years
    • Seen Aug 15, 2022
    This script creates animation before battle like this Video

    How to use
    Find in -> Link
    Choose version and read 'How to use' for using.

    Credit
    bo4p5687
    Graphics by Richard PT

    * Update *
    17/06/2022: Compatible v20
     
    Last edited:
    211
    Posts
    7
    Years
    • Seen May 5, 2024
    This script creates animation before battle like this Video

    How to use
    Read the first lines

    Download
    Link
    Put it in "Graphics\Pictures\Battle Introductions"

    Code
    Link

    Credit
    bo4p5687
    Graphics by Richard PT

    Cool Script!!
    And Great work!

    But,
    I getting Error animation not found if I use Visible overworld encounter..
    The script error if getting encounter poke outside grass tile..

    Sorry for my bad english
     
    295
    Posts
    6
    Years
    • Seen Aug 15, 2022
    Cool Script!!
    And Great work!

    But,
    I getting Error animation not found if I use Visible overworld encounter..
    The script error if getting encounter poke outside grass tile..

    Sorry for my bad english

    1. You should retry copy my script
    2. If there are still an error, give me what error (the list when you met it)
     
    295
    Posts
    6
    Years
    • Seen Aug 15, 2022
    When ever the graphic came it slow downs game and when graphic gone it's normal

    If you dont want it, delete 'appearTime = 60' and change
    Code:
          if [email protected]? && @vp.rect.height>0
            @animI.ox += 5
            @animI.ox += 10
            if @frs>5 && @frs%5==0
              @vp.rect.height -= 0.25
              @vp.rect.y += 1
            end
            @frs+=1
          end
    into
    Code:
          if [email protected]? && @vp.rect.height>0
            @animI.ox += 5
            @animI.ox += 10
            @vp.rect.height -= 0.25
            @vp.rect.y += 1
            @frs+=1
          end

    Is there a way to make this work with v17.2?

    Above 'PokeBattle_Scene', add
    Code:
    class PokeBattle_Scene
      
      class BattleIntroduction
        def initialize(sprites,viewport,environment)
          @sprites = sprites
          @viewport = viewport
          @name = nil
          # Set name of the picture. It depend environment (in module PBEnvironment)
          case environment
          when 1; @name = "Grass"
          when 2; @name = "Tall Grass"
          when 3,4,5; @name = "Water"
          when 6; @name = "Underwater"
          when 7; @name = "Cave"
          when 9; @name = "Desert"
          end
        end
        
        def check?
          return false if @name.nil?
          return true
        end
        
        def create
          @sprites = AnimatedPlane.new(@viewport)
          filename = "Graphics/Pictures/Battle Introductions/#{@name} Animation"
          @sprites.bitmap = Bitmap.new(filename)
          return @sprites
        end
      end
      
    end

    In 'class PokeBattle_Scene', find 'def pbStartBattle(battle)', above
    Code:
    # Move trainers/bases/etc. off-screen
        oldx=[]
        oldx[0]=@sprites["playerbase"].x; @sprites["playerbase"].x+=Graphics.width
        oldx[1]=@sprites["player"].x; @sprites["player"].x+=Graphics.width
        if @sprites["playerB"]
          oldx[2]=@sprites["playerB"].x; @sprites["playerB"].x+=Graphics.width
        end
    add
    Code:
        @vp = Viewport.new(0,0,Graphics.width,288)
        @vp.z = 99999
        animIntro = BattleIntroduction.new(@sprites["Intro animation"],@vp,@battle.environment)
        @animI = (animIntro.check?)? animIntro.create : nil
    above
    Code:
          pbGraphicsUpdate
          pbInputUpdate
          pbFrameUpdate
          break if tobreak
        end
    add
    Code:
          if [email protected]?
            @animI.ox += 20
            @vp.rect.height -= 6
            @vp.rect.y += 6
          end

    But it isn't good when you use it in PE v.18.1
     
    54
    Posts
    4
    Years
  • If you dont want it, delete 'appearTime = 60' and change
    Code:
          if [email protected]? && @vp.rect.height>0
            @animI.ox += 5
            @animI.ox += 10
            if @frs>5 && @frs%5==0
              @vp.rect.height -= 0.25
              @vp.rect.y += 1
            end
            @frs+=1
          end
    into
    Code:
          if [email protected]? && @vp.rect.height>0
            @animI.ox += 5
            @animI.ox += 10
            @vp.rect.height -= 0.25
            @vp.rect.y += 1
            @frs+=1
          end



    Above 'PokeBattle_Scene', add
    Code:
    class PokeBattle_Scene
      
      class BattleIntroduction
        def initialize(sprites,viewport,environment)
          @sprites = sprites
          @viewport = viewport
          @name = nil
          # Set name of the picture. It depend environment (in module PBEnvironment)
          case environment
          when 1; @name = "Grass"
          when 2; @name = "Tall Grass"
          when 3,4,5; @name = "Water"
          when 6; @name = "Underwater"
          when 7; @name = "Cave"
          when 9; @name = "Desert"
          end
        end
        
        def check?
          return false if @name.nil?
          return true
        end
        
        def create
          @sprites = AnimatedPlane.new(@viewport)
          filename = "Graphics/Pictures/Battle Introductions/#{@name} Animation"
          @sprites.bitmap = Bitmap.new(filename)
          return @sprites
        end
      end
      
    end

    In 'class PokeBattle_Scene', find 'def pbStartBattle(battle)', above
    Code:
    # Move trainers/bases/etc. off-screen
        oldx=[]
        oldx[0]=@sprites["playerbase"].x; @sprites["playerbase"].x+=Graphics.width
        oldx[1]=@sprites["player"].x; @sprites["player"].x+=Graphics.width
        if @sprites["playerB"]
          oldx[2]=@sprites["playerB"].x; @sprites["playerB"].x+=Graphics.width
        end
    add
    Code:
        @vp = Viewport.new(0,0,Graphics.width,288)
        @vp.z = 99999
        animIntro = BattleIntroduction.new(@sprites["Intro animation"],@vp,@battle.environment)
        @animI = (animIntro.check?)? animIntro.create : nil
    above
    Code:
          pbGraphicsUpdate
          pbInputUpdate
          pbFrameUpdate
          break if tobreak
        end
    add
    Code:
          if [email protected]?
            @animI.ox += 20
            @vp.rect.height -= 6
            @vp.rect.y += 6
          end

    But it isn't good when you use it in PE v.18.1

    Works fine, but there's still the old black bar during the transition that makes it look pretty messy:

    https://imgur.com/a/za23wTk

    any way to remove it?
     
    295
    Posts
    6
    Years
    • Seen Aug 15, 2022
    Works fine, but there's still the old black bar during the transition that makes it look pretty messy
    any way to remove it?

    In 'def pbStartBattle(battle)', change
    Code:
        @viewport=Viewport.new(0,Graphics.height/2,Graphics.width,0)
        @viewport.z=99999
    into
    Code:
        @viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
        @viewport.z=99999
     
    211
    Posts
    7
    Years
    • Seen May 5, 2024
    This script creates animation before battle like this Video

    How to use
    Read the first lines

    Download
    Link
    Put it in "Graphics\Pictures\Battle Introductions"

    Code
    Link

    Credit
    bo4p5687
    Graphics by Richard PT

    I getting error if get battle on outside of grass using Visible Overworld script
    how to fix it?

    that's error messages:
    Spoiler:
     
    Back
    Top