질문과 답변

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 12460
RMVXA 이맵에서 설정한 후레쉬효과 이벤트가 다른맵으로 가도 적용이 되잇네요...도와주세요ㅠㅠ 2 file crucible 2014.10.15 356
기타 RMVXA 윈도우 커스텀 하는방법에 대해서 4 seoha3360 2022.04.23 355
RMVXA 이벤트를 연결하는 방법 좀 알려주세요. 1 수퍼말이오 2014.10.17 354
RMVXA 전체화면시 화면이 가로로 찌부되요. 원래 안 그랬는데. 시캐 2014.12.20 354
RMVXA Continue Loop라는게 무슨 트리건가요? JunkMan 2014.10.05 353
RMVXA 스크립트를 찾습니다. 3 file 깡쨩 2015.03.30 351
이벤트 작성 RMVXA 확인버튼 눌렀을때 그림 삭제하기 2 MAYO 2019.09.20 350
RMVXA 방을 나갔다가 다시 들어왔을떄 이벤트의 새로고침을 막고 싶습니다. 2 file 가이아_ 2014.11.01 348
RMVXA 메뉴 화면 뜰 때 뒤의 게임 화면이 어두워지지 않게 할 수 있을까요? 2 여줄가리 2015.10.07 348
RMVXA 스크립트 질문좀 할게요~ 2 귀칸 2014.10.16 347
이벤트 작성 RMVXA 상태이상으로 난이도 만드는 법 10 슈필러 2019.03.03 346
RMVXA 감싸기나 대리에 대해서 1 hinim22 2014.11.01 345
RMVXA 살천처럼 rpg vx ace로 캐릭터 위에 말풍선? 같이 띄우기 람초와아이들 2018.12.05 345
RMVXA 선택지 창을 바꾸고싶습니다 ㅠㅠ 2 file 웬놈 2015.11.25 344
RMVXA VX Ace 대화창에 있는 그림 바꾸는 법 어떡해 해야 하나요?? 3 file Noha 2019.07.07 344
RMVXA 맵을 두번 날렸습니다 1 이레 2014.10.16 342
RMVXA [해결완료] 오른쪽에 이미지로 인터페이스를 깔아두고 맵스크롤을 고정하고싶은데요 6 file 코코아밀크 2016.12.28 340
RMVXA 속성유효도를 변경시키는 상태의 중첩에대해서 1 프라임헌터즈 2014.11.30 338
RMVXA 알만툴 VX ACE 전투 한글패치 질문드립니다. 2 file 메이플라이11 2018.07.23 338
RMVXA 게임 디컴파일 3 게임잘날아가는닝겐 2015.08.11 337
Board Pagination Prev 1 ... 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 ... 150 Next
/ 150