Skip to content

📦 Data

Defines the item model, authorable assets, and runtime value types used throughout the Inventory system.


🎯 Purpose

Provide the canonical data layer for inventory items, stacks, and container sizing.


🧩 What Lives Here

  • ItemDefinition → authorable ScriptableObject describing an item
  • ItemDatabase → lookup registry for item definitions
  • ItemStack → runtime value representing item quantities
  • ItemMetaEntry → key/value metadata entry on a stack
  • ContainerSizePolicy → authorable defaults for container sizes

⚠️ Important Notes

  • These types define data and value semantics only
  • They do not implement container or slot behaviour
  • They are shared across all inventory subsystems

🧠 Usage Guidance

ItemDefinition

Represents a single item as a ScriptableObject.

Includes:

  • identifiers (guid)
  • presentation data (name, icon, description)
  • stack limits and categorisation

Normalised fields are provided for consistent comparisons.


ItemDatabase

Provides lookup of item definitions by GUID.

  • lookups are case-insensitive
  • invalid or duplicate GUIDs are handled during registration

May include an optional placeholder for missing items.


ItemStack

Runtime value representing a quantity of an item.

Provides:

  • quantity tracking
  • stack capacity checks
  • cloning and mutation helpers

Metadata is stored as key/value entries.

Stack limits are enforced by containers, not by the value type itself.


ContainerSizePolicy

Defines initial container sizes by container name.

Applied when containers are created by the inventory service.


🚫 Not for Production Use

This folder does not:

  • Define container implementations
  • Define slot structures
  • Enforce authority or mutation rules
  • Perform service orchestration
  • Handle persistence pipelines