Custom Loot Pools
A downloadable tool
Custom Loot Pools
This plugin allows for the creation of custom loot pools for your items, weapons and armor*, through the use of custom notetags. You can then award the player a random element from a given pool. You can also award multiple random elements from a given pool.
*From this point on, any reference made to 'item/s' also refers to weapons and armors, unless otherwise stated.
The loot pools can also be added as enemy drops, enhancing the loot distribution process even further.
Plugin Parameters
This plugin has no plugin parameters, it is entirely set up through notetags.
What are Loot Pools?
A loot pool is a collection of items that share a common custom notetag. These notetags allow the developer to award a random item from the pool using a script call or by adding the loot pools to an enemy's drops. Add an item to a loot pool using the following notetag format:
Let's take a look at an example to see how this works:
In the above image, we see one of the note field of a the first default database item.
This adds the item to a custom loot pool name 'potions'
This is all that is necessary to create a custom loot pool. You can then use the following script call to award a random element from your newly created pool:
ThreeSixNine.CLP.gainRandomLoot('lootPool', X);
- Replace "lootPool" with the name of the loot pool you wish to draw from.
- Quotation marks ARE required around the loot pool name.
- Replace "X" with the quantity of that item to drop.
- A default quantity of 1 will be used if no quantity is provided.
So, with everything we have right now, if we used the following script call:
ThreeSixNine.CLP.gainRandomLoot('potions');
It would award the player with 1 potions. Since there is only one item in the loot pool, it would be the same each time you called the script.
If we repeat the same process of adding our custom notetag to the next item in the database, we begin to see what this plugin is capable of.
If we then us the same script call:
ThreeSixNine.CLP.gainRandomLoot('potions');
We again award the player 1 item from the potions loot pool, but now it could be either item with the 'potions' loot pool notetag.
You can also use the script call:
ThreeSixNine.CLP.gainRandomLootMulti('lootPool', X);
To award a random set of items from the supplied Loot Pool. If no quantity in provided, the default quantity of 2 will be used. This allows you to award multiple random items from a given loot pool with one script call.
A few notes about creating the Loot Pool notetags:
- Loot pool names will be converted entirely to lowercase format. This means that variations in capitalization only will be treated as the same loot pool.
For example:
And
Would add the item to the same pool, name 'potions'. This is to help minimize confusion and possible errors when setting up the notetags.
- You CAN use spaces, numbers and special characters when creating loot pools.
- You CAN add more than one loot pool to an item
Enemy Drops
You can add loot pools to enemy drops. When added to enemy drops, the loot pools work similarly to the script call. Upon defeat an enemy with a loot pool attached as a drop, will have a chance to drop a random item from the attached loot pool.
Add a loot pool to an enemy drop using the following notetag format:
- Replace lootPool with the name of a custom loot pool attached to your items.
- Replace X% with the percent chance to call the random drop upon defeat.
Example:
A few notes about creating the Loot Drop notetags:
- The percent chance must be provided, there is no default chance provided.
- You can add multiple instances of the same pool
- Each instance will be treated as it's own possible drop.
- You can bypass the editor limit on drops this way
Status | Released |
Category | Tool |
Author | ThreeSixNine |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.