【汉化】YEP.165 – Options Core

Introduction

WARNING: This plugin is to be used with RPG Maker MV 1.5.0 or above! This is because the MV 1.5.0+ editor allows for this plugin to be made in an orderly and efficient manner. Please make sure your RPG Maker MV software is up to date before using this plugin.
警告:此插件将与RPG Maker MV 1.5.0或更高版本一起使用!这是因为MV 1.5.0+编辑器允许以有序和高效的方式制作插件。请确保您的RPG Maker MV软件在使用此插件前是最新的。

The Options Menu can be the one thing that can change how comfortable a player is with your game. Within the Options Menu, the player can alter any given settings to their liking adjusting to their playstyle. By default, settings like ‘Always Dash’ and ‘Command Remember’ are included in RPG Maker MV and other plugins made for RPG Maker MV may also add in newer options to the list. However, the menus themselves were always a bit iffy to look at and/or adjust. This plugin gives the Options Menu a visual makeover and full control over what options can be added to the menu to befit your players!
选项菜单可以改变玩家在游戏中的设置。在选项菜单中,玩家可以根据自己的喜好改变任何设置以适应他们的游戏风格。
默认情况下,RPG Maker MV中包含“Always Dash”和“Command Remember”等设置,为MV制作的其他插件也可能会将更新的选项添加到列表中。
但是,菜单本身总是有点不便,无法便捷查看或调整。这个插件可以设置选项菜单的选项以适应游戏!

This plugin supports the following plugins:
这个插件支持以下插件:

- GamepadConfig.js 
- YEP_AnimateTilesOption.js 
- YEP_BattleAniSpeedOpt.js 
- YEP_FpsSynchOption.js 
- YEP_KeyboardConfig.js 
- YEP_X_ActSeqPack3.js 
- YEP_X_BattleSysATB.js 
- YEP_X_DifficultySlider.js

Please update them to the latest versions, too, in order to have compatibility with the Options Core.
请将它们更新到最新版本,以便与Options Core具有兼容性。

Instructions – Option Categories Plugin Parameters**

This plugin adds in ‘Option Categories’ into the Options Menu. Aside from the ‘All’ and ‘Exit’ categories, all of the categories are customizable from the way they appear in the menu to the way they behave.
该插件将“选项类别”添加到选项菜单中。除了“全部”和“退出”类别之外,所有类别都自定义显示。

Here is how each parameter behaves:
以下是每个参数的介绍

Name:
– Determines the way the Category name appears. Name or rename categories as you see fit. You can use text codes with this parameter, allowing you to add icons (\i[x]) or change the text color (\c[x]) of the category.
名称:- 确定显示的类别名称。按照您认为合适的名称重命名类别。您可以使用此参数的文本代码,允许您添加图标(\ i [x])或更改类别的文本颜色(\ c [x])。

Help Description:
– This is the text shown in the help window at the top of the Options Menu whenever this category is highlighted. Use it to describe what types of options will appear in this category and how they will affect the game. You may also use text codes with this parameter.
帮助说明:- 这是帮助中显示在选项菜单的顶部。用它来描述此类别中将出现哪些选项以及它们将如何影响游戏。您也可以使用此参数的文本代码。

Options List:
– This is the list of options that appear on the right side of the Options Menu when this category is highlighted or selected. You can add, edit, move around, or delete options from this list as you see fit. For details on how the plugin parameters for the Options List work, look in the next section below:
选项列表:- 这是显示出现在选项菜单右侧的选项列表。您可以添加,编辑,移动或删除此列表中的选项。有关选项列表的插件参数如何工作的详细信息,请参阅下面的下一部分:

Instructions – Option List Plugin Parameters**

This section explains how the plugin parameters for the Options List operate and how they interact with the rest of the plugin.
本节介绍Options List的插件参数以及它们如何交互。

Name:
– Determines the way the Options name appears. Name or rename the option as you see fit. This does not use the command names provided by other plugins by default. You can use text codes with this parameter, allowing you to add icons (\i[x]) or change the text color (\c[x]) of the option.
名称:- 确定选项名称的显示名称。请重命名该选项。这不会默认使用其他插件提供的命令名称。您可以使用此参数的文本代码,允许您添加图标(\ i [x])或更改选项的文本颜色(\ c [x])。

If you name this as ‘EVAL: code’ without the ‘quotes’, the name of this option will be whatever string that the code outputs.
如果您将此名称命名为'EVAL:code'而不带'引号',则此选项的名称将为代码输出的任何字符串。

Help Description:
– This is the text shown in the help window at the top of the Options Menu whenever this option is highlighted. Use it to describe what this option changes for the game.
帮助说明:- 这是帮助中显示的在选项菜单的顶部文字,用它来描述这个选项在游戏中的变化。

