あなたのゲームのイベントタイマー機能をもっとコントロールしてください。 – YEP_EventTimerControl.js

タイトル
Gain more control over the event timer functionfor your game.
作者名
ヘルプ
============================================================================
Introduction
============================================================================

The event timer is often used for countdown purposes. However, sometimes you
would like to have a bit more control over it, such as being able to pause
and resume the timer, increase or decrease the seconds, minutes, or even
hours on the timer. Don't want a countdown timer? Why not have it count
upwards instead? Experienced Lunatic Mode coders will be able to add in
their own plugin commands, too!

Notable Changes Made:
- Ability to separate timer sprite from the spriteset
- Timer is now capable of displaying hours
- Pause/resume functions for timer
- Increasing/decreasing seconds from timer
- Counting up instead of just count down

============================================================================
Plugin Commands
============================================================================

Use the following plugin commands to make use of the new features added by
this plugin to control the event timer.

Plugin Commands:

--- PAUSE/RESUME ---

EventTimer Pause
- Pauses the event timer.

EventTimer Resume
- Resumes the event timer if it has been paused.

--- COUNT DOWN/UP ---

EventTimer Countdown
- Changes the direction of the event timer to decrease and count down
towards 0 seconds.

EventTimer Count Up
- Changes the direction of the event timer to increase and count upwards
endlessly until manually stopped

EventTimer Count Toggle
- Switches the current direction of the event timer to either increase or
decrease each second it is active.

--- INCREASE/DECREASE ---

EventTimer Increase x Frames
EventTimer Decrease x Frames
- Replace 'x' with a number value to determine how many frames to
increase or decrease the event timer by.

EventTimer Increase x Seconds
EventTimer Decrease x Seconds
- Replace 'x' with a number value to determine how many seconds to
increase or decrease the event timer by.

EventTimer Increase x Minutes
EventTimer Decrease x Minutes
- Replace 'x' with a number value to determine how many minutes to
increase or decrease the event timer by.

EventTimer Increase x Hours
EventTimer Decrease x Hours
- Replace 'x' with a number value to determine how many hours to
increase or decrease the event timer by.

You can also combine them together as such:

EventTimer Increase x Hours, y Seconds
EventTimer Increase x Hours, y Minutes
EventTimer Increase x Minutes, y Seconds
EventTimer Increase x Hours, y Minutes, z Seconds

============================================================================
Lunatic Mode - Effect Code
============================================================================

For experienced users that know JavaScript and have RPG Maker MV 1.5.0+, you
can add new plugin commands for this plugin or alter the code of currently
existing plugin commands from the plugin parameters entry: Effect Code.
It should look something like this:

---

------------
Pause/Resume
------------
if (data.match(/PAUSE/i)) {
$gameTimer.pause();

} else if (data.match(/RESUME/i)) {
$gameTimer.resume();

...

--------------------------------
Add new commands above this data
--------------------------------
} else {
Do nothing
}

---

The 'data' variable refers to the rest of the Plugin Command after the
'EventTimer' keyword. For example:

EventTimer Increase 2 Hours, 30 Minutes, 15 Seconds

The 'data' would be 'Increase 2 Hours, 30 Minutes, 15 Seconds' and thus, the
string 'data' is used when checking lines in the 'Effect Code' parameter.

---

If you need to revert the Effect Code back to its original state, delete the
plugin from your plugin manager list and then add it again. The code will be
back to default.

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

Version 1.01:
- Bypass the isDevToolsOpen() error when bad code is inserted into a script
call or custom Lunatic Mode code segment due to updating to MV 1.6.1.

Version 1.00:
- Finished Plugin!

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

パラメータ
param ---Mechanical---

param SpritesetSplit
text Separate from Spriteset
parent ---Mechanical---
type boolean
on YES
off NO
desc Separates the game timer from the spriteset.
YES - true NO - false DEFAULT: true
default true

param TextAlign
text Timer Text Alignment
parent ---Mechanical---
type combo
option left
option center
option right
desc How do you want the text to be aligned?
Default: center
default right

param ---Lunatic Mode---

param Effect Code
parent ---Lunatic Mode---
type note
desc LUNATIC MODE: This is the code used for each of the
plugin commands.
default "------------\nPause/Resume\n------------\nif (data.match(/PAUSE/i)) {\n $gameTimer.pause();\n\n} else if (data.match(/RESUME/i)) {\n $gameTimer.resume();\n\n-------------\nCount Down/Up\n-------------\n} else if (data.match(/(?:COUNTDOWN|COUNT DOWN)/i)) {\n $gameTimer.changeDirection(-1);\n\n} else if (data.match(/(?:COUNTUP|COUNT UP)/i)) {\n $gameTimer.changeDirection(1);\n\n} else if (data.match(/(?:COUNTOGGLE|COUNT TOGGLE)/i)) {\n $gameTimer.changeDirection(-1$gameTimer._direction);\n\n-----------------\nIncrease/Decrease\n-----------------\n} else if (data.match(/(?:INCREASE|DECREASE)/i)) {\n if (data.match(/DECREASE/i)) {\n var direction = -1;\n } else {\n var direction = 1;\n }\n var frames = 0;\n if (data.match(/(\\d+)[ ]FRAME/i)) {\n frames += parseInt(RegExp.$1);\n }\n if (data.match(/(\\d+)[ ]SEC/i)) {\n frames += parseInt(RegExp.$1)60;\n }\n if (data.match(/(\\d+)[ ]MIN/i)) {\n frames += parseInt(RegExp.$1)6060;\n }\n if (data.match(/(\\d+)[ ](?:HR|HOUR)/i)) {\n frames += parseInt(RegExp.$1)606060;\n }\n if (data.match(/(\\d+)[ ]DAY/i)) {\n frames += parseInt(RegExp.$1)60606024;\n }\n if (data.match(/(\\d+)[ ]WEEK/i)) {\n frames += parseInt(RegExp.$1)606060247;\n }\n if (data.match(/(\\d+)[ ]MONTH/i)) {\n frames += parseInt(RegExp.$1)6060602430;\n }\n if (data.match(/(\\d+)[ ](?:YR|YEAR)/i)) {\n frames += parseInt(RegExp.$1)60606024365;\n }\n if (data.match(/(\\d+)[ ]DECADE/i)) {\n frames += parseInt(RegExp.$1)6060602436510;\n }\n if (data.match(/(\\d+)[ ]CENTUR/i)) {\n frames += parseInt(RegExp.$1)60606024365100;\n }\n if (data.match(/(\\d+)[ ]MILLEN/i)) {\n frames += parseInt(RegExp.$1)606060243651000;\n }\n frames= direction;\n $gameTimer.gainFrames(frames);\n\n--------------------------------\nAdd new commands above this data\n--------------------------------\n} else {\n Do nothing\n}"

param Expire Code
parent ---Lunatic Mode---
type note
desc LUNATIC MODE: Unique code that can be run when the
countdown timer expires.
default "BattleManager.abort();"

ライセンス表記

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