Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Shops

About

Sub module that extends dinv core features with in-game shops required API \ features and GUI controls.
With the module you can turn a storage to a shop with specific features.

Resources

To create a new shop, you have to create a regular Storage template resource and extend it with the ShopFeature component. The feature defines main shops parameters and makes it visible within the ShopsInspector window.

  1. Create a new game object on a scene.
  2. Add Storage component or its derived variant over it.
  3. Define resource signature that will allow to access the resource via Dynamic Resource Tools API.
    1. (Optional) Setup item tags related to resource categorization of resource using Tags Tool features.
  4. Add ShopFeature component to turn the Storage into a shop. Configure shop behavior parameters.
  5. Add custom AStorageFeature derived component to extend item's logic.
  6. Drag and drop the game object to any Resources folder to make it accessible to search.
  7. (Optional) Define asset bundle parameters in case you plan to distribute the resource via AssetBundle packages using Asset Bundles Tools features.

Explore API:

GUI

Windows

The package supplying you with several Window implementation to complex task solving.

Shops Inspector

Complex Window controller that tracks on scene loaded storages and provides access to via the GUI. Distinct storages pool on two groups:

  1. Inspecting person storages. Person defines by its abstract Guid
  2. Storages with defined Store feature component.

The window automatically tracks storages collection update.
The window automatically tracks storages' content update.

Explore API: Doloro.InvetorySystem.Modules.Shops.UI.Windows.ShopsInspector Explore Demo: Demo: Shops inspector


Transaction Order Inspector

Window controller that handles TransactionOrder content visualization and management.

  • Allows to manage item amount to transfer.
  • Handles order placement \ canceling along with attached GUI controls logic.
  • Visualizes Item icon, title, description.
  • Tracks order validation. Displays error massage in case order placement isn't possible.

Read also: Trasaction Service

Explore API:


Controls

The module extends regular controls with specified features. Following subjects provides you with a brief description of controls features.

You may find controls using examples in by the following path Doloro-Inventory-Shops \ Scenes.
You also may consider useful exploration of the Demo: Shops inspector that provides you with a complex solution build including entire stack of features.

GUI Element Description
ShopGUIElement Extended Storage GUI control that visualizes Storage in GUI as a store.
Example: using at the ShopsInspector stores catalog as collection element.
ExchangeBufferGUIElement GUI element that visualizes items for 2 storages along with currently placed transactions orders.

Can work in 3 modes:
- Raw: shows not formated storages content.
- Available: shows only items not reserved with placed transaction orders.
- Reserved: Shows items reserved in transactions between two selected storages.
InvalidOrderInfoGUIElement GUI control using in transaction UI as overlay in case
the system has no valid state and can't perform its features.
Shows an error message and recommendation toward issue solve.
TradingConsoleGUIElement GUI control that tracks summary of exchange buffer.
Visualizes states. Controls transaction order actions.
Handles high-end order permission logic.


Virtual Hub

The module supports Virtual UI Hub features.
That allows to relay shops GUI controls events cross dui2 hierarchy, including cross-windows messages.

Exchange Buffer UI Hub Listener

System handler that listens for selection messages shared with the TransferAgentCollectionDataConnector components within the Shops Inspector.

The listener works in a pair with an ExchangeBufferGUIElement and change its conent along with a Storage selected in collection managed with a TransferAgentCollectionDataConnector component.

Distinguishes 2 types of events:

  1. From player's storages. Forwards GUI update to from section of exchange buffer.
  2. From shops. Forwards GUI update to destination section of exchange buffer.

Examples of TransferAgentCollectionDataConnector usage:

  • Shops UI Shops Selection Explorer
  • Shops UI Player Storages Selection Explorer

Examples of ExchangeBufferGUIElement usage:

  • Exchange Buffer UI Available
  • Exchange Buffer UI Reserved