질문과 답변

Extra Form

 

 

 

 게임 내에 실제 시간 표기는 많은데

게임 속의 시간 표기가 없네요 ㅠㅠ

여러 이벤트할려면 시간 개념이 있어야하는데

게임내의 시간스크립트도 못찾겠고, 

시간관련 스크립트 적용해보면 실제 시간이 나오네요 ㅠㅠ

 

 

도와주십쇼


현재 쓰고 있는 스크립트 입니다


class Scene_Menu < Scene_MenuBase

  def start

    super

    create_command_window

    create_gold_window

    create_timer_window

    create_status_window

  end

  def create_gold_window

    @gold_window = Window_Gold.new

  end

  def create_timer_window

    @timer_window = Window_Timer.new

  end

  def create_command_window

    @command_window = Window_MenuCommand.new

    @command_window.set_handler(:item,    method(:command_item))

    @command_window.set_handler(:skill,    method(:command_personal))

    @command_window.set_handler(:equip,    method(:command_personal))

    @command_window.set_handler(:status,    method(:command_personal))

    @command_window.set_handler(:formation,    method(:command_formation))

    @command_window.set_handler(:save,    method(:command_save))

    @command_window.set_handler(:game_end,    method(:command_game_end))


    @command_window.set_handler(:cancel,    method(:return_scene))

  end

  def create_status_window

    @status_window = Window_MenuStatus.new(160, 0)

  end

end

class Window_MenuCommand < Window_Command

  def initialize

    super(0, 0)

    self.opacity = 255 if SceneManager.scene_is?(Scene_Menu)

    select_last

  end

  def window_width

    return 160

  end

  def window_height

    return 192

  end

  def make_command_list

    add_command(Vocab::item,   :item,   main_commands_enabled)

    add_command(Vocab::skill,   :skill,   main_commands_enabled)

    add_command(Vocab::equip,   :equip,   main_commands_enabled)

    add_command(Vocab::status,   :status,   main_commands_enabled)

    add_command(Vocab::formation,   :formation,   formation_enabled)

    add_command(Vocab::save,   :save,   save_enabled)

    add_command(Vocab::game_end,   :game_end)


  end

  def alignment

    return 0

  end

end

class Window_MenuStatus < Window_Selectable

  def initialize(x, y)

    super(x, y, window_width, window_height)

    @pending_index = -1

    self.opacity = 255 if SceneManager.scene_is?(Scene_Menu)

    refresh

  end

  def window_width

    return 384

  end

  def window_height

    return 416

  end

  def item_height

    return (height - standard_padding * 2) / 4

  end

  def draw_item(index)

    actor = $game_party.members[index]

    enabled = $game_party.battle_members.include?(actor)

    rect = item_rect(index)

    draw_item_background(index)

    draw_actor_face(actor, rect.x + 1, rect.y + 1, enabled)

    draw_actor_simple_status(actor, rect.x, rect.y)

  end

  def draw_actor_simple_status(actor, x, y)

    draw_actor_name(actor, x + 108, y + 12)

    draw_actor_level(actor, x + 108, y + 36)

    draw_actor_icons(actor, x + 108, y + 60)

    draw_actor_class(actor, x + 228, y + 12)

    draw_actor_hp(actor, x + 228, y + 36)

    draw_actor_mp(actor, x + 228, y + 60)

  end

  def draw_face(face_name, face_index, x, y, enabled = true)

    bitmap = Cache.face(face_name)

    rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96, 96, 96)

    contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)

    bitmap.dispose

  end

  def draw_actor_name(actor, x, y, width = 112)

    change_color(hp_color(actor))

    draw_text(x, y, width, 24, actor.name)

  end

  def draw_actor_level(actor, x, y)

    change_color(system_color)

    draw_text(x, y, 32, line_height, Vocab::level_a)

    change_color(normal_color)

    draw_text(x + 56 - 24, y, 24, 24, actor.level, 2)

  end

  def draw_actor_icons(actor, x, y, width = 96)

    icons = (actor.state_icons + actor.buff_icons)[0, ((24/24)*width)/24]

    icons.each_with_index {|n, i| draw_icon(n, x + 24 * (i % (width / 24)), y + 24 * (i / (width / 24))) }

  end

  def draw_actor_class(actor, x, y, width = 112)

    change_color(normal_color)

    draw_text(x, y, width, 24, actor.class.name)

  end

  def draw_actor_hp(actor, x, y, width = 124)

    draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)

    change_color(system_color)

    draw_text(x, y, 30, line_height, Vocab::hp_a)

    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,

    hp_color(actor), normal_color)

    end

  def draw_actor_mp(actor, x, y, width = 124)

    draw_gauge(x, y, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)

    change_color(system_color)

    draw_text(x, y, 30, line_height, Vocab::mp_a)

    draw_current_and_max_values(x, y, width, actor.mp, actor.mmp,

    mp_color(actor), normal_color)

  end

end

class Window_MenuActor < Window_MenuStatus

  def initialize

    super(0, 0)

    self.visible = false

  end

  def window_height

    Graphics.height

  end

end

