GS2-Showcase SDK for Game Engine API リファレンス

ゲームエンジン向け GS2-Showcase SDK の モデルの仕様 と API のリファレンス

モデル

EzShowcase

陳列棚

陳列棚には陳列する商品を定義できます。
また、陳列棚の商品の販売期間を設定することができます。

有効化条件 必須 デフォルト 値の制限 説明
name string
~ 128文字 陳列棚名
陳列棚固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
metadata string ~ 2048文字 メタデータ
メタデータには任意の値を設定できます。
これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。
displayItems List<EzDisplayItem> [] 1 ~ 1000 items 陳列する商品リスト
この陳列棚に陳列される商品のリストです。各陳列商品は単一の商品または商品グループのいずれかです。販売期間イベントが終了または無効な商品は、陳列棚の取得時に自動的にフィルタリングされます。
salesPeriodEventId string ~ 1024文字 陳列棚の販売期間を設定した GS2-Schedule のイベント GRN
この陳列棚全体の販売期間を制御します。指定した場合、関連する GS2-Schedule のイベント期間中のみ陳列棚が利用可能になります。イベントが有効でない場合、陳列棚は空で返されます。

EzDisplayItem

陳列する商品

陳列棚に表示される商品です。単一の商品または商品グループのいずれかを参照できます。各陳列商品には、陳列棚全体の販売期間とは独立して GS2-Schedule イベントによる個別の販売期間を設定できます。

有効化条件 必須 デフォルト 値の制限 説明
displayItemId string
UUID ~ 128文字 陳列商品ID
陳列商品の一意な名前を保持します。
省略するとシステムによって UUID(Universally Unique Identifier)フォーマットで自動的に割り当てられます。
type 文字列列挙型
enum {
  “salesItem”,
  “salesItemGroup”
}
種類
表示する商品の種類です。「salesItem」は固定の対価と報酬を持つ単一商品です。「salesItemGroup」は複数の商品を順番に評価する商品グループで、ステップアップ価格や初回限定割引などに使用されます。
定義説明
“salesItem”商品
“salesItemGroup”商品グループ
salesItem EzSalesItem {type} == “salesItem”
✓※
商品
※ type が “salesItem” であれば 必須
salesItemGroup EzSalesItemGroup {type} == “salesItemGroup”
✓※
商品グループ
※ type が “salesItemGroup” であれば 必須

EzRandomDisplayItem

ランダム陳列棚に陳列された商品

特定のユーザーに対してランダム陳列棚で抽選・表示された商品を表します。現在のローテーション期間における商品の対価、報酬、および購入回数の追跡情報を含みます。

有効化条件 必須 デフォルト 値の制限 説明
name string
UUID ~ 128文字 ランダム陳列商品名
ランダム陳列商品の一意な名前を保持します。
省略するとシステムによって UUID(Universally Unique Identifier)フォーマットで自動的に割り当てられます。
metadata string ~ 2048文字 メタデータ
メタデータには任意の値を設定できます。
これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。
verifyActions List<EzVerifyAction> [] 0 ~ 10 items 検証アクションリスト
consumeActions List<EzConsumeAction> [] 0 ~ 10 items 消費アクションリスト
acquireActions List<EzAcquireAction> [] 1 ~ 100 items 入手アクションリスト
currentPurchaseCount int
1 ~ 2147483646 現在の購入回数
現在のローテーション期間中にこの商品が購入された回数です。購入のたびに加算され、ローテーション期間が終了するとリセットされます。
maximumPurchaseCount int
1 ~ 2147483646 最大購入回数
現在のローテーション期間中にこの商品を購入できる最大回数です。currentPurchaseCount がこの値に達すると、次のローテーションまで購入できなくなります。

EzSalesItem

商品

商品を購入するために必要となる対価と、商品を購入したときに得られる報酬を設定します。

