Master Data Reference of GS2-Lottery

{
  "version": "2019-02-21",
  "lotteryModels": [
    {
      "name": "[string]Lottery Model Name",
      "metadata": "[string?]metadata",
      "mode": "[string]Drawing mode",
      "method": "[string]Lottery Method",
      "prizeTableName": "[string]Name of prize table",
      "choicePrizeTableScriptId": "[string]GS2-Script script to determine the emission probability table"
    }
  ],
  "prizeTables": [
    {
      "name": "[string]Name of prize table",
      "metadata": "[string?]metadata",
      "prizes": [
        {
          "prizeId": "[string]Prize ID",
          "type": "[string]Type of prize",
          "acquireActions": [
            {
              "action": "[string]Types of actions to be performed in the stamp sheet",
              "request": "[string]JSON of request"
            }
          ],
          "drawnLimit": "[int?]Maximum number of draws",
          "limitFailOverPrizeId": "[string]Prize ID to be discharged instead when the maximum number of drawn has been reached.",
          "prizeTableName": "[string]Name of prize table",
          "weight": "[int]Emission Weight"
        }
      ]
    }
  ]
}
TypeConditionRequireDefaultLimitationDescription
version2019-02-21Format version of master data
lotteryModelsList<LotteryModel>
prizeTablesList<PrizeTable>

LotteryModel

Lottery Model

The Lottery Model is the entity that defines the emission method and emission rate in Lottery. There are two types of emission methods: the normal lottery method draws lots with a fixed probability each time, and the rate of emission is determined by the number of lots drawn. The box lottery is a lottery method in which a predefined number of prizes are placed in a box and the prizes are removed from the box each time the lottery is drawn.

The lottery process uses an ejection probability table. GS2-Script can be used to replace a part of the ejection probability table with a different table when multiple drawings are performed. By using this mechanism, it is possible to apply a different lottery probability table only once in a 10-round gacha.

TypeConditionRequireDefaultLimitationDescription
lotteryModelIdstring~ 1024 charsPrize Table GRN
namestring~ 128 charsLottery Model Name
metadatastring~ 128 charsmetadata
modeenum [’normal’, ‘box’]~ 128 charsDrawing mode
methodenum [‘prize_table’, ‘script’]~ 128 charsLottery Method
prizeTableNamestring{method} == “prize_table”~ 128 charsName of prize table
choicePrizeTableScriptIdstring{method} == “script”~ 1024 charsGS2-Script script to determine the emission probability table

PrizeTable

Prize Table

The prize can be either a stamp sheet reward or a further emission probability table. By nesting the emission probability tables, a table that draws for SSR/SR/R rarity can be passed through the table. The second tier can be set up to draw for specific content. In this way, it is easier to adjust the overall emission probability of each rarity.

TypeConditionRequireDefaultLimitationDescription
prizeTableIdstring~ 1024 charsPrize Table GRN
namestring~ 128 charsName of prize table
metadatastring~ 128 charsmetadata
prizesList<Prize>1 ~ 100 itemsList of Prizes

Probability

TypeConditionRequireDefaultLimitationDescription
prizeDrawnPrizeType of prize
ratefloat~ 1.0Emission probability (0.0-1.0)

Prize

TypeConditionRequireDefaultLimitationDescription
prizeIdstringUUID~ 36 charsPrize ID
typeenum [‘action’, ‘prize_table’]~ 128 charsType of prize
acquireActionsList<AcquireAction>{type} == “action”[]1 ~ 100 itemsList of Acquire Action
drawnLimitint{type} == “action”1 ~ 100000Maximum number of draws
limitFailOverPrizeIdstring{type} == “action” and {drawnLimit} > 0~ 32 charsPrize ID to be discharged instead when the maximum number of drawn has been reached.
prizeTableNamestring{type} == “prize_table”~ 128 charsName of prize table
weightint1 ~ 2147483646Emission Weight

DrawnPrize

TypeConditionRequireDefaultLimitationDescription
prizeIdstring~ 36 charsPrize ID
acquireActionsList<AcquireAction>~ 100 itemsList of Acquire Actions

BoxItem

TypeConditionRequireDefaultLimitationDescription
prizeIdstring~ 128 charsPrize Id
acquireActionsList<AcquireAction>~ 100 itemsList of Acquire Action
remainingint~ 2147483646Remaining quantity
initialint~ 2147483646Initial quantity

AcquireAction

TypeConditionRequireDefaultLimitationDescription
actionenum []~ 128 charsTypes of actions to be performed in the stamp sheet
requeststring~ 1048576 charsJSON of request