XP 스크립트

일본사이트에서 얻어왔습니다.

메세지 분출해 표시


 



[개요]

메세지 윈도우를 자동적으로 리사이즈 해, 지정한 캐릭터 위에 표시합니다.
캐릭터명을 작은 윈도우로 표시하거나 메세지를 한 글자씩 표시하는 기능도 있습니다.

[스크립트]

<FORM name=xForm><TEXTAREA name=result rows=20 cols=80>#============================================================================== #  ++ 메세지 분출해 표시 ver. 2.00  ++ #   Script by 파라개 #   http://2d6.parasite.jp/ #------------------------------------------------------------------------------ # 분출해 표시를 하려면 , # 테일용 화상 「( 스킨명)-top 」 「( 스킨명)-under 」(을)를 # 「Graphics/Windowskins 」폴더에 임포트 해 둘 필요가 있습니다. #------------------------------------------------------------------------------ # # [분출해 표시의 사용법] # 이벤트 커멘드 「스크립트」로 「$mes_id 」에 이벤트ID (을)를 대입하는 것으로 # 그 이벤트나무이고가 팝 하게 됩니다. # (기술예: $mes_id=4 ) # ID 에-1 (을)를 대입하면 플레이어,0 그리고 그 이벤트 자신. # nil 또는"" (을)를 대입하면, 통상의 메세지 표시로 돌아옵니다. # 표시 위치는 이벤트 「문장 옵션」으로 변경할 수 있습니다. # 표시 위치에 「중앙」을 지정하면, 이벤트의 위치에 관계없이 # 화면 중앙에 표시됩니다. # # [이름 윈도우의 사용법] # 이벤트 커멘드 「스크립트」로 「$mes_name 」에 문자열을 대입하는 것으로 # 이름 윈도우를 표시합니다. # (기술예: $mes_name=" 아르시스" ) # 제어 문자 N[n] (을)를 사용하는 경우, 하 (와)과 기술해 주세요. # (기술예: $mes_name="N[1]" $mes_name="N[V[1]]" ) # "" 또는nil (을)를 대입하면, 비표시가 됩니다. # # 두 개의 기능은 독립하고 있기 때문에, 각각 단체로 사용할 수 있습니다. #  $mes_id=(ID) + $mes_name=" 이름" :분출해 표시 + 이름 윈도우 #  $mes_id=(ID) + $mes_name="" :분출해 표시 ( 이름 없음) #  $mes_id=nil + $mes_name=" 이름" :디폴트 윈도우 + 이름 윈도우 #  $mes_id=nil + $mes_name="" :디폴트 윈도우 ( 이름 없음) # # [메세지 표시 스피드의 변경법] # 이벤트 커멘드 「스크립트」로 「$mes_speed 」에 수치를 대입합니다. # 0 (을)를 대입하면 순간 표시가 됩니다. # (기술예: $mes_speed = 1 ) # # [오트멧세이지 보내] # 이벤트 커멘드 「스크립트」로 「$mes_auto 」에 수치를 대입합니다. # 수치는 메세지 묘화 종료후의 웨이트의 프레임수입니다. # nil (을)를 대입하면, 오토 모드가 해제됩니다. # # [추가 제어 문자] # I[ 파일명] 아이콘의 묘화 # 「Graphics/Icons 」 안의 화상을 표시합니다.( 기술예:I[001-Weapon01] ) # S[n] 메세지 스피드의 변경 # size[n] font size의 변경 # #============================================================================== module FUKI # 스킨의 설정 # 윈도우 스킨과 같은 것을 사용할 때는 「"" 」 FUKI_SKIN_NAME = "001-Blue01" # 분출해 용스킨 NAME_SKIN_NAME = "001-Blue01" # 이름 표시용 스킨 # font size MES_FONT_SIZE = 22 # 분출해 NAME_FONT_SIZE = 14 # 이름 윈도우 # 문자색 # ( Color.new(0, 0, 0, 0) (을)를 지정하면, 통상 문자색을 사용합니다 ) FUKI_COLOR = Color.new(255, 255, 255, 255) # 분출해 윈도우 NAME_COLOR = Color.new(255, 255, 255, 255) # 이름 윈도우 # 윈도우의 투명도 FUKI_OPACITY = 255 # 분출해 윈도우 MES_OPACITY = 255 # 통상의 메세지 윈도우 NAME_OPACITY = 255 # 이름 윈도우 # 이름 윈도우의 상대 위치 NAME_SHIFT_X = 0 # 옆위치 NAME_SHIFT_Y = 16 # 세로 위치 # 화면상하로부터 윈도우가 초과할 때는, # 자동으로 표시 위치(상하)를 체인지( true / false ) POS_FIX = true # 화면의 제일 구석나무이고를 조금 늦춘다 # 모퉁이의 둥근 스킨을 사용하고 있고, 테두리의 모퉁이나무이고와 겹치는 경우에 true (으)로 한다 CORNER_SHIFT = false SHIFT_PIXEL = 4 # true 의 때에 늦추는 피크셀수 # 캐릭터의 세로의 사이즈 CHARACTOR_HEIGHT = 48 # 나무이고의 상대 위치(세로 위치) POP_SHIFT_TOP = 0 # 표시 위치가 위 때 POP_SHIFT_UNDER = -16 # 표시 위치가 아래 때 # 메세지 표시 속도(숫자가 작을 정도 빠르다.0 그리고 순간 표시) # $mes_speed 에 수치를 대입하는 것으로, 게임중으로 변경가능. MES_SPEED = 1 # 메세지 스킵을 사용할까 MES_SKIP = true # ( true :유효 / false :무효 ) # 메세지 스킵에 사용하는 버튼(표기 방법은,Input:: (버튼)) # (키보드와의 대응표는 트크르의 헬프 「게임의 조작 방법」에 있습니다) MES_SKIP_KEY = Input::A # 메세지 스킵 금지 이벤트 스윗치ID # (이벤트 커멘드 「스윗치의 조작」으로 이 번호의 스윗치를ON (으)로 하고 있는 동안은 # 메세지 스킵을 기능을 무효로 합니다) NO_MES_SKIP_SWITCH = 999 end #============================================================================== # ■ Window_Message #------------------------------------------------------------------------------ #  문장 표시에 사용하는 메세지 윈도우입니다. #============================================================================== class Window_Message < Window_Selectable #-------------------------------------------------------------------------- # ● 오브젝트 초기화 #-------------------------------------------------------------------------- alias alias_para_fuki_initialize initialize def initialize # 앨리어스(alias)를 귀환시킨다 alias_para_fuki_initialize # 변수를 세트 @w = 0 @h = 0 @wait = 0 @dx = 0 @dy = 0 @dh = 0 $mes_speed = FUKI::MES_SPEED end #-------------------------------------------------------------------------- # ● 윈도우의 위치와 불투명도의 설정 #-------------------------------------------------------------------------- alias alias_para_fuki_reset_window reset_window def reset_window # 앨리어스(alias)를 귀환시킨다 alias_para_fuki_reset_window self.back_opacity = FUKI::MES_OPACITY end #-------------------------------------------------------------------------- # ● 프레임 갱신 #-------------------------------------------------------------------------- def update super # 분출해 모드에서는 이벤트의 움직임에 추종 if @tale != nil pos = get_fuki_pos(self.width, self.height) self.x = pos[0] self.y = pos[1] tale_pos = get_tale_pos @tale.x = tale_pos[0] @tale.y = tale_pos[1] if @name_win != nil name_height = FUKI::NAME_FONT_SIZE @name_win.x = self.x + FUKI::NAME_SHIFT_X @name_win.y = self.y - name_height - 16 + FUKI::NAME_SHIFT_Y @name_contents.x = @name_win.x + 12 @name_contents.y = @name_win.y + 8 end end # 메세지 스킵 if mes_skip? self.contents_opacity = 255 if @name_win != nil @name_win.opacity = 255 end if @tale != nil @tale.opacity = 255 end if @input_number_window != nil @input_number_window.contents_opacity = 255 end @fade_in = false end # 용명의 경우 if @fade_in self.contents_opacity += 24 if @name_win != nil @name_win.opacity += 24 end if @tale != nil @tale.opacity += 24 end if @input_number_window != nil @input_number_window.contents_opacity += 24 end if self.contents_opacity == 255 @fade_in = false end return end # 메세지 표시중의 경우 if @contents_drawing # 한 글자씩 묘화 refresh_drawtext return end # 수치 입력중의 경우 if @input_number_window != nil @input_number_window.update # 결정 if Input.trigger?(Input::C) $game_system.se_play($data_system.decision_se) $game_variables[$game_temp.num_input_variable_id] = @input_number_window.number $game_map.need_refresh = true # 수치 입력 윈도우를 해방 @input_number_window.dispose @input_number_window = nil terminate_message end return end # 메세지 표시 종료의 경우 if @contents_showing_end # 메세지 스킵 판정 if mes_skip? # 선택사항의 표시중이 아니면 메세지 윈도우를 닫는다 if $game_temp.choice_max == 0 terminate_message # 나무이고를 파기 del_fukidasi return end end # 오토 모드 if @mes_auto != nil if @mes_auto <= 0 terminate_message # 나무이고를 파기 del_fukidasi @mes_auto = nil else @mes_auto -= 1 end end # 선택사항의 표시중이 아니면 포즈 싸인을 표시 # 분출해 모드에서는 비표시 if $game_temp.choice_max == 0 and @tale == nil self.pause = true else self.pause = false end # 캔슬 if Input.trigger?(Input::B) if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0 $game_system.se_play($data_system.cancel_se) $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1) terminate_message end end # 결정 if Input.trigger?(Input::C) and $mes_auto == nil if $game_temp.choice_max > 0 $game_system.se_play($data_system.decision_se) $game_temp.choice_proc.call(self.index) end terminate_message # 나무이고를 파기 del_fukidasi end return end # 페이드아웃중 이외로 표시 기다리는 메세지나 선택사항이 있는 경우 if @fade_out == false and $game_temp.message_text != nil @contents_showing = true $game_temp.message_window_showing = true reset_window refresh_create if @name_win != nil @name_win.opacity = 0 end if @tale != nil @tale.opacity = 0 end Graphics.frame_reset self.visible = true self.contents_opacity = 0 if @input_number_window != nil @input_number_window.contents_opacity = 0 end @fade_in = true @mes_auto = $mes_auto return end # 표시해야 할 메세지가 없지만, 윈도우가 가시 상태의 경우 if self.visible @fade_out = true self.opacity -= 48 if @name_win != nil @name_win.opacity -= 48 end if @tale != nil @tale.opacity -= 48 end if self.opacity == 0 self.visible = false @fade_out = false $game_temp.message_window_showing = false del_fukidasi end return end end #-------------------------------------------------------------------------- # ● 메세지 종료 처리 #-------------------------------------------------------------------------- alias alias_para_fuki_terminate_message terminate_message def terminate_message # 앨리어스(alias)를 귀환시킨다 alias_para_fuki_terminate_message @contents_showing_end = false end #-------------------------------------------------------------------------- # ● 커서의 구형 갱신 #-------------------------------------------------------------------------- def update_cursor_rect if @index >= 0 n = $game_temp.choice_start + @index font_size = self.contents.font.size self.cursor_rect.set(8, n*(font_size+10)-5, @cursor_width, (font_size+10)) else self.cursor_rect.empty end end #-------------------------------------------------------------------------- # ○ 메세지 스킵 유효 판정 #-------------------------------------------------------------------------- def mes_skip? if FUKI::MES_SKIP == true and Input.repeat?(FUKI::MES_SKIP_KEY) and $game_switches[FUKI::NO_MES_SKIP_SWITCH] == false return true else return false end end #-------------------------------------------------------------------------- # ○ 사이즈를 결정해 윈도우를 작성 #-------------------------------------------------------------------------- def refresh_create self.contents.clear self.contents.font.color = normal_color self.contents.font.size = FUKI::MES_FONT_SIZE # 윈도우 사이즈를 취득 get_windowsize w = @w + 32 + 8 h = @h + 26 # 분출해 윈도우를 작성 set_fukidasi(self.x, self.y, w, h) # 이름 윈도우를 작성 set_namewindow # 메세지 표시용 변수의 초기화 @dx = @dy = @dh = @max_font_h = 0 @cursor_width = 0 @contents_drawing = true # 메세지 스피드의 초기화 @mes_speed = $mes_speed # font size의 초기화 self.contents.font.size = FUKI::MES_FONT_SIZE @max_font_h = self.contents.font.size # 문자 묘화 refresh_drawtext end #-------------------------------------------------------------------------- # ○ 한 글자씩 묘화 #-------------------------------------------------------------------------- def refresh_drawtext if $game_temp.message_text != nil # 메세지 스킵이 온이라면 if mes_skip? # 묘화가 끝날 때까지 묘화 처리를 루프 while $game_temp.message_text != "" draw_massage end # 메세지 스피드가0 (이)라면 elsif @mes_speed == 0 # 묘화가 끝날까 메세지 스피드가 변경될 때까지 묘화 처리를 루프 while $game_temp.message_text != "" and @mes_speed == 0 draw_massage end else if @wait > 0 @wait -= 1 elsif @wait == 0 # 묘화 처리 draw_massage @wait = @mes_speed end end end # 묘화 종료 if $game_temp.message_text == "" draw_opt_text @contents_showing_end = true @contents_drawing = false end end #-------------------------------------------------------------------------- # ○ 윈도우 사이즈를 취득 #-------------------------------------------------------------------------- def get_windowsize x = y = 0 @h = @w = 0 max_font_h = self.contents.font.size @cursor_width = 0 # 선택사항이라면 인덴트를 실시한다 if $game_temp.choice_start == 0 x = 16 end # 표시 기다리는 메세지가 있는 경우 if $game_temp.message_text != nil text = $game_temp.message_text.clone # 제어 문자 처리 begin last_text = text.clone text.gsub!(/[Vv][([0-9]+)]/) { $game_variables[$1.to_i] } end until text == last_text text.gsub!(/[Nn][([0-9]+)]/) do $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : "" end # 편의상,"\" (을)를 "00" 에 변환 text.gsub!(/\/) { "00" } # "C" (을)를 "01" 에,"G" (을)를 "02" 에 변환 text.gsub!(/[Cc][([0-9]+)]/) { "01" } text.gsub!(/[Gg]/) { "02" } # "I" (을)를 "03" 에 변환 text.gsub!(/[Ii][(.*?)]/) { "03[#{$1}]" } # "S" (을)를 "04" 에 변환 text.gsub!(/[Ss][([0-9]+)]/) { "04[#{$1}]" } # "size" (을)를 "05" 에 변환 text.gsub!(/size[([0-9]+)]/) { "05[#{$1}]" } # c 에 1 문자를 취득 ( 문자를 취득할 수 없게 될 때까지 루프) while ((c = text.slice!(/./m)) != nil) # 의 경우 if c == "00" # 본래의 문자에 되돌린다 c = "" end # C[n] 또는 G 의 경우 또는 S[n] 때 if c == "01" or c == "02" or c == "04" # 다음의 문자에 next end # 개행 문자의 경우 if c == "n" # y 에 1 (을)를 가산 y += 1 # 종횡 사이즈를 취득 @h += max_font_h + 10 max_font_h = 0 @w = x > @w ? x : @w if y >= $game_temp.choice_start @w = x + 8 > @w ? x + 8 : @w end x = 0 # 선택사항이라면 인덴트를 실시한다 if y >= $game_temp.choice_start x = 8 end # 다음의 문자에 next end # I[ 파일명] 의 경우 if c == "03" text.sub!(/[(.*?)]/, "") bitmap = RPG::Cache.icon($1) # x 에 아이콘의 폭을 가산 x += bitmap.width # 다음의 문자에 next end # size[n] 의 경우 if c == "05" text.sub!(/[([0-9]+)]/, "") # 문자 사이즈를 변경 self.contents.font.size = $1.to_i # 최대세로폭을 취득 if self.contents.font.size > max_font_h max_font_h = self.contents.font.size end end # x 에 문자의 폭을 가산 x += self.contents.text_size(c).width # 최대세로폭을 취득 if self.contents.font.size > max_font_h max_font_h = self.contents.font.size end end end # 문자 사이즈를 되돌린다 self.contents.font.size = FUKI::MES_FONT_SIZE # 수치 입력의 경우 if $game_temp.num_input_variable_id > 0 digits_max = $game_temp.num_input_digits_max number = $game_variables[$game_temp.num_input_variable_id] @h += 1 x = digits_max * self.contents.font.size + 16 @w = x > @w ? x : @w end end #-------------------------------------------------------------------------- # ○ 묘화 처리 #-------------------------------------------------------------------------- def draw_massage self.contents.font.color = normal_color # 표시 기다리는 메세지가 있는 경우 if $game_temp.message_text != nil text = $game_temp.message_text # 제어 문자 처리 begin last_text = text.clone text.gsub!(/[Vv][([0-9]+)]/) { $game_variables[$1.to_i] } end until text == last_text text.gsub!(/[Nn][([0-9]+)]/) do $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : "" end # 편의상,"\" (을)를 "00" 에 변환 text.gsub!(/\/) { "00" } # "C" (을)를 "01" 에,"G" (을)를 "02" 에 변환 text.gsub!(/[Cc][([0-9]+)]/) { "01[#{$1}]" } text.gsub!(/[Gg]/) { "02" } # "I" (을)를 "03" 에 변환 text.gsub!(/[Ii][(.*?)]/) { "03[#{$1}]" } # "S" (을)를 "04" 에 변환 text.gsub!(/[Ss][([0-9]+)]/) { "04[#{$1}]" } # "size" (을)를 "05" 에 변환 text.gsub!(/size[([0-9]+)]/) { "05[#{$1}]" } # c 에 1 문자를 취득 if ((c = text.slice!(/./m)) != nil) # 선택사항의 경우 if @dy >= $game_temp.choice_start # 인덴트를 실시한다 @dx = 8 # 문자를 묘화 font_size = self.contents.font.size self.contents.draw_text(4+@dx, @dh, font_size, font_size, c) # x 에 묘화 한 문자의 폭을 가산 @dx += self.contents.text_size(c).width # 루프 while ((c = text.slice!(/./m)) != "n") # 문자를 묘화 font_size = self.contents.font.size self.contents.draw_text(4+@dx, @dh, font_size, font_size, c) @max_font_h = font_size # x 에 묘화 한 문자의 폭을 가산 @dx += self.contents.text_size(c).width end if c == "n" # 커서의 폭을 갱신 @cursor_width = [@cursor_width, @dx].max # 폰트의 최대의 높이를 가산 @dh += @max_font_h + 10 @max_font_h = self.contents.font.size @dx = 0 end return end # 의 경우 if c == "00" # 본래의 문자에 되돌린다 c = "" end # C[n] 의 경우 if c == "01" # 문자색을 변경 text.sub!(/[([0-9]+)]/, "") color = $1.to_i if color >= 0 and color <= 7 self.contents.font.color = text_color(color) end end # G 의 경우 if c == "02" # 골드 윈도우를 작성 if @gold_window == nil @gold_window = Window_Gold.new @gold_window.x = 560 - @gold_window.width if $game_temp.in_battle @gold_window.y = 192 else @gold_window.y = self.y >= 128 ? 32 : 384 end @gold_window.opacity = self.opacity @gold_window.back_opacity = self.back_opacity end end # 개행 문자의 경우 if c == "n" # y 에 1 (을)를 가산 @dy += 1 @dx = 0 # 폰트의 최대의 높이를 가산 @dh += @max_font_h + 10 @max_font_h = 0 return end # I[ 파일명] 의 경우 if c == "03" text.sub!(/[(.*?)]/, "") bitmap = RPG::Cache.icon($1) font_size = FUKI::MES_FONT_SIZE # 아이콘을 묘화 self.contents.blt(4+@dx, 5+@dh, bitmap, Rect.new(0, 0, bitmap.width, bitmap.height)) # x 에 묘화 한 아이콘의 폭을 가산 @dx += bitmap.width # 최대세로폭을 취득 if self.contents.font.size > @max_font_h @max_font_h = bitmap.height end return end # S[n] 의 경우 if c == "04" text.sub!(/[([0-9]+)]/, "") # 묘화 스피드를 변경 @mes_speed = $1.to_i return end # size[n] 의 경우 if c == "05" text.sub!(/[([0-9]+)]/, "") c = "" # 문자 사이즈를 변경 self.contents.font.size = $1.to_i end # 문자를 묘화 font_size = self.contents.font.size self.contents.draw_text(4+@dx, @dh, font_size, font_size, c) # x 에 묘화 한 문자의 폭을 가산 @dx += self.contents.text_size(c).width # 문자의 최대세로폭을 취득 if self.contents.font.size > @max_font_h @max_font_h = self.contents.font.size end end end end #-------------------------------------------------------------------------- # ○ 선택사항과 수치 입력을 유효하게 #-------------------------------------------------------------------------- def draw_opt_text # 선택사항의 경우 if $game_temp.choice_max > 0 @item_max = $game_temp.choice_max self.active = true self.index = 0 end # 수치 입력의 경우 if $game_temp.num_input_variable_id > 0 digits_max = $game_temp.num_input_digits_max number = $game_variables[$game_temp.num_input_variable_id] @input_number_window = Window_InputNumber.new(digits_max) @input_number_window.number = number @input_number_window.x = self.x + 8 @input_number_window.y = self.y + $game_temp.num_input_start * 32 end end #-------------------------------------------------------------------------- # ○ 나무이고를 표시 #-------------------------------------------------------------------------- def set_fukidasi(x, y, width, height) # $mes_id 하지만 하늘의 때나무이고를 표시하지 않는다 if $mes_id == nil or $mes_id == "" del_fukidasi reset_window else # 포즈 싸인을 비표시 self.pause = false # 위치를 취득 pos = get_fuki_pos(width, height) x = pos[0] y = pos[1] skin = FUKI::FUKI_SKIN_NAME != "" ? FUKI::FUKI_SKIN_NAME : $game_system.windowskin_name # 분출해 용메세지 윈도우를 작성 self.windowskin = RPG::Cache.windowskin(skin) self.x = x self.y = y self.height = height self.width = width self.contents.dispose self.contents = Bitmap.new(width - 32, height - 32) self.back_opacity = FUKI::FUKI_OPACITY self.contents.clear self.contents.font.color = normal_color self.contents.font.size = FUKI::MES_FONT_SIZE # 나무이고의 테일을 묘화 if $game_system.message_frame == 0 # 위치를 취득 tale_pos = get_tale_pos @tale = Sprite.new case @message_position when 0 # 상 @tale.bitmap = RPG::Cache.windowskin(skin + "-top") @tale.x = tale_pos[0] @tale.y = tale_pos[1] @tale.z = self.z + 1 when 1 # 중 @tale.dispose @tale = nil when 2 # 하 @tale.bitmap = RPG::Cache.windowskin(skin + "-under") @tale.x = tale_pos[0] @tale.y = tale_pos[1] @tale.z = self.z + 1 end end end end #-------------------------------------------------------------------------- # ○ 나무이고의 위치를 계산 #-------------------------------------------------------------------------- def get_fuki_pos(width, height) # 캐릭터를 취득 @character = get_character($mes_id) if @character == nil # 캐릭터가 존재하지 않을 때는 통상의 메세지 윈도우에 del_fukidasi reset_window return end # 좌표 처리 x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - (width / 2) # 초과할 때는 화면내에 들어가도록(듯이) 이동 if x + width > 640 x = 640 - width elsif x < 0 x = 0 end # 윈도우의 위치를 결정 case $game_system.message_position when 0 # 상 y = ( @character.real_y - $game_map.display_y + 64) * 32 / 128 - height - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP when 1 # 중 y = (480 - height) / 2 x = (640 - width) / 2 when 2 # 하 y = ( @character.real_y - $game_map.display_y + 64) * 32 / 128 + 32 + FUKI::POP_SHIFT_UNDER end # 메세지 포지션 일시 기억 @message_position = $game_system.message_position # 화면외에는 봐 낼 때는 윈도우의 상하를 체인지 if FUKI::POS_FIX case @message_position when 0 # 상 if y <= 0 @message_position = 2 y = ( @character.real_y - $game_map.display_y + 64) * 32 / 128 + FUKI::POP_SHIFT_UNDER end when 2 # 하 if y + height >= 480 @message_position = 0 y = ( @character.real_y - $game_map.display_y + 64) * 32 / 128 - height + 32 - FUKI::CHARACTOR_HEIGHT + FUKI::POP_SHIFT_TOP end end end return [x,y] end #-------------------------------------------------------------------------- # ○ 테일의 위치를 계산 #-------------------------------------------------------------------------- def get_tale_pos case @message_position when 0 # 상 # 좌표 처리 x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16 # 화면단에서는 위치를 늦춘다 if FUKI::CORNER_SHIFT if x == 0 x = FUKI::SHIFT_PIXEL elsif x == 640 - 32 x = 640 - 32 - FUKI::SHIFT_PIXEL end end y = self.y + self.height - 16 when 1 # 중 x = nil y = nil when 2 # 하 # 좌표 처리 x = ( @character.real_x - $game_map.display_x + 64 ) * 32 / 128 - 16 # 화면단에서는 위치를 늦춘다 if FUKI::CORNER_SHIFT if x == 0 x = FUKI::SHIFT_PIXEL elsif @tale.x == 640 - 32 x = 640 - 32 - FUKI::SHIFT_PIXEL end end y = self.y - 16 end return [x,y] end #-------------------------------------------------------------------------- # ○ 이름 윈도우를 표시 #-------------------------------------------------------------------------- def set_namewindow # $mes_name 하지만 하늘 때는 이름 윈도우를 표시하지 않는다 if $mes_name == nil or $mes_name == "" return else # 변수를 세트 mes_name = $mes_name # 제어 문자 처리 begin last_text = mes_name.clone mes_name.gsub!(/[Vv][([0-9]+)]/) { $game_variables[$1.to_i] } end until mes_name == last_text mes_name.gsub!(/[Nn][([0-9]+)]/) do $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : "" end name_width = mes_name.size / 2 * FUKI::NAME_FONT_SIZE name_height = FUKI::NAME_FONT_SIZE name_x = self.x + FUKI::NAME_SHIFT_X name_y = self.y - name_height - 16 + FUKI::NAME_SHIFT_Y # 이름 윈도우(테두리만)를 작성 @name_win = Window_Base.new(name_x, name_y, name_width + 16, name_height + 16) skin = FUKI::NAME_SKIN_NAME != "" ? FUKI::NAME_SKIN_NAME : $game_system.windowskin_name @name_win.windowskin = RPG::Cache.windowskin(skin) @name_win.back_opacity = FUKI::NAME_OPACITY @name_win.z = self.z + 1 # 여백을window 클래스의 한계보다 작게하기 위해(때문에), 이중구조에 @name_contents = Sprite.new @name_contents.x = name_x + 12 @name_contents.y = name_y + 8 @name_contents.bitmap = Bitmap.new(name_width, name_height) @name_contents.z = @name_win.z + 2 # 문자색 설정 nil_color = Color.new(0,0,0,0) if FUKI::NAME_COLOR != nil_color @name_contents.bitmap.font.color = FUKI::NAME_COLOR else @name_contents.bitmap.font.color = normal_color end @name_contents.bitmap.font.size = FUKI::NAME_FONT_SIZE # 윈도우 사이즈를 조정 rect = @name_contents.bitmap.text_size(mes_name) @name_win.width = rect.width + 32 # 이름을 묘화 @name_contents.bitmap.draw_text(rect, mes_name) end end #-------------------------------------------------------------------------- # ○ 나무이고와 이름 윈도우를 파기 #-------------------------------------------------------------------------- def del_fukidasi if @tale != nil @tale.dispose @tale = nil end if @name_win != nil @name_win.dispose @name_win = nil @name_contents.dispose @name_contents = nil end self.opacity = 0 self.x = 80 self.width = 480 self.height = 160 self.contents.dispose self.contents = Bitmap.new(width - 32, height - 32) self.pause = true end #-------------------------------------------------------------------------- # ○ 캐릭터의 취득 # parameter : 파라미터 #-------------------------------------------------------------------------- def get_character(parameter) # 파라미터로 분기 case parameter when -1 # 플레이어 return $game_player when 0 # 이 이벤트 events = $game_map.events return events == nil ? nil : events[$active_event_id] else # 특정의 이벤트 events = $game_map.events return events == nil ? nil : events[parameter] end end #-------------------------------------------------------------------------- # ● 통상 문자색 취득 #-------------------------------------------------------------------------- def normal_color # 분출해 모드시로 설정을 적용 if $mes_id != nil and $mes_id != "" nil_color = Color.new(0,0,0,0) if FUKI::FUKI_COLOR != nil_color color = FUKI::FUKI_COLOR else color = super end return color else # 비분출해때에는 통상 문자색 return super end end end #============================================================================== # ■ Window_InputNumber #============================================================================== class Window_InputNumber < Window_Base #-------------------------------------------------------------------------- # ● 오브젝트 초기화 # digits_max : 자리수 #-------------------------------------------------------------------------- def initialize(digits_max) @digits_max = digits_max @number = 0 # 숫자의 폭으로부터 커서의 폭을 계산 (0 ~9 (은)는 등폭과 가정) dummy_bitmap = Bitmap.new(32, 32) dummy_bitmap.font.size = FUKI::MES_FONT_SIZE @cursor_width = dummy_bitmap.text_size("0").width + 8 dummy_bitmap.dispose super(0, 0, @cursor_width * @digits_max + 32, 64) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.size = FUKI::MES_FONT_SIZE self.z += 9999 self.opacity = 0 @index = 0 refresh update_cursor_rect end end #============================================================================== # ■ Interpreter #============================================================================== class Interpreter #-------------------------------------------------------------------------- # ● 이벤트의 셋업 # event_id : 이벤트 ID #-------------------------------------------------------------------------- alias setup_fuki setup def setup(list, event_id) setup_fuki(list, event_id) # 전투중이 아니면 if !($game_temp.in_battle) # 이벤트ID (을)를 기록 $active_event_id = event_id end end end </TEXTAREA> <INPUT onclick=setCB() type=button value=" 스크립트를 클립보드에 카피"> </FORM>

