질문과 답변

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 12387
이벤트 작성 RMVXA 스톱워치 하는 법 3 홍홍이1 2023.09.16 34
플러그인 추천 RMMV RPG maker mV 텍스트 행 늘리기 2 설렁설렁탕 2023.09.15 41
이벤트 작성 RMMZ 이벤트를 중간에 스킵하는 법 2 하라아아암 2023.09.14 36
플러그인 사용 기타 대화상자의 크기를 조절하는 플러그인에 관해 4 펑비 2023.09.13 53
이벤트 작성 RMVXA 일정시간동안 특정 버튼을 반복적으로 눌러 적을 공격해야하는 미니게임을 만들고싶은데요. 6 홍홍이1 2023.09.11 55
턴제 전투 RMMZ 전체 공격은 회피가 적용이 안되나요? 2 Lukim9 2023.09.10 47
에러 해결 RMMV 타이틀 실행오류 1 file 송실용 2023.09.09 43
이벤트 작성 RMMV 이벤트 도중에 타 이벤트 끼워넣기 2 file 송실용 2023.09.09 39
턴제 전투 RMMZ 알만툴 전투 이벤트 시스템이 원래 이런 건가요? 2 하라아아암 2023.09.04 53
기본툴 사용법 RMXP 무기장착에 따른 캐릭터 이미지 변화 스크립트없이 구현 불가능한가요? 3 ecdysis93 2023.09.02 44
에러 해결 RMMV 확장프로그램 로드 오류라고 뜹니다.. file 휴늘 2023.08.29 32
턴제 전투 RMMZ skill notetag가 뭔가요? 2 하라아아암 2023.08.29 28
이벤트 작성 RMXP RPG MAKER XP 이벤트 작성 중 문제가 발생했습니다. (방어구 장비 인식 오류) file AAAA. 2023.08.29 28
한글 패치 기타 알만툴 2k 스팀판은 한글패치가 없나요? 김기차 2023.08.28 47
스크립트 작성 RMMZ 혹시 이런 식으로 몬스터 구분을 알파벳으로 한 걸 없앨 수는 없나요? 2 file 하라아아암 2023.08.28 46
스크립트 작성 RMMZ MZ에서 사망시 커스텀된 타이틀 화면으로 돌아가게 하고 싶습니다. 2 하라아아암 2023.08.27 61
스크립트 작성 RMVXA 조건분기 스크립트에서 이벤트의 위치가 해당 위치에 있을때 조건거는법 2 홍홍이1 2023.08.24 40
스크립트 작성 RMVXA 조건분기 스크립트에서 변수 조건 거는 법 4 홍홍이1 2023.08.22 52
기타 RMMV 메뉴창 위치를 바꾸는법 아는사람있나요? 1 설연 2023.08.21 93
기본툴 사용법 기타 rpg maker mz 폰드 바꾸는 법좀 알려주세요 단무쥐 2023.08.17 28
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 516 Next
/ 516