VX 스크립트

메뉴
2009.02.07 17:35

GuiRPG menu시스템

조회 수 4849 추천 수 0 댓글 13
Atachment
첨부 '1'

이런식의메뉴입니다.
   

#----------------------------------------------------------------
#----------------------------------------------------------------
#                        Menu GuiRPG 1.0
#----------------------------------------------------------------
# Criado por: GuiRPG - Guilherme Santiago
# Versão: 1.0
#  
# Esse Script faz uma pequena modificação no Menu, deixando o
# Menu mais clássico, cobrindo toda a tela e mostrando informações
# Adicionais como Mapa e Tempo de Jogo
#
# Fórum: rpgmakertotal.ipbfree.com
#
# MSN: guilhermesantiagosilva@hotmail.com
#
#----------------------------------------------------------------



class Scene_Menu < Scene_Base
  
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  
  def start
    super
    create_menu_background
    create_command_window
    @status_window = Window_MenuStatus.new(0, 80)
    @window_local = Window_Local.new(120,416)
    @time = Window_Time.new(360,416)
    @gold_window = Window_Gold2.new(0, 416)
  end
  
  def terminate
    super
    dispose_menu_background
    @command_window.dispose
    @status_window.dispose
    @window_local.dispose
    @time.dispose
    @gold_window.dispose
  end
  
  def update
    super
    update_menu_background
    @command_window.update
    @status_window.update
    @gold_window.update
    @window_local.update
    @time.update

    @window_local.y -= 5
    if @window_local.y <= 366
      @window_local.y = 366
    end
    @time.y -= 5
    if @time.y <= 366
      @time.y = 366
    end
    @gold_window.y -= 5
    if @gold_window.y <= 366
      @gold_window.y = 366
    end
    
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6],3)
    @command_window.index = @menu_index
    if $game_party.members.size == 0          
      @command_window.draw_item(0, false)    
      @command_window.draw_item(1, false)    
      @command_window.draw_item(2, false)    
      @command_window.draw_item(3, false)    
    end
    if $game_system.save_disabled            
      @command_window.draw_item(4, false)    
    end
  end
  
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0    
        $scene = Scene_Item.new
      when 1,2,3  
        start_actor_selection
      when 4      
        $scene = Scene_File.new(true, false, false)
      when 5      
        $scene = Scene_End.new
      end
    end
  end

  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end

  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1  
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $scene = Scene_Equip.new(@status_window.index)
      when 3  
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end

class Window_MenuStatus < Window_Selectable
  
  def initialize(x, y)
    super(x, y, 544, 288)
    @column_max = 2
    refresh
    self.active = false
    self.index = -1
  end

  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      x = actor.index % @column_max * self.width/2 + 96
      y = actor.index / @column_max * 96 + WLH / 2
      draw_actor_face(actor, x - 96, y, 92)
      draw_actor_name(actor, x, y)
      draw_actor_level(actor, x + 80, y)
      draw_actor_hp(actor, x , y + WLH * 1)
      draw_actor_mp(actor, x , y + WLH * 2 - 6)
    end
  end
  
  def update_cursor
    case @index
    when -1
      self.cursor_rect.empty
    when 0, 1, 2, 3
      self.cursor_rect.set(@index % @column_max * self.width/2 - 4, index / @column_max * 96 + WLH / 2 - 4, self.width / 2 - 32 +4, 96+4)
    else
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

class Game_Map
   attr_reader   :map_id
   def namemap  
     $name_map = load_data("Data/MapInfos.rvdata")
     $name_map[@map_id].name
   end
end

class Window_Local < Window_Base
  
    def initialize(x,y)
    super(x, y, 240, WLH + 26)
    refresh
  end
  
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, 200, 32, "Local:")
    self.contents.font.color = normal_color
    self.contents.draw_text(59, -8, 210, 32, $game_map.namemap.to_s)
end
end

class Window_Gold2 < Window_Base
  
  def initialize(x, y)
    super(x, y, 120, WLH + 26)
    refresh
  end
    
  def refresh
    self.contents.clear
    draw_currency_value($game_party.gold, 6, -4, 80)
  end
end

