Avangs

  • 게임 정보
    • 게임 소개
    • 게임 리뷰
    • 게임 실황
    • 게임 공략
    • 모바일 테스트
  • 게임 작품new
    • 완성작 게임
    • 체험판 게임
    • 한글판 게임new
    • 온라인 게임
    • 추천작 제작자 저장소
  • 투표선정 작품
    • 아방스 추천작
    • 완성 기대작
    • 투표 신청
    • 투표소
    • 투표 결과
  • 강좌
    • 아방스 칼럼
    • 비주얼노벨 강좌
    • 알만툴 강좌
      • MZ 강좌
      • MV 강좌
      • VX Ace 강좌
      • VX 강좌
      • XP 강좌
      • 2003 강좌
      • 2000 강좌
    • 게임메이커 강좌
    • 울프툴 강좌
    • 3D 게임제작 강좌
    • 2D 게임제작 강좌
    • 그래픽 제작 강좌
    • 기타 강좌
  • 질문과 답변
    • 자주 묻는 질문
    • 질문과 답변
    • 제작의뢰
  • 커뮤니티
    • 구인·구직·외주
    • 테스트 요청
    • 자유게시판
    • 게임계 소식
    • 유머&정보
    • 사이트링크
    • 이벤트&대회
  • 창작
    • 게임 기획
    • 맵배치
    • 글쓰기
    • 그리기
    • 음악
  • 자료실
    • 게임제작툴
    • 예제 및 샘플
    • 그래픽 소재
      • 오리지널 소재
      • 이차창작 소재
      • 수정·개조 소재
      • 외부 소재
    • 사운드 소재
    • 확장·플러그인·스크립트
      • MZ 플러그인
      • MV 플러그인
      • Ace 스크립트
      • VX 스크립트
      • XP 스크립트
      • 2k3 플러그인
      • VN 플러그인·확장
    • 외부 소재사이트
    • 기타 자료
      • 한글화툴
      • 무료 폰트
      • 유틸리티
    • 디자인 참고자료
  • 고객센터
    • 공지사항
    • 건의 및 신고
    • 핫 이슈
로그인 회원가입
Avangs
  • 게임 정보
    • 게임 소개
    • 게임 리뷰
    • 게임 실황
    • 게임 공략
    • 모바일 테스트
  • 게임 작품new
    • 완성작 게임
    • 체험판 게임
    • 한글판 게임new
    • 온라인 게임
    • 추천작 제작자 저장소
  • 투표선정 작품
    • 아방스 추천작
    • 완성 기대작
    • 투표 신청
    • 투표소
    • 투표 결과
  • 강좌
    • 아방스 칼럼
    • 비주얼노벨 강좌
    • 알만툴 강좌
      • MZ 강좌
      • MV 강좌
      • VX Ace 강좌
      • VX 강좌
      • XP 강좌
      • 2003 강좌
      • 2000 강좌
    • 게임메이커 강좌
    • 울프툴 강좌
    • 3D 게임제작 강좌
    • 2D 게임제작 강좌
    • 그래픽 제작 강좌
    • 기타 강좌
  • 질문과 답변
    • 자주 묻는 질문
    • 질문과 답변
    • 제작의뢰
  • 커뮤니티
    • 구인·구직·외주
    • 테스트 요청
    • 자유게시판
    • 게임계 소식
    • 유머&정보
    • 사이트링크
    • 이벤트&대회
  • 창작
    • 게임 기획
    • 맵배치
    • 글쓰기
    • 그리기
    • 음악
  • 자료실
    • 게임제작툴
    • 예제 및 샘플
    • 그래픽 소재
      • 오리지널 소재
      • 이차창작 소재
      • 수정·개조 소재
      • 외부 소재
    • 사운드 소재
    • 확장·플러그인·스크립트
      • MZ 플러그인
      • MV 플러그인
      • Ace 스크립트
      • VX 스크립트
      • XP 스크립트
      • 2k3 플러그인
      • VN 플러그인·확장
    • 외부 소재사이트
    • 기타 자료
      • 한글화툴
      • 무료 폰트
      • 유틸리티
    • 디자인 참고자료
  • 고객센터
    • 공지사항
    • 건의 및 신고
    • 핫 이슈
