GS2-Limit Master Data Reference
Reference for the master data format and the 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]Reset Day of Month",
"resetDayOfWeek": "[string enum]Reset Day of Week",
"resetHour": "[int]Reset Hour",
"anchorTimestamp": "[long]Base date and time for counting elapsed days",
"days": "[int]Number of Days to Reset"
}
]
}| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| version | string | ✓ | 2019-04-05 | Format version of master data | ||
| limitModels | List<LimitModel> | ~ 100 items | 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. |
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.
| Type | Condition | Required | Default | Value Limits | Description | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| limitModelId | string | * | ~ 1024 chars | Usage Limit Model GRN * Set automatically by the server | ||||||||||||||||||
| name | string | ✓ | ~ 128 chars | Usage Limit Model name Usage Limit Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||||||||||||||||||
| metadata | string | ~ 2048 chars | Metadata 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. | |||||||||||||||||||
| resetType | String Enum enum { “notReset”, “daily”, “weekly”, “monthly”, “days” } | ✓ | Reset Timing Determines when the counter values under this limit model are automatically reset to zero. Choose from: notReset (permanent, never resets), daily (resets at the specified hour each day), weekly (resets on the specified day of the week), monthly (resets on the specified day of the month), or days (resets every fixed number of days from an anchor timestamp). All times are in UTC.
| |||||||||||||||||||
| resetDayOfMonth | int | {resetType} == “monthly” | ✓* | 1 ~ 31 | Reset Day of Month The day of the month on which counters are reset when resetType is “monthly”. Valid values are 1-31. If the specified day exceeds the number of days in the current month (e.g., 31 for February), the counter resets on the last day of that month. * Required if resetType is “monthly” | |||||||||||||||||
| resetDayOfWeek | String Enum enum { “sunday”, “monday”, “tuesday”, “wednesday”, “thursday”, “friday”, “saturday” } | {resetType} == “weekly” | ✓* | Reset Day of Week The day of the week on which counters are reset when resetType is “weekly”. The reset occurs at the hour specified by resetHour (UTC) on this day.
* Required if resetType is “weekly” | ||||||||||||||||||
| resetHour | int | {resetType} in [“monthly”, “weekly”, “daily”] | ✓* | 0 ~ 23 | Reset Hour The hour (0-23) in UTC at which counters are reset for daily, weekly, or monthly reset types. For example, a value of 0 means counters reset at midnight UTC. * Required if resetType is “monthly”,“weekly”,“daily” | |||||||||||||||||
| anchorTimestamp | long | {resetType} == “days” | ✓* | Base date and time for counting elapsed days Unix time, milliseconds * Required if resetType is “days” | ||||||||||||||||||
| days | int | {resetType} == “days” | ✓* | 1 ~ 2147483646 | Number of Days to Reset The interval in days between counter resets when resetType is “days”. The reset cycle is calculated from the anchorTimestamp. For example, if days is 7 and anchorTimestamp is Monday at noon, counters reset every Monday at noon. * Required if resetType is “days” |