class Window_Time < Window_Base
  
  def initialize(x, y)
    super(x, y, 184, WLH + 26)
    refresh
  end
  
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, 200, 32, "Tempo:")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(69, -8, 200, 32, text)
  end
  
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end
Comment '13'
  • ?
    쿠쿠. 2009.02.07 23:44
    그닥...
  • ?
    할렘 2009.02.08 11:26
    저도 마음에 안들지만 없는메뉴시스템이라서 그냥 올려뒀습니다.
  • ?
    허걱 2009.02.08 17:16
    전 맘에 드는데요...1인용 메뉴로 살짝 바꿔서 써도 될듯...감사합니다~
  • ?
    백년술사 2009.02.10 18:12
    맘에 들긴하지만...
    그..뭐라해야나...
    순서...?같은게 제가 원하는게 아니라...ㄳ합니다.
  • ?
    Man.... 2009.02.17 21:52
    스클크립트가 다  이쪽으로이동했네...
  • ?
    드랍 2009.06.06 12:47
    좋긴 한데 스텟배분이 없어져서...
  • ?
    mymy 2009.11.14 19:40

    드랍님 말듣고 고개돌린 1ㅅ

    이유:내게임은 스킬장착,스텟배분등등이있어서

  • ?
    VX MANIA 2010.01.29 11:19

    별 좋진 않은듯...

    하지만 약간 좋다.

  • ?
    엑셀 2010.07.23 09:35

    좋기는 좋내요...

  • ?
    포인트팡팡 2010.07.23 09:35
    축하합니다. 엑셀님은 50포인트에 당첨되셨습니다
  • ?
    김브레이커 2010.07.28 13:50

    오오 좋네요.. 만들고 있는 게임에 적용시켰습니다.

    좋은 자료 감사합니다. ㅇㅂㅇ

  • ?
    구제가능 2011.07.24 12:37

    Local 부분만 없애고 적용시켰음

  • ?
    조총병 2011.09.22 20:08

    좋습니다!


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
517 메시지 어드밴스 텍스트 시스템 13 file 카르와푸딩의아틀리에 2009.06.30 4918
516 전투 사이드뷰배틀에서 시각적으로 위치 지정하기 9 file 078656577er 2009.10.14 4908
515 HUD 네비게이션 (나침반) 36 file 허걱 2009.08.25 4908
514 전투 전투 배경을 이미지로 설정하는 스크립트 20 file 아방스 2008.01.23 4889
» 메뉴 GuiRPG menu시스템 13 file 할렘 2009.02.07 4849
512 메뉴 캐릭터설명을 심플하게! 스크립트. 13 file 할렘 2009.02.03 4848
511 전투 VX에서 전투배경을 XP스타일로 나오게 하는 스크립트 7 아방스 2008.01.25 4839
510 타이틀/게임오버 타이틀에 스토리맵을 달자 26 file RPGbooster 2008.10.08 4829
509 기타 RPG 2000이나 RPG 2003처럼 전체화면으로 나오게 하는 스크립트(대박) 21 Man... 2008.10.28 4821
508 스킬 무기성장 랭크 시스템. 20 file 카르와푸딩의아틀리에 2009.07.08 4820
507 맵/타일 레이 월드맵 스크립트 14 file 카르와푸딩의아틀리에 2009.07.04 4813
506 기타 rpg vx 렉 줄이는 스크립트 34 아방스 2008.03.09 4813
505 기타 게임 해상도를 조절 하는 스크립트 19 아방스 2008.01.21 4780
504 타이틀/게임오버 타이틀 공지 37 file 허걱 2009.08.10 4748
503 HUD 맵 이름을 띠우는 스크립트 [메시지창] 24 아방스 2008.03.09 4748
502 미니맵 MiniMap 1.0 미니맵 스크립트. 39 아방스 2010.12.02 4740
501 이름입력 [rpg vx]한글 스크립트(저번 것보단 업그레이드 된 것입니다.^^) 17 file 레시온 2008.03.28 4736
500 케릭터 텍스트박스 18 file RPGbooster 2008.10.08 4709
499 메뉴 자작 메뉴 스크립트 for VX(L's Simple Custom Menu VX ver.) 5 Alkaid 2010.09.02 4705
498 ATB v1.0 배틀 시스템 + RPG Tankentai SBS v2.8 16 supergt 2008.10.11 4681
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32