조회 수 1778 추천 수 2 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

#==============================================================================
# *** 자동 저장
# 원본제작자 - 모름
# 원본게시물 - 귀찮아‡ (yoseb031) 님의 게시물 (http://www.acoc.co.kr/bbs/view.php?id=acoc_board_ideatip&no=455&n_mode=n)
# 한글화 - JamesClifford (http://www.acoc.co.kr에 배포합니다)
# 덧붙이는말) 직접 번역했으며, 의미가 자연스럽도록 없는 단어 조금씩 붙여서
# 의역 했습니다. 잘못된 부분이 있으면 지적해주시기 바랍니다.
# 이 스크립트를 분석하는분께 도움이 됬으면 하는 바람입니다.
#------------------------------------------------------------------------------
# 이 모듈은 '자동저장(AutoSaving)'에 대한 모듈입니다
#==============================================================================
module AutoSave
#--------------------------------------------------------------------------
# * 파일 저장
#--------------------------------------------------------------------------
def self.save
  begin
    #Saves the file to whatever $game_system.filename is
    file = File.open($game_system.filename, "wb")
    a = Scene_Save.new
    a.write_save_data(file)
  ensure
    file.close
  end
end
#--------------------------------------------------------------------------
# * 파일 삭제
#--------------------------------------------------------------------------
def self.deletesave
  begin
    if FileTest.exits?($game_system.filename)
      File.delete($game_system.filename)
    end 
  end
end
end
#==============================================================================


#==============================================================================
# ** 장면저장(Scene_Save)
#------------------------------------------------------------------------------
# 이 클래스는 화면 저장 작업을 진행합니다.
# 알림! SCENE_SAVE는 더 이상 게임 저장에 사용할 수 없습니다.
# 이것은 자동저장 파일(autosave file)로 변경됩니다.
#==============================================================================


class Scene_Save < Scene_File
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
  super("Which file would you like to autosave to?")
end
#--------------------------------------------------------------------------
# * 진행 결정
#--------------------------------------------------------------------------
def on_decision(filename)
  # Play save SE
  $game_system.se_play($data_system.save_se)
  $game_system.filename_c(filename)
  $scene = Scene_Menu.new
end
end


#==============================================================================
# ** 장면 부르기 (Scene_Load)
#------------------------------------------------------------------------------
#  이 클래스는 화면을 부르는 작업을 진행합니다
#==============================================================================
class Scene_Load < Scene_File


alias old_doloadthingie on_decision
#--------------------------------------------------------------------------
# * 작업 진행
#--------------------------------------------------------------------------
def on_decision(filename)
  $game_system.filename_c(filename)
  old_doloadthingie(filename)
end
end


#==============================================================================
# ** 게임 시스템(Game_System)
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of
#  this class.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Aliasing Objects
#--------------------------------------------------------------------------
alias autosaveinit initialize
#--------------------------------------------------------------------------
# * 초기화
#--------------------------------------------------------------------------
def initialize
  autosaveinit
  @filename = "Save1.rxdata"
end
#--------------------------------------------------------------------------
# * 파일명 -> 자동저장 파일명을 얻습니다
#--------------------------------------------------------------------------
def filename
  if @filename != nil
    return @filename
  else
    return "Save1.rxdata"
  end 
end
#--------------------------------------------------------------------------
# * 파일명 변경 -> 새로운 자동저장 파일명을 설정합니다
#--------------------------------------------------------------------------
def filename_c(newname)
  return if newname == "" or newname == nil
  @filename = newname
end
end


#==============================================================================
# ** 게임 파티 (Game_Party)
#------------------------------------------------------------------------------
# 이것은 파티(party)클래스 입니다. 이것은 금(gold)의 총액과 아이템에 대한 정보를
# 포함합니다. 이 클래스를 위해서 "$game_party"에서 자료를 불러옵니다.
#==============================================================================
class Game_Party


alias gainglod_autosave gain_gold
alias gainitem_autosave gain_item
alias gainweap_autosave gain_weapon
alias gainarmor_autosave gain_armor
#--------------------------------------------------------------------------
# * 금(Gold) 받아오기 (혹은 잃기)
# n : 금(Gold)의 총액
#--------------------------------------------------------------------------
def gain_gold(n)
  gainglod_autosave(n)
  AutoSave.save