[사용법]

[분출해 표시의 사용법]
이벤트 커멘드 「스크립트」로 「$mes_id 」에 이벤트ID (을)를 대입하는 것으로
그 이벤트나무이고가 팝 하게 됩니다.(기술예: $mes_id=4 )
ID 에-1 (을)를 대입하면 플레이어,0 그리고 그 이벤트 자신.
nil 또는"" (을)를 대입하면, 통상의 메세지 표시로 돌아옵니다.(기술예: $mes_id=nil )

표시 위치는 이벤트 「문장 옵션」으로 변경할 수 있습니다.
표시 위치에 「중앙」을 지정하면, 이벤트의 위치에 관계없이 화면 중앙에 표시됩니다.

[이름 윈도우의 사용법]
이벤트 커멘드 「스크립트」로 「$mes_name 」에 문자열을 대입하는 것으로
이름 윈도우를 표시합니다.(기술예: $mes_name=" 아르시스" )
$mes_name 에"" 또는nil (을)를 대입하면, 비표시가 됩니다.

N[ (액터ID )] (와)과 기술하면,ID 에 대응하는 액터의 이름을 표시합니다.
N[n] 에 상당하는 기능입니다만, 「 」라고 기술하는 점에 주의해 주세요.
(기술예: $mes_name="N[1]" $mes_name="N[V[1]]" )



