Fyrox Inventory

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.

Fyrox 1.0+ Rust 1.87+ MIT (Free) 5 Rarity Tiers 10 Categories 8 Equipment Slots
Get Pro on itch.io GitHub (Free)

Core Features

📦

ItemDefinition

Define items with name, description, icon path, rarity tier, category, weight, value, max stack size, and custom tags. Fully serde-serializable.

🎨

5 Rarity Tiers

Common, Uncommon, Rare, Epic, and Legendary. Each tier has a distinct color for UI display and can drive loot table probabilities.

🏷️

10 Categories

Misc, Weapon, Armor, Helmet, Shield, Boots, Accessory, Consumable, Material, and QuestItem. Categories control equipment slot validation.

📚

ItemStack

Stack identical items up to a configurable max. Split stacks, merge partial stacks, and sort inventories by name, rarity, category, or value.

🎒

Fixed-Size Inventory

Create inventories with a fixed slot count. Full stacking, splitting, merging, and sorting operations. Query by item ID, category, or tag.

⚔️

Equipment System

8 typed slots: MainHand, OffHand, Head, Body, Legs, Feet, and 2 Accessory slots. Category-validated equip/unequip with auto-swap.

🗃️

ItemDatabase (.itemdb)

Central item registry as a Fyrox resource. Load from RON files, look up items by ID. Shared across all inventory instances in the scene.

🎮

Scripts

InventoryHolder script for entities that own an inventory. ItemPickup script for world items with interaction radius and auto-stack on pickup.

Rarity Tiers & Categories

Rarity Tiers

TierColor
CommonGray (#94a3b8)
UncommonGreen (#22c55e)
RareBlue (#3b82f6)
EpicPurple (#a855f7)
LegendaryOrange (#f97316)

Item Categories

CategoryEquip Slot
WeaponMainHand
ShieldOffHand
HelmetHead
ArmorBody
BootsFeet
AccessoryAccessory (x2)
Consumable
Material
QuestItem
Misc

Free vs Pro

Free MIT

  • ItemDefinition (name, description, icon, rarity, category, weight, value, tags)
  • ItemStack with configurable max size
  • Fixed-size inventory with stacking, splitting, merging, sorting
  • Equipment system (8 slots with category validation)
  • ItemDatabase resource (.itemdb files)
  • InventoryHolder script
  • ItemPickup script with auto-stack
  • Full serde serialization

Pro Paid

  • Everything in Free
  • Drag & drop inventory UI
  • ItemSlot widget with rarity-colored borders
  • InventoryPanel grid layout
  • Item tooltip with rarity colors and stats
  • ItemDatabase editor GUI (add/edit/remove items visually)
  • fyrox-savegame integration examples
  • Priority support

Quick Start Example

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);

FAQ

What is Fyrox Inventory?

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.

How many rarity tiers and categories are there?

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.

How does the equipment system work?

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.

Can I save and load inventory data?

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.

What is the .itemdb resource?

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.

Build your item system in minutes

Complete inventory, equipment, and loot — from definition to drag-and-drop UI.

Get Pro on itch.io GitHub (Free) All Plugins