Introduction
This plugin requires YEP_SaveCore. Make sure this plugin is located under YEP_SaveCore in the plugin list.
这个插件需要YEP_SaveCore。确保此插件位于插件列表中的YEP_SaveCore下。
Autosave is a common feature found in standard RPG’s nowadays. Games would save at certain triggers or upon changing maps so that the player won’t lose any progress in case they forget to manually save. This plugin adds in an Autosave function to your game(s) and lets you control when to Autosave or set it to do it automatically under certain conditions.
自动保存是目前标准RPG中的常见功能。游戏将在某些触发器或更改地图时保存,以便玩家在忘记手动保存时不会丢失任何进度。此插件为您的游戏添加了自动保存功能,并允许您控制何时自动保存或将其设置为在特定条件下自动执行。
Instructions
There are three ways to go about Autosave with this plugin. Please read them carefully and decide which one(s) is best suited for your game.
使用此插件有三种方法可以实现自动保存。请仔细阅读并确定哪一个最适合您的游戏。
—
Manual:
– By default, Autosave does not happen automatically with this plugin. You, as the game dev, need to insert the Plugin Command: Autosave at the various points you want the Autosave to occur. This one gives you the most control over your game.
手动:
- 默认情况下,此插件不会自动进行自动保存。作为游戏开发者,您需要插入插件命令:自动保存您希望自动保存发生的各个点。这个让你最能控制你的游戏。
—
Autosave on Map Load:
– This is a Plugin Parameter. When it is set to true, the game will Autosave each time the map scene is loaded. This means entering a new map, coming out of a menu, or finishing a battle. All three of those conditions causes the Autosave function to activate.
自动保存地图加载:
- 这是一个插件参数。当它设置为true时,每次加载地图场景时游戏都将自动保存。这意味着输入新地图,从菜单中退出或完成战斗。所有这三个条件都会导致自动保存功能。
—
Autosave on Main Menu:
– This is a Plugin Parameter. When it is set to true, the game will Autosave each time the player enters the Main Menu from the map scene. Autosave will NOT occur any other way regarding the Main Menu, meaning that coming out of the Item scene to the Main Menu will not activate Autosave.
主菜单上的自动保存:
- 这是一个插件参数。当它设置为true时,每次玩家从地图场景进入主菜单时,游戏将自动保存。除此外,自动保存不会以任何其他方式发生,这意味着从项目场景出现到主菜单将不会激活自动保存。
—
Autosaving will not occur if the player disables Autosave. If you don’t want to give the player the ability to disable Autosave, you can set the Plugin Parameter “Show Option” to false.
如果玩家禁用自动保存,则不会发生自动保存。如果您不想让玩家禁用自动保存功能,可以将插件参数“显示选项”设置为false。
You can use all three methods of Autosaving together. You can have it done manually, Autosave on loading a map, and Autosave on calling the Main Menu to get the most coverage.
您可以将所有三种Autosaving方法结合使用。您可以手动完成,自动保存加载地图,自动保存调用主菜单以获得最大的覆盖率。
*NOTE: Although you can use all three methods together, be mindful of your players. Sometimes, saving a game could induce a bit of lag depending on how big the save files are. Autosaving is no different. This is something that cannot be fixed by plugins.
注意:虽然你可以一起使用所有三种方法,但要注意你的玩家。有时,保存游戏可能会导致一些延迟,具体取决于保存文件的大小。自动保存也不例外。这是插件无法修复的问题。
*NOTE: Autosaving will not occur until the player saved manually at least once in-game. After that, Autosave will take the slot that was used to save and continue saving to it or whichever save slot the player moved to later.
- 注意:直到玩家在游戏中至少手动保存一次后才会发生自动保护。之后,自动保存将覆盖之前的存档或者下次玩家手动保存的存档。
Plugin Commands
Autosave is manually done by the game developer using plugin commands. There are also other plugin commands that can control autosaving, too.
自动保存由游戏开发人员使用插件命令手动完成。还有其他插件命令也可以控制自动保存。
Plugin Commands:
Autosave
– This will make the game automatically save in the last saved file slot used by the player. If the player has started a new game and did not save into a slot yet, nothing will happen. If autosave is disabled by the player through the Options menu or disabled by the system with a plugin command, nothing will happen either.
自动保存
- 这将使游戏自动保存在玩家上次使用的存档中。如果玩家已开始新游戏并且尚未保存,则不会发生任何事情。如果玩家通过“选项”菜单禁用了自动保存,或者系统使用插件命令禁用了自动保存,则不会发生任何事情。
EnableAutosave
DisableAutosave
– This will forcibly enable or disable autosaving done by the game. This will not bypass the player’s option to disable Autosave if trying to enable it. The player’s decision to disable Autosaving will take priority over the game dev’s. If you wish to take this option away from the player, please change it in the plugin parameters.
这将强制启用或禁用游戏完成的自动保存。如果尝试启用它,则不会绕过玩家禁用自动保存的选项。玩家禁用自动保护的决定将优先于游戏开发者。如果您希望将此选项从播放器中取出,请在插件参数中进行更改。
Options Core Settings – Adding the New Option
If you are using YEP_OptionsCore.js, you can add a new Option using this plugin. Here’s the following code/parameter settings you can use with it.
如果您使用的是YEP_OptionsCore.js,则可以使用此插件添加新选项。以下是您可以使用的以下代码/参数设置。
———
Settings:
———
Name:
\i[231]Autosave
Help Description:
Enables \c[4]Autosaving\c[0] for your game if ON.
You can still manually save your game.
Symbol:
autosave
Show/Hide:
show = Imported.AutosaveShowOpt;
Enable:
enabled = true;
Ext:
ext = 0;
———-
Functions:
———-
Make Option Code:
this.addCommand(name, symbol, enabled, ext);
Draw Option Code:
var rect = this.itemRectForText(index);
var statusWidth = this.statusWidth();
var titleWidth = rect.width - statusWidth;
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawOptionsName(index);
this.drawOptionsOnOff(index);
Process OK Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, !value);
Cursor Right Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, true);
Cursor Left Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, false);
Default Config Code:
// Empty. Provided by this plugin.
Save Config Code:
// Empty. Provided by this plugin.
Load Config Code:
// Empty. Provided by this plugin.