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.


GS2-Stamina SDK for Game Engine API Reference

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

GS2-Stamina SDK API Reference

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

GS2-Stamina Script Trigger Reference

Reference for event triggers that call extended scripts

GS2-Stamina Deploy/CDK Reference

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

GS2-Stamina Master Data Reference

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

GS2-Stamina Transaction Actions

Specification of verify/consume/acquire transaction actions

GS2-Stamina Buff Reference

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.