VX 스크립트

#==============================================================================
# ■ VX-RGSS2-7 Change Battle Background [Ver.1.0.0]     by Claimh
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis [http://www.rpgcrisis.net]
#------------------------------------------------------------------------------
# Changes the battle background.
#==============================================================================


module BattleBack
  #   Select Battle Background Type
  #   0:Current map with wave effect for battle background (Default VX Style).
  #   1:Current map used as battle background. 
  #   2:Uses a picture for battle background. 
  BB_TYPE = 0
  
  # Display Battle Floor
  BT_FLOOR = false

  # Picture (Only required if BB_TYPE = 2)
  M_B_BACK = {
    # Map ID => "Picture File Name(Graphics/System)"
    1 => "001-Grassland01"
  }
end


#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
  #--------------------------------------------------------------------------
  # ● Creating Battle Back Sprite
  #--------------------------------------------------------------------------
  def create_battleback
    case BattleBack::BB_TYPE
    when 0
      source = $game_temp.background_bitmap
      bitmap = Bitmap.new(640, 480)
      bitmap.stretch_blt(bitmap.rect, source, source.rect)
      bitmap.radial_blur(90, 12)
      @battleback_sprite = Sprite.new(@viewport1)
      @battleback_sprite.bitmap = bitmap
      @battleback_sprite.ox = 320
      @battleback_sprite.oy = 240
      @battleback_sprite.x = 272
      @battleback_sprite.y = 176
      @battleback_sprite.wave_amp = 8
      @battleback_sprite.wave_length = 240
      @battleback_sprite.wave_speed = 120
    when 1
      source = $game_temp.background_bitmap
      bitmap = Bitmap.new(640, 480)
      bitmap.stretch_blt(bitmap.rect, source, source.rect)
      @battleback_sprite = Sprite.new(@viewport1)
      @battleback_sprite.bitmap = bitmap
      @battleback_sprite.ox = 320
      @battleback_sprite.oy = 240
      @battleback_sprite.x = 272
      @battleback_sprite.y = 176
    when 2
      @battleback_sprite = BattleBackSprite.new(@viewport1)
    end
  end
  #--------------------------------------------------------------------------
  # ● Creating Battle Floor Sprite
  #--------------------------------------------------------------------------
  alias create_battlefloor_mbb create_battlefloor
  def create_battlefloor
    create_battlefloor_mbb if BattleBack::BT_FLOOR
  end
  #--------------------------------------------------------------------------
  # ● Delete Battle Floor Sprite
  #--------------------------------------------------------------------------
  alias dispose_battlefloor_mbb dispose_battlefloor
  def dispose_battlefloor
    dispose_battlefloor_mbb if BattleBack::BT_FLOOR
  end
  #--------------------------------------------------------------------------
  # ● Update Battle Floor Sprite
  #--------------------------------------------------------------------------
  alias update_battlefloor_mbb update_battlefloor
  def update_battlefloor
    update_battlefloor_mbb if BattleBack::BT_FLOOR
  end
end


#==============================================================================
# ■ BattleBackSprite
#==============================================================================
class BattleBackSprite < Sprite
  # Background Screen Size
  WIDTH  = 544.00
  HEIGHT = 288.00
  #--------------------------------------------------------------------------
  # ● Object Initialization
  #     viewport : viewport
  #--------------------------------------------------------------------------
  def initialize(viewport = nil)
    super(viewport)
    self.bitmap = Cache.system(BattleBack::M_B_BACK[$game_map.map_id])
    # Zoom is carried out according to picture size.
    @x_zoom = WIDTH / self.bitmap.width
    @y_zoom = HEIGHT / self.bitmap.height
    @zoom = @x_zoom > @y_zoom ? @x_zoom : @y_zoom
    # Zoom is carried out.
    self.zoom_x = @zoom
    self.zoom_y = @zoom
    # Made into central display.
    self.ox = self.bitmap.width / 2
    self.oy = self.bitmap.height / 2
    self.x = (self.bitmap.width / 2)  * @zoom
    self.y = (self.bitmap.height / 2) * @zoom
  end
end

Comment '45'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
117 장비 KGC확장장비창 스크립트 15 file 티라엘 2009.03.27 3622
116 기타 KGC패시브 스크립트 30 카르와푸딩의아틀리에 2009.10.07 3551
115 기타 KGC파라미터배분 2 (VX전용) 20 file 카르와푸딩의아틀리에 2009.07.21 3269
114 장비 KGC장비종류 추가 스크립트. 36 file 루시페르 2009.03.28 4674
113 타이틀/게임오버 KGC_TitleDirection 알기쉽게 설명추가 5 파이어 2011.01.03 2662
112 그래픽 KGC_BitmapExtension : 비트맵 클래스 확장 8 file soleone 2010.07.18 3176
111 전투 KGC]전투형태 오버드라이브(턴알) 13 찌나 2008.03.08 5656
110 아이템 KGC]아이템 합성 29 file 찌나 2008.03.08 5123
109 장비 KGC 확장 장비 화면 2009/02/15 13 시트르산 2010.09.25 3113
108 기타 KGC 스크립트 라이브러리 7 훈덕 2009.05.31 2611
107 미니맵 KGC 미니맵 스크립트 (한글번역) 45 file 레오 2009.02.01 6555
106 미니맵 KGC 미니 맵 22 file RPGbooster 2008.10.08 4036
105 기타 KGC 리버스 데미지! 28 루시페르 2009.04.13 2979
104 기타 KGC counter 스크립트. 반격기 추가스크립트입니다. 4 우켈킁 2011.03.31 1812
103 메뉴 KGC - 커스텀 메뉴 커멘드 (번역) 1 듀란테 2015.07.27 1079
102 메뉴 kgc 파라미터 배분 09/07/25 13 시트르산 2010.09.24 2327
101 키입력 Key Simulator by Fantasist 습작 2013.05.01 1176
100 Jens009's Critical Flash 1.0 3 Man... 2008.10.27 1240
99 아이템 Item Price Changer 7 Man... 2008.10.28 1530
98 기타 IEX - Script Library 1.0 by IceDragon 8 Alkaid 2011.01.11 2619
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32