有効化条件 必須 デフォルト 値の制限 説明
name string
~ 128文字 商品名
商品固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
metadata string ~ 2048文字 メタデータ
メタデータには任意の値を設定できます。
これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。
verifyActions List<EzVerifyAction> [] 0 ~ 10 items 検証アクションリスト
購入前に実行される前提条件チェックです。すべての検証アクションが成功した後に消費・入手アクションが処理されます。購入資格の条件チェックに使用できます。
consumeActions List<EzConsumeAction> [] 0 ~ 10 items 消費アクションリスト
購入対価としてリソースを消費するアクションです。商品グループの購入回数制御のために GS2-Limit の CountUp アクションを含めることができます。
acquireActions List<EzAcquireAction> [] 1 ~ 100 items 入手アクションリスト
購入報酬としてリソースを付与するアクションです。すべての消費アクションが正常に完了した後に実行されます。

EzSalesItemGroup

商品グループ

商品グループは陳列棚に陳列するためのエンティティです。
商品グループには複数の商品を所属させることができ、所属している商品の先頭から順番に購入可能かを判定し、一番最初に購入可能だと判定された商品が実際に陳列されます。
初回のみ割引する商品や、ステップアップガチャのように購入回数によって商品の内容が変化する仕組みに使用できます。

有効化条件 必須 デフォルト 値の制限 説明
name string
~ 128文字 商品グループ名
商品グループ固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
metadata string ~ 2048文字 メタデータ
メタデータには任意の値を設定できます。
これらの値は GS2 の動作には影響しないため、ゲーム内で利用する情報の保存先として使用できます。
salesItems List<EzSalesItem> [] 2 ~ 10 items 商品グループに含める商品
このグループ内の商品の順序付きリストです。GS2-Limit カウンターを使って先頭から順に購入可能かを判定し、最初に購入可能と判定された商品が表示されます。いずれも該当しない場合、リストの最後の商品がフォールバックとして使用されます。

EzConfig

コンフィグ設定

トランザクションの変数に適用する設定値

有効化条件 必須 デフォルト 値の制限 説明
key string
~ 64文字 名前
トランザクションテンプレートで置換される変数名です。入手アクションパラメータ内のプレースホルダーに対応します。
value string ~ 51200文字
トランザクションテンプレート内の対応する変数名に置換される値です。

EzConsumeAction

消費アクション

有効化条件 必須 デフォルト 値の制限 説明
action 文字列列挙型
enum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
消費アクションで実行するアクションの種類
request string
~ 524288文字 アクション実行時に使用されるリクエストのJSON文字列

EzVerifyAction

検証アクション

有効化条件 必須 デフォルト 値の制限 説明
action 文字列列挙型
enum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
検証アクションで実行するアクションの種類
request string
~ 524288文字 アクション実行時に使用されるリクエストのJSON文字列

EzAcquireAction

入手アクション

有効化条件 必須 デフォルト 値の制限 説明
action 文字列列挙型
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
入手アクションで実行するアクションの種類
request string
~ 524288文字 アクション実行時に使用されるリクエストのJSON文字列

EzVerifyActionResult

検証アクションの実行結果