덧붙여 분출해 표시와 이름 윈도우의 두 개의 기능은 독립하고 있기 때문에,
각각 단체로 사용할 수 있습니다.


[사용하기 전에]

나무이고의 테일에 해당하는 부분의 화상을 준비해,
「Graphics/Windowskins 」폴더에 임포트 합니다.

화상 사이즈는16 ×16(pixel) .
그 중8pixel 하지만 윈도우와 겹쳐 표시됩니다.



상부 분출해 용무와 하부 분출해 용무의 2 패턴을 만들어,
각각 「( 스킨명)-top 」 「( 스킨명)-under 」라고 이름을 붙여 주세요.

샘플:
 RTP 소재 「001-Blue01 」용 분출해 테일
 ( 오른쪽 클릭→「이름을 붙여 화상을 보존」으로 다운로드)

(001-Blue01-top.png )

(001-Blue01-under.png )

분출해 윈도우의 투명도를 변경해도, 분출해 테일은 투과 하지 않습니다.
반투명의 윈도우를 사용할 때는, 테일을 프레임과 일체화시키도록 만들어 주세요.

 샘플(다운로드 후, 말미의 「_b 」(을)를 소거해 주세요)

(001-Blue01-top_b.png )

(001-Blue01-under_b.png )


[그 외의 기능]

