โ๏ธ ZionRPG
RPG Framework ยท RPGFramework Namespace ยท Unity 6
Economy & Shops โ Phase 8
The economy system provides a full vendor/shop pipeline with ScriptableObject-based shop definitions and a Unity Editor inspector tool.
Core Classes
ShopDefinition ScriptableObject
Defines the items available in a shop. Create via Assets โ Create โ RPGFramework โ Shop Definition.
| Field | Type | Description |
|---|---|---|
shopName | string | Display name shown in the ShopUI |
items | List<ShopItem> | Items available for purchase |
currencyType | CurrencyType | Gold, Gems, or custom enum value |
ShopController MonoBehaviour
Runtime controller. Attach to the vendor GameObject alongside a VendorNPC.
Usage
// Open the shop from an interaction trigger
shopController.OpenShop(playerInventory);
VendorNPC MonoBehaviour
Handles NPC interaction detection and delegates to ShopController.
VendorNPCEditor Editor Tool
Custom Unity Editor inspector for VendorNPC. Provides shop preview and quick-assign buttons for ShopDefinition assets.