dingk

Long-time Lurker
Member
Joined
Jul 3, 2018
Messages
20
Reaction score
21
First Language
English
Primarily Uses
RMMV
Loot Tables v1.0.1
Author: dingk
RMMV version 1.6.2
Launched April 29, 2020
Updated July 5, 2021


Download

Itch.io Link
-or-
Raw Source (Right-click > Save As...):


Introduction

Do you need your enemies to drop more loot or change how the game drops items?

This plugin adds a randomized tier-based loot drop mechanic to your game. You can customize loot tables in the plugin manager and set up various item pools. You can assign these loot tables to enemies or use plugin commands on the map.

Loot tables consist of different item pools, which are assigned different weights. A pool with a higher weight has a higher chance of being selected. A selected item pool will drop a random item that has been assigned to it.

Notetags

In the notetags below, the keywords Item/Drop/Loot are interchangeable. For example, you can use <Item Table>, <Drop Table>, or <Loot Table>.

Item, Weapon, and Armor Notetags

Code:
<Loot Pool: name>
  • Put this item in the specified item pool.
  • Replace name with the name of the item pool.
Actor, Class, Weapon, Armor, and State Notetags

Code:
<name Weight: +n>
<name Weight: -n>
<name Weight: *n>
  • Adjust the weight at which an item pool is selected.
  • Replace name with the name of the item pool.
  • Replace n with a number (can be floating point).
Enemy Notetags

Code:
<Loot Table [rate]: name[, name, name, ...]>
  • Assign one or more loot tables in a comma-separated list to this enemy.
  • Replace name with the name of the loot table.
  • [Optional] Replace rate with a decimal or percent value to determine the probability this table will drop items.
Code:
<Loot Table [rate]>
name
name: weight
name x[amount]: weight
name x[minAmount]-[maxAmount]: weight
...
</Loot Table>
  • Create a local loot table for this enemy.
  • Replace the following variables:
    • [Optional] rate : The probability this table will drop items. Default is 100%. Replace with a decimal or percent value.
    • name : Name of the item or item pool. For items, you can use the names of the items or use Item [id], Weapon [id], or Armor [id], replacing [id] with the item ID.
    • weight : Weight of the item or item pool. Default is 1.
    • [amount] : Number of items to drop. Default is 1.
    • [minAmount]-[maxAmount] : Random range of the items to drop (inclusive).
Example:
Code:
<Loot Table 75%>
Item 3
Potion x2: 5
Common: 5
Common x3-5: 4
Rare: 1
</Loot Table>
  • There is a 75% chance that this enemy will drop an item with an ID of 3, two Potions, a random Common item, three to five random Common items (all same), or a random Rare item.
  • The total weight adds up to 16, so the Rare item has a 1/16 chance to drop, whereas the two Potions have a 5/16 chance.
Plugin Commands

In the plugin commands below, the keywords Item/Drop/Loot are interchangeable. Customize the message displayed in the plugin manager.

Code:
GiveLootPool name [minAmount] [maxAmount]
  • Give the player an item from this item pool. Replace name with the name of the item pool.
  • [Optional] Replace [minAmount] and [maxAmount] with the amount to give to the player. Default is 1.
Code:
GiveLootTable name
  • Give the player an item from this loot table. Replace name with the name of the loot table.
Code:
EnableLootMessage
DisableLootMessage
  • Toggle the message displayed after using the commands above on or off.
  • This setting is saved globally.
Code:
SingleLootMessageFormat string
MultipleLootMessageFormat string
  • Change the message format. Replace string with the new format.
    %1 - Icon, %2 - Name, %3 - Count
  • This setting is saved globally.
Code:
ResetLootMessage
  • Reset all loot message settings to default.
Compatibility
  • No issues found.
Terms of Use
  • Free and commercial use and redistribution (under MIT License).
1.0.1 (2021-07-05) - Compatibility patch for Moghunter's Treasure Popup
1.0.0 (2020-04-29) - Initial release
 
Last edited:

ShenNung

Manchine
Member
Joined
Sep 1, 2018
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Great plugin, much easier to use than the one I was previously using. Works well for most of my needs, except I'm wondering if there's a script call or some way to extract the gold value of a picked item. I need to sum the total gold as I award xp based off gems and jewelry in addition to the regular slaying of monsies.
 

dingk

Long-time Lurker
Member
Joined
Jul 3, 2018
Messages
20
Reaction score
21
First Language
English
Primarily Uses
RMMV
Great plugin, much easier to use than the one I was previously using. Works well for most of my needs, except I'm wondering if there's a script call or some way to extract the gold value of a picked item. I need to sum the total gold as I award xp based off gems and jewelry in addition to the regular slaying of monsies.
Sorry for the late reply.

There is no script call, but maybe this will work for you. Basically, it just adds the price of each item you get in battle to the EXP gains. Open the plugin in notepad or similar and copy/paste at the bottom.
JavaScript:
let dingk_Loot_BM_makeRewards = BattleManager.makeRewards;
BattleManager.makeRewards = function() {
    dingk_Loot_BM_makeRewards.call(this);
    for (let item of this._rewards.items) {
        this._rewards.exp += item.price;
    }
};
 

ShenNung

Manchine
Member
Joined
Sep 1, 2018
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Late reply? Oh pshaw, it's only been a day or so. There's always something else to work on in MV whilst waiting.

Unfortunately, this will not work as I don't reward xp for most loot, just gems/jewelry. Plus, I mostly need it for outside of combat for chests and whatnot. It's not a huge deal, I can use the default system in MV to do this, it'll just be less elegant.
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
476
Reaction score
310
First Language
English
Primarily Uses
RMMV
Gonna watch this thread. So glad I found this though. Not sure if I will replace Aesica Loot plugin with this one. Haven't even had time to really update. LMAO

Anyway, nice plugin. :)
 

FAWKS

Veteran
Veteran
Joined
Aug 29, 2013
Messages
32
Reaction score
51
First Language
English
Primarily Uses
RMMZ
Does this happen to work for MZ as well?
 

dingk

Long-time Lurker
Member
Joined
Jul 3, 2018
Messages
20
Reaction score
21
First Language
English
Primarily Uses
RMMV
Does this happen to work for MZ as well?
Sorry, I don't know. I haven't touched RPG Maker for a long time nor have I tried MZ.
 

Latest Threads

Latest Profile Posts

ScreenShot_11_27_2022_10_0_8.png
finally finished all the sprites for my friend's Comic book OC that I put in my game.
1669612924226.png
Added collectible trading cards to my current game, bio-Synthetica.
I plan to have a total of 20 different BATTLE-bot cards you can find & collect.
100 likes.jpg

I reached 100 followers on my new twitter! It's not much but it's honest work

Forum statistics

Threads
126,896
Messages
1,182,157
Members
166,694
Latest member
Roze_
Top