메세지 표시 스피드의 변경
  이벤트 커멘드 「스크립트」로 「$mes_speed 」에 수치를 대입하는 것으로
  메세지의 표시 속도를 변화시킬 수 있습니다.
  0 (을)를 대입하면 순간 표시가 됩니다.

오트멧세이지 보내
  이벤트 커멘드 「스크립트」로 「$mes_auto 」에 수치를 대입하면
  메세지 표시 종료후, 지정 프레임수가 경과하면 자동으로 윈도우를 닫습니다.
  nil (을)를 대입하면, 오토 모드가 해제됩니다.

메세지 스킵
  임의의 키를 계속 누르고 있는 동안, 메세지를 고속 표시합니다.

제어 문자
  I[ 파일명]   아이콘의 묘화
    「Graphics/Icons 」 안의 화상을 표시합니다.( 기술예:I[001-Weapon01] )
    
    [  하트의 그림 문자  ( 오른쪽 클릭→「대상을 파일에 보존」으로 다운로드) ]
  S[n]   메세지 스피드의 변경
  size[n]   font size의 변경


[사용 샘플]

Brave Quest
 짧습니다. 바카게이입니다. 관계없는 스크립트도 섞이고 있습니다.
 파일 사이즈는500kb 언더.회선에 상냥한 네!


[갱신 이력]

2007/6/3  ver.2.00
 신기능 「오트멧세이지 보내」 「메세지 스킵」 「아이콘의 묘화」
 「제어 문자로 메세지 스피드의 변경」 「font size의 변경」을 추가.
 RTP 의 버젼이1.03 때 개행시에 점이 묘화 되어 버리는 문제를 수정.
2006/3/12  ver.1.40
 이름 윈도우로 제어 문자N[n] 하지만 사용할 수 있도록(듯이) 기능 추가.
2006/2/8  ver.1.32
 문자 사이즈를 변경하고 있으면 선택사항이 올바르고 묘화 되지 않는 것을 수정.
2005/9/23  ver.1.31
 화면단나무이고가 올바르고 추종 하지 않았던 것을 수정.
 횡방향의 이동을 보다 매끈하게.
2005/9/22  ver.1.30
 캐릭터의 움직임에 맞출 수 있어 나무이고도 이동하도록(듯이).
 제어 문자로 색 변경을 실시했을 때 윈도우의 옆사이즈가 약간 퍼져 버리는 것을 수정.
 고르드윈드우를 재정의하고 있던 것을 폐지.
2005/8/31  ver.1.20
 문자색 설정을 가능하게.
 화면상하로부터 윈도우가 초과할 때, 상하를 자동적으로 체인지 하는 기능을 추가.
2005/7/17  ver.1.16
 문자 사이즈의 설정이 적용되지 않았던 것을 수정.
2005/6/20  ver.1.15
 문장 옵션 「비표시」때 나무이고를 묘화 하지 않게.
2005/6/19  ver.1.14
 3개 은행이상의 문자가 묘화 할 수 없는 버그(ver.1.12 이후에 발생)을 수정.
2005/6/17  ver.1.13
 맵 우단나무이고의 위치가 어긋나 있던 것을 수정.
2005/6/10  ver.1.12
 분출해 표시의 직후에 「중앙에 표시」하면 종료하는 버그를 수정.
 이벤트의 도중에 전투를 넣으면$mes_id=0 의 대상을 취득할 수 없게 되는 버그를 수정.
 32 피크셀 이상의 문자를 묘화 한다고 문자의 일부가 빠진다(Window_Message 클래스의 사양)의를 수정.
 더미 윈도우를 정리.경량화.
2005/6/10  ver.1.11
 존재하지 않는 이벤트ID (을)를 지정했을 때에 강제 종료하는 버그를 수정.
2005/6/9  ver.1.10
 신기능 「메세지를 한 글자씩 표시」를 실장.
2005/6/8  ver.1.00
 공개.

 

 

+분출해 표시


 



위의 사진은,XMS. 스크립트 쉘프모양의
「메세지 표시 풀 그레이드 업」과의 병용입니다.

[개요]

메세지 윈도우에 대해서 머위 국물 표시 기능을 부가합니다.
거의 어떤 메세지 윈도우계 스크립트에 대해서도 부록 가능해지고 있는 것이 특징입니다.
「+분출해」단체에서도 움직입니다.

·동작 확인이 끝난 스크립트
  스크립트 쉘프 양 : 「메세지 표시 풀 그레이드 업」
  톱니바퀴의 성 양 : 「메세지 제어 문자 추가」
 KGC Software 양 : 「메세지 윈도우 개조」

메세지 윈도우의 기능(리사이즈나 캐릭터 추적등 )은, 병용 하는 스크립트에 의존합니다.
윈도우 위치가 고정의 스크립트의 경우, 테일 부분만이 캐릭터를 자동 추적 합니다.

당스크립트는, 「XMS. 스크립트 쉘프」의 앵아 재토 모양과의 콜라보레이션에 의해서 제작되었습니다.


[스크립트]

<FORM name=xForm><TEXTAREA name=result rows=20 cols=80>#============================================================================== #  +++ 콜라보레이션 「+분출해 표시」 ver.1.13  +++ # Script by # 파라개  http://2d6.parasite.jp/ # × # 앵아 재흙 http://xms.rdy.jp/ # #------------------------------------------------------------------------------ # 거의 어떤 메세지 윈도우에 대해서도 부록 가능한 「분출해 표시」입니다. # 또, 테일 부분만의 자동 추적 기능을 가집니다. #============================================================================== # 분출해 표시를 하려면 , # 테일용 화상 「( 스킨명)-top 」 「( 스킨명)-under 」(을)를 # 「Graphics/Windowskins 」폴더에 임포트 해 둘 필요가 있습니다. #------------------------------------------------------------------------------ # # [분출해 표시의 사용법] # 이벤트 커멘드 「스크립트」로 「$mes_id 」에 이벤트ID (을)를 대입하는 것으로 # 그 이벤트나무이고가 팝 하게 됩니다. # (기술예: $mes_id=4 ) # ID 에0 (을)를 대입하면 플레이어, nil 대입하면, 통상의 메세지 표시로 돌아옵니다. # 표시 위치는 이벤트 「문장 옵션」으로 변경할 수 있습니다. # 표시 위치에 「중앙」을 지정하면, 이벤트의 위치에 관계없이 # 화면 중앙에 표시됩니다. # #============================================================================== #============================================================================== # □ 커스터마이즈 포인트 #============================================================================== class Window_Message < Window_Selectable #-------------------------------------------------------------------------- # 분출해 모드시의 스킨 설정 #-------------------------------------------------------------------------- # 스킨명(원의 윈도우 스킨과 같은 것을 사용할 때는 「"" 」) FUKI_SKIN_NAME = "001-Blue01" # 윈도우 배경의 불투명도(디폴트는160 ) FUKI_OPACITY = 255 end #============================================================================== # ■ Window_Message #============================================================================== class Window_Message < Window_Selectable #-------------------------------------------------------------------------- # ● 메세지 종료 처리 #-------------------------------------------------------------------------- alias parashelf_terminate_message terminate_message def terminate_message # 귀환시킨다 parashelf_terminate_message # 나무이고의 소거 del_tail end #-------------------------------------------------------------------------- # ● 리프레쉬 #-------------------------------------------------------------------------- alias parashelf_refresh refresh def refresh # 귀환시킨다 parashelf_refresh # 나무이고의 재설정 del_tail set_tail end #-------------------------------------------------------------------------- # ● 윈도우의 위치와 불투명도의 설정 #-------------------------------------------------------------------------- alias parashelf_reset_window reset_window def reset_window # 귀환시킨다 parashelf_reset_window # 테일의 위치를 변경 if $mes_id != nil and @tail != nil tale_pos = get_tale_pos @tail.x = tale_pos[0] @tail.y = tale_pos[1] end end #-------------------------------------------------------------------------- # ● 프레임 갱신 #-------------------------------------------------------------------------- alias parashelf_update update def update # 귀환시킨다 parashelf_update # 분출해 테일의 갱신 update_tail # 메세지 표시중의 경우 if @contents_showing # 테일이 있는 경우는 포즈 싸인을 비표시 if @tail != nil self.pause = false end end # 멧지 종료시에 스킨 설정이 돌아오지 않은 경우 if $game_temp.message_window_showing == false and @def_skin_name != nil # 스킨을 되돌린다 reset_fuki_skin end end #-------------------------------------------------------------------------- # ○ 프레임 갱신 ( 분출해 테일) #-------------------------------------------------------------------------- def update_tail # 분출해 모드에서는 이벤트의 움직임에 추종 if $mes_id != nil and @tail != nil tale_pos = get_tale_pos @tail.x = tale_pos[0] @tail.y = tale_pos[1] skin = $game_system.windowskin_name case @message_position when 0 # 상 @tail.bitmap = RPG::Cache.windowskin(skin + "-top") when 2 # 하 @tail.bitmap = RPG::Cache.windowskin(skin + "-under") end end end #-------------------------------------------------------------------------- # ○ 분출해 테일을 표시 #-------------------------------------------------------------------------- def set_tail # $mes_id 하지만 하늘 때와 전투중나무이고를 표시하지 않는다 if $mes_id == nil or $game_temp.in_battle del_tail # 스킨을 되돌린다 reset_fuki_skin else # 스킨을 세트 set_fuki_skin # 나무이고의 테일을 묘화 skin = $game_system.windowskin_name if $game_system.message_frame == 0 # 위치를 취득 tale_pos = get_tale_pos @tail = Sprite.new case $game_system.message_position when 0 # 상 @tail.bitmap = RPG::Cache.windowskin(skin + "-top") @tail.x = tale_pos[0] @tail.y = tale_pos[1] @tail.z = self.z + 1 when 1 # 중 @tail.dispose @tail = nil when 2 # 하 @tail.bitmap = RPG::Cache.windowskin(skin + "-under") @tail.x = tale_pos[0] @tail.y = tale_pos[1] @tail.z = self.z + 1 end # 엑스트라 스프라이트에 등록 @extra_sprites = [] if @extra_sprites.nil? @extra_sprites.push(@tail) if @tail != nil end end end #-------------------------------------------------------------------------- # ○ 테일의 위치를 계산 #-------------------------------------------------------------------------- def get_tale_pos character = get_character($mes_id) x = [[character.screen_x - 16, self.x].max, self.x + self.width - 32].min case $game_system.message_position when 0 y = self.y + self.height - 16 else y = self.y - 16 end return [x, y] end #-------------------------------------------------------------------------- # ○ 캐릭터의 취득 # parameter : 파라미터 #-------------------------------------------------------------------------- def get_character(parameter) # 파라미터로 분기 case parameter when 0 # 플레이어 return $game_player else # 특정의 이벤트 events = $game_map.events return events == nil ? nil : events[parameter] end end #-------------------------------------------------------------------------- # ○ 나무이고를 파기 #-------------------------------------------------------------------------- def del_tail if @tail != nil @tail.dispose @tail = nil end end #-------------------------------------------------------------------------- # ○ 스킨의 설정 #-------------------------------------------------------------------------- def set_fuki_skin # 윈도우 스킨을 변경 if FUKI_SKIN_NAME != "" and FUKI_SKIN_NAME != $game_system.windowskin_name @def_skin_name = $game_system.windowskin_name $game_system.windowskin_name = FUKI_SKIN_NAME self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name) end # 불투명도를 변경 if self.back_opacity != FUKI_OPACITY @def_back_opacity = self.back_opacity self.back_opacity = FUKI_OPACITY end end #-------------------------------------------------------------------------- # ○ 스킨을 되돌린다 #-------------------------------------------------------------------------- def reset_fuki_skin # 윈도우 스킨을 되돌린다 if @def_skin_name != nil $game_system.windowskin_name = @def_skin_name self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name) @def_skin_name = nil end # 불투명도를 되돌린다 if @def_back_opacity != nil self.back_opacity = @def_back_opacity @def_back_opacity = nil end end end </TEXTAREA> <INPUT onclick=setCB() type=button value=" 스크립트를 클립보드에 카피"> </FORM>

