Proto-driven item registry forbevy_items
Proto-driven item definitions for Bevy games — the itemdb.proto types behind a searchable ItemDb registry any game can load and query.
One proto, every game
itemdb.proto defines the shape and the kbve-proto crate supplies the Rust types; the docs/itemdb rows are baked into an encoded registry, published as /api/registry/itemdb.binpb, that ItemDb::from_bytes() decodes.
What it gives you
Features
Proto-driven schema
Item types come from the shared kbve-proto crate rather than a generated copy, so the crate cannot drift from the schema.
Searchable ItemDb resource
Query items by ref, ULID, type flags, or rarity; loads from encoded registry bytes, a decoded ItemRegistry, or JSON.
JSON loading
ItemDb::from_json() parses the /api/itemdb.json rows, handling string-to-enum conversion automatically.
Game-agnostic
The same registry serves rareicon, the DiscordSH bot, and bevy_dungeon; with default features off it runs without Bevy.
Optional inventory adapter
The inventory feature implements bevy_inventory's ItemKind for proto items, so Inventory slots stack by the registry's max_stack.
Profession registry
The profession module loads professiondb rows — categories, experience curves, and what each gathering node yields at a given level.
Get started
Usage
[dependencies]
bevy_items = { path = "crates/bevy_items" }Questions
Frequently asked
What does the bevy_items crate do?
It re-exports the shared itemdb.proto types from kbve-proto and wraps them in a searchable ItemDb Bevy resource, so any game can load the same item registry and query it by slug, ULID, type flags, or rarity.
Where do bevy_items item definitions come from?
Human-authored rows live in the docs/itemdb MDX collection and are baked into one encoded registry — kbve_registry::ITEMDB inside the workspace, https://kbve.com/api/registry/itemdb.binpb outside it — which ItemDb::from_bytes decodes. ItemDb::from_json still parses the /api/itemdb.json rows, converting strings to enums.
Is bevy_items tied to a specific game?
No. It is game-agnostic — rareicon, the DiscordSH bot, and bevy_dungeon load the same proto item registry, keeping item data consistent across the KBVE ecosystem.
Discuss on the forum
Questions, fixes and notes on this page live in the KBVE forum.