로그인 회원가입

NOTICE

공지사항
더보기
  • 서버 안정성 및 보안 강화 조치 04.20

Recently Added Games

최근 등록 게임
  • 어드벤쳐 고철에 파묻힌 데모나 (屑鉄まとうデモナ) newfile 08.19
  • 어드벤쳐 비올레 저택의 시온 : 꽃눈의 저택|RPG Maker MZ 단편 심리공포 어드벤처 file 08.17
  • 기타 (똥 주의)그저 똥을 누러 가는 게임 Re:Boot updatefile 08.16
  • 롤플레잉 SACCHARINE SYNC (DEMO) 배포 file 08.12
  • 기타 (완성작) 야구장에 가자4 file 2 07.07
스킬
2009.02.21 23:48

스킬 도감

백호
조회 수 1203 추천 수 0 댓글 1
크게 작게 위로 아래로 댓글로 가기 인쇄
크게 작게 위로 아래로 댓글로 가기 인쇄
#스킬 도감
#
#기본적으로 설정 방법법은 아이템 도감과 같습니다.
#스킬의 카테고리명을 @skill_kind_name 로 설정.
#@kind_row (으)로 설정한 카테고리명을 늘어놓고 싶은 차례로 설정.
#@skill_kind_element_name 에는 @skill_kind_name 에 대응한
#카테고리 판정용의 속성명을 설정해 주세요.
#
#이벤트 커멘드 「스크립트」로
#skill_book_max 로 최대 등록수
#skill_book_now 로 현재 등록수
#skill_book_comp로 완성율(소수점 이하 잘라버림)
#을 취득할 수 있습니다.
#그리고 ,skill_book_max("카테고리명")과 같이
#카테고리명을 인수에 건네주면(자) , 그 카테고리의
#최대 등록수를 취득할 수 있습니다.
#현재 등록수 , 완성율도 같습니다.
#
#2005.2.21
#·몰래 버그 수정입니다.
#변경점 skill_book_category_now
#
#2005.3.9
#·위력0시에는 「-」이라고 표기할까 선택할 수 있도록(듯이).
#
#2005.11.26
#·레이팅0의 스테이트를 표시하지 않게 선택 가능하게.

module Skill_Book_Config
  SHOW_COMPLETE_TYPE = 3        #도감 완성율의 표시 방법
                                #0:표시 없음 1:현재수/최대수 2:%표시 3:양쪽 모두
  DRAW_POW_ZERO = false          #위력0때 그대로 표시하는지 어떤지
                                #true:하는 false:하지 않는
  ZERO_POW_TEXT = "-"          #위력0때 표시하지 않는 경우 대신에 표시하는 말
  SHOW_ZERO_RATING_STATE = false #레이팅0의 스테이트도 표시해?
                                #true:하는 false:하지 않는
end

class Window_SkillBook_Info < Window_Selectable
  include Skill_Book_Config
end

class Data_SkillBook
  attr_reader :skill_kind_name
  attr_reader :kind_row
  attr_reader :skill_id_data
  attr_reader :skill_kind_element_name
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
   
    # ↓이하 , 설정용의 여러 가지
    @skill_kind_name = ["기술", "마술", "그 외"]
    @kind_row = ["기술",
                "마술",
                "그 외"]
    @skill_kind_element_name = ["물리 스킬", "마술 스킬", "그 외 스킬"]
    # ↑코코까지
   
    @skill_id_data = skill_book_id_set
  end
  #--------------------------------------------------------------------------
  # ● 지정된 종류 표시명의 정보를 돌려주는
  #--------------------------------------------------------------------------
  def kind_search(name)
    if @skill_kind_name.include?(name)
      return [0, @skill_kind_name.index(name)]
    end
  end
  #--------------------------------------------------------------------------
  # ● 도감용 등록 무시 속성 취득
  #--------------------------------------------------------------------------
  def no_add_element
    no_add = 0
    # 등록 무시의 속성ID을 취득
    for i in 1...$data_system.elements.size
      if $data_system.elements[i] =~ /도감 등록 무효/
        no_add = i
        break
      end
    end
    return no_add
  end
 
  #--------------------------------------------------------------------------
  # ● 지정된 속성명의 것ID을 돌려주는
  #--------------------------------------------------------------------------
  def element_search(element_name)
    return nil if element_name == nil
    for i in 1...$data_system.elements.size
      if $data_system.elements[i] =~ /^#{element_name}/
        return i
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # ● 도감용 스킬ID설정
  #--------------------------------------------------------------------------
  def skill_book_id_set
    data = []
    no_add = no_add_element
    if @skill_kind_element_name.size == 0
      data[0] = [0]
      for i in 1...$data_skills.size
        skill = $data_skills[i]
        next if skill.name == ""
        next if skill.element_set.include?(no_add)
        data[0].push(skill.id)
      end
    else
      for i in 0...@skill_kind_element_name.size
        data[i] = [0]
        element_id = element_search(@skill_kind_element_name[i])
        for j in 1...$data_skills.size
          skill = $data_skills[j]
          next if skill.name == ""
          next if skill.element_set.include?(no_add)
          if skill.element_set.include?(element_id)
            data[i].push(skill.id)
          end
        end
      end
    end
    return data
  end