[사용법]

이벤트ID 의 지정 방법이나 테일 화상의 형식은, 메세지 분출해 표시 (와)과 같습니다.
(다만 「$mes_id=-1 (그 이벤트 자신)」는 비대응이 되고 있습니다)

XMS. 스크립트 쉘프모양의 「메세지 표시 풀 그레이드 업」은, 확장CO-X (을)를 사용하는 것으로
제어 문자p[] 의 설정을 자동적으로$mes_id 에 적용할 수 있습니다.
즉, 캐릭터 팝으로부터 이벤트 커멘드를 고쳐 쓰는 필요없음에 도입이 가능합니다.


[외부 스크립트 병용판( 구)과의 차이]

외부 스크립트 병용판( 구)은, 스크립트 「메세지 분출해 표시」의 문자 묘화 부분만을
다른 사이트제 스크립트에 옮겨놓는 것으로,
강제 리사이즈 기능이나 스킨 변경 기능이나 캐릭터 추적 기능등을 가집니다.
약간 무리한 처리를 가하고 있기 때문에, 병용성에 대해서 약간의 난이 있었습니다.

대해 「+분출해 표시」는 병용처의 스크립트를 베이스로서
윈도우나무이고를 추가하는 옵션 파트이므로,
유연한 병용이 가능해져 지금 매연.

구버젼으로서 취급하고 있습니다만, 기능적으로도 완전한 별개이므로
버그 보고나 리퀘스트등의 서포트는 계속 되고 있습니다.
외부 스크립트 병용판( 구)


[갱신 이력]

2006/1/8 ver.1.13
 후르그레 병용시, 테일이 존재하지 않을 때(문장의 표시 위치가 「안」 때 등)는
 엑스트라 스프라이트에의 등록을 하지 않게 설정.
2005/9/30 ver.1.12
 스킨 변환시, 일순간원의 스킨이 표시되고 있던 것을 수정.
2005/9/30 ver.1.11
 메세지 종료후, 스킨 설정이 올바르게 돌아오지 않았던 문제를 수정.
2005/9/29 ver.1.10
 분출해 모드시의 스킨 설정을 추가.
2005/9/27
 공개.

그래픽 변경 데쉬



통상 이동

데쉬


[개요]

임의의 키를 누르면서 이동하면, 이동 속도가 오릅니다.
선두 캐릭터에 데쉬시의 화상이 준비되어 있는 경우는, 그것을 사용해 표시합니다.

[스크립트]

<FORM name=xForm><TEXTAREA name=result rows=20 cols=80>#============================================================================== #  ++ 그래픽 변경 데쉬 ver. 1.21  ++ #   Script by 파라개 #   http://2d6.parasite.jp/ #------------------------------------------------------------------------------ # 「Graphics/Characters 」폴더에 # 「(선두 캐릭터의 보행 그래픽명)+_dash 」라고 하는 이름의 파일이 있는 경우 # 데쉬시의 그래픽으로서 사용합니다.(예:001-Fighter01_dash ) #============================================================================== class Game_Player < Game_Character SPEED_DASH = 5 # 데쉬시의 이동 속도 SPEED_NORMAL = 4 # 통상의 이동 속도 # 데쉬에 사용하는 버튼(표기 방법은,Input:: (버튼)) # (키보드와의 대응표는 트크르의 헬프에 있습니다) KEY_DASH = Input::A # "_dash" 그래픽이 존재하지 않는 경우 데쉬를 할까( true: 한다 / false: 하지 않는다 ) NO_FILE_DASH = true # 정지시는 그래픽을 변경하지 않는다( true: 변경하지 않는다 / false: 변경한다 ) CHANGE_IN_MOVING = false # 데쉬 금지 이벤트 스윗치ID # (이벤트 커멘드 「스윗치의 조작」으로 이 번호의 스윗치를ON (으)로 하고 있는 동안은 # 데쉬를 기능을 무효로 합니다) NO_DASH_SWITCH = 999 end #============================================================================== # ■ Game_Player #============================================================================== class Game_Player < Game_Character #-------------------------------------------------------------------------- # ● 프레임 갱신 #-------------------------------------------------------------------------- alias dash_update update def update # 이벤트 실행중, 이동 루트 강제중, # 메세지 윈도우 표시중의 머지않아도 아닌 경우 unless $game_system.map_interpreter.running? or @move_route_forcing or $game_temp.message_window_showing if !($game_switches[NO_DASH_SWITCH]) # 키 판정 if Input.press?(KEY_DASH) and (CHANGE_IN_MOVING == false or Input.dir8 != 0) if (dash_graphic_exist?($game_party.actors[0]) or NO_FILE_DASH) # 데쉬중이 아니면 데쉬 if @move_speed != SPEED_DASH @move_speed = SPEED_DASH @dash_on = true $game_player.refresh end end elsif @dash_on == nil or @dash_on @move_speed = SPEED_NORMAL @dash_on = nil $game_player.refresh end end end dash_update end #-------------------------------------------------------------------------- # ○ 데쉬 그래픽의 유무를 체크 #-------------------------------------------------------------------------- def dash_graphic_exist?(actor) # 읽기 테스트 begin RPG::Cache.character(actor.character_name.to_s + "_dash", actor.character_hue) rescue return false end return true end #-------------------------------------------------------------------------- # ● 리프레쉬 #-------------------------------------------------------------------------- alias dash_refresh refresh def refresh dash_refresh # 파티 인원수가 0 사람이 아닌 경우 if $game_party.actors.size != 0 actor = $game_party.actors[0] # 캐릭터의 파일명과 색상을 설정 if @dash_on and dash_graphic_exist?(actor) fileplus = "_dash" else fileplus = "" end @character_name = actor.character_name + fileplus @character_hue = actor.character_hue end end end </TEXTAREA> <INPUT onclick=setCB() type=button value=" 스크립트를 클립보드에 카피"> </FORM>

[사용하기 전에]

데쉬시의 화상을 준비해, 「(캐릭터의 보행 그래픽명)+_dash 」라고 하는 이름을 붙여
「Graphics/Characters 」폴더에 임포트 합니다.
화상이 없어도, 데쉬 기능은 사용 가능합니다.

샘플:
 RTP 소재 「001-Fighter01 」데쉬 화상
 ( 오른쪽 클릭→「이름을 붙여 화상을 보존」으로 다운로드)
 
(001-Fighter01_dash.png )

[갱신 이력]

2006/2/15  ver.1.21
 「정지시는 그래픽을 변경하지 않는다」때, 데쉬→정지시에 그래픽이 원래대로 돌아가지 않았던 것을 수정.
2006/2/14  ver.1.20
 설정 항목 「정지시는 그래픽을 변경하지 않는다」추가.
2005/9/2  ver.1.11
 통상의 이동 속도 설정이 반영되어 있지 않았던 문제를 수정.(ver.1.10 그리고 발생)
2005/9/2  ver.1.10
 이벤트 스윗치로 데쉬 기능을 제어 가능하게.
 이벤트로 플레이어의 이동 스피드 변경이 반영되지 않았던 문제를 수정.
2005/6/17  ver.1.01
 파티 인원수가0 때에 에러가 나오는 문제를 수정.
2005/6/14  ver.1.00
 공개.

무기 종별 스킬




[개요]

「검 기술」 「창 기술」 등, 특정의 종류의 무기를 장비하고 있을 때 밖에 스킬을 사용할 수 없게 합니다.
트크르200x 의 「무기 속성」에 상당하는 기능입니다.

[스크립트]

