Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
A Storage
object allows to create a model of in-game storage implements its own features and receives database entry as content.
The storage resource by itself an entity of Entity Component System implemented with the Storages Service. When you load any StorageContainer
from Storages Database on scene via the service, you'll get an instance of Storage
bond with the container.
Such an instance will receive saved session data provided with the loaded data container.
The changes in the container will be automatically saved to the database as soon as the Storage
instance has been released via the service.
Simply it’s enough to have a single Storage
resource that will be a default container used all around the game, but normally you may need to implement custom features over the storages, like a lock, or ownership rights. For such cases you may need to create extra variants of base Starage
resource and extend they with special logic. More about in Features section.
Explore API:
To create a new Storage
resource you need to:
Storage
component or its derived variant over it.AStorageFeature
derived component to extend item's logic.Resources
folder to make it accessible to search.A storage interaction behavior can be extended from base one by adding of new components derived from the AStorageFeature
class over the object with defined Storage
component. The feature component will be automatically integrated within internal systems, you no need to make any manual assignments.
Explore API: Doloro.InvetorySystem.AStorageFeature
Storage
is a Dynamic Resource it can be extended with new features via distributing packages that allows to change gameplay dynamically via mods or etc.
Read more:
The package supplies you with several pre-implemented storage features those extends its behavior and features.
Feature | Purpose |
---|---|
StorageInfo | Implements extra properties over the storage like a Title, Description and Owner ID. Allows to personalize the storage among others. |
StorageLock | Adds ability to lock a storage on a key with defined signature. |
StorageItemsTagsFilter | Alows adding to the storage only items with tags mask passing defined patterns. Read more: Tags Tool. |
StorageContentSpawner | Defines storage content spawn policy. Provides API to manage the spawn process. |
StorageSlotsLimiter | Limits count of different resource containers that allowed to place within the same storage. |
StorageWeightLimiter | Implements concept of storage weigh and allows to limit upper bound. |
To create a new Storage Feature enough to create a new component class derived from the AStorageFeature
.
Then the instance of the component has to be added to the game object with Storage
component.
In common the feature class will follow the next pattern:
CrossSessionData
is an optional implementation. It’s not required in case the feature is uniform and has no difference from one Storage instance to other.
You also may find useful deriving the component from AMaskStorageFeature
instead of regular AStorageFeature
in case you has to prevent performing not permitted transactions between storages via the ref dinv_trasaction_service. Such feature will validate is the transaction passes defined rules that allows to block the order from execution.
The class derived from AMaskStorageFeature
has only one difference from previous pattern:
Inventory system implements list of controls and extension based on dui2 features.
Subject | Brief description |
---|---|
Storage GUI control | Base Storage inspector and following extension. |
Storages GUI Collections | Elements Collection extension controls. |
Storages Virtual Hub extension | Virtual UI Hub compatibility components. |