> For the complete documentation index, see [llms.txt](/llms.txt)

# 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.

[Introduction to Microservices / GS2-Stamina](../../microservices/stamina)



- [GS2-Stamina Buff Reference](/api_reference/stamina/buff/)
  
- [GS2-Stamina Deploy/CDK Reference](/api_reference/stamina/deploy/)
  
- [GS2-Stamina Master Data Reference](/api_reference/stamina/master_data/)
  
- [GS2-Stamina Script Trigger Reference](/api_reference/stamina/script/)
  
- [GS2-Stamina SDK API Reference](/api_reference/stamina/sdk/)
  
- [GS2-Stamina SDK for Game Engine API Reference](/api_reference/stamina/game_engine/)
  
- [GS2-Stamina Transaction Actions](/api_reference/stamina/stamp_sheet/)
  
