Casper Gaming Developer Corner
Casper Gaming Developer Corner

Documentation

Back to Plugin


Quick InfoVersion: 1.1.0
Made for RPG Maker MZ 1.9.0

The BasicsThe Idle Switch will be turned ON when the player is idle, and OFF when the player is not idle. This process is automatic, if you do not wish to use a switch for this, you can set the Idle Switch to 0 to not use this feature.

An alternative to the automatic switch is using the Plugin Command to check if the player is idle as needed. Using the plugin command in a parallel process event will be much less efficient than using the automatic Idle Switch functionality.

The Idle Variable will be set to 0 while the player is not idle. When idle, the variable will automatically be set to the amount of frames the player has been idle for. If you do not wish to use this feature, set the Idle Variable to 0.

An alternative to the automatic variable is using the Plugin Command to check idle frames as needed. Using the plugin command in a parallel process event will be slightly less efficient than using the automatic Idle Variable functionality.

Eventing TipsYou can event idle behavior by checking if the switch is ON in an event that runs parallel process. If ON, the player is idle and you can run whatever happens when the player is idle. If OFF, you can reset the player back to normal. For one-time results, use a second switch to compare both and determine if the player is newly idle or has been idle for a while.

You can event idle behavior by checking the Idle Variable's value. If you want repeating idle behavior, you can compare the variable's mod (%) value against a certain number. For example, checking if Idle Variable % 300 is equal to 1 will run the event every 300 frames (5 seconds). Do not check if the variable mod some number is equal to 0 as this will also run while not idle.

Plugin CommandsThis plugin supports the following plugin commands:
Check Idle - Set a switch to the player's current idle status

Check Idle Frames - Set a variable to the current amount of frames the player has been idle for

Force Idle - Force the player to become idle (no effect if already idle). Ignores the setting for if the player can be idle or not.

Clear Idle - Forces the player to no longer be idle (no effect if already not idle). Ignores setting for if the player can be idle or not.

Saved GamesThis plugin is fully compatible with saved games. This means you can:

✓ Add this plugin to a saved game and it will work as expected.
✓ Change any plugin params and changes will be reflected in saved games.
✓ Remove the plugin with no issue to save data.

Filename

The filename for this plugin MUST remain CGMZ_Idle.js. This is what it comes as when downloaded. The filename is used to load parameters and execute plugin commands. If you change it, things will begin behaving incorrectly and your game will probably crash. Please do not rename the js file.


Known Issues

This plugin currently has no known issues that need to be fixed. If you believe you have encountered a bug, please report it to Casper Gaming.


Compatibility

This plugin currently has no known compatibility issues with other RMMZ plugins. If you believe you have encountered a conflict, please report it to Casper Gaming.


Version HistoryVersion AlphaR2
  • Added option to run common event when idle starts
  • Added option to run common event when idle stops
Version AlphaR3
  • Added option to prevent common events from starting when outside map scene
  • Added plugin command to prevent/enable the changing of idle status
Version AlphaR4
  • Added plugin command to clear idle status
  • Added plugin command to force idle status
Version Beta
  • Added tracking of total idle time throughout game
  • Added plugin command to get total idle time
Version 1.0.0
  • Added battle common event start/stop
  • Fix bug with idle status if save occurred while idle
Version 1.1.0
  • Converted idle state change freeze to game switch from plugin command

Back to Plugin