RPG Maker Forums

Hello, everyone!

I'm in the need to request a plugin, a conversion of a script that I was using with RPG Maker VX and VX Ace. This plugin allowed the battle transition to be more "Final Fantasy-esque", since it creates a swirl effect when the game calls the battlestart.

Here is a good example image of the effect when using this script:
upload_2019-6-7_18-5-31.png

What this script does, is to make a screen capture of the game, and then initiate the battlestart sequence with an effect on that same screenshot.

I don't recall exactly who made this plugin, only that it was originally made for VX Ace, and then converted to VX. Here's the entire code of the VX version:
Code:
module FrameBuffer
 
  def self.start(frames = 1, viewport_z = 10000)
    dispose unless disposed?
    this_frame =  Graphics.snap_to_bitmap
    @buffer = []
    @viewport = Viewport.new(0,0,544,416)
    @viewport.z = viewport_z
   
    frames.times do
      sprite = Sprite.new(@viewport)
      sprite.bitmap = this_frame.clone
      sprite.x = Graphics.width / 2
      sprite.y = Graphics.height / 2
      sprite.ox = Graphics.width / 2
      sprite.oy = Graphics.height / 2
      @buffer.push(sprite)
    end
    this_frame.dispose
  end
   
  def self.dispose
    return if disposed?
    @buffer.each {|sprite| sprite.dispose}
    @viewport.dispose if @viewport
    @buffer = nil
  end
   
  def self.disposed?
    !@buffer
  end
#===============================================================================
# Deletes the oldest frame bitmaps and shuffles all the bitmaps down
# replacing the first frame with a fresh snap shot.
#===============================================================================
  def self.cycle
    return if disposed?
    @buffer[-1].bitmap.dispose
    @buffer.each_index do |i|
      next if i == 0
      @buffer[i].bitmap = @buffer[i - 1].bitmap
    end
    @buffer[0].bitmap = Graphics.snap_to_bitmap
  end
#===============================================================================
# Set's all the frame buffer sprites to use a fresh snapshot.
#===============================================================================
  def self.refresh
    this_frame = Graphics.snap_to_bitmap
    @buffer.each do |sprite|
      sprite.bitmap.dispose
      sprite.bitmap = this_frame.clone
    end
    this_frame.dispose
  end
 
  def self.[](num)
    return nil if disposed?
    return @buffer[num]
  end
 
end

class Scene_Map < Scene_Base
 
#===============================================================================
# Preprocessing for Battle Screen Transition.
#===============================================================================

  alias fbst_call_battle call_battle
  def call_battle
    Graphics.update
    Graphics.freeze
   
    FrameBuffer.start(3)
   
    FrameBuffer[0].z = 0
    FrameBuffer[0].zoom_x = 1
    FrameBuffer[0].zoom_y = 1
    FrameBuffer[0].opacity = 235
    FrameBuffer[0].angle = 0
    FrameBuffer[0].blend_type = 0

    FrameBuffer[1].z = 1
    FrameBuffer[1].zoom_x = 1.2
    FrameBuffer[1].zoom_y = 1.2
    FrameBuffer[1].opacity = 128
    FrameBuffer[1].angle = 2872
    FrameBuffer[1].blend_type = 0
   
    FrameBuffer[2].z = 2
    FrameBuffer[2].zoom_x = 0.8
    FrameBuffer[2].zoom_y = 0.9
    FrameBuffer[2].opacity = 12
    FrameBuffer[2].angle = 5744
    FrameBuffer[2].blend_type = 1
   
    fbst_call_battle
   
    #@spriteset.dispose_characters
    #BattleManager.save_bgm_and_bgs
    #BattleManager.play_battle_bgm
    #Sound.play_battle_start
  end
 
#===============================================================================
# Execute Pre-battle Transition
#===============================================================================

  def perform_battle_transition
    Graphics.transition(1)
    (0..30).each do |i|
      Graphics.brightness = 255
      FrameBuffer.refresh
      Graphics.frame_reset
      Graphics.brightness = 255 - (255 * ((i - 20) / 10.0)) if i > 20
      Graphics.update
    end
    FrameBuffer.dispose
    Graphics.freeze
  end
 
end
I hope you can help me with this, since it is a good effect for the Battle Transitions, and it would be helpful for other people that are looking for something like this.

Thanks in advance!

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,049
Messages
1,018,546
Members
137,835
Latest member
yetisteven
Top