질문과 답변

Extra Form
종류 스크립트 사용

RPG VX ACE 스크립트를 받았는데 글자가 정리되어있지 않고 한 줄로 쫙 쓰여져 있었습니다.

잘 모르지만 어떻게든 정리를 해보았는데 실행하니까 오류가 나네요.

스크립트 정리를 잘 못해서 그런 건지 뭔가 잘못되어서 오류가 나는 건지 모르겠습니다.

스크립트 정리와 오류를 해결하려면 어떻게 해야하나요?


스크립트 ▼


 #===============================================================================

## DT's Autosave

# Author: DoctorTodd

# Date (06/22/2012)

# Edited by: ArkLennard

# Date (01/13/2013)

# Version: (1.0.0) (VXA)

# Level: (Simple)

# Email: Todd@beacongames.com

##===============================================================================

## NOTES: 1)This script will only work with ace.

##===============================================================================

## Description: Saves the game when transferring the map, before battle, 

# and opening the menu (all optional).

## Credits: Me (DoctorTodd), ArkLennard

##===============================================================================

## Instructions# Paste above main.

##===============================================================================

## Free for any use as long as I'm credited.

##===============================================================================

## Editing begins 37 and ends on 50.

##===============================================================================

module ToddAutoSaveAce

  

  #Max files (without autosave).      

  MAXFILES = 16

  

  #Autosave file name.      

  AUTOSAVEFILENAME = "자동 저장"   

  

  #Switch to activate autosave before battle?      

  AUTOSAVEBB = 1            

  

  #Switch to activate autosave when menu opened?      

  AUTOSAVEM =  2             

  

  #Switch to activate autosave when changing map?      

  AUTOSAVETM =  3             

  

  #Variable ID that contains the number where the sutosave file will be saved.      

  VARIABLE = 1          

end

#==============================================================================

# ** Autosave

#------------------------------------------------------------------------------

# This module contains the autosave method. This allows you to use the

# "Autosave.call" ans "Autosave.load" commands. 

#==============================================================================

module Autosave  

  #--------------------------------------------------------------------------  

  # * Save header writer  

  #--------------------------------------------------------------------------  

  def self.make_save_header    

    header = {}    

    header[:characters] = $game_party.characters_for_savefile    

    header[:playtime_s] = $game_system.playtime_s    

    header  

  end  

  #--------------------------------------------------------------------------  

  # * Save contents writer  

  #--------------------------------------------------------------------------  

  def self.make_save_contents    

    contents = {}    

    contents[:system]        = $game_system    

    contents[:timer]         = $game_timer    

    contents[:message]       = $game_message    

    contents[:switches]      = $game_switches    

    contents[:variables]     = $game_variables    

    contents[:self_switches] = $game_self_switches    

    contents[:actors]        = $game_actors    

    contents[:party]         = $game_party    

    contents[:troop]         = $game_troop    

    contents[:map]           = $game_map    

    contents[:player]        = $game_player    

    contents  

  end    

  #--------------------------------------------------------------------------  

  # * Save contents extractor  

  #--------------------------------------------------------------------------  

  def self.extract_save_contents(contents)    

    $game_system        = contents[:system]    

    $game_timer         = contents[:timer]    

    $game_message       = contents[:message]    

    $game_switches      = contents[:switches]    

    $game_variables     = contents[:variables]    

    $game_self_switches = contents[:self_switches]    

    $game_actors        = contents[:actors]    

    $game_party         = contents[:party]    

    $game_troop         = contents[:troop]    

    $game_map           = contents[:map]    

    $game_player        = contents[:player]  

  end    

  #--------------------------------------------------------------------------  

  # * Map reloader  

  #--------------------------------------------------------------------------  

  def self.reload_map_if_updated    

    if $game_system.version_id != $data_system.version_id      

      $game_map.setup($game_map.map_id)      

      $game_player.center($game_player.x, $game_player.y)      

      $game_player.make_encounter_count    

    end  

  end    

  #--------------------------------------------------------------------------  

  # * Total fade out  

  #time : duration (milliseconds)  

  #--------------------------------------------------------------------------  

  def self.fadeout_all(time = 1000)    

    RPG::BGM.fade(time)    

    RPG::BGS.fade(time)    

    RPG::ME.fade(time)    

    Graphics.fadeout(time * Graphics.frame_rate / 1000)    

    RPG::BGM.stop    

    RPG::BGS.stop    

    RPG::ME.stop  

  end    

  #--------------------------------------------------------------------------  

  # * Call method  

  #--------------------------------------------------------------------------    

  def self.call  

    File.open('Autosave.rvdata2', "wb") do |file|      

      $game_system.on_before_save      

      Marshal.dump(make_save_header, file)      

      Marshal.dump(make_save_contents, file)    

    end    

  end            

  def self.load    

    fadeout_all    

    File.open('Autosave.rvdata2', "rb") do |file|    

      Marshal.load(file)    

      extract_save_contents(Marshal.load(file))    

      reload_map_if_updated    

    end    

    $game_system.on_after_load    

    SceneManager.goto(Scene_Map)            

  end  

end

#==============================================================================

# ** DataManager

