XP 스크립트

#==========================================================================
# ** SG Battle Retry
#==========================================================================
# sandgolem
# Version 4
# 29.06.06
#==========================================================================

Scene_Battle::SG_CantRetryBattle = 0

#==========================================================================
#
# To check for updates or find more script-xs, visit:
# http://www.gamebaker.com/rmxp/script-xs/
#
# To use this script-x, copy it and insert it in a new section above "Main",
# but under the default script-xs and the SDK if you're using it.
#
# Have problems? You can leave me a message at:
# http://www.gamebaker.com/users/sandgolem
#
#==========================================================================

begin
SDK.log('SG Battle Retry', 'sandgolem', 4, '29.06.06')
if SDK.state('SG Battle Retry') != true
@sg_battleretry_disabled = true
end
rescue
end

if !@sg_battleretry_disabled
#--------------------------------------------------------------------------

class Game_System
attr_accessor :playing_bgm
end

class Game_Temp
attr_accessor :battle_music_playing
end

class Scene_Map
alias sandgolem_bretry_map_callbattle call_battle
def call_battle
sandgolem_bretry_map_callbattle
$game_temp.battle_music_playing = $game_system.playing_bgm.clone
end
end

class Scene_Save < Scene_File
def sg_write_retrysave_data
file = File.open('Data/retry.sg', 'wb')
write_save_data(file)
file.close
end
end

class Scene_Load < Scene_File
def sg_read_retrysave_data
file = File.open('Data/retry.sg', 'rb')
read_save_data(file)
file.close
end
end

class Scene_Battle
alias sandgolem_battleretry_battle_main main
def main
if $game_switches[SG_CantRetryBattle] == 0 or
!$game_switches[SG_CantRetryBattle]
if !$sg_battleretry_inbattle && !$game_temp.battle_can_lose
$sg_battleretry_inbattle = $game_temp
sg_scene_save_temp = Scene_Save.new
sg_scene_save_temp.sg_write_retrysave_data
sg_scene_save_temp = nil
end
end
sandgolem_battleretry_battle_main
if !$scene.is_a?(Scene_Gameover)
if FileTest.exist?('Data/retry.sg')
File.delete('Data/retry.sg')
end
$sg_battleretry_inbattle = nil
end
end
end

class Scene_Gameover
alias sandgolem_battleretry_gameover_main main
def main
if $sg_battleretry_inbattle
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
$game_system.bgm_stop
$game_system.me_play($data_system.gameover_me)
Graphics.transition(90)
@command_window = Window_Command.new(192,['Retry Battle','Title Screen'])
@command_window.back_opacity = 160
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 288
loop do
Graphics.update
Input.update
sg_retry_update
if $scene != self
break
end
end
@command_window.dispose
Graphics.freeze
@sprite.bitmap.dispose
@sprite.dispose
Graphics.transition(30)
Graphics.freeze
else
sandgolem_battleretry_gameover_main
end
end

def sg_retry_update
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0
sg_scene_save_temp = Scene_Load.new
sg_scene_save_temp.sg_read_retrysave_data
sg_scene_save_temp = nil
$game_temp = $sg_battleretry_inbattle
$game_temp.gameover = nil
$game_system.bgm_play($game_temp.battle_music_playing)
$scene = Scene_Battle.new
when 1
if FileTest.exist?('Data/retry.sg')
File.delete('Data/retry.sg')
end
$sg_battleretry_inbattle = nil
$scene = Scene_Title.new
end
end
end
end

#--------------------------------------------------------------------------
end


게임오버되면 다시 전투할꺼냐고 물어봐주는 센스의 스크립트인듯.

SCREEN SHOT 

INSTRUCTION
단순히 당신의 게임에 그것을 놓으십시오, 어떤 회의도 요구하지 않았습니다.
만약 당신이 가끔 이 실시를 무능하게 하고 싶으면, 이 줄을 발견하십시오 :
Scene_Battle::SG_CantRetryBattle = 0
스위치 ID까지 0을 바꾸십시오. 언제 스위치가 전투 재시행에 있는지는 쓸모 없게 만들어집니다.

UPDATE
Version 4:
- 전투 재시행 저축 파일을 삭제하는 것을 시도합니다
- 선택 과목에 스위치를 쓸모 없게 만들으며 바꾸었습니다
- 그것이 SG Automatic Backup와 포함되지 않도록 파일 이름을 바꿔주었습니다.
- Optional와 Random Battle Music와의 겸용이 가능해지게 바꿨습니다.

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '2'
  • ?
    용호작무 2009.08.23 04:35

    실시를 무능하게.... 하가렌 생각나네요 쩝<

    보글보글에 나오는 시스템이군요? 전투를 다시한다라.... 일단 감사합니다!

  • ?
    내로미 2010.05.07 14:48

    ...;;;


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
701 기타 [신기술 체험] RM포트리스 4 file 백호 2009.02.22 1428
700 전투 KGC_AutoRecover(매턴 자동 회복) 1 백호 2009.02.22 1429
699 메뉴 Leidy's Ring Command Window 1.2 by DerVVulfman Alkaid 2012.09.09 1430
698 전투 Mr Mo DVV Addon #20~#21 Alkaid 2011.09.05 1432
697 기타 모험 일기 스크립트 2 file 백호 2009.02.21 1433
696 전투 대전게임 Fighter 1 file 백호 2009.02.21 1436
695 스킬 Grouping and Details 8.1 by DerVVulfman 4 file Alkaid 2011.04.18 1437
694 전투 Mr. Mo's ABS Ultimate by DerVVulfman Alkaid 2011.09.05 1438
693 전투 전투 난이도 설정 스크립트 file 백호 2009.02.21 1441
692 전투 배틀 리포트 화면 변경 스크립트 2 file 백호 2009.02.21 1442
691 기타 필드에서 경험치%를 표시합니다. 4 file 백호 2009.02.22 1448
690 기타 프리 윈도우 스크립트 (상입오두막 출처) 6 백호 2009.02.21 1449
689 기타 sandgolem Script Archive (RMXP SDK 1.5 이상 필요) file Alkaid 2011.02.17 1453
» 전투 SG_Batte Retry ver.4 by sandgolem 2 백호 2009.02.22 1457
687 전투 S ABS_NonSDK ver 1 file 백호 2009.02.22 1458
686 전투 Minkoff's Animated Battlers - Enhanced 13.4 by DerVVulfman 2 Alkaid 2011.07.13 1458
685 전투 추적 공격 스크립트 백호 2009.02.21 1459
684 메뉴 FF7형식의 메뉴로 변경하는 스크립트 1 file 백호 2009.02.21 1462
683 HUD 맵 이름 표시 by Slipknot@rmxp.net (SDK호환) 2 백호 2009.02.22 1463
682 장비 MultiSlots! 2.4 by DerVVulfman 2 Alkaid 2011.09.05 1466
Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ... 52 Next
/ 52