ゲームに戦闘アニメーションの速度オプションを追加して、プレーヤーが望む速度設定を選択できるようにするプラグイン – YEP_BattleAniSpeedOpt.js

タイトル
Add battle animation speed options for your game so yourplayers can choose the speed setting they want.
作者名
ヘルプ
============================================================================
Introduction
============================================================================

Player comfort is a major thing to pay attention to when it comes to
designing video games nowadays. RPG's are no exception either. And inside of
RPG's, the player is usually within a battle a large portion of the time.
And for this large portion of the time, players are often waiting for battle
animations to finish playing.

This plugin adds in the ability for players to choose how fast they want
battle animations to play from inside the options menu. From the default
speed, which plays one animation frame per four real frames, to the fastest
setting, which plays one animation frame per one real frame, the player now
has the option to choose how quickly things progress in battle.

============================================================================
Compatibility
============================================================================

This plugin is made compatible with the following plugins:
- YEP_BattleEngineCore
- YEP_X_ActSeqPack1
- YEP_X_ActSeqPack2
- YEP_X_ActSeqPack3

If you are using the listed plugins, place this plugin underneath the listed
plugins in the Plugin Manager list for maximum compatibility. This is to
ensure the action sequences are working properly with the battle animation
speed options.

============================================================================
Options Core Settings - Adding the New Options
============================================================================

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.

---------
Settings:
---------

Name:
\i[302]Battle Animation Speed

Help Description:
Changes the speed of battle animations.

Symbol:
battleAniSpeed

Show/Hide:
show = Imported.YEP_BattleAniSpeedOpt;

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 quarterWidth = statusWidth / 4;
var titleWidth = rect.width - statusWidth;
this.resetTextColor();
this.changePaintOpacity(this.isCommandEnabled(index));
this.drawOptionsName(index);
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
this.changePaintOpacity(value === 4);
var text = this.battleAnimationSpeedText(4);
this.drawText(text, titleWidth + quarterWidth0, rect.y, quarterWidth, 'center');
this.changePaintOpacity(value === 3);
var text = this.battleAnimationSpeedText(3);
this.drawText(text, titleWidth + quarterWidth1, rect.y, quarterWidth, 'center');
this.changePaintOpacity(value === 2);
var text = this.battleAnimationSpeedText(2);
this.drawText(text, titleWidth + quarterWidth2, rect.y, quarterWidth, 'center');
this.changePaintOpacity(value === 1);
var text = this.battleAnimationSpeedText(1);
this.drawText(text, titleWidth + quarterWidth3, rect.y, quarterWidth, 'center');

Process OK Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value -= 1;
if (value <= 0) value = 4;
value = value.clamp(1, 4);
this.changeValue(symbol, value);

Cursor Right Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value -= 1;
value = value.clamp(1, 4);
this.changeValue(symbol, value);

Cursor Left Code:
var index = this.index();
var symbol = this.commandSymbol(index);
var value = this.getConfigValue(symbol);
value += 1;
value = value.clamp(1, 4);
this.changeValue(symbol, value);

Default Config Code:
Empty. Provided by this plugin.

Save Config Code:
Empty. Provided by this plugin.

Load Config Code:
Empty. Provided by this plugin.

============================================================================
Changelog
============================================================================

Version 1.01:
- Compatibility update with YEP_OptionsCore.js.

Version 1.00:
- Finished Plugin!

============================================================================
End of Helpfile
============================================================================

パラメータ
param ---General---
default
param Option Name
parent ---General---
desc The option command text used in-game.
default Battle Animation

param Default Speed
parent ---General---
type number
min 0
desc The default speed used for battle animations.
default 4

param Affect Movement?
parent ---General---
type boolean
on YES
off NO
desc Do you want this to affect the battler movement speed, too?
default true

param Affect Waiting?
parent ---General---
type boolean
on YES
off NO
desc Do you want this to affect battler animation waits and events, too?
default true

param ---Vocabulary---
default
param Speed 1
parent ---Vocabulary---
desc The text used for this speed.
default Fastest

param Speed 2
parent ---Vocabulary---
desc The text used for this speed.
default Faster

param Speed 3
parent ---Vocabulary---
desc The text used for this speed.
default Fast

param Speed 4
parent ---Vocabulary---
desc The text used for this speed.
default Full

ライセンス表記

紹介ページ http://yanfly.moe/