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

PGMZ - The Community-Driven Plugin Library for RPG Maker MZ

MZ plugins

Battle Record - BattleRecord.js

Plugin desc : Performance Plugin

License : MIT License

Author : Triacontane

Website : https://triacontane.blogspot.com

Desc page : https://github.com/triacontane/RPGMakerMV/tree/mz_master/BattleRecord.js

Download Page : https://raw.githubusercontent.com/munokura/triacontane-MZ-plugins/refs/heads/main/BattleRecord.js

File name : BattleRecord.js

Help of plugin :

@target MZ
@url https://github.com/triacontane/RPGMakerMV/tree/mz_master/BattleRecord.js
@plugindesc Performance Plugin
@author Triacontane
@license MIT License

@help
English Help Translator: munokura
This is an unofficial English translation of the plugin help,
created to support global RPG Maker users.
Feedback is welcome to improve translation quality
(see: https://github.com/munokura/triacontane-MZ-plugins ).
Original plugin by Triacontane.
Please check the latest official version at:
https://triacontane.blogspot.com
-----

BattleRecord.js

Records various battle information and makes it available at any time.
In addition to recording it as a battle record, it can also be incorporated
into the damage calculation formula for special skills.

The following data can be recorded for each actor:

- Number of uses per skill (counted only during battle; same for other items)
- Number of uses per skill type
- Total number of uses of all skills
- Number of uses per item
- Total number of uses of all items
- Number of eliminations per enemy character
- Total number of eliminations of all enemy characters
- Total damage dealt
- Maximum damage dealt
- Total damage received
- Maximum damage received
- Total damage healed
- Total MP consumed
- Total TP consumed
- Number of times KO’d

To obtain the values, call the corresponding script using the ”Script” option
in the ”Variable Operation” event command.

・Retrieving from the actor ID in the database
$gameActors.actor(1).getSkillUseCounter(2); # Number of times actor[1] has
used skill[2]
$gameActors.actor(1).getSkillTypeUseCounter(1)# Number of times actor[1] has
used skill type[1]
$gameActors.actor(1).getAllSkillUseCounter(); # Number of times actor[1] has
used all skills
$gameActors.actor(1).getItemUseCounter(3); # Number of times actor[1] has used
item[3]
$gameActors.actor(1).getAllItemUseCounter(); # Number of times actor[1] has
used all items
$gameActors.actor(1).getKillEnemyCounter(4); # Number of times actor[1] has
killed enemy character[4]
$gameActors.actor(1).getAllKillEnemyCounter();# Actor[1]’s total number of
enemy kills
$gameActors.actor(1).attackDamageMax; # Actor[1]’s maximum damage dealt
$gameActors.actor(1).attackDamageSum; # Actor[1]’s total damage dealt
$gameActors.actor(1).acceptDamageMax; # Actor[1]’s maximum damage taken
$gameActors.actor(1).acceptDamageSum; # Actor[1]’s total damage taken
$gameActors.actor(1).recoverDamageSum; # Actor[1]’s total damage recovered
$gameActors.actor(1).payCostMpSum; # Actor[1]’s total MP cost
$gameActors.actor(1).payCostTpSum; # Actor[1]’s total TP cost
$gameActors.actor(1).deadCounter; # Number of times actor[1] has been killed

- To get the value from the party order (0 being the first),
Replace $gameActors.actor(n) with $gameParty.members()[n] and execute.
(Example)
$gameParty.members()[0].attackDamageMax # Maximum damage dealt by the first
member

- To use in skill damage calculations,
Replace $gameActors.actor(n) with a (the performer) or b (the target).
(Example)
a.getSkillUseCounter(5) # Number of times the performer has used skill[5]
b.getKillEnemyCounter(6) # Number of times the target has killed enemy
characters[6]

- To get the total value for all actors,
Replace $gameActors.actor(n) with $gameActors and execute.
(Example)
$gameActors.getKillEnemyCounter(4); # Total number of enemy characters [4]
killed by all actors

- The following returns the maximum damage among all actors.
$gameActors.attackDamageMax; # Maximum damage dealt by all actors
$gameActors.acceptDamageMax; # Maximum damage taken by all actors

- To obtain battle statistics managed by each party
$gameParty.gainGoldSum; # Total gold earned
$gameParty.loseGoldSum; # Total gold consumed
$gameParty.getGainItemSum(1); # Total amount of item [1] earned
$gameParty.getGainWeaponSum(1); # Total amount of weapon [1] earned (excluding
initial equipment)
$gameParty.getGainArmorSum(1); # Total amount of armor [1] earned (excluding
initial equipment)

- To obtain trading history information
You can obtain trading history for each item.
By specifying the start ID and end ID, you can retrieve trading history within
that range.
If you do not specify the start ID and end ID, the total of all trading
history will be retrieved.

1. Purchase
# Total cumulative purchase price for items ID[1] through ID[3]
$gameParty.getItemBuyingRecord().getUseGoldSum(1, 3);

# Total cumulative purchase quantity for items ID[2] through ID[4]
$gameParty.getItemBuyingRecord().getAmountSum(2, 4);

# Total number of item purchases (bulk purchases are counted as one purchase)
$gameParty.getItemBuyingRecord().getTradeCount();

# Total cumulative purchase price for weapon ID[1]
$gameParty.getWeaponBuyingRecord().getUseGoldSum(1);

# Total cumulative purchase quantity for weapon ID[2]
$gameParty.getWeaponBuyingRecord().getAmountSum(2);

# Total number of weapon purchases (bulk purchases are counted as one purchase)
$gameParty.getWeaponBuyingRecord().getTradeCount();

# Total total purchase price of all armor
$gameParty.getArmorBuyingRecord().getUseGoldSum();

# Total number of armor purchases
$gameParty.getArmorBuyingRecord().getAmountSum();

# Total number of armor purchases (bulk purchases are counted as one purchase)
$gameParty.getArmorBuyingRecord().getTradeCount();

2. Selling
# Total total sales price of items ID[1] through ID[3]
$gameParty.getItemSellingRecord().getUseGoldSum(1, 3);

# Total total number of items sold ID[2] through ID[4]
$gameParty.getItemSellingRecord().getAmountSum(2, 4);

# Total number of times an item has been sold (bulk purchases are counted as one purchase)
$gameParty.getItemSellingRecord().getTradeCount();

# Total sale price of weapon ID [1]
$gameParty.getWeaponSellingRecord().getUseGoldSum(1);

# Total number of weapons sold with ID [2]
$gameParty.getWeaponSellingRecord().getAmountSum(2);

# Total number of times a weapon has been sold (bulk purchases are counted as one purchase)
$gameParty.getWeaponSellingRecord().getTradeCount();

# Total total sale price of all armor
$gameParty.getArmorSellingRecord().getUseGoldSum();

# Total number of armor pieces sold
$gameParty.getArmorSellingRecord().getAmountSum();

# Total number of armor sales (bulk purchases count as one sale)
$gameParty.getArmorSellingRecord().getTradeCount();

For more advanced use, combine this with the ”Dynamic Database Construction
Plugin” to incorporate battle records into the database values and create a
wider variety of equipment and skills.
The ”Dynamic Database Construction Plugin” is distributed by the same
distributor as this plugin.

- To clear (initialize) battle records

Actor-related items
$gameActors.actor(ActorID).clearBattleRecord();

Party-related items
$gameParty.clearRecord();

This plugin does not have any plugin commands.

Terms of Use:
You may modify and redistribute this plugin without permission, and there are
no restrictions on its use (commercial, R18, etc.).
This plugin is now yours.

スポンサードリンク

-MZ plugins

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