GS2-Inventory Buff リファレンス
Note
バフエントリーモデルの詳細については BuffEntryModel をご参照ください。Model
バフを適用可能なモデルの種類
Gs2Inventory:Inventory
インベントリ
バフの適用対象フィールド
currentInventoryMaxCapacity
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| currentInventoryMaxCapacity | int | ✓ | 1 ~ 2147483646 | 最大キャパシティ このユーザーが使用可能なインベントリ枠の現在の最大数です。インベントリモデルのinitialCapacityから初期化され、入手アクションまたは直接のAPI呼び出しを通じてモデルのmaxCapacityまで拡張できます。 |
マスターデータ記述例
rate には、対象フィールドに対する補正レートを指定します。
"targetModel": {
"targetModelName": "Gs2Inventory:Inventory",
"targetFieldName": "currentInventoryMaxCapacity",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:InventoryModel
インベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:InventoryModel",
"targetGrn": "grn:gs2:any:any:inventory:{namespaceName}:model:{inventoryName}"
}
]Action
バフを適用可能なアクションの種類
Gs2Inventory:AcquireItemSetByUserId
ユーザーIDを指定してアイテムセットを入手
ユーザーのインベントリにアイテムを追加します。既存のアイテムセットに空き(スタック制限未満)がある場合はそこに追加され、そうでない場合は複数スタックが許可されていれば新しいアイテムセットが作成されます。
オプションの expiresAt で、新しく作成されるアイテムセットの有効期限を設定できます。有効期限が既に過去のアイテムは空として扱われます。
createNewItemSet が true の場合、既存のセットに空きがあっても常に新しいアイテムセットが作成されます。
合計数量がインベントリ容量を超える場合、オーバーフロー数量が返され、ネームスペースの設定に応じてオーバーフロー分が GS2-Inbox に転送される場合があります。
バフの適用対象フィールド
acquireCount
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| acquireCount | long | ✓ | 1 ~ 9223372036854775805 | 入手する量 |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:AcquireItemSetByUserId",
"targetFieldName": "acquireCount",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:InventoryModel
インベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:InventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:model:{inventoryName}"
}
]Gs2Inventory:ItemModel
アイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:ItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:model:{inventoryName}:item:{itemName}"
}
]Gs2Inventory:ConsumeItemSet
アイテムセットを消費
リクエストユーザーのインベントリ内の指定されたアイテムの数量を減少させます。
itemSetName を指定すると、その特定のスタックのみが消費対象になります。指定しない場合、そのアイテムタイプのすべてのスタックから消費されます。
アイテムセットの数量がゼロになると、自動的に削除されます。
要求された量を消費するのに十分なアイテムがない場合、Insufficient エラーが返されます。
バフの適用対象フィールド
consumeCount
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| consumeCount | long | ✓ | 1 ~ 9223372036854775805 | 消費する量 |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:ConsumeItemSet",
"targetFieldName": "consumeCount",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:InventoryModel
インベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:InventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:model:{inventoryName}"
}
]Gs2Inventory:ItemModel
アイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:ItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:model:{inventoryName}:item:{itemName}"
}
]Gs2Inventory:ConsumeItemSetByUserId
ユーザーIDを指定してアイテムセットを消費
指定されたユーザーのインベントリ内の特定アイテムの数量を減少させます。
itemSetName を指定すると、その特定のスタックのみが消費対象になります。指定しない場合、そのアイテムタイプのすべてのスタックから消費されます。
アイテムセットの数量がゼロになると、自動的に削除されます。
十分なアイテムがない場合、Insufficient エラーが返されます。
バフの適用対象フィールド
consumeCount
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| consumeCount | long | ✓ | 1 ~ 9223372036854775805 | 消費する量 |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:ConsumeItemSetByUserId",
"targetFieldName": "consumeCount",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:InventoryModel
インベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:InventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:model:{inventoryName}"
}
]Gs2Inventory:ItemModel
アイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:ItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:model:{inventoryName}:item:{itemName}"
}
]Gs2Inventory:AcquireSimpleItemsByUserId
ユーザーIDを指定してシンプルアイテムを入手
入手数量のバッチを使用して、ユーザーのシンプルインベントリにアイテムを追加します。
単一のアトミック操作で複数のアイテムを入手できます。acquireCounts 配列で各アイテムの名前と数量を指定します。
通常のアイテムセットとは異なり、シンプルアイテムには容量制限、スタック制限、有効期限がありません。
バフの適用対象フィールド
acquireCounts
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| acquireCounts | List<AcquireCount> | ✓ | 1 ~ 100 items | シンプルアイテムの入手数量リスト |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:AcquireSimpleItemsByUserId",
"targetFieldName": "acquireCounts",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:SimpleInventoryModel
シンプルインベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:SimpleInventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:simple:model:{inventoryName}"
}
]Gs2Inventory:SimpleItemModel
シンプルアイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:SimpleItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:simple:model:{inventoryName}:item:{itemName}"
}
]Gs2Inventory:ConsumeSimpleItems
シンプルアイテムを消費
消費数量のバッチを使用して、リクエストユーザーのシンプルインベントリ内のアイテム数量を減少させます。
単一のアトミック操作で複数のアイテムを消費できます。いずれかのアイテムの数量が不足している場合、操作全体が失敗します。
指定されたいずれかのアイテムが十分にない場合、Insufficient エラーが返されます。
バフの適用対象フィールド
consumeCounts
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| consumeCounts | List<ConsumeCount> | ✓ | 1 ~ 100 items | シンプルアイテムの消費数量のリスト |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:ConsumeSimpleItems",
"targetFieldName": "consumeCounts",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:SimpleInventoryModel
シンプルインベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:SimpleInventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:simple:model:{inventoryName}"
}
]Gs2Inventory:SimpleItemModel
シンプルアイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:SimpleItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:simple:model:{inventoryName}:item:{itemName}"
}
]Gs2Inventory:ConsumeSimpleItemsByUserId
ユーザーIDを指定してシンプルアイテムを消費
消費数量のバッチを使用して、指定されたユーザーのシンプルインベントリ内のアイテム数量を減少させます。
単一のアトミック操作で複数のアイテムを消費できます。いずれかのアイテムの数量が不足している場合、操作全体が失敗します。
バフの適用対象フィールド
consumeCounts
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| consumeCounts | List<ConsumeCount> | ✓ | 1 ~ 100 items | シンプルアイテムの消費数量のリスト |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:ConsumeSimpleItemsByUserId",
"targetFieldName": "consumeCounts",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:SimpleInventoryModel
シンプルインベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:SimpleInventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:simple:model:{inventoryName}"
}
]Gs2Inventory:SimpleItemModel
シンプルアイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:SimpleItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:simple:model:{inventoryName}:item:{itemName}"
}
]Gs2Inventory:AcquireBigItemByUserId
ユーザーIDを指定して巨大アイテムを入手
任意精度演算を使用して、ユーザーの巨大アイテム数量に指定された数量を加算します。
acquireCount は最大1024桁の有効な整数文字列でなければならず、無効な形式はエラーになります。
アイテムがまだ存在しない場合は自動的に作成されます。
ネームスペース設定により、巨大アイテム入手時にカスタムロジックを実行する GS2-Script を設定できます。
バフの適用対象フィールド
acquireCount
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| acquireCount | string | ✓ | ~ 1024文字 | 巨大アイテムの入手数量 最大1024桁までの整数値文字列 |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:AcquireBigItemByUserId",
"targetFieldName": "acquireCount",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:BigInventoryModel
巨大インベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:BigInventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:big:model:{inventoryName}"
}
]Gs2Inventory:BigItemModel
巨大アイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:BigItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:big:model:{inventoryName}:item:{itemName}"
}
]Gs2Inventory:ConsumeBigItem
巨大アイテムを消費
任意精度演算を使用して、リクエストユーザーの巨大アイテム数量から指定された数量を減算します。
consumeCount は最大1024桁の有効な整数文字列でなければなりません。
現在の数量が不足している場合、Insufficient エラーが返され、減算は行われません。
ネームスペース設定により、巨大アイテム消費時にカスタムロジックを実行する GS2-Script を設定できます。
バフの適用対象フィールド
consumeCount
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| consumeCount | string | ✓ | ~ 1024文字 | 巨大アイテムの消費数量 最大1024桁までの整数値文字列 |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:ConsumeBigItem",
"targetFieldName": "consumeCount",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:BigInventoryModel
巨大インベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:BigInventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:big:model:{inventoryName}"
}
]Gs2Inventory:BigItemModel
巨大アイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:BigItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:big:model:{inventoryName}:item:{itemName}"
}
]Gs2Inventory:ConsumeBigItemByUserId
ユーザーIDを指定して巨大アイテムを消費
任意精度演算を使用して、指定ユーザーの巨大アイテム数量から指定された数量を減算します。
consumeCount は最大1024桁の有効な整数文字列でなければなりません。
現在の数量が不足している場合、Insufficient エラーが返され、減算は行われません。
ネームスペース設定により、巨大アイテム消費時にカスタムロジックを実行する GS2-Script を設定できます。
バフの適用対象フィールド
consumeCount
| 型 | 有効化条件 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|---|
| consumeCount | string | ✓ | ~ 1024文字 | 巨大アイテムの消費数量 最大1024桁までの整数値文字列 |
マスターデータ記述例
"targetAction": {
"targetActionName": "Gs2Inventory:ConsumeBigItemByUserId",
"targetFieldName": "consumeCount",
"conditionGrns": [
],
"rate": 1.0
}バフの適用条件モデル
Gs2Inventory:BigInventoryModel
巨大インベントリモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:BigInventoryModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:big:model:{inventoryName}"
}
]Gs2Inventory:BigItemModel
巨大アイテムモデル
マスターデータ記述例
"conditionGrns": [
{
"targetModelName": "Gs2Inventory:BigItemModel",
"targetGrn": "grn:gs2:{region}:{ownerId}:inventory:{namespaceName}:big:model:{inventoryName}:item:{itemName}"
}
]