end

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ● 스킬을 기억하는
  #    skill_id : 스킬 ID
  #--------------------------------------------------------------------------
  alias game_actor_skill_book_learn_skill learn_skill
  def learn_skill(skill_id)
    game_actor_skill_book_learn_skill(skill_id)
    $game_system.add_skill_count(skill_id)
  end
end

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ● 기본 속성 표시
  #--------------------------------------------------------------------------
  def draw_attack_element(x, y, element_set)
    elem_temp = []
    for i in element_set
      elem = $data_system.elements[i]
      elem_temp.push("염") if elem == "염"
      elem_temp.push("빙") if elem == "빙"
      elem_temp.push("뢰") if elem == "뢰"
      elem_temp.push("수") if elem == "수"
      elem_temp.push("토") if elem == "토"
      elem_temp.push("풍") if elem == "풍"
      elem_temp.push("광") if elem == "광"
      elem_temp.push("암") if elem == "암"
    end
    if elem_temp.size == 0
      self.contents.draw_text(x, y, 64, 32, "없음")
      return
    end
    ox = 0
    for name in elem_temp
      cx = self.contents.text_size(name).width
      self.contents.draw_text(x+ox, y, cx, 32, name)
      ox += cx+8
    end
  end
  #--------------------------------------------------------------------------
  # ● 무기 속성 표시
  #--------------------------------------------------------------------------
  def draw_attack_wp_element(x, y, element_set)
    elem_temp = []
    for i in element_set
      elem = $data_system.elements[i]
      elem_temp.push("참") if elem == "참"
      elem_temp.push("타") if elem == "타"
      elem_temp.push("돌") if elem == "돌"
      elem_temp.push("쏘아 맞히고") if elem == "쏘아 맞히고"
      elem_temp.push("마") if elem == "마"
    end
    if elem_temp.size == 0
      self.contents.draw_text(x, y, 64, 32, "없음")
      return
    end
    ox = 0
    for name in elem_temp
      cx = self.contents.text_size(name).width
      self.contents.draw_text(x+ox, y, cx, 32, name)
      ox += cx+8
    end
  end
  #--------------------------------------------------------------------------
  # ● 특공 속성 표시
  #--------------------------------------------------------------------------
  def draw_attack_weak_element(x, y, element_set)
    elem_temp = []
    for i in element_set
      elem = $data_system.elements[i]
      elem_temp.push("불사") if elem == "대 불사"
      elem_temp.push("뱀")  if elem == "대 뱀"
      elem_temp.push("수서") if elem == "대 수서"
      elem_temp.push("수")  if elem == "대 수"
      elem_temp.push("귀")  if elem == "대 귀"
      elem_temp.push("조")  if elem == "대 새"
      elem_temp.push("악마") if elem == "대 악마"
      elem_temp.push("천사") if elem == "대 천사"
    end
    if elem_temp.size == 0
      self.contents.draw_text(x, y, 64, 32, "없음")
      return
    end
    ox = 0
    for name in elem_temp
      cx = self.contents.text_size(name).width
      self.contents.draw_text(x+ox, y, cx, 32, name)
      ox += cx+8
    end
  end
  #--------------------------------------------------------------------------
  # ● 스테이트 부여 표시
  #--------------------------------------------------------------------------
  def draw_attack_add_state(x, y, plus_state_set)
    state_temp = []
    for i in plus_state_set
      state = $data_states[i]
      if state.name != "" and (Skill_Book_Config::SHOW_ZERO_RATING_STATE or state.rating >= 1)
        state_temp.push(state.name)
      end
    end
    if state_temp.size == 0
      self.contents.draw_text(x, y, 64, 32, "없음")
      return
    end
    ox = 0
    oy = 0
    for name in state_temp
      cx = self.contents.text_size(name).width
      if ox + cx + 4 >= self.contents.width - 128
        ox = 0
        oy += 1
      end
      self.contents.draw_text(x+ox, y+oy*32, cx, 32, name)
      ox += cx+8
    end
  end
  #--------------------------------------------------------------------------
  # ● 효과 범위를 돌려주는
  #--------------------------------------------------------------------------
  def draw_scope(scope)
    case scope
    when 0
      return "없음"
    when 1
      return "적 단체"
    when 2
      return "적 전체"
    when 3
      return "아군 단체"
    when 4
      return "아군 전체"
    when 5
      return "아군 단체"
    when 6
      return "아군 전체"
    when 7
      return "사용자"
    end
  end
