Master Data Reference of GS2-Inventory
{
"version": "2019-02-05",
"inventoryModels": [
{
"name": "[string]Inventory Model Name",
"metadata": "[string?]metadata",
"initialCapacity": "[int]Initial Capacity",
"maxCapacity": "[int]Maximum Capacity",
"protectReferencedItem": "[bool?]Item Sets with registered references cannot be deleted",
"itemModels": [
{
"itemModelId": "[string]Item Model GRN",
"name": "[string]Item Model Name",
"metadata": "[string?]metadata",
"stackingLimit": "[long]Maximum stackable quantity",
"allowMultipleStacks": "[bool]Allow items to be stored in multiple slots when the maximum stackable quantity is exceeded?",
"sortValue": "[int]Display order"
}
]
}
],
"simpleInventoryModels": [
{
"name": "[string]Simple Inventory Model Name",
"metadata": "[string?]metadata",
"simpleItemModels": [
{
"itemModelId": "[string]Simple Item Model GRN",
"name": "[string]Simple Item Model Name",
"metadata": "[string?]metadata"
}
]
}
],
"bigInventoryModels": [
{
"name": "[string]Big Inventory Model Name",
"metadata": "[string?]metadata",
"bigItemModels": [
{
"itemModelId": "[string]Big Item Model GRN",
"name": "[string]Big Item Model Name",
"metadata": "[string?]metadata"
}
]
}
]
}
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
version | ✓ | 2019-02-05 | Format version of master data | |||
inventoryModels | List<InventoryModel> | |||||
simpleInventoryModels | List<SimpleInventoryModel> | |||||
bigInventoryModels | List<BigInventoryModel> |
InventoryModel
Inventory Model
Inventory is like a bag that stores items owned by game players. Inventory can have a set capacity and cannot be owned beyond its capacity.
The inventory capacity can be expanded. It can be set to reward stamp sheets, so any method of expansion is acceptable as long as the stamp sheets can be used to grant rewards.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
inventoryModelId | string | ✓ | ~ 1024 chars | Inventory model GRN | ||
name | string | ✓ | ~ 128 chars | Inventory Model Name | ||
metadata | string | ~ 128 chars | metadata | |||
initialCapacity | int | ✓ | ~ 2147483646 | Initial Capacity | ||
maxCapacity | int | ✓ | ~ 2147483646 | Maximum Capacity | ||
protectReferencedItem | bool? | false | Item Sets with registered references cannot be deleted | |||
itemModels | List<ItemModel> | ✓ | 1 ~ 1000 items | List of item models that can be stored in inventory |
ItemModel
Item Model
Multiple items can be owned for one capacity of inventory, such as potions x 99
.
Multiple items owned in one capacity are stacked items
. The maximum number of items that can be stacked can be specified for each item.
When the maximum stackable quantity is reached, you can set for each item whether you can reserve a new inventory capacity and own it, or whether it will no longer be available.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
itemModelId | string | ✓ | ~ 1024 chars | Item Model GRN | ||
name | string | ✓ | ~ 128 chars | Item Model Name | ||
metadata | string | ~ 128 chars | metadata | |||
stackingLimit | long | ✓ | 1 ~ 9223372036854775805 | Maximum stackable quantity | ||
allowMultipleStacks | bool | ✓ | Allow items to be stored in multiple slots when the maximum stackable quantity is exceeded? | |||
sortValue | int | ✓ | ~ 2147483646 | Display order |
SimpleInventoryModel
Simple Inventory Model
In a normal InventoryModel, you could limit the amount of items that could be stored in your inventory. Simple Inventory, however, has no such functionality and simply stores the number of items in the inventory.
However, the Simple Inventory provides an API that can increase or decrease the number of items in a single process.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
inventoryModelId | string | ✓ | ~ 1024 chars | Inventory model GRN | ||
name | string | ✓ | ~ 128 chars | Simple Inventory Model Name | ||
metadata | string | ~ 128 chars | metadata | |||
simpleItemModels | List<SimpleItemModel> | ✓ | 1 ~ 1000 items | List of simple item models that can be stored in inventory |
SimpleItemModel
Simple ItemModel
In the normal ItemModel, it is possible to set the maximum number of items that can be stacked, and if the number exceeds a certain number, it can be implemented to divide the items into multiple stacks. However, SimpleItem does not have such a function and simply stores the number of items in the possession of the item.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
itemModelId | string | ✓ | ~ 1024 chars | Simple Item Model GRN | ||
name | string | ✓ | ~ 128 chars | Simple Item Model Name | ||
metadata | string | ~ 128 chars | metadata |
BigInventoryModel
Big Inventory model
In the normal InventoryModel and SimpleInventoryModel, the number of items that can be stored in the inventory is limited to the range of 64bit integer values. In inflationary games, you may need a wider range of values.
In the Big Inventory Model, the number of items that can be stored in the inventory can have an integer value of 1024 digits.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
inventoryModelId | string | ✓ | ~ 1024 chars | Inventory model GRN | ||
name | string | ✓ | ~ 128 chars | Big Inventory Model Name | ||
metadata | string | ~ 128 chars | metadata | |||
bigItemModels | List<BigItemModel> | ✓ | 1 ~ 1000 items | List of big item models that can be stored in inventory |
BigItemModel
Big ItemModel
In the normal ItemModel, it is possible to set the maximum number of items that can be stacked, and if the number exceeds a certain number, it can be implemented to divide the items into multiple stacks. However, BigItem does not have such a function and simply stores the number of items in the possession of the item.
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
itemModelId | string | ✓ | ~ 1024 chars | Big Item Model GRN | ||
name | string | ✓ | ~ 128 chars | Big Item Model Name | ||
metadata | string | ~ 128 chars | metadata |
AcquireCount
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
itemName | string | ✓ | ~ 128 chars | Simple Item Model Name | ||
count | long | ✓ | 1 ~ 9223372036854775805 | Quantity to be obtained |
ConsumeCount
Type | Condition | Require | Default | Limitation | Description | |
---|---|---|---|---|---|---|
itemName | string | ✓ | ~ 128 chars | Simple Item Model Name | ||
count | long | ✓ | 1 ~ 9223372036854775805 | Quantity to be consumed |