#------------------------------------------------------------------------------

#  This module manages the database and game objects. Almost all of the 

# global variables used by the game are initialized by this module.

#==============================================================================

module DataManager  

  #--------------------------------------------------------------------------  

  # * Maximum Number of Save Files  

  #--------------------------------------------------------------------------  

  def self.savefile_max    

    return ToddAutoSaveAce::MAXFILES + 1  

  end  

end

#==============================================================================

# ** Scene_Map

#------------------------------------------------------------------------------

#  This class performs the map screen processing.

#==============================================================================

class Scene_Map < Scene_Base  

#--------------------------------------------------------------------------  

# * Preprocessing for Battle Screen Transition  

#--------------------------------------------------------------------------  

  def pre_battle_scene    

    Graphics.update    

    Graphics.freeze    

    @spriteset.dispose_characters    

    BattleManager.save_bgm_and_bgs    

    BattleManager.play_battle_bgm    

    Sound.play_battle_start  

    Autosave.call if $game_switches[ToddAutoSaveAce::AUTOSAVEBB] == true

  end  

#--------------------------------------------------------------------------  

# * Call Menu Screen  

#--------------------------------------------------------------------------  

  def call_menu    

    Sound.play_ok    

    SceneManager.call(Scene_Menu)    

    Window_MenuCommand::init_command_position  Autosave.call 

    if $game_switches[ToddAutoSaveAce::AUTOSAVEM] == true

  end  

#--------------------------------------------------------------------------  

# * Preprocessing for Transferring Player  

#--------------------------------------------------------------------------  

  def pre_transfer    

    @map_name_window.close    

    case $game_temp.fade_type    

    when 0      

      fadeout(fadeout_speed)    

      when 1      

        white_fadeout(fadeout_speed)    

  end  

#--------------------------------------------------------------------------  

# * Post Processing for Transferring Player  

#--------------------------------------------------------------------------  

   def post_transfer    

     case $game_temp.fade_type    

     when 0      

       Graphics.wait(fadein_speed / 2)      

       fadein(fadein_speed)    

       when 1      

         Graphics.wait(fadein_speed / 2)      

         white_fadein(fadein_speed)    

       end    

       @map_name_window.open  

       Autosave.call if $game_switches[ToddAutoSaveAce::AUTOSAVETM] == true  

     end 

   end

   end

TAG •
Comment '2'
  • profile
    러닝은빛 2019.06.02 12:48 Files첨부 (1)

    두 군데가 문제였네요. 첨부 파일 참고 바랍니다.

  • profile
    소녀160 2019.06.02 21:22
    노고에 감사드립니다.
    그런데 저장이 되지 않습니다.
    저장 칸에 "자동 저장" 이라고 쓰여있지도 않고요.
    어떻게 하면 좋을까요?

List of Articles
종류 분류 제목 글쓴이 날짜 조회 수
공지 묻고 답하기 가이드 습작 2014.06.14 12384
RMXP 게임하다가 일정 이벤트가 뜨면 게임 폴더 속 파일이 자동 실행되도록 할수 있나요? 2 찐콩땅콩 2015.11.15 339
RMVX 힐이 특정 상대 에게 데미지로 박히게 하는방법 3 OvercomE 2014.01.04 1032
RMVX 흰색없는 이미지 올리기? 13 file Thyella 2013.03.05 1441
기본툴 사용법 RMVXA 흡혈 스킬 만들기 3 겜만들고싶다앙 2021.01.06 290
RMVXA 흔들림 효과 질문 3 달밤에왈츠 2012.07.03 1677
기타 RMVXA 흑백 스킬 애니메이션을 만들었는데 검은 색이 계속 투명처리가 됩니다 2 file 오황불 2020.12.31 89
RMXP 흐읗읗 2 쿠크 2011.02.12 1076
RMVX 흐음..제가 액토이동경로 이벤트에대해 아쳐 2015.04.19 199
RMXP 흐엏엏 2 file 쿠크 2011.02.11 1146
RMXP 흐아아.. 맵칩 관련 질문 입니다. 4 미니쿠키 2011.01.22 1107
RM2k 흐미 1 알이즈웰 2011.01.13 1852
RMXP 훈장 시스템 3 솔로몬 2013.02.18 906
RMVX 훈덕 님이 올리신 스킬 사용 조건(번역) 사용방법 file 엿데브 2011.06.07 1677
RMVXA 후크 샷 스크립트 2 불청객 2013.01.17 1086
RMVX 후레시 같은거 어떻게 만들죠? 6 후라이팬샷 2013.08.19 1319
RMVXA 후레쉬효과? 1 아이디어창고 2015.07.11 265
RMVX 후레쉬같은 이벤트 질문 2 노이치 2012.07.08 3448
RMVX 후레쉬 스크립트..? 3 아인이다 2012.10.25 1410
기본툴 사용법 RMMV 효과음이나 브금 추가하는 법을 모르겠어요ㅜ 3 클라시메이트 2019.01.18 477
기본툴 사용법 RMMV 효과음을 끊기거나 겹치지 않게 반복시킬 수 있나요? 2 PPPL 2019.11.22 314
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 515 Next
/ 515