<FORM name=xForm><TEXTAREA name=result rows=20 cols=80>#============================================================================== #  ++ 무기 종별 스킬 ver. 1.10  ++ #   Script by 파라개 #   http://2d6.parasite.jp/ #------------------------------------------------------------------------------ # 무기의 종류 마다 사용 가능한 스킬을 제한합니다. #------------------------------------------------------------------------------ # [사용법] # 무기의 종류 마다 「검」 「창」등의 속성을 설정해 # 무기와 스킬의 양쪽 모두에 부가합니다. # 이 속성이 일치하지 않는 경우, 스킬을 습득하고 있어도 사용 불가능이 됩니다. #============================================================================== module PARA_WSKL # 맨손때만 사용 가능한 스킬 속성의 이름 NO_WEAPON_NAME = " 체술" # 무기에 의해서 제한되지 않는 스킬 속성명 # (이 속성이 부가되고 있는 스킬은 무기의 영향을 받지 않습니다) VARIABLE_SKILL = " 마법" # 스킬을 제한하지 않는 무기 속성명 # (이 속성이 부가되고 있는 무기는 모든 스킬을 사용할 수 있습니다) VARIABLE_WEAPON = "" # 사용 불가 스킬의 표시/비표시 # ( 0: 항상 표시 / 1: 전투중은 비표시 / 2: 항상 비표시 ) VISIBLE_TYPE = 1 end # ↑ 설정 항목 여기까지 #------------------------------------------------------------------------------ #============================================================================== # ■ Game_Actor #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● 스킬의 사용 가능 판정 # skill_id : 스킬 ID #-------------------------------------------------------------------------- def skill_can_use?(skill_id) if not skill_learn?(skill_id) return false end if not skill_w_can_use?(skill_id) return false end return super end #-------------------------------------------------------------------------- # ● 무기 스킬의 사용 가능 판정 # skill_id : 스킬 ID #-------------------------------------------------------------------------- def skill_w_can_use?(skill_id) if not skill_learn?(skill_id) return false end # 스킬과 무기의 속성이 하나에서도 일치할까 if $data_skills[skill_id].element_set & self.element_set != [] bool = true else # 무기의 속성ID (을)를 이름에 weapon_elements_name = [] for element_id in self.element_set weapon_elements_name.push($data_system.elements[element_id]) end # 스킬의 속성ID (을)를 이름에 skill_elements_name = [] for element_id in $data_skills[skill_id].element_set skill_elements_name.push($data_system.elements[element_id]) end # 무기에 의해서 제한되지 않는 스킬 속성 if skill_elements_name.include?(PARA_WSKL::VARIABLE_SKILL) and PARA_WSKL::VARIABLE_SKILL != "" bool = true end # 스킬을 제한하지 않는 무기 속성 if weapon_elements_name.include?(PARA_WSKL::VARIABLE_WEAPON) and PARA_WSKL::VARIABLE_WEAPON != "" bool = true end # 맨손 스킬 if skill_elements_name.include?(PARA_WSKL::NO_WEAPON_NAME) and @weapon_id == 0 bool = true end end bool = bool == nil ? false : bool return bool end end #============================================================================== # ■ Window_Skill #============================================================================== class Window_Skill < Window_Selectable #-------------------------------------------------------------------------- # ● 리프레쉬 #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 0...@actor.skills.size skill = $data_skills[@actor.skills[i]] case PARA_WSKL::VISIBLE_TYPE when 1 if skill != nil and !(!@actor.skill_w_can_use?(skill.id) and $game_temp.in_battle) @data.push(skill) end when 2 if skill != nil and @actor.skill_w_can_use?(skill.id) @data.push(skill) end else if skill != nil @data.push(skill) end end end # 항목수가 0 (이)가 아니면 비트 맵을 작성해, 전항목을 묘화 @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end end end </TEXTAREA> <INPUT onclick=setCB() type=button value=" 스크립트를 클립보드에 카피"> </FORM>

[사용법]

데이타베이스로 「검」 「창」 등, 임의의 속성을 작성해,
그 속성을, 무기와 스킬의 양쪽 모두로 설정합니다.

스킬의 속성과 무기의 속성이 일치하지 않는 경우,
그 스킬은 사용 불가가 됩니다.

[갱신 이력]

2005/10/9  ver.1.10
 사용 불가의 스킬은 비표시로 할 수 있는 기능을 추가.
2005/8/6  ver.1.00
 공개.
"); // :badtag -->

그래픽 변경 8 방향 이동




[개요]

상하 키와 좌우 키를 동시 눌러 하는 것으로써, 기울기 이동을 가능하게 합니다.
선두 캐릭터에 기울기 이동시의 화상이 준비되어 있는 경우는, 그것을 사용해 표시합니다.
이벤트 커멘드 「이동 루트의 설정」으로의 경사 방향 지정에도 대응하고 있습니다.

[스크립트]

<FORM name=xForm><TEXTAREA name=result rows=20 cols=80>#============================================================================== #  ++ 그래픽 변경 8 방향 이동 ver. 1.01  ++ #   Script by 파라개 #   http://2d6.parasite.jp/ #------------------------------------------------------------------------------ # 상하 키와 좌우 키를 동시 눌러 하는 것으로써 기울기 이동을 가능하게 해, # 「Graphics/Characters 」폴더에 # 「(선두 캐릭터명)+_quarter 」라고 하는 이름의 파일이 있는 경우 # 기울기 이동시의 그래픽으로서 사용합니다.(예:001-Fighter01_quarter ) #------------------------------------------------------------------------------ # [설치상의 주의] # 「그래픽 변경 데쉬」라고 병용 하는 경우, 이 스크립트를 # 데쉬 스크립트보다 아래에 두어 주세요. # 경사 방향 데쉬의 화상 파일명은 「(선두 캐릭터명)+_dash_quarter 」에 # 됩니다. #============================================================================== #============================================================================== # ■ Game_Player #============================================================================== class Game_Player < Game_Character #-------------------------------------------------------------------------- # ● 프레임 갱신 #-------------------------------------------------------------------------- alias update_para_quarter update def update update_para_quarter unless moving? or $game_system.map_interpreter.running? or @move_route_forcing or $game_temp.message_window_showing # 방향 버튼이 밀리고 있으면, 그 방향에 플레이어를 이동 case Input.dir8 when 1 # 좌하에 이동 move_lower_left when 3 # 우하에 이동 move_lower_right when 7 # 좌상에 이동 move_upper_left when 9 # 우상에 이동 move_upper_right end end end end #============================================================================== # ■ Sprite_Character #============================================================================== class Sprite_Character < RPG::Sprite #-------------------------------------------------------------------------- # ● 프레임 갱신 #-------------------------------------------------------------------------- alias update_para_quarter update def update update_para_quarter if @tile_id == 0 if (@character.direction - 2) % 2 == 1 # 기울기 화상의 유무를 체크 if quarter_graphic_exist?(@character) # 기울기 화상을 세트 if character.dash_on and dash_quarter_graphic_exist?(@character) @character_name = @character.character_name + "_dash_quarter" else @character_name = @character.character_name + "_quarter" end self.bitmap = RPG::Cache.character(@character_name, @character.character_hue) # 방향을 취득 case @character.direction when 1 n = 0 when 3 n = 2 when 7 n = 1 when 9 n = 3 end else @character.direction = @character.sub_direction # 기울기 화상이 존재하지 않을 때의 방향 n = (@character.direction - 2) / 2 end # 전송원의 구형을 설정 sx = @character.pattern * @cw sy = n * @ch self.src_rect.set(sx, sy, @cw, @ch) else self.bitmap = RPG::Cache.character(@character.character_name, @character.character_hue) # 전송원의 구형을 설정 sx = @character.pattern * @cw sy = (@character.direction - 2) / 2 * @ch self.src_rect.set(sx, sy, @cw, @ch) end end end #-------------------------------------------------------------------------- # ○ 기울기 화상의 유무를 체크 #-------------------------------------------------------------------------- def quarter_graphic_exist?(character) # 읽기 테스트 begin RPG::Cache.character(character.character_name.to_s + "_quarter", character.character_hue) rescue return false end return true end #-------------------------------------------------------------------------- # ○ 기울기 데쉬 화상의 유무를 체크 #-------------------------------------------------------------------------- def dash_quarter_graphic_exist?(character) # 읽기 테스트 begin RPG::Cache.character(character.character_name.to_s + "_dash_quarter", character.character_hue) rescue return false end return true end end #============================================================================== # ■ Game_Character #============================================================================== class Game_Character #-------------------------------------------------------------------------- # ● 공개 인스턴스 변수 #-------------------------------------------------------------------------- attr_accessor :direction # 방향 attr_accessor :sub_direction # 기울기 화상이 존재하지 않을 때의 방향 #-------------------------------------------------------------------------- # ● 좌하에 이동 #-------------------------------------------------------------------------- def move_lower_left # 방향 고정이 아닌 경우 unless @direction_fix @sub_direction = @direction @direction = 1 # 오른쪽 방향이었던 경우는 왼쪽을, 오름새였던 경우는 아래를 향한다 @sub_direction = (@sub_direction == 6 ? 4 : @sub_direction == 8 ? 2 : @sub_direction) end # 하→왼쪽, 좌→하 의 어느 쪽인가의 코스가 통행 가능한 경우 if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 4)) or (passable?(@x, @y, 4) and passable?(@x - 1, @y, 2)) # 좌표를 갱신 @x -= 1 @y += 1 # 보수 증가 increase_steps end end #-------------------------------------------------------------------------- # ● 우하에 이동 #-------------------------------------------------------------------------- def move_lower_right # 방향 고정이 아닌 경우 unless @direction_fix @sub_direction = @direction @direction = 3 # 좌향이었던 경우는 오른쪽을, 오름새였던 경우는 아래를 향한다 @sub_direction = (@sub_direction == 4 ? 6 : @sub_direction == 8 ? 2 : @sub_direction) end # 하→오른쪽, 우→하 의 어느 쪽인가의 코스가 통행 가능한 경우 if (passable?(@x, @y, 2) and passable?(@x, @y + 1, 6)) or (passable?(@x, @y, 6) and passable?(@x + 1, @y, 2)) # 좌표를 갱신 @x += 1 @y += 1 # 보수 증가 increase_steps end end #-------------------------------------------------------------------------- # ● 좌상에 이동 #-------------------------------------------------------------------------- def move_upper_left # 방향 고정이 아닌 경우 unless @direction_fix @sub_direction = @direction @direction = 7 # 오른쪽 방향이었던 경우는 왼쪽을, 하향이었던 경우는 위를 향한다 @sub_direction = (@sub_direction == 6 ? 4 : @sub_direction == 2 ? 8 : @sub_direction) end # 상→왼쪽, 좌→상 의 어느 쪽인가의 코스가 통행 가능한 경우 if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 4)) or (passable?(@x, @y, 4) and passable?(@x - 1, @y, 8)) # 좌표를 갱신 @x -= 1 @y -= 1 # 보수 증가 increase_steps end end #-------------------------------------------------------------------------- # ● 우상에 이동 #-------------------------------------------------------------------------- def move_upper_right # 방향 고정이 아닌 경우 unless @direction_fix @sub_direction = @direction @direction = 9 # 좌향이었던 경우는 오른쪽을, 하향이었던 경우는 위를 향한다 @sub_direction = (@sub_direction == 4 ? 6 : @sub_direction == 2 ? 8 : @sub_direction) end # 상→오른쪽, 우→상 의 어느 쪽인가의 코스가 통행 가능한 경우 if (passable?(@x, @y, 8) and passable?(@x, @y - 1, 6)) or (passable?(@x, @y, 6) and passable?(@x + 1, @y, 8)) # 좌표를 갱신 @x += 1 @y -= 1 # 보수 증가 increase_steps end end #-------------------------------------------------------------------------- # ○ 데쉬 스크립트 도입 판정 #-------------------------------------------------------------------------- def dash_on if @dash_on != nil return @dash_on else return false end end end </TEXTAREA> <INPUT onclick=setCB() type=button value=" 스크립트를 클립보드에 카피"> </FORM>