有効化条件 必須 デフォルト 値の制限 説明
action 文字列列挙型
enum {
"Gs2Dictionary:VerifyEntryByUserId",
"Gs2Distributor:IfExpressionByUserId",
"Gs2Distributor:AndExpressionByUserId",
"Gs2Distributor:OrExpressionByUserId",
"Gs2Enchant:VerifyRarityParameterStatusByUserId",
"Gs2Experience:VerifyRankByUserId",
"Gs2Experience:VerifyRankCapByUserId",
"Gs2Grade:VerifyGradeByUserId",
"Gs2Grade:VerifyGradeUpMaterialByUserId",
"Gs2Guild:VerifyCurrentMaximumMemberCountByGuildName",
"Gs2Guild:VerifyIncludeMemberByUserId",
"Gs2Inventory:VerifyInventoryCurrentMaxCapacityByUserId",
"Gs2Inventory:VerifyItemSetByUserId",
"Gs2Inventory:VerifyReferenceOfByUserId",
"Gs2Inventory:VerifySimpleItemByUserId",
"Gs2Inventory:VerifyBigItemByUserId",
"Gs2Limit:VerifyCounterByUserId",
"Gs2Matchmaking:VerifyIncludeParticipantByUserId",
"Gs2Mission:VerifyCompleteByUserId",
"Gs2Mission:VerifyCounterValueByUserId",
"Gs2Ranking2:VerifyGlobalRankingScoreByUserId",
"Gs2Ranking2:VerifyClusterRankingScoreByUserId",
"Gs2Ranking2:VerifySubscribeRankingScoreByUserId",
"Gs2Schedule:VerifyTriggerByUserId",
"Gs2Schedule:VerifyEventByUserId",
"Gs2SerialKey:VerifyCodeByUserId",
"Gs2Stamina:VerifyStaminaValueByUserId",
"Gs2Stamina:VerifyStaminaMaxValueByUserId",
"Gs2Stamina:VerifyStaminaRecoverIntervalMinutesByUserId",
"Gs2Stamina:VerifyStaminaRecoverValueByUserId",
"Gs2Stamina:VerifyStaminaOverflowValueByUserId",
}
検証アクションで実行するアクションの種類
verifyRequest string
~ 524288文字 アクション実行時に使用されるリクエストのJSON文字列
statusCode int 0 ~ 999 ステータスコード
verifyResult string ~ 1048576文字 結果内容

EzConsumeActionResult

消費アクションの実行結果

有効化条件 必須 デフォルト 値の制限 説明
action 文字列列挙型
enum {
"Gs2AdReward:ConsumePointByUserId",
"Gs2Dictionary:DeleteEntriesByUserId",
"Gs2Enhance:DeleteProgressByUserId",
"Gs2Exchange:DeleteAwaitByUserId",
"Gs2Experience:SubExperienceByUserId",
"Gs2Experience:SubRankCapByUserId",
"Gs2Formation:SubMoldCapacityByUserId",
"Gs2Grade:SubGradeByUserId",
"Gs2Guild:DecreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:DecreaseMaximumIdleMinutesByUserId",
"Gs2Inbox:OpenMessageByUserId",
"Gs2Inbox:DeleteMessageByUserId",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2JobQueue:DeleteJobByUserId",
"Gs2Limit:CountUpByUserId",
"Gs2LoginReward:MarkReceivedByUserId",
"Gs2Mission:ReceiveByUserId",
"Gs2Mission:BatchReceiveByUserId",
"Gs2Mission:DecreaseCounterByUserId",
"Gs2Mission:ResetCounterByUserId",
"Gs2Money:WithdrawByUserId",
"Gs2Money:RecordReceipt",
"Gs2Money2:WithdrawByUserId",
"Gs2Money2:VerifyReceiptByUserId",
"Gs2Quest:DeleteProgressByUserId",
"Gs2Ranking2:CreateGlobalRankingReceivedRewardByUserId",
"Gs2Ranking2:CreateClusterRankingReceivedRewardByUserId",
"Gs2Schedule:DeleteTriggerByUserId",
"Gs2SerialKey:UseByUserId",
"Gs2Showcase:IncrementPurchaseCountByUserId",
"Gs2SkillTree:MarkRestrainByUserId",
"Gs2Stamina:DecreaseMaxValueByUserId",
"Gs2Stamina:ConsumeStaminaByUserId",
}
消費アクションで実行するアクションの種類
consumeRequest string
~ 524288文字 アクション実行時に使用されるリクエストのJSON文字列
statusCode int 0 ~ 999 ステータスコード
consumeResult string ~ 1048576文字 結果内容

EzAcquireActionResult

入手アクションの実行結果

