질문과 답변

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 12393
스크립트 작성 RMVXA 뉴비 질문) 셀프 스위치로 이벤트 페이지를 넘어가게 하고 싶어요 4 file ㄱㅇㅇㅇ 2024.01.09 38
스크립트 작성 RMVXA 챗GPT가 만들어준 스크립트 2 rsy1189a 2024.02.26 74
스크립트 사용 RMVXA 그림 각도 회전 스크립트 질문 file slieun 2022.10.03 50
스크립트 사용 RMVXA 세이브 슬롯 수 줄이는 방법 2 할짓없는인간 2021.05.05 77
스크립트 사용 RMVX 세이브 메뉴와 관련된 스크립트에 대해서 물어보려고 합니다. file 즈네 2021.02.02 112
스크립트 사용 RMVXA 포르투갈 포럼에서 알게된 메뉴 스크립트 적용 1 우야까 2021.02.02 115
스크립트 사용 RMVXA RPG VX Ace 웹사이트 하이퍼링크 김치찌개두루치기 2020.08.05 83
스크립트 사용 기타 스크립트등을 엔딩 크레딧에 출처를 남겨야 할까요? 2 외눈요리 2023.01.24 103
스크립트 사용 RMVXA vx ace) 스크립트가 작동하질 않습니다... 2 file 게임이만들고파 2021.01.05 188
스크립트 사용 RMVX [VX스크립트] KGC패시브스킬, 무기옵션 스크립트 성공하신분. 2 테일즈 2019.03.07 117
스크립트 사용 RMVXA 최대TP 늘리는 법 (100>200) 2 슈필러 2019.03.21 104
스크립트 사용 RMVXA vx ace 소비템 갯수 제한 스크립트 질문 1 leim 2019.01.07 67
스크립트 사용 RMMV vxa 스크립트를 mv에서 사용가능한가요? 5 NEXONON 2019.01.22 135
스크립트 사용 RMVXA 북극토끼님의 아이템창 스크립트 1 심심이병 2019.01.27 226
스크립트 사용 RMMV alert 질문 15 file 무명시절 2019.02.02 3683
스크립트 사용 RMVXA 동방프로젝트 탄막슈팅 스크립트 슈필러 2019.02.04 169
스크립트 사용 RMMV 알만툴 MV에서 세이브창에 페이스칩을 어떻게 띄워야하나요? 6 file 빌헬름17세 2019.02.23 768
스크립트 사용 RMMV 스크립트의 변수,스위치 설정 단축명령어가 있을까요? 1 wkdrn33 2019.03.28 89
스크립트 사용 RMXP (RPG XP) 스크립트 사용방법 질문 1 file 늑이씨 2019.03.31 84
스크립트 사용 RMXP UMS 스크립트 오류 해결좀요 ㅠㅠ 오예쓰 2019.04.05 99
Board Pagination Prev 1 ... 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 ... 83 Next
/ 83