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"
        }
      ]
    }
  ]
}
TypeConditionRequireDefaultLimitationDescription
version2019-02-05Format version of master data
inventoryModelsList<InventoryModel>
simpleInventoryModelsList<SimpleInventoryModel>
bigInventoryModelsList<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.

TypeConditionRequireDefaultLimitationDescription
inventoryModelIdstring~ 1024 charsInventory model GRN
namestring~ 128 charsInventory Model Name
metadatastring~ 128 charsmetadata
initialCapacityint~ 2147483646Initial Capacity
maxCapacityint~ 2147483646Maximum Capacity
protectReferencedItembool?falseItem Sets with registered references cannot be deleted
itemModelsList<ItemModel>1 ~ 1000 itemsList 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.

TypeConditionRequireDefaultLimitationDescription
itemModelIdstring~ 1024 charsItem Model GRN
namestring~ 128 charsItem Model Name
metadatastring~ 128 charsmetadata
stackingLimitlong1 ~ 9223372036854775805Maximum stackable quantity
allowMultipleStacksboolAllow items to be stored in multiple slots when the maximum stackable quantity is exceeded?
sortValueint~ 2147483646Display 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.

TypeConditionRequireDefaultLimitationDescription
inventoryModelIdstring~ 1024 charsInventory model GRN
namestring~ 128 charsSimple Inventory Model Name
metadatastring~ 128 charsmetadata
simpleItemModelsList<SimpleItemModel>1 ~ 1000 itemsList 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.

TypeConditionRequireDefaultLimitationDescription
itemModelIdstring~ 1024 charsSimple Item Model GRN
namestring~ 128 charsSimple Item Model Name
metadatastring~ 128 charsmetadata

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.

TypeConditionRequireDefaultLimitationDescription
inventoryModelIdstring~ 1024 charsInventory model GRN
namestring~ 128 charsBig Inventory Model Name
metadatastring~ 128 charsmetadata
bigItemModelsList<BigItemModel>1 ~ 1000 itemsList 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.

TypeConditionRequireDefaultLimitationDescription
itemModelIdstring~ 1024 charsBig Item Model GRN
namestring~ 128 charsBig Item Model Name
metadatastring~ 128 charsmetadata

AcquireCount

TypeConditionRequireDefaultLimitationDescription
itemNamestring~ 128 charsSimple Item Model Name
countlong1 ~ 9223372036854775805Quantity to be obtained

ConsumeCount

TypeConditionRequireDefaultLimitationDescription
itemNamestring~ 128 charsSimple Item Model Name
countlong1 ~ 9223372036854775805Quantity to be consumed