【汉化】YEP.180 – Autosave

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.

Happy RPG Making!

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 159,117评论 4 362
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,328评论 1 293
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,839评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 44,007评论 0 206
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,384评论 3 287
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,629评论 1 219
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,880评论 2 313
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,593评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,313评论 1 243
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,575评论 2 246
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,066评论 1 260
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,392评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 33,052评论 3 236
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,082评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,844评论 0 195
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,662评论 2 274
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,575评论 2 270

推荐阅读更多精彩内容