end
#--------------------------------------------------------------------------
# * 아이템 얻어오기 (혹은 잃기)
# item_id : item ID
# n : 수량
#--------------------------------------------------------------------------
def gain_item(item_id, n)
  gainitem_autosave(item_id, n)
  AutoSave.save
end
#--------------------------------------------------------------------------
# * 무기 얻어오기 (혹은 잃기)
# weapon_id : 무기(weapon) ID
# n : 수량
#--------------------------------------------------------------------------
def gain_weapon(weapon_id, n)
  gainweap_autosave(weapon_id, n)
  AutoSave.save
end
#--------------------------------------------------------------------------
# * 방어구 얻어오기 (혹은 잃기)
# armor_id : 갑옷 ID
# n : 수량
#--------------------------------------------------------------------------
def gain_armor(armor_id, n)
  gainarmor_autosave(armor_id, n)
  AutoSave.save
end
end


#==============================================================================
# ** 맵의 장면변화
#------------------------------------------------------------------------------
# 이것은 순간이동(teleporting)했을때 장면이 튀어나오게 합니다
#==============================================================================
class Scene_Map
alias autosavescript_changemap_main main
#--------------------------------------------------------------------------
# * 메인(Main)
#--------------------------------------------------------------------------
def main
  autosavescript_changemap_main
  AutoSave.save
end
end


 

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
124 언어/기타 MFC 색상표 file 피군 2006.09.12 1772
123 RPG Maker 초보의 로그인박스로 웹사이트에서 인증하는 방법 설명 챔피온 2005.05.28 1773
» 언어/기타 귀찮아‡님의 자동세이브 스크립트의 한글화 J.Clifford 2007.08.20 1778
121 언어/기타 액션알피지 왕초보도 따라하는.. -스킬만들기- LifeⓘⓢGood 2005.09.08 1791
120 언어/기타 《완벽하게 현실적인 게임을 만들려면 해야되는 조작 몇 가지》-[上편] 자이크로 2005.05.27 1815
119 언어/기타 [DX/VB] DirectDraw? 별거 아냐! (3) 더블 버퍼의 생성과 블리팅 악희 2007.08.03 1843
118 언어/기타 [ODS] 그림을 움직여보겠습니다(Animate) Zeprod 2008.06.07 1844
117 언어/기타 스킬데미지를 10000이상 뜨게해보자.(턴알,액알 둘다) Dship 2005.05.18 1846
116 언어/기타 엔진 제작중...... 랜스 2008.05.19 1849
115 RPG Maker RPG2003용 플러그인 제작 SDK:DynRPG 의 설치와 적용 +@ 3 file 아름다운마을 2012.05.08 1854
114 RPG Maker [꿀팁] 간단하게 만들 수 있는 실시간 전투 시스템 1 file 준E 2017.03.31 1854
113 RPG Maker 오직 RPGXP만 재생하지 못하는 MIDI파일 Les Paul 2007.01.30 1863
112 RPG Maker [VX] 집안의 블라인드 다듬기 ~2차 블라인드 정의로운녀석! 2008.11.27 1878
111 언어/기타 VNAP 1.78 file 자유의지 2006.07.20 1880
110 언어/기타 보스는 왜 맨날 쫄자들만 보내는가!? 다크아머 2006.01.24 1890
109 언어/기타 액알, 한번의 노가다로 끝까지 사용하자! file RPG_매냐 2007.02.23 1893
108 언어/기타 1. 게임 시나리오의 기초 1 샤르엘 2007.11.27 1895
107 언어/기타 "빵과 유통기한" EverSmileMan 2006.10.21 1898
106 언어/기타 [DX/VB] DirectDraw? 별거 아냐! (2) 블리팅, 그리고 투명도 악희 2007.07.31 1916
105 언어/기타 (2003) 연속공격 버프 스킬로 '공격' 커맨드의 활용도를 늘려보자. 땡중 2007.11.17 1930
Board Pagination Prev 1 ... 40 41 42 43 44 45 46 47 48 49 ... 51 Next
/ 51






[개인정보취급방침] | [이용약관] | [제휴문의] | [후원창구] | [인디사이드연혁]

Copyright © 1999 - 2016 INdiSide.com/(주)씨엘쓰리디 All Rights Reserved.
인디사이드 운영자 : 천무(이지선) | kernys(김원배) | 사신지(김병국)