The Drop Table runtime lives in its own assembly so any feature (items, farming, quests, chest rewards, non-item effects) can use the same weighted-roll pattern without referencing the Inventory package.
CupkekGames.Data.DropTableCupkekGames.Data.DropTableLibrary/CupkekGamesSystems/Data.DropTable/Runtime/CupkekGames.InventorySystem references this assembly so inventory samples and games can keep one drop model everywhere.
A serializable list of entries: each row is a CatalogKey plus chance and min/max amount, plus Evaluate() that returns concrete DropResult rows (Key string + Amount).
The package does not interpret what the key means. Your game resolves DropResult.Key (and optional catalog id from authoring) to items, heals, currency, scripted events, and so on.
| Type | Role |
|---|---|
DropEntry | Key (CatalogKey), Chance (0–1), MinAmount / MaxAmount |
DropResult | Outcome: Key (CatalogKey), Amount |
DropTable | Implements IData; holds entries and evaluation |
DropTableSO | DataSO<DropTable> — create via Create Asset → CupkekGames/Data/Drop Table |
DropEntry no longer carries an inventory-only inspector constraint; if you want a picker limited to the item catalog, subclass or wrap DropEntry and apply CatalogKeyConstraint on your field.
Evaluate behaviorTwo overloads share the same pipeline:
Evaluate(..., Func<DropEntry, float> chanceModifier) — per-entry chance override; delegates to the full modifier with amountAddition: 0.Evaluate(..., Func<DropEntry, (float chance, int amountAddition)> modifier) — full control:
modifier is null: effective chance = entry.Chance * chanceMultiplier (then clamped to 0–1).modifier is non-null: returned chance is the final effective chance (chanceMultiplier is not applied again). Amount range uses amountAddition on both min and max, then clamps so min ≥ 1 and max ≥ min.Other rules:
Key are skipped.minimumDrops: if not enough entries pass the roll, remaining slots are filled from failed entries in descending effective chance (using the same chance values as above, including modifier).limit: caps how many results are returned. If minimumDrops > limit, the limit is raised to minimumDrops so you never return fewer than the minimum.DropTable is an IData type used inside DropTableSO, so you get the same default vs actual and JSON tooling patterns as other data-backed assets where your serializer stack supports them.
InventorySystem drop typesIf you still have code or docs pointing at CupkekGames.InventorySystem for drop types:
using CupkekGames.Data.DropTable.DropEntry.ItemKey → DropEntry.Key, DropResult.ItemKey → DropResult.Key (a CatalogKey; use result.Key.Key where you previously used a string id).DropEntry uses [FormerlySerializedAs("ItemKey")] on Key so existing YAML migrates on load in Unity.CupkekGames.Data.DropTable in your asmdef when you reference these types from another assembly.Settings
Theme
Light
Contrast
Material
Dark
Dim
Material Dark
System
Sidebar(Light & Contrast only)
Font Family
DM Sans
Wix
Inclusive Sans
AR One Sans
Direction