An open library of RPG Maker MV plugins, powered by the community.

PGMV - The Community-Driven Plugin Library for RPG Maker MV

MV plugins

PANDA Fixed Timer - PANDA_FixedTimer.js

Plugin desc : Treat timers more strictly in units of the decimal point.

License : MIT License

Author : panda(werepanda.jp)

Website : https://www.werepanda.jp/

Desc page : http://www.werepanda.jp/blog/20210911103413.html

File name : PANDA_FixedTimer.js

Help of plugin :

* @target MV MZ
 * @plugindesc Treat timers more strictly in units of the decimal point.
 * @author panda(werepanda.jp)
 * @url http://www.werepanda.jp/blog/20210911103413.html
 * 
 * @help Fix a bug in the core script that the seconds after the decimal point
 * is truncated when the timer is judged by conditional branch,
 * and the judgement will be made with a deviation of about 1 second.
 * 
 * The timer of RPG Maker holds the number of seconds after the decimal point,
 * which is less than one second, but it is "truncated" to the second
 * when it is actually used.
 * So if the timer is specified as "<= 0 seconds" in the conditional branch,
 * it is judged that is has become 0 seconds when it is less than 1 second,
 * even though there are actually 0.99 seconds left.
 * This plugin fixes this, so that the timer can be judged correctly.
 * 
 * Also, when displaying the timer or controling variabels,
 * the number of seconds after the decimal point will be "rounded up".
 * 
 * [Thanks to] Hoshigata (StarlagoonAP)
 * http://artificialprovidence.web.fc2.com/
 * 
 * [License]
 * this plugin is released under MIT license.
 * https://opensource.org/licenses/mit-license.php
 *

スポンサードリンク

-MV plugins

Copyright© PGMV - The Community-Driven Plugin Library for RPG Maker MV , 2026 All Rights Reserved.