Documentation
Quick InfoVersion: Beta
Made for RPG Maker MZ 1.9.0
Drop Table ChancesThe chances of your drop table along with the Nothing Chance parameter should add up to 100% exactly. This plugin supports up to 2 decimal places for the drop chance of a specific item. If the percentages do not add up to 100%, weird behavior may be experienced such as some items not dropping at all or a nothing drop being more common than expected.
Drop Table ItemsEach drop table item parameter should only have 1 of the possible drop types: item, weapon, armor, gold, drop table. If you want a drop table to have 1 of each type (item, weapon, armor, gold), make 4 different drops for each individual item rather than 1 drop item with all 4 drops.
Amount and VarianceThe amount parameter determines the base amount to drop (min 1). The variance parameter will add a random number between 0 and the parameter which is then added to the base amount. If you want 5-7 of an item to drop, you would set the Amount to 5 and the Variance to 2.
Drop Text ParamThe toString parameter for a drop is what will be output to the message window when the object drops. When another drop table drops, the toString of the drop table object will be ignored, and the toString of the dropped item will be used in its place.
This param supports some special text codes:
- %amt - Will be replaced by the amount that dropped
- %name - Will be replaced by the item/armor/weapon/currency name
- %icon - Will be replaced by the item/wep/armor/currency icon
- %cunit - Will be replaced by the currency unit
- %ccolor - Will be replaced by the currency color (CGMZ CurrencySystem only)
Notetagshis plugin supports the following notetags:
In the enemy notebox:
<cgmzdroptable:id>
For example, if you had a drop table with id "potions" then your note tag would look like:
<cgmzdroptable:potions>
You can also chain ids together with commas separating them. If you wanted two drops from the potions table, you could make the notetag:
<cgmzdroptable:potions,potions>
VariablesThe type variable will be set to one of the following numbers when a drop is generated:
0 = Nothing dropped
1 = Item dropped
2 = Weapon dropped
3 = Armor dropped
4 = Gold dropped (or [CGMZ] Custom Currency)
The amount variable will be set to the amount that dropped.
The ID variable will be set to the item/weapon/armor id. If gold, it will be set to a string that is the currency id (if using [CGMZ] Currency System) and will be set to 0 when nothing drops. You can compare strings by using script: $gameVariables.value(1) === 'myString';
IntegrationsThis plugin has special functions when used with other CGMZ Plugins:
[CGMZ] Currency System
A drop table can drop Currency System currencies. Use the currency ID param to have the drop table drop currency with the ID from the currency system.
[CGMZ] Toast Manager
Can display the drop message as a toast instead of adding to the game message window.
FAQQ: I added 5 items with 25% chance to drop each but I only ever get the first four in the drop table?
A: The first 4 items add up to 100%, so the 5th item will never be possible to drop. If you want each item to have an equal chance and have 5 items, set to 20% chance each.
Plugin CommandsThis plugin supports the following plugin commands:
Generate Drop - Generates an item from specified drop table.
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_DropTables.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 support for [CGMZ] Currency System currencies in enemy battle drops
- Now warn instead of crash when invalid json detected
- Converted cgmzTemp to CGMZ_Utils functions
- Added [CGMZ] Toast Manager integration for drop messages
- Added option to not show game message window for drops
- Added variable parameters for drop type, id, and amount
- Added toast override for plugin command
- Updated toast integration