end

class Game_Temp
  attr_accessor :skill_book_data
  alias temp_skill_book_data_initialize initialize
  def initialize
    temp_skill_book_data_initialize
    @skill_book_data = Data_SkillBook.new
  end
end

class Game_System
  attr_accessor :skill_count              # 입수 스킬 정보(도감용)
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  alias game_system_skill_book_initialize initialize
  def initialize
    game_system_skill_book_initialize
    @skill_count = {}
  end
  #--------------------------------------------------------------------------
  # ● 스킬의 획득 정보의 추가(도감용)
  #    0:무 획득 1:획득제
  #--------------------------------------------------------------------------
  def add_skill_count(skill_id, type=0)
    if type == -1
      @skill_count[skill_id] = 0
    else
      @skill_count[skill_id] = 1
    end
  end
  #--------------------------------------------------------------------------
  # ● 스킬 도감의 최대 등록수를 취득
  #--------------------------------------------------------------------------
  def skill_book_max
    kind_data = $game_temp.skill_book_data.skill_kind_name
    size = 0
    for kind in kind_data
      size += skill_book_category_max(kind)
    end
    return size
  end
  #--------------------------------------------------------------------------
  # ● 스킬 도감의 현재 등록수를 취득
  #--------------------------------------------------------------------------
  def skill_book_now
    kind_data = $game_temp.skill_book_data.skill_kind_name
    size = 0
    for kind in kind_data
      size += skill_book_category_now(kind)
    end
    return size
  end
  #--------------------------------------------------------------------------
  # ● 스킬 도감의 완성율을 취득
  #--------------------------------------------------------------------------
  def skill_book_complete_percentage
    s_max = skill_book_max.to_f
    s_now = skill_book_now.to_f
    comp = s_now / s_max * 100
    return comp.truncate
  end
  #--------------------------------------------------------------------------
  # ● 스킬 도감의 카테고리별 최대 등록수를 취득
  # category:카테고리명
  #--------------------------------------------------------------------------
  def skill_book_category_max(category)
    id_data = $game_temp.skill_book_data.skill_id_data.dup
    index = $game_temp.skill_book_data.kind_search(category)[1]
    size = id_data[index].size - 1
    return size
  end
  #--------------------------------------------------------------------------
  # ● 스킬 도감의 카테고리별 현재 등록수를 취득
  # category:카테고리명
  #--------------------------------------------------------------------------
  def skill_book_category_now(category)
    now_skill_info = @skill_count.keys
    index = $game_temp.skill_book_data.kind_search(category)[1]
    # 등록 무시의 속성ID을 취득
    no_add = $game_temp.skill_book_data.no_add_element
    elename = $game_temp.skill_book_data.skill_kind_element_name[index]
    element_id = $game_temp.skill_book_data.element_search(elename)
    new_skill_info = []
    for i in now_skill_info
      skill = $data_skills[i]
      next if skill == nil
      next if skill.name == ""
      next if skill.element_set.include?(no_add)
      if element_id == nil or skill.element_set.include?(element_id)
        new_skill_info.push(skill.id)
      end
    end
    return new_skill_info.size
  end
  #--------------------------------------------------------------------------
  # ● 스킬 도감의 카테고리별 완성율을 취득
  # category:카테고리명
  #--------------------------------------------------------------------------
  def skill_book_category_complete_percentage(category)
    s_max = skill_book_category_max(category).to_f
    s_now = skill_book_category_now(category).to_f
    comp = s_now / s_max * 100
    return comp.truncate
  end
