Builder API Reference
This page collects the main builder methods, advanced item-instance notes, and item-specific best practices.
StorableItemDefinitionBuilder Methods
WithBasicInfo(id, name, description, category)- Sets core item propertiesWithStackLimit(limit)- Sets maximum stack size (1-999)WithIcon(sprite)- Sets the item iconWithPricing(basePrice, resellMultiplier)- Configures economic propertiesWithLegalStatus(status)- Sets legal or illegal statusWithEquippable(equippable)- Attaches an equippable componentWithStoredItem(prefab)- Assigns a customStoredItemprefabWithDemoAvailability(available)- Sets demo availabilityBuild()- Registers and returns the item
EquippableBuilder Methods
CreateBasicEquippable(name)- Creates a basic equippableCreateEquippable<T>(name)- Creates a typed equippable for customMonoBehaviourclassesCreateViewmodelEquippable(name)- Creates a viewmodel equippable with 3D model supportWithInteraction(canInteract, canPickup)- Configures interaction capabilitiesWithViewmodelTransform(position, rotation, scale)- Configures first-person transformWithAvatarEquippable(assetPath, hand, animationTrigger)- Configures third-person avatar behaviorWithUseCallback(callback)- Registers a callback when the item is usedBuild()- Finalizes and returns the equippable
Advanced: Custom Item Instances
For items with custom runtime state, such as extra fields that must serialize, you will need to:
- Create a custom
ItemInstanceclass inheriting from the game'sStorableItemInstance. - Create a custom
ItemDataclass for serialization. - Create a custom
ItemLoaderclass for deserialization. - Override
GetDefaultInstance()in your custom definition class.
Best Practices
- Register regular items after
Mainloads and runtime additives before save data loads when possible - Use callbacks for simple use behavior and custom equippable types for complex flows
- Load and register avatar prefabs before creating items that depend on them
- Always validate icon loading before attaching the sprite to the builder
- Test both Mono and Il2Cpp environments when changing item behavior