有効化条件 必須 デフォルト 値の制限 説明
action 文字列列挙型
enum {
"Gs2AdReward:AcquirePointByUserId",
"Gs2Dictionary:AddEntriesByUserId",
"Gs2Enchant:ReDrawBalanceParameterStatusByUserId",
"Gs2Enchant:SetBalanceParameterStatusByUserId",
"Gs2Enchant:ReDrawRarityParameterStatusByUserId",
"Gs2Enchant:AddRarityParameterStatusByUserId",
"Gs2Enchant:SetRarityParameterStatusByUserId",
"Gs2Enhance:DirectEnhanceByUserId",
"Gs2Enhance:UnleashByUserId",
"Gs2Enhance:CreateProgressByUserId",
"Gs2Exchange:ExchangeByUserId",
"Gs2Exchange:IncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:AcquireForceByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Friend:UpdateProfileByUserId",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Guild:IncreaseMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Guild:SetMaximumCurrentMaximumMemberCountByGuildName",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"Gs2Idle:ReceiveByUserId",
"Gs2Inbox:SendMessageByUserId",
"Gs2Inventory:AddCapacityByUserId",
"Gs2Inventory:SetCapacityByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:AcquireItemSetWithGradeByUserId",
"Gs2Inventory:AddReferenceOfByUserId",
"Gs2Inventory:DeleteReferenceOfByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:SetSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:SetBigItemByUserId",
"Gs2JobQueue:PushByUserId",
"Gs2Limit:CountDownByUserId",
"Gs2Limit:DeleteCounterByUserId",
"Gs2LoginReward:DeleteReceiveStatusByUserId",
"Gs2LoginReward:UnmarkReceivedByUserId",
"Gs2Lottery:DrawByUserId",
"Gs2Lottery:ResetBoxByUserId",
"Gs2Mission:RevertReceiveByUserId",
"Gs2Mission:IncreaseCounterByUserId",
"Gs2Mission:SetCounterByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Money2:DepositByUserId",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2Schedule:ExtendTriggerByUserId",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
入手アクションで実行するアクションの種類
acquireRequest string
~ 524288文字 アクション実行時に使用されるリクエストのJSON文字列
statusCode int 0 ~ 999 ステータスコード
acquireResult string ~ 1048576文字 結果内容

EzTransactionResult

トランザクション実行結果

サーバーサイドでのトランザクションの自動実行機能を利用して実行されたトランザクションの実行結果

有効化条件 必須 デフォルト 値の制限 説明
transactionId string
36 ~ 36文字 トランザクションID
verifyResults List<EzVerifyActionResult> 0 ~ 10 items 検証アクションの実行結果リスト
consumeResults List<EzConsumeActionResult> [] 0 ~ 10 items 消費アクションの実行結果リスト
acquireResults List<EzAcquireActionResult> [] 0 ~ 100 items 入手アクションの実行結果リスト

メソッド

buy

陳列棚の商品を購入する

陳列棚から特定の商品を購入します。
プレイヤーが商品を購入すると、システムが購入フロー全体を自動的に処理します。条件のチェック(例: プレイヤーレベル)、コストの消費(例: ジェム100個)、報酬の付与(例: レア剣)がすべて自動で行われます。
これらはすべて1つのトランザクションで処理されるため、支払いだけ行われてアイテムが届かないという状況は発生しません。
プレイヤーがショップの商品の「購入」ボタンをタップした時に使います。たとえば「スターターパック」をジェム500個で購入し、スタミナポーション10個とゴールドチェスト1個を受け取るといった処理に便利です。

Request

有効化条件 必須 デフォルト 値の制限 説明
namespaceName string
~ 128文字 ネームスペース名
ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
showcaseName string
~ 128文字 陳列棚名
陳列棚固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
gameSession GameSession
GameSession
displayItemId string
UUID ~ 128文字 陳列商品ID
陳列商品の一意な名前を保持します。
省略するとシステムによって UUID(Universally Unique Identifier)フォーマットで自動的に割り当てられます。
quantity int 1 1 ~ 1000 購入数量
config List<EzConfig> [] 0 ~ 32 items トランザクションの変数に適用する設定値

Result

説明
item EzSalesItem 商品
transactionId string 発行されたトランザクションID
stampSheet string 購入処理の実行に使用するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN
autoRunStampSheet bool トランザクションの自動実行が有効か
atomicCommit bool トランザクションをアトミックにコミットするか
transaction string 発行されたトランザクション
transactionResult EzTransactionResult トランザクション実行結果

実装例

    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Showcase(
        showcaseName: "showcase-0001"
    ).DisplayItem(
        displayItemId: "display-item-0001"
    );
    var result = await domain.BuyAsync(
        quantity: null,
        config: null
    );
    // New Experience ではスタンプシートはSDKレベルで自動的に実行されます。
    // エラーが発生すると TransactionException がスローされます。
    // TransactionException::Retry() でリトライが可能です。
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Showcase(
        showcaseName: "showcase-0001"
    ).DisplayItem(
        displayItemId: "display-item-0001"
    );
    var future = domain.BuyFuture(
        quantity: null,
        config: null
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    // New Experience ではスタンプシートはSDKレベルで自動的に実行されます。
    // エラーが発生すると TransactionException がスローされます。
    // TransactionException::Retry() でリトライが可能です。
    const auto Domain = Gs2->Showcase->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Showcase(
        "showcase-0001" // showcaseName
    )->DisplayItem(
        "display-item-0001" // displayItemId
    );
    const auto Future = Domain->Buy(
        // quantity
        // config
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }

getShowcase

ショップの陳列棚と商品を取得する

特定の陳列棚(ショップページ)と、その陳列棚に表示されている商品の一覧を取得します。
陳列棚はゲーム内のショップ画面のようなものです。たとえば「ジェムショップ」「デイリーセール」「スペシャルオファー」などのページに相当します。
各陳列棚には商品が並んでおり、各商品にはプレイヤーが支払うもの(コスト)と受け取るもの(報酬)が定義されています。
陳列棚はスケジュールイベントに紐づけて特定の期間だけ表示させることもできます。たとえば、クリスマス期間だけ表示される「ホリデーショップ」のような使い方が可能です。
ショップUIの構築に使います。たとえば、プレイヤーがショップ画面を開いた時に、商品一覧を価格と「購入」ボタンとともに表示するのに便利です。

Request

有効化条件 必須 デフォルト 値の制限 説明
namespaceName string
~ 128文字 ネームスペース名
ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
gameSession GameSession
GameSession
showcaseName string
~ 128文字 陳列棚名
陳列棚固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。

Result

説明
item EzShowcase 陳列棚

実装例

    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Showcase(
        showcaseName: "showcase-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Showcase(
        showcaseName: "showcase-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Showcase->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Showcase(
        "showcase-0001" // showcaseName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
値の変更イベントハンドリング
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Showcase(
        showcaseName: "showcase-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.Subscribe(
        value => {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    domain.Unsubscribe(callbackId);
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Showcase(
        showcaseName: "showcase-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.Subscribe(
        value => {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Showcase->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->Showcase(
        "showcase-0001" // showcaseName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Showcase::Model::FShowcase> value) {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    Domain->Unsubscribe(CallbackId);

getRandomShowcaseDisplayItem

ランダム陳列棚の特定の商品を取得する

ランダム陳列棚に現在表示されている特定の商品の詳細を取得します。
プレイヤーがランダムショップの特定商品をタップした時に詳細表示するのに使います。たとえば、詳細ポップアップでアイテムの説明、価格、「購入」ボタンを表示するのに便利です。

Request

有効化条件 必須 デフォルト 値の制限 説明
namespaceName string
~ 128文字 ネームスペース名
ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
gameSession GameSession
GameSession
showcaseName string
~ 128文字 ランダム陳列棚名
ランダム陳列棚固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
displayItemName string
UUID ~ 128文字 ランダム陳列商品名
ランダム陳列商品の一意な名前を保持します。
省略するとシステムによって UUID(Universally Unique Identifier)フォーマットで自動的に割り当てられます。

Result

説明
item EzRandomDisplayItem 商品

実装例

    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    ).RandomDisplayItem(
        displayItemName: "display-item-0001"
    );
    var item = await domain.ModelAsync();
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    ).RandomDisplayItem(
        displayItemName: "display-item-0001"
    );
    var future = domain.ModelFuture();
    yield return future;
    var item = future.Result;
    const auto Domain = Gs2->Showcase->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RandomShowcase(
        "showcase-0001" // showcaseName
    )->RandomDisplayItem(
        "display-item-0001" // displayItemName
    );
    const auto Future = Domain->Model();
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }
値の変更イベントハンドリング
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    ).RandomDisplayItem(
        displayItemName: "display-item-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.Subscribe(
        value => {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    domain.Unsubscribe(callbackId);
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    ).RandomDisplayItem(
        displayItemName: "display-item-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.Subscribe(
        value => {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    domain.Unsubscribe(callbackId);
    const auto Domain = Gs2->Showcase->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RandomShowcase(
        "showcase-0001" // showcaseName
    )->RandomDisplayItem(
        "display-item-0001" // displayItemName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->Subscribe(
        [](TSharedPtr<Gs2::Showcase::Model::FRandomDisplayItem> value) {
            // 値が変化した時に呼び出される
            // value には変更後の値が渡ってくる
        }
    );

    // イベントハンドリングを停止
    Domain->Unsubscribe(CallbackId);

listRandomShowcaseDisplayItems

ランダム陳列棚に現在表示されている商品一覧を取得する

プレイヤーに対してランダム陳列棚に現在表示されている商品を取得します。
ランダム陳列棚は、商品プールからランダムに選ばれた商品が表示されるショップです。「デイリーセール」や「ミステリーショップ」のように、プレイヤーごとに異なる商品が表示されたり、定期的にラインナップが更新されたりします。
たとえば、50種類の商品プールから毎日5つがランダムに選ばれ、深夜0時にリフレッシュされるといった仕組みです。
表示される商品はプレイヤーごとに異なり、同じタイミングでも別のプレイヤーには別の商品が表示される場合があります。
ランダムショップのUI構築に使います。たとえば「本日のセール」として5つのランダム商品と、次のリフレッシュまでのカウントダウンタイマーを表示するのに便利です。

Request

有効化条件 必須 デフォルト 値の制限 説明
namespaceName string
~ 128文字 ネームスペース名
ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
gameSession GameSession
GameSession
showcaseName string
~ 128文字 ランダム陳列棚名
ランダム陳列棚固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。

Result

説明
items List<EzRandomDisplayItem> ランダム陳列棚の商品リスト

実装例

    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    );
    var items = await domain.RandomDisplayItemsAsync(
    ).ToListAsync();
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    );
    var it = domain.RandomDisplayItems(
    );
    List<EzRandomDisplayItem> items = new List<EzRandomDisplayItem>();
    while (it.HasNext())
    {
        yield return it.Next();
        if (it.Error != null)
        {
            onError.Invoke(it.Error, null);
            break;
        }
        if (it.Current != null)
        {
            items.Add(it.Current);
        }
        else
        {
            break;
        }
    }
    const auto Domain = Gs2->Showcase->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RandomShowcase(
        "showcase-0001" // showcaseName
    );
    const auto It = Domain->RandomDisplayItems(
    );
    TArray<Gs2::UE5::Showcase::Model::FEzRandomDisplayItemPtr> Result;
    for (auto Item : *It)
    {
        if (Item.IsError())
        {
            return false;
        }
        Result.Add(Item.Current());
    }
値の変更イベントハンドリング
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeRandomDisplayItems(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeRandomDisplayItems(callbackId);
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    );
    
    // イベントハンドリングを開始
    var callbackId = domain.SubscribeRandomDisplayItems(
        () => {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    domain.UnsubscribeRandomDisplayItems(callbackId);
    const auto Domain = Gs2->Showcase->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RandomShowcase(
        "showcase-0001" // showcaseName
    );
    
    // イベントハンドリングを開始
    const auto CallbackId = Domain->SubscribeRandomDisplayItems(
        []() {
            // リストの要素が変化した時に呼び出される
        }
    );

    // イベントハンドリングを停止
    Domain->UnsubscribeRandomDisplayItems(CallbackId);

randomShowcaseBuy

ランダム陳列棚の商品を購入する

ランダム陳列棚から特定の商品を購入します。
通常の陳列棚での購入と同様に、条件チェック、コストの消費、報酬の付与がすべて1つのトランザクションで自動的に処理されます。
ランダム陳列棚から商品を購入すると、設定によってはその商品が売り切れになり、次のリフレッシュまで新しい商品は表示されません。
プレイヤーがランダムショップの商品の「購入」ボタンをタップした時に使います。たとえば、デイリーセールでリフレッシュ前に割引された「レジェンダリー武器ボックス」を購入するといった処理に便利です。

Request

有効化条件 必須 デフォルト 値の制限 説明
namespaceName string
~ 128文字 ネームスペース名
ネームスペース固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
showcaseName string
~ 128文字 ランダム陳列棚名
ランダム陳列棚固有の名前。英数字および -(ハイフン) _(アンダースコア) .(ピリオド)で指定します。
gameSession GameSession
GameSession
displayItemName string
UUID ~ 128文字 ランダム陳列商品名
ランダム陳列商品の一意な名前を保持します。
省略するとシステムによって UUID(Universally Unique Identifier)フォーマットで自動的に割り当てられます。
quantity int 1 1 ~ 1000 購入数量
config List<EzConfig> [] 0 ~ 32 items トランザクションの変数に適用する設定値

Result

説明
item EzRandomDisplayItem 購入した商品
transactionId string 発行されたトランザクションID
stampSheet string 購入処理の実行に使用するスタンプシート
stampSheetEncryptionKeyId string スタンプシートの署名計算に使用した暗号鍵GRN
autoRunStampSheet bool トランザクションの自動実行が有効か
atomicCommit bool トランザクションをアトミックにコミットするか
transaction string 発行されたトランザクション
transactionResult EzTransactionResult トランザクション実行結果

実装例

    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    ).RandomDisplayItem(
        displayItemName: "display-item-0001"
    );
    var result = await domain.RandomShowcaseBuyAsync(
        quantity: 1,
        config: null
    );
    // New Experience ではスタンプシートはSDKレベルで自動的に実行されます。
    // エラーが発生すると TransactionException がスローされます。
    // TransactionException::Retry() でリトライが可能です。
    var domain = gs2.Showcase.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).RandomShowcase(
        showcaseName: "showcase-0001"
    ).RandomDisplayItem(
        displayItemName: "display-item-0001"
    );
    var future = domain.RandomShowcaseBuyFuture(
        quantity: 1,
        config: null
    );
    yield return future;
    if (future.Error != null)
    {
        onError.Invoke(future.Error, null);
        yield break;
    }
    // New Experience ではスタンプシートはSDKレベルで自動的に実行されます。
    // エラーが発生すると TransactionException がスローされます。
    // TransactionException::Retry() でリトライが可能です。
    const auto Domain = Gs2->Showcase->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        GameSession
    )->RandomShowcase(
        "showcase-0001" // showcaseName
    )->RandomDisplayItem(
        "display-item-0001" // displayItemName
    );
    const auto Future = Domain->RandomShowcaseBuy(
        1 // quantity
        // config
    );
    Future->StartSynchronousTask();
    if (Future->GetTask().IsError())
    {
        return false;
    }