GS2-Lottery マスターデータリファレンス

{
  "version": "2019-02-21",
  "lotteryModels": [
    {
      "name": "[string]抽選モデルの種類名",
      "metadata": "[string?]メタデータ",
      "mode": "[string]抽選モード",
      "method": "[string]抽選方法",
      "prizeTableName": "[string]排出確率テーブルの名前",
      "choicePrizeTableScriptId": "[string]排出確率テーブルを決定する GS2-Script のスクリプト"
    }
  ],
  "prizeTables": [
    {
      "name": "[string]排出確率テーブル名",
      "metadata": "[string?]メタデータ",
      "prizes": [
        {
          "prizeId": "[string]景品ID",
          "type": "[string]景品の種類",
          "acquireActions": [
            {
              "action": "[string]スタンプシートを使用して実行するアクションの種類",
              "request": "[string]リクエストのJSON"
            }
          ],
          "drawnLimit": "[int?]最大排出数",
          "limitFailOverPrizeId": "[string]最大排出数に達していた時に代わりに排出する景品ID",
          "prizeTableName": "[string]排出確率テーブルの名前",
          "weight": "[int]排出重み"
        }
      ]
    }
  ]
}
有効化条件必須デフォルト値の制限説明
version2019-02-21マスターデータのフォーマットバージョン
lotteryModelsList<LotteryModel>
prizeTablesList<PrizeTable>

LotteryModel

抽選モデル

抽選モデルはLotteryで排出方式や排出レートを定義するエンティティです。 排出方式は2種類用意されており、通常抽選は毎回一定の確率で抽選をする方式 Box抽選は箱の中にあらかじめ定義された数量の景品が入っており、抽選するたびに箱から景品を取り出していく抽選方式です。

抽選処理を行うにあたって、排出確率テーブルを利用しますが、 GS2-Script を使用すれば複数回抽選を実行した際に排出確率テーブルを一部だけ異なるテーブルに差し替えることができます。 この仕組みを利用することで、10連ガチャで1回だけ異なる抽選確率テーブルを適用することが可能となります。

有効化条件必須デフォルト値の制限説明
lotteryModelIdstring~ 1024文字抽選モデルGRN
namestring~ 128文字抽選モデルの種類名
metadatastring~ 128文字メタデータ
modeenum [
“normal”,
“box”
]
~ 128文字抽選モード
methodenum [
“prize_table”,
“script”
]
~ 128文字抽選方法
prizeTableNamestring{method} == “prize_table”~ 128文字排出確率テーブルの名前
choicePrizeTableScriptIdstring{method} == “script”~ 1024文字排出確率テーブルを決定する GS2-Script のスクリプト

PrizeTable

排出確率テーブル

景品にはスタンプシートの報酬または更に排出確率テーブルを指定することができます。 排出確率テーブルを入れ子にすることで、SSR/SR/R といったレアリティを抽選するテーブルを通し、 2段目で具体的なコンテンツを抽選するような設定が可能です。 こうすることで、全体におけるレアリティの排出確率の調整が容易となります。

有効化条件必須デフォルト値の制限説明
prizeTableIdstring~ 1024文字排出確率テーブルGRN
namestring~ 128文字排出確率テーブル名
metadatastring~ 128文字メタデータ
prizesList<Prize>1 ~ 100 items景品リスト

Probability

有効化条件必須デフォルト値の制限説明
prizeDrawnPrize景品の種類
ratefloat~ 1.0排出確率(0.0〜1.0)

Prize

有効化条件必須デフォルト値の制限説明
prizeIdstringUUID~ 36文字景品ID
typeenum [
“action”,
“prize_table”
]
~ 128文字景品の種類
acquireActionsList<AcquireAction>{type} == “action”[]1 ~ 100 items景品の入手アクションリスト
drawnLimitint{type} == “action”1 ~ 100000最大排出数
limitFailOverPrizeIdstring{type} == “action” and {drawnLimit} > 0~ 32文字最大排出数に達していた時に代わりに排出する景品ID
prizeTableNamestring{type} == “prize_table”~ 128文字排出確率テーブルの名前
weightint1 ~ 2147483646排出重み

DrawnPrize

有効化条件必須デフォルト値の制限説明
prizeIdstring~ 36文字景品ID
acquireActionsList<AcquireAction>~ 100 items入手アクションのリスト

BoxItem

有効化条件必須デフォルト値の制限説明
prizeIdstring~ 128文字景品ID
acquireActionsList<AcquireAction>~ 100 items入手アクションのリスト
remainingint~ 2147483646残り数量
initialint~ 2147483646初期数量

AcquireAction

有効化条件必須デフォルト値の制限説明
actionenum [
"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:UnlockIncrementalExchangeByUserId",
"Gs2Exchange:CreateAwaitByUserId",
"Gs2Exchange:SkipByUserId",
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SetExperienceByUserId",
"Gs2Experience:AddRankCapByUserId",
"Gs2Experience:SetRankCapByUserId",
"Gs2Experience:MultiplyAcquireActionsByUserId",
"Gs2Formation:AddMoldCapacityByUserId",
"Gs2Formation:SetMoldCapacityByUserId",
"Gs2Formation:AcquireActionsToFormProperties",
"Gs2Formation:SetFormByUserId",
"Gs2Formation:AcquireActionsToPropertyFormProperties",
"Gs2Grade:AddGradeByUserId",
"Gs2Grade:ApplyRankCapByUserId",
"Gs2Grade:MultiplyAcquireActionsByUserId",
"Gs2Idle:IncreaseMaximumIdleMinutesByUserId",
"Gs2Idle:SetMaximumIdleMinutesByUserId",
"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",
"Gs2Money:DepositByUserId",
"Gs2Money:RevertRecordReceipt",
"Gs2Quest:CreateProgressByUserId",
"Gs2Schedule:TriggerByUserId",
"Gs2SerialKey:RevertUseByUserId",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
]
~ 128文字スタンプシートを使用して実行するアクションの種類
requeststring~ 1048576文字リクエストのJSON