Symbol:
– This is the identifier for the option. Each option should have a unique symbol, so much as to not cause conflicts within the Options Settings. However, shared symbols are perfectly fine as long as you’re fine with them performing the same functions when selected.
符号:- 这是选项的标识符。每个选项都应该有一个唯一的符号,以免在选项设置中导致冲突。但是,只要您选择时执行相同的功能,您就可以使用共享符号。

Show/Hide:
– This is the code used to determine if this option will be visible on the list of options within this category.
显示/隐藏:- 这是用于确定此选项是否可见。

To make sure it always shows, use the following code:
确保它始终显示,请使用以下代码
show = true;

Enable:
– This is the code used to determine if this option will be enabled. It is recommended that you leave all options as enabled as to not lock away options from the player.
启用:- 这是用于确定是否启用此选项的代码。建议您将所有选项保留为启用状态。
To make sure it is always enabled, use the following code:
要确保它始终处于启用状态,请使用以下代码
enabled = true;

Ext:
– Stands for extension. This serves as a secondary symbol for the option and it can be used for pretty much anything. It has no direct impact on the option unless the option’s effect is related to the extension value. The majority of options do not need to make use of the Ext value so it is best to just leave this alone.
分机:- 代表分机。这是该选项的第二个符号,它几乎可以用于任何事情。它对选项没有直接的影响。
To leave it alone the following code:
如下代码:
ext = 0;

The following section is best left untouched if you do not know any JS programming and don’t have instructions on how to set it up. This is because all of the behaviors related to the options can be controlled from here and a mistake can crash the game.
如果您不熟悉编程,以下部分最好不要触动任何JS代码,这是因为所有与选项有关的行为都可以从这里控制,而错误会导致游戏崩溃。

Make Command Code:
– This is the code used to add the option command to the list of options. Use this to modify the name, symbol, if it is enabled, or change the ext value before finally adding it to the list.
制作命令代码:- 这是用于将选项命令添加到选项列表的代码。使用它来修改名称,符号(如果已启用),或在最终将其添加到列表之前更改ext值。

The default code:
this.addCommand(name, symbol, enabled, ext);

Draw Option Code:
– This is how the option is ‘drawn’ onto the Options window and seen by your players. Everything here controls the way the option looks from the way it is named to the position of the text. The majority of the variables defined towards the beginning of the default code is placed there for the sake of convenience.
绘制选项代码:- 这是如何将选项“绘制”到“选项”窗口并由玩家看到的。这里的一切都控制着选项从命名方式到文本位置的方式。为了方便起见,将定义在默认代码开始处的大部分变量放在那里。

The default 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:
– This is the code that runs when the player presses any kind of confirm button (Z, Enter, Left Click) on this option. For most options, this will switch between an ON/OFF option. For others, this will make the value of the option scale upwards until it loops back.
处理OK代码:- 这是当玩家在此选项上按下任何种类的确认按钮(Z,Enter,Left Click)时运行的代码。对于大多数选项,这将在ON / OFF选项之间切换,或者循环选项。
The default code:

var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, !value);

Cursor Right Code:
– This is the code that runs when the player presses the RIGHT button. Usually, this will move most options into an ON position. For others, this will scale the value of the option upward.
光标右代码:- 这是当玩家按下右键按钮时运行的代码。通常情况下,这会将大部分选项移至ON位置,或者选择上一个。

The default code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, true);

Cursor Left Code:
– This is the code that runs when the player presses the LEFT button. Usually, this will move most options into an OFF position. For others, this will scale the value of the option downward.
光标左代码:- 这是当玩家按下左键时运行的代码。通常情况下,这会将大多数选项移至OFF位置,选择下一个。

The default code:

var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changeValue(symbol, false);

Default Config Code:
– When creating new options, this determines the default value of the option. For most options, this starts in an OFF position, which is usually represented by a ‘false’ boolean.
默认配置代码:- 创建新选项时,这决定了选项的默认值。对于大多数选项来说,这从OFF位置开始,通常由“假”布尔值表示。

The default code:
ConfigManager[symbol] = false;

Save Config Code:
– This determines how saving the Options Settings is done through code. Normally, this takes on the value as it is for the ConfigManager.
保存配置代码:- 这决定了如何通过代码保存选项设置。通常情况下,它的值与ConfigManager相同。

The default code:
config[symbol] = ConfigManager[symbol];

Load Config Code:
– This determines how the ConfigManager loads the saved Options Settings upon the loading of the game. Normally, this takes on whatever settings stored within the config file and plants it straight into the ConfigManager directly.
加载配置代码:- 这决定了ConfigManager在加载游戏时如何加载保存的选项设置。通常情况下,这会采用配置文件中存储的任何设置,并直接将其直接植入ConfigManager中。
The default code:
ConfigManager[symbol] = !!config[symbol];

Happy RPG Making!

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

推荐阅读更多精彩内容