Loot

Project: Loot

Type of work: Plugin

Date: 2022

Link: Loot on asset store and Documentation

Overview

This plugin begins as a solution to control drops on a custom RPG project and then grows into a plugin later on. The main focus here is to allow users to have more control over their dropping tables adding custom hooks as modifiers and filters to change the percentage of the drop in runtime and also a debugging window to allow us to see the current table state. Below you can see an overview of the features that I’ve made but you can take a deeper look at it on store page OR documentation.

  • Debugger tool (2020+): A window that allows you to follow the current state of each drop from your tables and runtime tables in real-time.
  • Modifiers: Customize your drop values (percentage, amount range, and so on) properties on the fly based on your game state.
  • Filter: Custom rules that allow you to filter your drop list based on single or multiple conditions.
  • Custom drop: You can use custom unique rules for the same table in different parts of your code. e.g. Normally drop from this chest table using these X rules, but when opening the chest through this secret switch drop just items rare or above.
  • Runtime table: Clone the table with all characteristics from the original. It’s useful when we want to add temporary rules to some table or make some destructive operation.
  • Simple/Weighted: A simple way to change between a simple and weighted table. Their individual percentage is based on the sum of weights, you will get only one item per request.
  • Extension drop: Does your drop design follow some kind of hierarchy? Maybe all wolves drop a fur, and you want the changes on the common wolf table to reverberate through more specialized tables, just toggle the "Extension drop" in the drop option inside your table and it will be treated as an extension.
  • Custom enumerator: You can change the view of your current table by altering a bit-mask parameter of the custom enumerator or can use some of our pre-made enumerators, you can read further here.
  • Save/Load runtime table: Loot will provide you a ready-to serialize data with the necessary information to load your table when necessary.
  • Integrate with LINQ: Both main classes, Drop table and their drop request result Bag, implement IEnumerable and IEnumerable respectively, which means that it can be used as a LINQ query.
  • Guaranteed drops: Toggled items will always drop.
  • Hidden drop: Toggled items will be locked by default (can’t be dropped) and should be unlocked by some condition ruled set by the user.
  • Variable amount: You can set a minimum and maximum amount range that will collapse when you request a drop.