GS2-Limit API Reference

Number of times limit feature

Service to realize limit processing

This service is not used alone, but is used in other services to realize the limit function.

A counter is an entity used to represent the number of times a player has acted. The count limit is achieved by a mechanism that specifies the maximum acceptable value when raising the counter and attempting to count up; if the maximum value would be exceeded, the count-up fails, causing subsequent processing to fail as well. A distinctive feature is that there is no maximum value on the counter itself; rather, the maximum is set on each count-up action.

For example, consider the process of recovering stamina. In many games there is an upper limit on how many times per day stamina can be recovered. And the more you recover, the higher the amount of money required for the recovery becomes.

By using anchorTimestamp, flexible scheduling such as resetting every N days from an event start date is possible.

By integrating with GS2-Buff, you can use buffs to adjust the maxValue of CountUp/CountUpByUserId, temporarily increasing or decreasing the upper limit. This is useful when implementing event-based easing measures such as “for a limited time, double the number of gacha pulls allowed per day”.


Use in your game

Game Engine

Specifications of models and API references for GS2-Limit SDK for Game Engine

SDK

Specification of models and API references for GS2-Limit SDK for various programming languages

Configuration and integrations

Deploy/CDK

The template format used when creating stacks with GS2-Deploy, and implementation examples of template output in various languages using CDK

Master Data

Reference for the master data format and the models to be imported

Script

Reference for event triggers that call extended scripts

Transaction Action

Specification of verify/consume/acquire transaction actions

Buff

Describes the fields within models/actions whose parameters can be adjusted when applying buffs with GS2-Buff, and how to configure the scope in which those buffs are applied.