Items, Equipment & Loot — a complete inventory system for the Fyrox Rust game engine. 5 rarity tiers, 10 categories, stacking, equipment slots, and drag-and-drop UI.
Define items with name, description, icon path, rarity tier, category, weight, value, max stack size, and custom tags. Fully serde-serializable.
Common, Uncommon, Rare, Epic, and Legendary. Each tier has a distinct color for UI display and can drive loot table probabilities.
Misc, Weapon, Armor, Helmet, Shield, Boots, Accessory, Consumable, Material, and QuestItem. Categories control equipment slot validation.
Stack identical items up to a configurable max. Split stacks, merge partial stacks, and sort inventories by name, rarity, category, or value.
Create inventories with a fixed slot count. Full stacking, splitting, merging, and sorting operations. Query by item ID, category, or tag.
8 typed slots: MainHand, OffHand, Head, Body, Legs, Feet, and 2 Accessory slots. Category-validated equip/unequip with auto-swap.
Central item registry as a Fyrox resource. Load from RON files, look up items by ID. Shared across all inventory instances in the scene.
InventoryHolder script for entities that own an inventory. ItemPickup script for world items with interaction radius and auto-stack on pickup.
| Tier | Color |
|---|---|
| Common | Gray (#94a3b8) |
| Uncommon | Green (#22c55e) |
| Rare | Blue (#3b82f6) |
| Epic | Purple (#a855f7) |
| Legendary | Orange (#f97316) |
| Category | Equip Slot |
|---|---|
| Weapon | MainHand |
| Shield | OffHand |
| Helmet | Head |
| Armor | Body |
| Boots | Feet |
| Accessory | Accessory (x2) |
| Consumable | — |
| Material | — |
| QuestItem | — |
| Misc | — |
use fyrox_inventory::*;
// Define an item
let sword = ItemDefinition {
id: "iron_sword".into(),
name: "Iron Sword".into(),
description: "A sturdy blade forged from iron.".into(),
icon: "data/icons/iron_sword.png".into(),
rarity: Rarity::Uncommon,
category: Category::Weapon,
weight: 3.5,
value: 150,
max_stack: 1,
tags: vec!["melee".into(), "metal".into()],
};
// Register in the database
let mut db = ItemDatabase::new();
db.register(sword);
// Create an inventory (20 slots) and add items
let mut inventory = Inventory::new(20);
inventory.add_item("iron_sword", 1, &db); // add 1 sword
inventory.add_item("health_potion", 5, &db); // stackable
// Equip to a slot
let mut equipment = Equipment::new();
equipment.equip(EquipSlot::MainHand, "iron_sword", &mut inventory, &db);
// Sort by rarity (Legendary first)
inventory.sort_by_rarity(&db);
A complete item and equipment system plugin for the Fyrox Rust game engine. It handles item definitions, stacking, inventories, equipment slots, and world pickups. The Pro version adds a visual drag-and-drop UI and editor tools.
5 rarity tiers (Common, Uncommon, Rare, Epic, Legendary) and 10 item categories (Misc, Weapon, Armor, Helmet, Shield, Boots, Accessory, Consumable, Material, QuestItem). Custom tags provide additional filtering beyond categories.
Equipment provides 8 typed slots: MainHand, OffHand, Head, Body, Legs, Feet, and 2 Accessory slots. Items are validated by category before equipping. Swapping an occupied slot returns the previous item to the inventory automatically.
Yes. All types implement serde Serialize/Deserialize, so you can persist them with any format (JSON, RON, bincode, etc.). The Pro version includes fyrox-savegame integration examples with compression and encryption.
The ItemDatabase is a Fyrox resource loaded from .itemdb (RON) files. It serves as a central registry for all item definitions in your game. All inventory instances reference the same database, ensuring consistency.
Complete inventory, equipment, and loot — from definition to drag-and-drop UI.
Get Pro on itch.io GitHub (Free) All Plugins