VX 스크립트

Screen Resolution
Version 0.4 (beta)

윈도우의 크기를 조절 하는 스크립트입니다.

우선 아래 스크립트를 main 위쪽에 추가 하시구요.


WIDTH = 640
HEIGHT = 480
DELTA_WIDTH   = (WIDTH - 544).abs
DELTA_HEIGHT = (HEIGHT - 416).abs

class Game_Map
  def calc_parallax_x(bitmap)
    if bitmap == nil
      return 0
    elsif @parallax_loop_x
      return @parallax_x / 16
    elsif loop_horizontal?
      return 0
    else
      w1 = bitmap.width - WIDTH
      w2 = @map.width * 32 - WIDTH
      if w1 <= 0 or w2 <= 0
        return 0
      else
        return @parallax_x * w1 / w2 / 8
      end
    end
  end
end

class Spriteset_Map
  def create_viewports
    @viewport1 = Viewport.new(0, 0, WIDTH, HEIGHT)
    @viewport2 = Viewport.new(0, 0, WIDTH, HEIGHT)
    @viewport3 = Viewport.new(0, 0, WIDTH, HEIGHT)
    @viewport2.z = 50
    @viewport3.z = 100
  end
end

class Spriteset_Battle
  def create_viewports
    @viewport1 = Viewport.new(0, 0, WIDTH, HEIGHT)
    @viewport2 = Viewport.new(0, 0, WIDTH, HEIGHT)
    @viewport3 = Viewport.new(0, 0, WIDTH, HEIGHT)
    @viewport2.z = 50
    @viewport3.z = 100
  end
end

class Game_Player < Game_Character
  CENTER_X = (WIDTH / 2 - 16) * 8     # 画面中央の X 座標 * 8
  CENTER_Y = (HEIGHT / 2 - 16) * 8
end

class Sprite_Timer < Sprite
  def initialize(viewport)
    super(viewport)
    self.bitmap = Bitmap.new(88, 48)
    self.bitmap.font.name = "Arial"
    self.bitmap.font.size = 32
    self.x = WIDTH - self.bitmap.width
    self.y = 0
    self.z = 200
    update
  end
end

class Sprite_Base < Sprite
  def start_animation(animation, mirror = false)
    dispose_animation
    @animation = animation
    return if @animation == nil
    @animation_mirror = mirror
    @animation_duration = @animation.frame_max * 4 + 1
    load_animation_bitmap
    @animation_sprites = []
    if @animation.position != 3 or not @@animations.include?(animation)
      if @use_sprite
        for i in 0..15
          sprite = ::Sprite.new(viewport)
          sprite.visible = false
          @animation_sprites.push(sprite)
        end
        unless @@animations.include?(animation)
          @@animations.push(animation)
        end
      end
    end
    if @animation.position == 3
      if viewport == nil
        @animation_ox = WIDTH / 2
        @animation_oy = HEIGHT / 2
      else
        @animation_ox = viewport.rect.width / 2
        @animation_oy = viewport.rect.height / 2
      end
    else
      @animation_ox = x - ox + width / 2
      @animation_oy = y - oy + height / 2
      if @animation.position == 0
        @animation_oy -= height / 2
      elsif @animation.position == 2
        @animation_oy += height / 2
      end
    end
  end

end

class Window_Base < Window
  def x=(x)
    super(x + DELTA_WIDTH / 2)
  end
 
  def y=(y)
    super(y + DELTA_HEIGHT/ 2)
  end
end


class Scene_Battle < Scene_Base
  def create_info_viewport
    @info_viewport = Viewport.new(0, 288, WIDTH, HEIGHT)
    @info_viewport.z = 100
    @status_window = Window_BattleStatus.new
    @party_command_window = Window_PartyCommand.new
    @actor_command_window = Window_ActorCommand.new
    @status_window.viewport = @info_viewport
    @party_command_window.viewport = @info_viewport
    @actor_command_window.viewport = @info_viewport
    @status_window.x = 128
    @actor_command_window.x = 544
    @info_viewport.visible = false
  end
end

class Scene_Item < Scene_Base
   def start
    super
    create_menu_background
    @viewport = Viewport.new(0, 0, WIDTH, HEIGHT)
    @help_window = Window_Help.new
    @help_window.viewport = @viewport
    @item_window = Window_Item.new(0, 56, 544, 360)
    @item_window.help_window = @help_window
    @item_window.active = false
    @target_window = Window_MenuStatus.new(0,  0)
    hide_target_window
  end
 
  def show_target_window(right)
    @item_window.active = false
    width_remain = WIDTH - @target_window.width
    @target_window.x = right ? width_remain : 0
    @target_window.visible = true
    @target_window.active = true
    if right
      @viewport.rect.set(0, 0, width_remain, HEIGHT)
      @viewport.ox = 0
    else
      @viewport.rect.set(@target_window.width, 0, width_remain, HEIGHT)
      @viewport.ox = @target_window.width
    end
  end
 
  def hide_target_window
    @item_window.active = true
    @target_window.visible = false
    @target_window.active = false
    @viewport.rect.set(0, 0, WIDTH, HEIGHT)
    @viewport.ox = 0
  end
