じ☆ve冰风 发表于 2026-8-5 16:05:00

Autosave

Autosave 1.0.0

by Todd (or DoctorTodd on RMRK)

Introduction

Change autosave file name to autosave and have an optional window saying the game was autosaved.

Features


[*]Change max files.
[*]Call autosave

How to Use

Paste above main.

Configure the script to the way you like it.

Script

Spoiler                Code:       
#===============================================================================
#
# DT's Autosave
# Author: DoctorTodd
# Date (06/22/2012)
# 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)
#
#===============================================================================
#
# Instructions
# Paste above main.
# Call using Autosave.call
#
#===============================================================================
#
# 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 = "Autosave"

          #Autosave before battle?
          AUTOSAVEBB =true

          #Autosave when menu opened?
          AUTOSAVEM =true

          #Autosave when changing map?
          AUTOSAVETM =true
        end
#==============================================================================
# ** Autosave
#------------------------------------------------------------------------------
# This module contains the autosave method. This is allows you to use the
# "Autosave.call" command.
#==============================================================================

module Autosave
#--------------------------------------------------------------------------
# * Call method
#--------------------------------------------------------------------------
def self.call
DataManager.save_game_without_rescue(0)
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 ToddAutoSaveAce::AUTOSAVEBB
end
#--------------------------------------------------------------------------
# * Call Menu Screen
#--------------------------------------------------------------------------
def call_menu
        Sound.play_ok
        SceneManager.call(Scene_Menu)
        Window_MenuCommand::init_command_position
Autosave.call if ToddAutoSaveAce::AUTOSAVEM
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 ToddAutoSaveAce::AUTOSAVETM
end
end





FAQ

None right now.

Credit and Thanks

- Todd

Author's Notes

See header


本贴来自国际rpgmaker官方论坛作者:Todd处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/autosave.2707/
页: [1]
查看完整版本: Autosave