end

class Interpreter
  def skill_book_max(category=nil)
    if category == nil
      return $game_system.skill_book_max
    else
      return $game_system.skill_book_category_max(category)
    end
  end
  def skill_book_now(category=nil)
    if category == nil
      return $game_system.skill_book_now
    else
      return $game_system.skill_book_category_now(category)
    end
  end
  def skill_book_comp(category=nil)
    if category == nil
      return $game_system.skill_book_complete_percentage
    else
      return $game_system.skill_book_category_complete_percentage(category)
    end
  end
end

class Window_SkillBook < Window_Selectable
  attr_reader  :data
  attr_reader  :item_kind
  attr_reader  :item_index
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize(index=0)
    super(0, 64, 640, 416)
    @column_max = 2
    @book_data = $game_temp.skill_book_data
    @data = data_set(index)
    @data.shift
    #@data.sort!
    @item_max = @data.size
    @item_kind = index
    self.index = 0
    #refresh
  end
  def new_data_set(index)
    @data = data_set(index)
    @data.shift
    #@data.sort!
    @item_max = @data.size
  end
  #--------------------------------------------------------------------------
  # ● 입수 데이터를 취득
  #--------------------------------------------------------------------------
  def data_set(index)
    kind_row_data = @book_data.kind_search(@book_data.kind_row[index])
    @item_kind = kind_row_data[0]
    @item_index = kind_row_data[1]
    data = []
    case @item_kind
    when 0
      data = @book_data.skill_id_data[@item_index].dup
    end
    return data
  end
  #--------------------------------------------------------------------------
  # ● 표시 허가 취득
  #--------------------------------------------------------------------------
  def show?(kind, id)
    case kind
    when 0
      if $game_system.skill_count[id] == 0 or $game_system.skill_count[id] == nil
        return false
      else
        return true
      end
    end
  end
  #--------------------------------------------------------------------------
  # ● 아이템 취득
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    #항목수가 0 나오지 않으면 비트 맵을 작성해 , 전 항목을 묘화
    return if @item_max == 0
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # ● 항목의 묘화
  #    index : 항목 번호
  #--------------------------------------------------------------------------
  def draw_item(index)
    case @item_kind
    when 0
      item = $data_skills[@data[index]]
      id = @book_data.skill_id_data[@item_index].index(item.id)
    end
    return if item == nil
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 32, 32, id.to_s)
    if show?(@item_kind, item.id)
      bitmap = RPG::Cache.icon(item.icon_name)
      opacity = 255
      self.contents.blt(x+48, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
      self.contents.draw_text(x+48 + 28, y, 212, 32, item.name, 0)
    else
      self.contents.draw_text(x+48 + 28, y, 212, 32, "-----", 0)
      return
    end
  end
end

class Window_SkillBook_Info < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0+64+64, 640, 480-64-64)
    @book_data = $game_temp.skill_book_data
    self.contents = Bitmap.new(width - 32, height - 32)
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh(item_id, item_kind, item_index)
    self.contents.clear
    self.contents.font.size = 22
    case item_kind
    when 0
      draw_skill_info(item_id, item_index)
    end
  end
  #--------------------------------------------------------------------------
  # ● 스킬 묘화
  #--------------------------------------------------------------------------
  def draw_skill_info(item_id, item_index)
    item = $data_skills[item_id]
    rect = Rect.new(4, 0, 160, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = 255
    self.contents.blt(4+48, 0 + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = normal_color
    id = @book_data.skill_id_data[item_index].index(item.id)
    self.contents.draw_text(4, 0, 32, 32, id.to_s)
    self.contents.draw_text(4+48 + 28, 0, 212, 32, item.name, 0)
   
    cost = item.sp_cost.to_s
    self.contents.draw_text(4+48 + 28 + 232, 0, 48, 32, cost.to_s, 2)
   
    #skill_kind = skill_kind_name(item.element_set)
    #self.contents.draw_text(320+96, 0, 160, 32, skill_kind, 0)
    self.contents.font.color = text_color(2)
    self.contents.draw_text(4, 32, 48, 32, "위력", 0)
    self.contents.font.color = normal_color
    if item.power == 0 and DRAW_POW_ZERO == false
      pow = ZERO_POW_TEXT
    else
      pow = item.power.to_s
    end
    self.contents.draw_text(4+48, 32, 48, 32, pow, 2)
   
    self.contents.font.color = system_color
    self.contents.draw_text(4, 64, 48, 32, "범위", 0)
    self.contents.font.color = normal_color
    self.contents.draw_text(4+96+16, 64, 128, 32, draw_scope(item.scope), 0)
   
    self.contents.font.color = system_color
    self.contents.draw_text(4, 96, 96, 32, "기본 속성")
    self.contents.draw_text(4, 128, 96, 32, "특공 속성")
    self.contents.draw_text(4, 160, 96, 32, "부여 스테이트")
    self.contents.font.color = normal_color
    draw_attack_element(4+96+16, 96, item.element_set)
    draw_attack_weak_element(4+96+16, 128, item.element_set)
    draw_attack_add_state(4+96+16, 160, item.plus_state_set)
   
    @help_window.set_text(item.description)
  end
  #--------------------------------------------------------------------------
  # ● 헬프 텍스트 갱신
  #--------------------------------------------------------------------------
  def update_help
    #더미
  end
end


class Scene_SkillBook
  include Skill_Book_Config
  #--------------------------------------------------------------------------
  # ● 메인 처리
  #--------------------------------------------------------------------------
  def main
    # 윈도우를 작성
    @title_window = Window_Base.new(0, 0, 640, 64)
    @title_window.contents = Bitmap.new(640 - 32, 64 - 32)
    @title_window.contents.draw_text(4, 0, 320, 32, "스킬 도감", 0)
    draw_comp
    @main_window = Window_SkillBook.new
    @main_window.active = false
    @main_window.index = -1
    @help_window = Window_Help.new
    @help_window.z = 110
    @help_window.y = 64
    @help_window.visible = false
    command = $game_temp.skill_book_data.kind_row
    @kind_window = Window_Command.new(160, command)
    @kind_window.z = 110
    @kind_window.x = 320 - @kind_window.width / 2
    @kind_window.y = 240 - @kind_window.height / 2
    @kind_window.active = true
    # 인포메이션 윈도우를 작성 (불가시·비액티브하게 설정)
    @info_window = Window_SkillBook_Info.new
    @info_window.z = 110
    @info_window.visible = false
    @info_window.active = false
    # 헬프 윈도우를 관련짓고
    @info_window.help_window = @help_window
    @visible_index = 0
    @now_kind = nil
    # 트란지션 실행
    Graphics.transition
    # 메인 루프
    loop do
      # 게임 화면을 갱신
      Graphics.update
      # 입력 정보를 갱신
      Input.update
      # 프레임 갱신
      update
      # 화면이 바뀌면(자) 루프를 중단
      if $scene != self
        break
      end
    end
    # 트란지션 준비
    Graphics.freeze
    # 윈도우를 해방
    @title_window.dispose
    @help_window.dispose
    @main_window.dispose
    @kind_window.dispose
    @info_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    # 윈도우를 갱신
    #@help_window.update
    @main_window.update
    @kind_window.update
    @info_window.update
    if @info_window.active
      update_info
      return
    end
    # 메인 윈도우가 액티브의 경우: update_target 를 부르는
    if @main_window.active
      update_main
      return
    end
    # 종류 윈도우가 액티브의 경우: update_kind 를 부르는
    if @kind_window.active
      update_kind
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (종류 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_kind
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      # 결정 SE 을 연주
      $game_system.se_play($data_system.decision_se)
      if @now_kind != @kind_window.index
        @main_window.new_data_set(@kind_window.index)
        @main_window.refresh
        @now_kind = @kind_window.index
      end
      subtitle = $game_temp.skill_book_data.kind_row[@kind_window.index]
      title = "스킬 도감:"+subtitle
      @title_window.contents.clear
      @title_window.contents = Bitmap.new(640 - 32, 64 - 32)
      @title_window.contents.draw_text(4, 0, 320, 32, title, 0)
      draw_comp(subtitle)
      @kind_window.active = false
      @kind_window.visible = false
      @main_window.active = true
      @main_window.index = 0
      return
    end
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 을 연주
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (메인 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_main
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 을 연주
      $game_system.se_play($data_system.cancel_se)
      @main_window.active = false
      @kind_window.active = true
      @kind_window.visible = true
      @main_window.index = -1
      @title_window.contents.clear
      @title_window.contents = Bitmap.new(640 - 32, 64 - 32)
      @title_window.contents.draw_text(4, 0, 320, 32, "스킬 도감", 0)
      draw_comp
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      if @main_window.item == nil or
        @main_window.show?(@main_window.item_kind, @main_window.item) == false
        # 버저 SE 를 연주
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 결정 SE 을 연주
      $game_system.se_play($data_system.decision_se)
      @main_window.active = false
      @info_window.active = true
      @info_window.visible = true
      @visible_index = @main_window.index
      @info_window.refresh(@main_window.item, @main_window.item_kind, @main_window.item_index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신 (인포메이션 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_info
    # B 버튼이 밀렸을 경우
    if Input.trigger?(Input::B)
      # 캔슬 SE 을 연주
      $game_system.se_play($data_system.cancel_se)
      @main_window.active = true
      @info_window.active = false
      @info_window.visible = false
      @help_window.visible = false
      return
    end
    # C 버튼이 밀렸을 경우
    if Input.trigger?(Input::C)
      # 결정 SE 을 연주
      $game_system.se_play($data_system.decision_se)
      return
    end
    if Input.trigger?(Input::L)
      # 결정 SE 을 연주
      $game_system.se_play($data_system.decision_se)
      loop_end = false
      while loop_end == false
        if @visible_index != 0
          @visible_index -= 1
        else
          @visible_index = @main_window.data.size - 1
        end
        loop_end = true if @main_window.show?(@main_window.item_kind,@main_window.data[@visible_index])
      end
      id = @main_window.data[@visible_index]
      @info_window.refresh(id, @main_window.item_kind, @main_window.item_index)
      return
    end
    if Input.trigger?(Input::R)
      # 결정 SE 을 연주
      $game_system.se_play($data_system.decision_se)
      loop_end = false
      while loop_end == false
        if @visible_index != @main_window.data.size - 1
          @visible_index += 1
        else
        @visible_index = 0
        end
        loop_end = true if @main_window.show?(@main_window.item_kind,@main_window.data[@visible_index])
      end
      id = @main_window.data[@visible_index]
      @info_window.refresh(id, @main_window.item_kind, @main_window.item_index)
      return
    end
  end
  def draw_comp(category=nil)
    if SHOW_COMPLETE_TYPE != 0
      if category == nil
        case SHOW_COMPLETE_TYPE
        when 1
          s_now = $game_system.skill_book_now
          s_max = $game_system.skill_book_max
          text = s_now.to_s + "/" + s_max.to_s
        when 2
          comp = $game_system.skill_book_complete_percentage
          text = comp.to_s + "%"
        when 3
          s_now = $game_system.skill_book_now
          s_max = $game_system.skill_book_max
          comp = $game_system.skill_book_complete_percentage
          text = s_now.to_s + "/" + s_max.to_s + " " + comp.to_s + "%"
        end
      else
        case SHOW_COMPLETE_TYPE
        when 1
          s_now = $game_system.skill_book_category_now(category)
          s_max = $game_system.skill_book_category_max(category)
          text = s_now.to_s + "/" + s_max.to_s
        when 2
          comp = $game_system.skill_book_category_complete_percentage(category)
          text = comp.to_s + "%"
        when 3
          s_now = $game_system.skill_book_category_now(category)
          s_max = $game_system.skill_book_category_max(category)
          comp = $game_system.skill_book_category_complete_percentage(category)
          text = s_now.to_s + "/" + s_max.to_s + " " + comp.to_s + "%"
        end
      end
      if text != nil
        @title_window.contents.draw_text(320, 0, 288, 32,  text, 2)
      end
    end
  end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

0 추천 0 비추천
Facebook Twitter Google Pinterest KakaoStory Band
위로 아래로 댓글로 가기 인쇄
에디터 선택하기
✔ 텍스트 모드 ✔ 에디터 모드
?
댓글 쓰기 권한이 없습니다. 로그인 하시겠습니까?
Comment '1'
  • ?
    알피지GM 2010.02.22 15:30

    ㄳ

    댓글

Category
  • 그래픽(16)
  • 맵/타일(15)
  • 메뉴(88)
  • 메시지(26)
  • 미니맵(9)
  • 버그픽스(0)
  • 변수/스위치(10)
  • 상점(14)
  • 상태/속성(8)
  • 스킬(49)
  • 아이템(34)
  • 액터(4)
  • 원경(0)
  • 영상(7)
  • 오디오(8)
  • 온라인(23)
  • 이동 및 탈것(62)
  • 이름입력(10)
  • 장비(34)
  • 저장(34)
  • 전투(174)
  • 제작도구(1)
  • 직업(2)
  • 퀘스트(3)
  • 키입력(18)
  • 타이틀/게임오버(24)
  • 파티(11)
  • HUD(34)
  • 기타(254)
List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 10171
1021 제작도구 [XP/VX/VXA] Doodad's Editor by newold Alkaid 2020.07.12 600
1020 메시지 Taylor's Simple Message System 2000 Alkaid 2020.07.05 436
1019 이름입력 한글조합입력기(영어가능) file 조규진1 2019.11.10 743
1018 맵/타일 맵연결 스크립트 (데모첨부) file 게임애호가 2018.06.15 909
1017 전투 전투중에 장비들 교체하기 file 레이스89 2017.08.19 940
1016 온라인 인터넷 웹 상에서의 시간을 취득하는 스크립트 1 이우 2016.05.24 1099
1015 장비 착용한 장비에 따라 모습이 달라지는 스크립트 예제 5 file 게임애호가 2015.02.14 2258
1014 기타 [All RGSS] File-Ex file Cheapmunk 2014.12.29 1108
1013 기타 [All RGSS] FileTest (Unicode) file Cheapmunk 2014.12.29 749
1012 기타 [RGSS XP] 게임 해상도 조절 스크립트 (*2) 11 file Cheapmunk 2014.10.03 2867
1011 그래픽 Drago - Custom Resolution II 1 Alkaid 2014.09.10 1267
1010 기타 레벨업스크립트(xp) 2 게임을만들자! 2014.08.05 1950
1009 메뉴 MOG - Scroll Bar for XP file 습작 2014.07.06 1731
1008 기타 [All RGSS] 윈도우 메세지박스 스크립트 (Completed ver) 5 file Cheapmunk 2014.06.22 2396
1007 기타 [All RGSS] 게임 다중 실행 방지 스크립트 1 file Cheapmunk 2014.05.24 1567
1006 기타 RM2kXP file 습작 2014.03.17 1712
1005 기타 [All RGSS] 윈도우 커서 숨기기/보이기 1 file Cheapmunk 2014.03.02 2161
1004 기타 Drago - Custom Resolution by LiTTleDRAgo Alkaid 2014.02.13 1316
1003 그래픽 [XP/VX/VXA] Drago - Transition Pack Alkaid 2014.02.13 1386
1002 기타 [XP/VX/VXA] Map Screenshot by LiTTleDRAgo 1 Alkaid 2014.02.13 1045
쓰기
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52
AVANGS

게임 제작, 창작, 자료, 강좌를 연결하는 커뮤니티

  • 개인정보 취급방침

Copyright © 2026 Avangs