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 acquire action",
              "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>~ 10 itemsLottery Model
prizeTablesList<PrizeTable>~ 10 itemsPrize Table

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

Enumeration type definition to specify as mode

Enumerator String DefinitionDescription
normalNormal
boxBox

Enumeration type definition to specify as method

Enumerator String DefinitionDescription
prize_tableStatic lottery table
scriptGS2-Script dynamic lottery table

PrizeTable

Prize Table

Prizes can specify an acquisition action or further specify an 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

Probability

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

Prize

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

Enumeration type definition to specify as type

Enumerator String DefinitionDescription
actionActions to acquire prizes
prize_tableFurther redrawing by specifying the lottery table

DrawnPrize

Types of prizes

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

BoxItem

Item taken out of the lottery box

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

AcquireAction

Acquire Action

TypeConditionRequireDefaultLimitationDescription
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: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",
"Gs2Script:InvokeScript",
"Gs2SerialKey:RevertUseByUserId",
"Gs2SerialKey:IssueOnce",
"Gs2Showcase:DecrementPurchaseCountByUserId",
"Gs2Showcase:ForceReDrawByUserId",
"Gs2SkillTree:MarkReleaseByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
"Gs2Stamina:RaiseMaxValueByUserId",
"Gs2Stamina:SetMaxValueByUserId",
"Gs2Stamina:SetRecoverIntervalByUserId",
"Gs2Stamina:SetRecoverValueByUserId",
"Gs2StateMachine:StartStateMachineByUserId",
}
~ 128 charsTypes of actions to be performed in the acquire action
requeststring~ 1048576 charsJSON of request

VerifyActionResult

Verify action execution result

TypeConditionRequireDefaultLimitationDescription
actionenum {
}
~ 128 charsTypes of actions to be performed in the verify task
verifyRequeststring~ 1048576 charsJSON of request
statusCodeint~ 999Status code
verifyResultstring~ 1048576 charsResult payload

Enumeration type definition to specify as action

Enumerator String DefinitionDescription

ConsumeActionResult

Consume action execution result

TypeConditionRequireDefaultLimitationDescription
actionenum {
}
~ 128 charsTypes of actions to be performed in the consume action
consumeRequeststring~ 1048576 charsJSON of request
statusCodeint~ 999Status code
consumeResultstring~ 1048576 charsResult payload

Enumeration type definition to specify as action

Enumerator String DefinitionDescription

AcquireActionResult

Acquire action execution result

TypeConditionRequireDefaultLimitationDescription
actionenum {
}
~ 128 charsTypes of actions to be performed in the acquire action
acquireRequeststring~ 1048576 charsJSON of request
statusCodeint~ 999Status code
acquireResultstring~ 1048576 charsResult payload

Enumeration type definition to specify as action

Enumerator String DefinitionDescription

TransactionResult

Transaction execution results

Transaction execution results executed using server-side transaction auto-execution functionality

TypeConditionRequireDefaultLimitationDescription
transactionIdstring36 ~ 36 charsTransaction ID
verifyResultsList<VerifyActionResult>~ 10 itemsList of verify action execution results
consumeResultsList<ConsumeActionResult>~ 10 itemsList of consume action execution results
acquireResultsList<AcquireActionResult>~ 100 itemsList of acquire action execution results