[사용하기 전에]

기울기 이동시의 화상을 준비해, 「(캐릭터의 보행 그래픽명)+_quarter 」라고 하는 이름을 붙여
「Graphics/Characters 」폴더에 임포트 합니다.
화상이 없어도, 8 방향 이동 기능은 사용 가능합니다.

샘플:
 RTP 소재 「001-Fighter01 」기울기 화상
 ( 오른쪽 클릭→「이름을 붙여 화상을 보존」으로 다운로드)
 
(001-Fighter01_quarter.png )

[병용에 대해]

스크립트 「 그래픽 변경 데쉬 」라고 병용 하는 경우,
이 스크립트를 데쉬 스크립트보다 아래에 두어 주세요.
경사 방향 데쉬의 화상 파일명은, 「(선두 캐릭터명)+_dash_quarter 」(이)가 됩니다.


[갱신 이력]

2005/10/1  ver.1.01
 이벤트 캐릭터의 기울기 이동으로 에러가 나오는 문제를 수정.
2005/9/9  ver.1.00
 공개.

중단 세이브


 


[개요]

 메뉴 「게임 종료」에 일시 보존 기능을 추가합니다.
 중단시의 데이터는 타이틀 화면으로부터 재개할 수 있어 한 번 재개하면 소멸합니다.

[스크립트]

<FORM name=xForm><TEXTAREA name=result rows=20 cols=80>#============================================================================== #  ++ 중단 세이브 ver. 1.00  ++ #   Script by 파라개 #   http://2d6.parasite.jp/ #------------------------------------------------------------------------------ # 메뉴의 「게임 종료」에 중단 세이브 기능을 추가합니다. # 중단 세이브 데이터는 한 번 호출하면 소멸합니다. #============================================================================== module PARA_RESTART # 메뉴에 표시하는 문자 MENU_COMMAND_NAME = " 중단 세이브" # 타이틀 화면에 표시하는 문자 TITLE_COMMAND_NAME = " 중단 데이터로부터 재개" # 중단시의 귀가처( 0: 게임 종료 1: 타이틀 화면 ) RETURN_SCENE = 1 # 확인 메세지 DIALOG1 = " 일시 보존해 중단" # 세이브해 중단 DIALOG2 = " 일시 보존하지 않고 중단" # 세이브하지 않고 중단 DIALOG3 = " 캔슬" # 돌아온다 # 파일명 FILENAME = "SaveTemp.rxdata" end #============================================================================== # ■ Scene_End #============================================================================== class Scene_End #-------------------------------------------------------------------------- # ● 메인 처리 #-------------------------------------------------------------------------- def main # 커멘드 윈도우를 작성 s1 = PARA_RESTART::DIALOG1 s2 = PARA_RESTART::DIALOG2 s3 = PARA_RESTART::DIALOG3 @command_window = Window_Command.new(192, [s1, s2, s3]) @command_window.x = 320 - @command_window.width / 2 @command_window.y = 240 - @command_window.height / 2 # 트란지션 실행 Graphics.transition # 메인 루프 loop do # 게임 화면을 갱신 Graphics.update # 입력 정보를 갱신 Input.update # 프레임 갱신 update # 화면이 바뀌면 루프를 중단 if $scene != self break end end # 트란지션 준비 Graphics.freeze # 윈도우를 해방 @command_window.dispose # 타이틀 화면으로 전환해 안의 경우 if $scene.is_a?(Scene_Title) # 화면을 페이드아웃 Graphics.transition Graphics.freeze end end #-------------------------------------------------------------------------- # ● 프레임 갱신 #-------------------------------------------------------------------------- def update # 커멘드 윈도우를 갱신 @command_window.update # B 버튼이 밀렸을 경우 if Input.trigger?(Input::B) # 캔슬 SE (을)를 연주 $game_system.se_play($data_system.cancel_se) # 메뉴 화면으로 전환해 $scene = Scene_Menu.new(5) return end # C 버튼이 밀렸을 경우 if Input.trigger?(Input::C) # 커멘드 윈도우의 커서 위치에서 분기 case @command_window.index when 0 # 세이브해 중단 command_save_and_end when 1 # 세이브하지 않고 중단 command_no_save_and_end when 2 # 그만둔다 command_cancel end return end end #-------------------------------------------------------------------------- # ○ 커멘드 [ 세이브해 중단] 선택시의 처리 #-------------------------------------------------------------------------- def command_save_and_end # 세이브 데이터의 기입 file = File.open(PARA_RESTART::FILENAME, "wb") write_save_data(file) file.close # 중단 처리(세이브하지 않고 중단과 공통) command_no_save_and_end end #-------------------------------------------------------------------------- # ○ 커멘드 [ 세이브하지 않고 중단] 선택시의 처리 #-------------------------------------------------------------------------- def command_no_save_and_end case PARA_RESTART::RETURN_SCENE when 0 # 게임 종료 command_shutdown when 1 # 타이틀 화면 command_to_title end end #-------------------------------------------------------------------------- # ○ 세이브 데이터의 기입 # file : 기입용 파일 오브젝트 ( 오픈이 끝난 상태) #-------------------------------------------------------------------------- def write_save_data(file) # 세이브 파일 묘화용의 캐릭터 데이터를 작성 characters = [] for i in 0...$game_party.actors.size actor = $game_party.actors[i] characters.push([actor.character_name, actor.character_hue]) end # 세이브 파일 묘화용의 캐릭터 데이터를 쓴다 Marshal.dump(characters, file) # 플레이 시간 계측용의 프레임 카운트를 쓴다 Marshal.dump(Graphics.frame_count, file) # 세이브 회수를 1 늘린다 $game_system.save_count += 1 # magic number-를 보존한다 # ( 에디터로 보존할 때마다 랜덤인 값에 고쳐 쓸 수 있다) $game_system.magic_number = $data_system.magic_number # 각종 게임 오브젝트를 쓴다 Marshal.dump($game_system, file) Marshal.dump($game_switches, file) Marshal.dump($game_variables, file) Marshal.dump($game_self_switches, file) Marshal.dump($game_screen, file) Marshal.dump($game_actors, file) Marshal.dump($game_party, file) Marshal.dump($game_troop, file) Marshal.dump($game_map, file) Marshal.dump($game_player, file) end end #============================================================================== # ■ Scene_Menu #============================================================================== class Scene_Menu #-------------------------------------------------------------------------- # ● 메인 처리 #-------------------------------------------------------------------------- def main # 커멘드 윈도우를 작성 s1 = $data_system.words.item s2 = $data_system.words.skill s3 = $data_system.words.equip s4 = " 스테이터스" s5 = " 세이브" s6 = PARA_RESTART::MENU_COMMAND_NAME @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index # 파티 인원수가 0 사람의 경우 if $game_party.actors.size == 0 # 아이템, 스킬, 장비, 스테이터스를 무효화 @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end # 세이브 금지의 경우 if $game_system.save_disabled # 세이브를 무효로 한다 @command_window.disable_item(4) end # 플레이 시간 윈도우를 작성 @playtime_window = Window_PlayTime.new @playtime_window.x = 0 @playtime_window.y = 224 # 보수 윈도우를 작성 @steps_window = Window_Steps.new @steps_window.x = 0 @steps_window.y = 320 # 골드 윈도우를 작성 @gold_window = Window_Gold.new @gold_window.x = 0 @gold_window.y = 416 # 스테이터스 윈도우를 작성 @status_window = Window_MenuStatus.new @status_window.x = 160 @status_window.y = 0 # 트란지션 실행 Graphics.transition # 메인 루프 loop do # 게임 화면을 갱신 Graphics.update # 입력 정보를 갱신 Input.update # 프레임 갱신 update # 화면이 바뀌면 루프를 중단 if $scene != self break end end # 트란지션 준비 Graphics.freeze # 윈도우를 해방 @command_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose @status_window.dispose end end #============================================================================== # ■ Scene_Title #------------------------------------------------------------------------------ #  타이틀 화면의 처리를 실시하는 클래스입니다. #============================================================================== class Scene_Title #-------------------------------------------------------------------------- # ● 메인 처리 #-------------------------------------------------------------------------- def main # 전투 테스트의 경우 if $BTEST battle_test return end # 데이타베이스를 로드 $data_actors = load_data("Data/Actors.rxdata") $data_classes = load_data("Data/Classes.rxdata") $data_skills = load_data("Data/Skills.rxdata") $data_items = load_data("Data/Items.rxdata") $data_weapons = load_data("Data/Weapons.rxdata") $data_armors = load_data("Data/Armors.rxdata") $data_enemies = load_data("Data/Enemies.rxdata") $data_troops = load_data("Data/Troops.rxdata") $data_states = load_data("Data/States.rxdata") $data_animations = load_data("Data/Animations.rxdata") $data_tilesets = load_data("Data/Tilesets.rxdata") $data_common_events = load_data("Data/CommonEvents.rxdata") $data_system = load_data("Data/System.rxdata") # 시스템 오브젝트를 작성 $game_system = Game_System.new # 타이틀 그래픽을 작성 @sprite = Sprite.new @sprite.bitmap = RPG::Cache.title($data_system.title_name) # 커멘드 윈도우를 작성 s1 = " 뉴 게임" s2 = " 콘티 뉴" s3 = " 슛다운" s4 = PARA_RESTART::TITLE_COMMAND_NAME @command_window = Window_Command.new(192, [s1, s2 ,s4 ,s3]) @command_window.back_opacity = 160 @command_window.x = 320 - @command_window.width / 2 @command_window.y = 288 # 콘티 뉴 유효 판정 # 세이브 파일이 하나에서도 존재할지를 조사한다 # 유효하면 @continue_enabled (을)를 true , 무효라면 false (으)로 한다 @continue_enabled = false for i in 0..3 if FileTest.exist?("Save#{i+1}.rxdata") @continue_enabled = true end end # 콘티 뉴가 유효한 경우, 커서를 콘티 뉴에 맞춘다 # 무효인 경우, 콘티 뉴의 문자를 그레이 표시로 한다 if @continue_enabled @command_window.index = 1 else @command_window.disable_item(1) end # 중단 데이터 유효 판정 # 중단 세이브 파일이 존재할지를 조사한다 # 유효하면 @restart_enabled (을)를 true , 무효라면 false (으)로 한다 @restart_enabled = false if FileTest.exist?(PARA_RESTART::FILENAME) @restart_enabled = true end # 콘티 뉴가 유효한 경우, 커서를 콘티 뉴에 맞춘다 # 무효인 경우, 콘티 뉴의 문자를 그레이 표시로 한다 if @restart_enabled @command_window.index = 2 else @command_window.disable_item(2) end # 타이틀 BGM (을)를 연주 $game_system.bgm_play($data_system.title_bgm) # ME ,BGS 의 연주를 정지 Audio.me_stop Audio.bgs_stop # 트란지션 실행 Graphics.transition # 메인 루프 loop do # 게임 화면을 갱신 Graphics.update # 입력 정보를 갱신 Input.update # 프레임 갱신 update # 화면이 바뀌면 루프를 중단 if $scene != self break end end # 트란지션 준비 Graphics.freeze # 커멘드 윈도우를 해방 @command_window.dispose # 타이틀 그래픽을 해방 @sprite.bitmap.dispose @sprite.dispose end #-------------------------------------------------------------------------- # ● 프레임 갱신 #-------------------------------------------------------------------------- def update # 커멘드 윈도우를 갱신 @command_window.update # C 버튼이 밀렸을 경우 if Input.trigger?(Input::C) # 커멘드 윈도우의 커서 위치에서 분기 case @command_window.index when 0 # 뉴 게임 command_new_game when 1 # 콘티 뉴 command_continue when 2 # 재개 command_restart when 3 # 슛다운 command_shutdown end end end #-------------------------------------------------------------------------- # ○ 커멘드 : 재개 #-------------------------------------------------------------------------- def command_restart # 콘티 뉴가 무효의 경우 unless @restart_enabled # 버저 SE (을)를 연주 $game_system.se_play($data_system.buzzer_se) return end # 결정 SE (을)를 연주 $game_system.se_play($data_system.decision_se) # 파일이 존재하지 않는 경우 unless FileTest.exist?(PARA_RESTART::FILENAME) # 버저 SE (을)를 연주 $game_system.se_play($data_system.buzzer_se) return end # 텐포라리오브제크트를 재작성 $game_temp = Game_Temp.new # 세이브 데이터의 읽기 file = File.open(PARA_RESTART::FILENAME, "rb") read_save_data(file) file.close # 파일의 삭제 File.delete(PARA_RESTART::FILENAME) # BGM ,BGS (을)를 복귀 $game_system.bgm_play($game_system.playing_bgm) $game_system.bgs_play($game_system.playing_bgs) # 맵을 갱신 ( 병렬 이벤트 실행) $game_map.update # 맵 화면으로 전환해 $scene = Scene_Map.new end #-------------------------------------------------------------------------- # ○ 세이브 데이터의 읽기 # file : 읽기용 파일 오브젝트 ( 오픈이 끝난 상태) #-------------------------------------------------------------------------- def read_save_data(file) # 세이브 파일 묘화용의 캐릭터 데이터를 읽어들인다 characters = Marshal.load(file) # 플레이 시간 계측용의 프레임 카운트를 읽어들인다 Graphics.frame_count = Marshal.load(file) # 각종 게임 오브젝트를 읽어들인다 $game_system = Marshal.load(file) $game_switches = Marshal.load(file) $game_variables = Marshal.load(file) $game_self_switches = Marshal.load(file) $game_screen = Marshal.load(file) $game_actors = Marshal.load(file) $game_party = Marshal.load(file) $game_troop = Marshal.load(file) $game_map = Marshal.load(file) $game_player = Marshal.load(file) # magic number-가 세이브시와 다른 경우 # ( 에디터로 편집이 더해지고 있는 경우) if $game_system.magic_number != $data_system.magic_number # 맵을 리로드 $game_map.setup($game_map.map_id) $game_player.center($game_player.x, $game_player.y) end # 파티 멤버를 리프레쉬 $game_party.refresh end end </TEXTAREA> <INPUT onclick=setCB() type=button value=" 스크립트를 클립보드에 카피"> </FORM>

