GS2-Stamina API Reference

Stamina feature

Realize a stamina value that recovers with the passage of real time.

Stamina can be set to a recovery interval and recovery amount. Stamina can be set to a maximum of two levels. The first is the maximum value for natural recovery over time, and the second is the maximum value for UI reasons.

In GS2, when all stamina is restored upon leveling up, it can be restored beyond the maximum natural recovery value to ensure fairness. On the other hand, if this were allowed without limitation, the UI might break down. For this reason, a second maximum level is set so that even if the maximum is exceeded, GS2-Distributor can still deliver stamina recovery resources to the gift box.

This mechanism can also be applied to implement a foraging function in a city-building game. Set up buildings in the Stamina Model and represent stamina values as the production of buildings.


Use in your game

Game Engine

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

SDK

Specification of models and API references for GS2-Stamina 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.