조회 수 1831 추천 수 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


 

?

  1. 물체 밀어서 움직이는 이벤트 조금 더 쉽게 하는 법

    Date2018.01.02 CategoryRPG Maker Byzero? Views644
    Read More
  2. [마지막 3명 모집] [취업연계무료교육] VR/AR 게임 콘텐츠 전문가 양성 과정 교육생 모집

    Date2017.07.14 Category언어/기타 By황금상자 Views702
    Read More
  3. rpg vxa 로 겜만들때 데미지 설정 공식[링크]

    Date2017.06.08 CategoryRPG Maker By준E Views740
    Read More
  4. [꿀팁] 간단하게 만들 수 있는 실시간 전투 시스템

    Date2017.03.31 CategoryRPG Maker By준E Views2019
    Read More
  5. JSON parser 변환데이터 저장시 생기는 Object Too Deep 해결하기

    Date2016.12.24 Category언어/기타 Bytitle: 댓글러lklslel Views851
    Read More
  6. 앙뜨프리너십에서 해커톤 부트캠프 모집중이네요

    Date2016.11.08 Category언어/기타 By마나님이 Views908
    Read More
  7. RPG MV에서 플러그인 오류의 원인에 대하여

    Date2016.07.08 CategoryRPG Maker Bytitle: 댓글러lklslel Views2359
    Read More
  8. RPG MV 게임 도중에 윈도우 스킨 파일 자체를 통째로 바꿔버리는 방법 (출처: HIME)

    Date2016.07.08 CategoryRPG Maker By최저 Views1627
    Read More
  9. 게임의 버전을 짜 보자! - 유의적 버전 2.0.0

    Date2016.06.07 Category언어/기타 ByYanggaeng Views1123
    Read More
  10. 텍스트 대화 도중 메뉴 여는 방법을 알아냈습니다!

    Date2016.03.12 CategoryRPG Maker By정궈니 Views2938
    Read More
  11. rpgmv 마우스 지원과 터치 지원이 되니.

    Date2015.10.25 CategoryRPG Maker By팡소리 Views1011
    Read More
  12. RPG Maker MV 와 AJAX를 이용한 웹통신 관련 영상.

    Date2015.10.25 CategoryRPG Maker ByHT9MAN Views2246
    Read More
  13. RPG게임 뻔한요소들.

    Date2015.10.05 Category언어/기타 Bytitle: 천무천무 Views1644
    Read More
  14. 자바스크립트와 관련해서 참고할 만한 사이트들

    Date2015.10.04 Category언어/기타 ByMARCO Views921
    Read More
  15. 꿀잼이군요!

    Date2015.05.20 Category언어/기타 By사람님[대회참가] Views873
    Read More
  16. [RPG2000/3 팁] 간편한 이벤트 단축키

    Date2015.04.06 CategoryRPG Maker Bytitle: 자게이하앵 Views1833
    Read More
  17. [RPG2000/3 팁] 간편한 이벤트 단축키

    Date2015.04.05 CategoryRPG Maker Bytitle: 자게이하앵 Views748
    Read More
  18. [강의링크] 대비법칙-색상대비-밀당의 재미 약한 반대색 설계

    Date2015.04.02 Category언어/기타 Bytitle: 천무천무 Views636
    Read More
  19. 오다 주웠습니다.

    Date2015.03.30 Category언어/기타 By사람님[대회참가] Views917
    Read More
  20. 무료 이미지 사이트 Pixabay!

    Date2015.03.28 Category언어/기타 By나작소 Views909
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 51 Next
/ 51


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

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