Master Data Reference of GS2-Limit

Reference of the format of master data and various models to be imported

Master Data Format

{
  "version": "2019-04-05",
  "limitModels": [
    {
      "name": "[string]Usage Limit Model name",
      "metadata": "[string?]Metadata",
      "resetType": "[string enum]Reset timing",
      "resetDayOfMonth": "[int]Date to reset (If the value exceeds the days of the month, it is treated as the last day.)",
      "resetDayOfWeek": "[string enum]Day of the week to reset",
      "resetHour": "[int]Reset hour",
      "anchorTimestamp": "[long]Base date and time for counting elapsed days",
      "days": "[int]Number of days to reset"
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2019-04-05Format version of master data
limitModelsList<LimitModel>~ 100 itemsUsage Limit Model
Usage Limit Model allows you to set the timing for resetting the usage count.
The reset interval can be selected from five options: “Daily”, “Weekly”, “Monthly”, “Every fixed number of days” or “Not Reset”.

Additionally, the maximum value for usage Limits is not fixed in the master data.
This design allows the maximum allowed count to be changed dynamically depending on the game context.
For example, in a step-up gacha:
- Items purchasable when the purchase counter is under 3
- When the above items are unavailable, another item purchasable if the purchase counter is under 5

The design assumes the ability to switch the “maximum count” based on the situation.

Model

LimitModel

Usage Limit Model

Usage Limit Model allows you to set the timing for resetting the usage count. The reset interval can be selected from five options: “Daily”, “Weekly”, “Monthly”, “Every fixed number of days” or “Not Reset”.

Additionally, the maximum value for usage Limits is not fixed in the master data. This design allows the maximum allowed count to be changed dynamically depending on the game context. For example, in a step-up gacha:

  • Items purchasable when the purchase counter is under 3
  • When the above items are unavailable, another item purchasable if the purchase counter is under 5

The design assumes the ability to switch the “maximum count” based on the situation.

TypeConditionRequiredDefaultValue LimitsDescription
limitModelIdstring
✓*
~ 1024 charsUsage Limit Model GRN
* Required (system-assigned)
namestring
~ 128 charsUsage Limit Model name
Usage Limit Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 2048 charsMetadata
Arbitrary values can be set in the metadata.
Since they do not affect GS2’s behavior, they can be used to store information used in the game.
resetTypeString Enum
enum {
  “notReset”,
  “daily”,
  “weekly”,
  “monthly”,
  “days”
}
Reset timing
Enumerator String DefinitionDescription
“notReset”Not Reset
“daily”Daily
“weekly”Weekly
“monthly”Monthly
“days”Every fixed number of days
resetDayOfMonthint{resetType} == “monthly”
✓*
1 ~ 31Date to reset (If the value exceeds the days of the month, it is treated as the last day.)
* Required if resetType is “monthly”
resetDayOfWeekString Enum
enum {
  “sunday”,
  “monday”,
  “tuesday”,
  “wednesday”,
  “thursday”,
  “friday”,
  “saturday”
}
{resetType} == “weekly”
✓*
Day of the week to reset
Enumerator String DefinitionDescription
“sunday”Sunday
“monday”Monday
“tuesday”Tuesday
“wednesday”Wednesday
“thursday”Thursday
“friday”Friday
“saturday”Saturday
* Required if resetType is “weekly”
resetHourint{resetType} in [“monthly”, “weekly”, “daily”]
✓*
0 ~ 23Reset hour
* Required if resetType is “monthly”,“weekly”,“daily”
anchorTimestamplong{resetType} == “days”
✓*
Base date and time for counting elapsed days
Unix time, milliseconds
* Required if resetType is “days”
daysint{resetType} == “days”
✓*
1 ~ 2147483646Number of days to reset
* Required if resetType is “days”