class Window_Gold < Window_Base

  def initialize

    super(0, 368, window_width, 48)

    self.opacity = 255 if SceneManager.scene_is?(Scene_Menu)

    refresh

  end

  def window_width

    return 160

  end

  def refresh

    contents.clear

    change_color(system_color)

    draw_text(4, 0, contents_width - 8, line_height, '소지금')

    cx = text_size(currency_unit).width

    change_color(normal_color)

    draw_text(4, contents_height - line_height, contents.width - 8 - cx - 2, line_height, value, 2)

    change_color(system_color)

    draw_text(4, contents_height - line_height, contents.width - 8, line_height, currency_unit, 2)

  end

end

class Window_Timer < Window_Base

  def initialize

    super(0, 320, window_width, 48)

    self.opacity = 255 if SceneManager.scene_is?(Scene_Menu)

    refresh

  end

  def window_width

    return 160

  end

  def refresh

    contents.clear

    change_color(system_color)

    draw_text(4, 0, contents_width - 8, line_height, '시간')

    change_color(normal_color)

    draw_playtime(4, contents_height - line_height, contents.width - 8, 2)

  end

  def open

    refresh

    super

  end

  def draw_playtime(x, y, width, align)

    draw_text(x, y, width, line_height, $game_system.playtime_s, align)

  end

  def update

    refresh

  end

end

 

 

 

■ 질문전 필독!
  • 질문할 내용이 이 게시판이나 강좌에 이미 있는지 확인합니다.
  • 하나의 게시물에는 하나의 질문만 합니다.
  • 제목은 질문의 핵심 내용으로 작성합니다.
  • 질문 내용은 답변자가 쉽게 이해할 수 있도록 최대한 상세하게 작성합니다.
  • 스크립트의 전문이 필요할 경우 txt 파일 등으로 첨부해 주시기 바랍니다.
  • 답변받은 게시물은 삭제하지 않습니다.
  • 답변이 완료된 경우 해당 답변해주신 분들께 감사의 댓글을 달아줍니다.
    • 처음 오신 분들은 공지 게시물을 반드시 읽어주세요!

※ 미준수시 사전경고 없이 게시물을 삭제합니다.

Comment '1'
  • ?
    작은꼬리 2017.12.19 20:56
    구글에 검색해보니까 이 스크립트가 제일 위에 뜨던데.. 사용해보셨나요?
    https://forums.rpgmakerweb.com/index.php?threads/advanced-game-time.3851/

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12387
스크립트 추천 RMVXA 스테이터스 애니메이션을 따로 추가할수 있나요? 겜만들고싶다앙 2021.04.22 69
이벤트 작성 RMMV 특정 아이템을 일정수량가지고 있을시 발생하는 이벤트를 만들 수 없을까요? 1 폭광 2021.04.21 54
기타 게임찾기 알만툴 공포게임 명작이 어떤게 있나요? 3 후라이팬샷 2021.04.19 217
스크립트 작성 RMMV 전투화면에서 액터이미지 띄우기 2 픽셀 2021.04.19 145
스크립트 추천 RMVXA 보호막 같은 것을 구현시키는 스크립트 있나요? 2 겜만들고싶다앙 2021.04.18 103
에러 해결 RMMV data 파일에있는.json파일이 깨지면 복구는 힘드나요? 폭광 2021.04.17 88
이벤트 작성 RMMV 타이머관련 질문입니다 1 짓기귀찮아 2021.04.14 63
액션 전투 RMMV 전투에서 데미지를 입었을 때에 TP획득 을 없애고 싶습니다. 2 게임제작초보자 2021.04.13 103
기타 RMMZ 알만툴 mz에서 캐릭터 제작툴에있는 여러 옷이나 머리모양의 종류들을 어떻게 추가하는지 알고싶습니다 1 file 라인_ 2021.04.12 626
기본툴 사용법 RMVXA 게임 도중에 타이틀을 바꾸고 싶어요 2 설님 2021.04.12 120
스크립트 사용 RMVXA 전투중 적이 누구를 노리는지 미리 알수 있는 스크립트가 있을까요 겜만들고싶다앙 2021.04.10 27
기본툴 사용법 RMVXA 액터 그래픽을 중간에 바꾸고 싶어요 2 설님 2021.04.10 76
액션 전투 RMMV QABS 플러그인 잘아시는분 있으신가요? file 카르네스아리엔 2021.04.09 142
스크립트 작성 RMVXA vx ace)특정 상태일 경우 추가 피해를 주는 패시브 5 게임이만들고파 2021.04.08 114
이벤트 작성 RMMV Png로 루프 애니메이션을 만드는데 텍스트가 걸림니다 1 hurakan 2021.04.07 85
턴제 전투 RMMV 캐릭터 스킬 하나로 적한테 데미지 주고 자기한테 버프 걸게 할수있을까요? 4 Kokodd 2021.04.06 95
플러그인 사용 RMMV MV 폰트 변경 방법 질문드립니다. 1 file 부리인간 2021.04.03 258
이벤트 작성 RMMV 텍스트에 창 위에 이름보이게 하는 플러그인이나 텍스트 명령어 있나요 1 짓기귀찮아 2021.04.03 175
플러그인 생성 RMMV mv용 시작할때 까만화면 시작하는 플러그인 있을까요 2 짓기귀찮아 2021.04.01 125
게임 번역 기타 만약에 게임 한글판/영문판을 동시에 제작한다고 하면, 어떻게하는게 제일 효율적일까요? 2 티안타 2021.03.30 118
Board Pagination Prev 1 ... 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 ... 516 Next
/ 516