Casper Gaming Developer Corner
Casper Gaming Developer Corner

Documentation

Back to Plugin


Quick InfoVersion: 1.4.0
Made for RPG Maker MZ 1.9.0

Tracked StatsThe following stats are tracked for the entire party:
- Gold spent at shops
- Gold earned at shops
- Items bought from shops
- Items sold to shops
- Damage taken
- Damage dealt
- Items used
- Gold looted from battle
- Amount of each individual item bought/sold
- Amount of each enemy defeated

The following stats are tracked per actor:
- Times attacked
- Times attacked with
- Times used skills
- Amount of deaths

Legacy StatsLegacy stats are the first 8 stats tracked via this plugin.

These stats were automatically tracked by variables set up in parameters. New stats do not have the ability to be tracked automatically by variable, as this approach has several issues for per-actor stats. Instead, it is recommended to use the plugin command to get these stats into variables.

Script CallsThese stats are also always stored in CGMZ data separate from the in-game variables. To access these values, use the following javascript in any "script" command (script, command variables->script, etc):

$cgmz.getExtraStats("itemsBought")
$cgmz.getExtraStats("itemsSold")
$cgmz.getExtraStats("itemsUsed")
$cgmz.getExtraStats("goldSpent")
$cgmz.getExtraStats("goldProfit")
$cgmz.getExtraStats("goldLooted")
$cgmz.getExtraStats("damageDealt")
$cgmz.getExtraStats("damageTaken")

This can help track these stats without needing to dedicate in-game variables to them as you can always look them up on the fly.

IntegrationsThis plugin integrates well with the following CGMZ plugins:

[CGMZ] Menu Command Window - Add the Statistics scene to the Main Menu commands using this plugin. The JS required to do so is:
SceneManager.push(CGMZ_Scene_Statistics);

[CGMZ] Scene Backgrounds - This plugin will allow you to show a custom background image in the statistics scene, including scrolling backgrounds or weather.

[CGMZ] Controls Window - This plugin will allow you to show controls during the statistics scene. It will display keyboard or gamepad controls, depending on the player's last input.

Plugin CommandsThis plugin supports the following plugin commands:
Initialize - This command will re-initialize all CGMZ Extra Stats data. Does not affect in-game variables, only internal CGMZ data.

Tracking - This command will turn all tracking ON or OFF. Tracking is ON by default. When tracking is OFF, both in-game variables and internal CGMZ extra stat data is not tracked.

Get Party Stat - Sets a game variable to the selected party stat.

Get Actor Stat - Sets a game variable to the selected actor-specific stat.

Get Enemies Killed - Sets a game variable to the selected enemy's defeated count

Get Item Stat - Sets a game variable to the selected item-specific stat

Call Scene - Calls the statistics scene

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_ExtraStats.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 1.1.0
  • Added tracking for actor-specific stats (times attacked, times attacked with, times used skills).
  • Added plugin command to get party stats
  • Added plugin command to get actor stats
  • This plugin now works in saved games from before this plugin was added
  • Documentation update
Version 1.1.1
  • Added Spanish language help documentation
  • This plugin now warns instead of crashes on invalid JSON parameter
Version 1.2.0
  • Added tracking for how many times each item was bought/sold/used
  • Added tracking for how many times each enemy has been defeated
  • Added tracking for how many times each actor has died
  • Fixed bug with some stats returning undefined in rare cases
  • Fixed bug with updated plugin in saved games
Version 1.3.0
  • Added scene to display tracked statistics
Version 1.3.1
  • Added [CGMZ] Window Backgrounds integration
  • Added custom space display option
Version 1.3.2
  • Added [CGMZ] Window Settings integration
Version 1.4.0
  • Added [CGMZ] Idle integration
  • Added [CGMZ] New Game Plus integration
  • Custom Variables should now show locale based separators

Back to Plugin