질문과 답변

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
플러그인 생성 RMMV 철권처럼 게이지바를 만들고 싶습니다 2 abang 2020.11.15 235
플러그인 생성 RMMV 궁금한 것이 있습니다. 1 영혼의서약 2022.02.03 204
플러그인 생성 RMMV 플러그인 관련해서 조언을 좀 얻어도 될까요? 무명시절 2022.02.19 163
플러그인 생성 RMMV ESC키가 메뉴/취소버튼을 쓰지않게하고싶습니다/ESC키는 취소만되게 하고싶습니다. 쌩촙제작자 2022.09.23 150
플러그인 생성 기타 아이템의 갯수를조정하여 조건분기를일으켜 해당개수가 만족해지면 그래픽을변하게하는법 2 file 허왕 2022.11.30 52
플러그인 생성 RMMV RMMV에서 npm 사용하는 방법 (윈도우 바탕화면 변경) 1 LV 2023.05.14 61
플러그인 생성 RMMZ MZ에서 화면상의 출력 영역 및 UI 조절하는 방법 file 요르마유 2023.02.09 248
플러그인 사용 RMMV 플러그인과 같이 사용할 캐릭터칩을 찾고있습니다. 2 GDS아크 2020.12.11 121
플러그인 사용 RMMV 선택창을 원하는 위치로 옮기는 플러그인이 있나요? 1 file 폴트 2021.01.01 344
플러그인 사용 RMMV 아침에 녹는 마녀처럼 엔딩나누고싶은데 어떻게하나요? 백월화(白月華) 2022.02.23 275
플러그인 사용 RMMV 업적관련 Torigoya 의 플러그인 사용중 팝업이 나오질 않습니다 file PPPL 2019.10.06 54
플러그인 사용 RMMV RGB MV 폰트변경 8 file 뜨끔 2019.02.02 2896
플러그인 사용 RMMV 기본키 이외에 다른키 입력 받는법을 알고 싶습니다. 2 MSM 2019.02.11 168
플러그인 사용 RMMV 캐릭터 한글 이름 설정 2 에비앙 2019.02.20 223
플러그인 사용 RMMV 경험치를 수동으로 일일이 설정할 수 있는 플러그인을 구하고 싶습니다 2 코코아밀크 2019.05.04 108
플러그인 사용 RMMV 타이틀 메뉴의 모습을 바꾸고 싶습니다 7 file 소녀160 2019.05.04 925
플러그인 사용 RMMV RPG MV 대화창 크기 2 file 나나블랑 2020.06.17 612
플러그인 사용 RMMV HP만 게이지로 화면에 나타나게 하고 싶습니다 5 소녀160 2019.05.04 88
플러그인 사용 RMMV 변수를 게이지로 보이게 하고 싶습니다 9 소녀160 2019.05.04 127
플러그인 사용 RMMV HP를 숫자로 화면에 띄우고 싶습니다 2 소녀160 2019.05.04 90
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 82 Next
/ 82