[차분 파일]

· 타이틀 화면 커스터마이즈 병용화 패치 ·
  타이틀 화면 커스터마이즈 그리고, 중단 세이브의 메뉴 커멘드에
 화상을 사용할 수 있도록(듯이) 합니다.


[갱신 이력]

2007/5/3  ver.1.00
 공개.

더 올리겠습니다. 에휴

( 번역하느라 오래걸리네,,,)

무작정 퍼와서 ㅎㅎ 중뷁 좀 있으리라 생각듭니다,

Who's WMN

?
 
 

  W M  N  
                  자료공유

Comment '9'
  • ?
    WMN 2008.03.17 18:33

    타이틀 화면 커스터마이즈




    [개요]

    타이틀 화면의 메뉴 항목에 화상을 사용합니다.
    메뉴에 화상을 사용하지 않는 경우는, 항목의 문자나 윈도우의 투명도를 설정할 수 있습니다.

    [스크립트]


    [사용법]

    메뉴 커멘드에 사용하는 화상을 준비하고, 「Graphics/Titles」에 임포트 합니다.
    그리고는 설정 항목으로 파일명과 표시 위치를 지정해 주세요.

    [덤]

    메뉴용 화상(투과 처리필 봐.흑배경 이외에도 사용할 수 있습니다)

    ( 오른쪽 클릭→「이름을 붙여 화상을 보존」으로 다운로드)


    [갱신 이력]

    2007/8/5 ver.1.11
     콘티 뉴 무효시 화상을 설정시, 세이브 파일이 있을 때에도 무효 화상이 표시되는 것을 수정.
     세이브 파일이 없을 때, 초기 표시로 뉴 게임 화상이 비선택 상태가 되어 있던 것을 수정.
    2007/5/3 ver.1.10
     콘티 뉴 무효시의 화상을 설정할 수 있도록 했다.
    2005/8/16 ver.1.01
     커서 키 중인방 해로 선택 항목이 어긋나는 문제를 수정.
    2005/8/6 ver.1.00
     공개.
  • ?
    WMN 2008.03.17 18:34

    병용화 패치

    기능의 추가나, 경합을 해소하기 위한 차분 파일입니다.
    스크립트와 같게, 카피해 붙여 주세요.
    (일발 카피를 할 수 없기 때문에, 텍스트 박스내를 「모두 선택」해 카피해 주세요)


    액티브 타임 배틀


    [액티브 타임 배틀 & ActionEX에너미 행동 회수 병용화 패치]

     스크립트 쉘프모양의 「ActionEX 에너미 행동 회수」라는 병용시에
     에너미가 무한하게 행동해 버리는 문제를 수정합니다.
     ※액티브 타임 배틀ver.2.60이후에 대응하고 있습니다.


    중단 세이브


    [중단 세이브&타이틀 화면 커스터마이즈 병용화 패치]

     타이틀 화면 커스터마이즈로, 중단 세이브의 메뉴 커멘드에 화상을 사용할 수 있도록(듯이) 합니다.
     ※타이틀 화면 커스터마이즈ver.1.10이상에게만 대응하고 있습니다.낡은 버젼에서는 올바르게 동작하지 않습니다.


    화살표형 셀렉트 커서


    [화살표형 셀렉트 커서&아이콘 커멘드 윈도우 병용화 패치]

     momomomo?님의 「아이콘 커멘드 윈도우」라는 병용시에
     커서가 나와 버리는 문제를 수정합니다.


  • ?
    썽게군 2008.03.17 22:04


    이..이건 어떻게 사용하는거죠.. 안돼는데요<<니가 못하잖아 퍽퍽퍽(혼잣말_죄송)
  • ?
    WMN 2008.03.18 14:41

    사용법 올릴게요 ^^

  • ?
    작은악마 2008.03.18 18:03
    .... 뜨르르~~ xp인거 같네 ㅠㅠ
  • ?
    괴도키드 2008.10.06 17:59
    와~~ 길다
  • ?
    쭌돌 2009.05.10 07:57
    아나 ㅡㅡ;; 한줄에 스크립트가 다 나오면 어쩌자는거 ㅡㅡ;;
  • ?
    세잎 2009.07.31 18:57
    아나.. 태그 수정해서 올려주세요 ㅠ
  • ?
    Hsik 2012.08.02 02:27

    감사합니다~


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
781 스킬 [KGC] 다단공격 (즉, 여러번 공격하는 스킬) 10 백호 2009.02.21 2817
780 상태/속성 [■ Window_ShopStatus] 상점에서 캐릭터의 상세정보를 보여주는 스크립트 15 file 제로스S2 2009.08.06 2812
779 이름입력 RPG Advocate의 이름 입력 스크립트를 약간 손댄 것 Alkaid 2012.01.28 2784
778 액터 크리쳐 합체, 'SW_CreatureMix(for_rmxp)' by SiotWarrior 21 file 시옷전사 2010.09.11 2777
777 메뉴 메뉴화면 변경 스크립트 1 file 백호 2009.02.21 2769
776 전투 [신기술 체험]액션배틀1탄 6 file 백호 2009.02.22 2766
775 전투 전투배경확장 스크립트 3 file 아미상 2013.09.15 2763
774 전투 KGC_BonusGauge (보너스게이지) 3 file 백호 2009.02.22 2762
773 메뉴 Etude87_Horror_Menu_XP ver.1.1 15 file 습작 2012.08.04 2759
772 이동 및 탈것 이동속도[빈도]를 높히거나 낮추게할수있는 스크립트 5 - 하늘 - 2009.08.06 2759
771 기타 [KGC]HP&SP게이지 색다른것(글씨와 게이지가 안겹침) 10 file 백호 2009.02.21 2732
770 타이틀/게임오버 타이틀 화면전 로고를 띄우는 스크립트 9 백호 2009.02.21 2728
769 기타 appletree님 요청) 화면 명암 주기 3 file 뮤바보 2013.01.31 2724
768 장비 심플액션 수정본(장비드롭, 데미지표시) 원본:비밀소년 수정:kcss 10 file 백호 2009.02.21 2721
767 타이틀/게임오버 타이틀에 글씨 박기 . 11 WMN 2008.03.17 2721
» 메세지 분풀해 표시 스크립트 9 WMN 2008.03.17 2711
765 맵/타일 Map Extension - 맵상의 에어리어 설정, 탈것, 맵 루프 등 from RGSS Wiki 3 file 백호 2009.02.22 2708
764 메뉴 CoaMenuVer0.1 10 file 코아 코스튬 2010.09.25 2701
763 전투 간단 액알 스크립티!(2번째) 2 백호 2009.02.21 2696
762 메뉴 KGC스크립트모음 12 file 키라링 2009.01.18 2687
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ... 52 Next
/ 52