end

class Scene_Skill < Scene_Base
  def start
    super
    create_menu_background
    @actor = $game_party.members[@actor_index]
    @viewport = Viewport.new(0, 0, WIDTH, HEIGHT)
    @help_window = Window_Help.new
    @help_window.viewport = @viewport
    @status_window = Window_SkillStatus.new(0, 56, @actor)
    @status_window.viewport = @viewport
    @skill_window = Window_Skill.new(0, 112, 544, 304, @actor)
    @skill_window.viewport = @viewport
    @skill_window.help_window = @help_window
    @target_window = Window_MenuStatus.new(0, 0)
    hide_target_window
  end
 
  def show_target_window(right)
    @skill_window.active = false
    width_remain = WIDTH - @target_window.width
    @target_window.x = right ? width_remain : 0
    @target_window.visible = true
    @target_window.active = true
    if right
      @viewport.rect.set(0, 0, width_remain, HEIGHT)
      @viewport.ox = 0
    else
      @viewport.rect.set(@target_window.width, 0, width_remain, HEIGHT)
      @viewport.ox = @target_window.width
    end
  end

  def hide_target_window
    @skill_window.active = true
    @target_window.visible = false
    @target_window.active = false
    @viewport.rect.set(0, 0, WIDTH, HEIGHT)
    @viewport.ox = 0
  end
end






main 섹션의 제일 위부분에 아래 스크립트를 추가해주세요 ^^

Graphics.resize_screen(WIDTH, HEIGHT)

Comment '5'
  • ?
    뉴펜슬 2008.01.30 23:24

    아 저기위에있는 높이와 넓이를 자기가 원하는 정도록 하면 되군요.

  • ?
    ps인간 2008.01.31 11:44
    Graphics.resize_screen(WIDTH, HEIGHT)
    가안되시면
    Graphics.resize_screen(640, 480)으로 바꾸어주세요 이것도 안되면.. 모릅니다 ^^
    '
    그리고 타이틀에 문제가 잇는게아니라 사이즈가 안맞아서.. 그러니 rpgxp용 타이틀로 바꾸시면 됩니다(웬강좌?)
  • ?
    ps인간 2008.01.31 12:11
    문제점이 있네요.... 많약 그렇게 한다면 맵이  바탕화면 설정처럼 바둑판식으로 되네요ㅠㅠ
    아방스님 이거 문제입니다 ㅡㅡ
  • ?
    에스테반 2011.01.08 19:22

    이거 문제 있나요?

  • ?
    에드문드 2014.06.17 16:32
    해상도 스크립트군요.

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
24 메뉴 스테이터스 화면 개조 - 커스텀 버전 13 file 훈덕 2009.06.15 4932
23 메뉴 시스템 옵션 스크립트의 사용방법 6 아방스 2009.06.04 2834
22 메뉴 몬스터도감 Tankentai사이드뷰에 작동하도록 수정 13 카르와푸딩의아틀리에 2009.05.22 3775
21 메뉴 [자작]명성치 사용 시스템(메뉴 출력) 16 Rainsy 2009.03.22 4361
20 메뉴 CogWheelBars 시스템. 13 file 할렘 2009.02.20 4362
19 메뉴 모그메뉴 스킨입니다. 1 file 아부리 2009.02.16 6866
18 메뉴 (모그메뉴 풀세트팩 SEL Style.) 유니크급 자료 147 file 할렘 2009.02.07 9558
17 메뉴 GuiRPG menu시스템 13 file 할렘 2009.02.07 4849
16 메뉴 파이날 판타지 IX 메뉴. 12 file 할렘 2009.02.06 6287
15 메뉴 스테이터스 창을 멋있게 쿨하게~!전신을 보여주자. 24 file 할렘 2009.02.06 6236
14 메뉴 캐릭터설명을 심플하게! 스크립트. 13 file 할렘 2009.02.03 4848
13 메뉴 레벨업 시 자세한 정보 나오는 스크립트 23 아방스 2009.01.20 3895
12 메뉴 커서 모양 바꾸는 스크립트 16 아방스 2009.01.20 3959
11 메뉴 Adding Extra Menu in lafia Script 2 Man... 2008.10.29 1574
10 메뉴 김태히님이 개조한 모그메뉴 스텟화면 43 file RPGbooster 2008.10.08 6360
9 메뉴 지난 메뉴 스크립트에 이은 스테이터스 스크립트! 5 file 독사 2008.06.29 3545
8 메뉴 헬프 윈도우 중앙표시 스크립트 11 file 양념통닼 2008.06.10 3348
7 메뉴 창 크기 변경 스크립트 6 file Incubus 2008.05.25 5945
6 메뉴 일본에서 만든 멋있는메뉴변경 스크립트 (한글 VX에서 쓰시면 자동으로 바뀜) 45 유칸지 2008.04.09 8861
5 메뉴 메뉴 배경화면 바꾸는 스크립트 9 독도2005 2008.03.23 4520
Board Pagination Prev 1 2 3 Next
/ 3