(要YEP_MessageCore.js)テキスト評価 <> を追加するプラグイン - YEP_X_MessageEvalText.js
- タイトル
- (Req YEP_MessageCore.js) Adds \evalText to the textcode list so that you can run JavaScript code and display it as text.
- 作者名
- Yanfly Engine Plugins様
- ヘルプ
- ============================================================================
Introduction
============================================================================
This plugin requires YEP_MessageCore. Make sure this plugin is located under
YEP_MessageCore in the plugin list.
This is a small plugin that adds in a \evalText<<code>> text code for
messages so that people can run JavaScript code and display it as text.
This can be used to make calculations on the fly without needing to use
Change Variable events prior to displaying the amount or to determine what
kind of string would be displayed without making a plethora of Conditional
Branch events.
============================================================================
Text Code
============================================================================
\evalText<<code>>
- Replace 'code' with JavaScript code. It will run the code inside, then
return whatever is the last line of the code that's ran. Here are some
examples of what you could do this with:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Examples:
---
\evalText<<$gameActors.actor(1).atk + $gameActors.actor(2).atk>>
- Displays the sum of actor 1's ATK and actor 2's ATK.
---
\evalText<<Math.min(1000, $gameParty.gold())>>
- Displays either '1000' or the party's gold count, depending on which one
is currently smaller.
---
\evalText<<['His','Her','Its'][\v[123]]>>
- Depending on the value of Variable 123, this will display 'His' if the
Variable 123 value is equal to 0, 'Her' if the value is equal to 1, or 'Its'
if the value is equal to 2.
---
\evalText<<['Abel','Brandon','Chris'][$gameVariables.value(456)]>>
- Depending on the value of Variable 456, this will display 'Abel' if the
Variable 456 value is equal to 0, 'Brandon' if the value is equal to 1, or
'Chris' if the value is equal to 2.
============================================================================
Changelog
============================================================================
Version 1.00:
- Finished Plugin!
============================================================================
End of Helpfile
============================================================================ - パラメータ
-
( なし ) - ライセンス表記
紹介ページ http://yanfly.moe/