GS2-Stamina Master Data Reference

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

Master Data Format

{
  "version": "2019-02-14",
  "staminaModels": [
    {
      "name": "[string]Stamina Model name",
      "metadata": "[string?]Metadata",
      "recoverIntervalMinutes": "[int]Recover Interval Minutes",
      "recoverValue": "[int]Recover Value",
      "initialCapacity": "[int]Initial Capacity",
      "isOverflow": "[bool]Is Overflow",
      "maxCapacity": "[int]Max Capacity",
      "maxStaminaTable": {
        "name": "[string]Maximum Stamina Table Name",
        "metadata": "[string?]Metadata",
        "experienceModelId": "[string]Experience Model ID",
        "values": [
          "[int]Maximum Stamina"
        ]
      },
      "recoverIntervalTable": {
        "name": "[string]Stamina recovery interval table name",
        "metadata": "[string?]Metadata",
        "experienceModelId": "[string]Experience Model ID",
        "values": [
          "[int?]Stamina Recovery Interval (Minutes)"
        ]
      },
      "recoverValueTable": {
        "name": "[string]Stamina Recovery Amount Table name",
        "metadata": "[string?]Metadata",
        "experienceModelId": "[string]Experience Model ID",
        "values": [
          "[int?]Stamina Recovery Amount"
        ]
      }
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2019-02-14Format version of master data
staminaModelsList<StaminaModel>~ 100 itemsStamina Model
Parameters such as the maximum value of stamina, recovery interval, and amount of recovery can be defined.
You can also control the maximum value and the amount of recovery in conjunction with GS2-Experience.

Model

StaminaModel

Stamina Model

Parameters such as the maximum value of stamina, recovery interval, and amount of recovery can be defined. You can also control the maximum value and the amount of recovery in conjunction with GS2-Experience.

TypeConditionRequiredDefaultValue LimitsDescription
staminaModelIdstring
*
~ 1024 charsStamina Model GRN
* Set automatically by the server
namestring
~ 128 charsStamina Model name
Stamina Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 128 charsMetadata
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.
recoverIntervalMinutesint
0 ~ 2147483646Recover Interval Minutes
The number of minutes between each stamina recovery tick.
Every time this interval elapses, the player’s stamina increases by the recover value amount.
Can be overridden per-user via GS2-Experience rank using a RecoverIntervalTable.
Set to 0 to disable automatic time-based recovery.
recoverValueint10 ~ 2147483646Recover Value
The amount of stamina recovered per recovery tick.
Each time the recover interval elapses, stamina increases by this value until the maximum is reached.
Can be overridden per-user via GS2-Experience rank using a RecoverValueTable.
Defaults to 1.
initialCapacityint
0 ~ 2147483646Initial Capacity
The default maximum stamina value for all players.
When overflow is disabled, this serves as the floor for the per-user maximum value.
Can be overridden per-user via GS2-Experience rank using a MaxStaminaTable.
isOverflowbool
Is Overflow
Whether stamina can exceed the initial capacity through means such as item usage.
When enabled, stamina can be set above initialCapacity up to maxCapacity. Natural time-based recovery still caps at the normal maximum.
When disabled, the per-user maximum value is clamped to at least initialCapacity.
maxCapacityint{isOverflow} == true
✓*
0 ~ 2147483646Max Capacity
The absolute upper limit of stamina when overflow is enabled.
Even with overflow, stamina cannot exceed this value. Only shown when isOverflow is true.
For example, if initialCapacity is 100 and maxCapacity is 200, items can boost stamina up to 200 but natural recovery stops at 100.
* Required if isOverflow is true
maxStaminaTableMaxStaminaTableMax Stamina Table
Reference to a MaxStaminaTable that dynamically determines the maximum stamina value based on the player’s GS2-Experience rank.
When set, the player’s max stamina is looked up from the table using their current rank index, overriding initialCapacity.
If not set, all players share the same initialCapacity as their maximum.
recoverIntervalTableRecoverIntervalTableRecover Interval Table
Reference to a RecoverIntervalTable that dynamically determines the recovery interval based on the player’s GS2-Experience rank.
When set, the player’s recovery interval is looked up from the table using their current rank index, overriding recoverIntervalMinutes.
If not set, all players share the same recoverIntervalMinutes.
recoverValueTableRecoverValueTableRecover Value Table
Reference to a RecoverValueTable that dynamically determines the recovery amount based on the player’s GS2-Experience rank.
When set, the player’s recovery value is looked up from the table using their current rank index, overriding recoverValue.
If not set, all players share the same recoverValue.

MaxStaminaTable

Maximum Stamina Table

This entity defines the maximum value of stamina for each rank of GS2-Experience.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsMaximum Stamina Table Name
Maximum Stamina Table-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 128 charsMetadata
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.
experienceModelIdstring
~ 1024 charsExperience Model ID
The GRN of the GS2-Experience ExperienceModel used to look up the player’s current rank.
The rank index is used as an array index into the values list to determine the per-user maximum stamina.
valuesList<int>
1 ~ 1024 itemsMaximum Stamina Values by Rank
An array of maximum stamina values indexed by the player’s GS2-Experience rank index.
The value at index i is used as the maximum stamina for players at rank i. The array length should match the number of ranks defined in the referenced ExperienceModel.

RecoverIntervalTable

Recovery Interval Table

This entity defines the stamina recovery interval for each rank of GS2-Experience.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsStamina recovery interval table name
Stamina recovery interval table-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 128 charsMetadata
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.
experienceModelIdstring
~ 1024 charsExperience Model ID
The GRN of the GS2-Experience ExperienceModel used to look up the player’s current rank.
The rank index is used as an array index into the values list to determine the per-user recovery interval.
valuesList<int>
1 ~ 1024 itemsRecovery Interval Values by Rank
An array of recovery interval values (in minutes) indexed by the player’s GS2-Experience rank index.
The value at index i is used as the recovery interval for players at rank i, overriding the model’s default recoverIntervalMinutes.

RecoverValueTable

Stamina Recovery Amount Table

This entity defines the amount of stamina recovery for each rank of GS2-Experience.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsStamina Recovery Amount Table name
Stamina Recovery Amount Table-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
metadatastring~ 128 charsMetadata
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.
experienceModelIdstring
~ 1024 charsExperience Model ID
The GRN of the GS2-Experience ExperienceModel used to look up the player’s current rank.
The rank index is used as an array index into the values list to determine the per-user recovery amount.
valuesList<int>
1 ~ 1024 itemsRecovery Amount Values by Rank
An array of recovery amount values indexed by the player’s GS2-Experience rank index.
The value at index i is used as the recovery amount per tick for players at rank i, overriding the model’s default recoverValue.