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"
]
}
}
]
}| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| version | string | ✓ | 2019-02-14 | Format version of master data | ||
| staminaModels | List<StaminaModel> | ~ 100 items | 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. |
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.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| staminaModelId | string | * | ~ 1024 chars | Stamina Model GRN * Set automatically by the server | ||
| name | string | ✓ | ~ 128 chars | Stamina Model name Stamina Model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| metadata | string | ~ 128 chars | Metadata 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. | |||
| recoverIntervalMinutes | int | ✓ | 0 ~ 2147483646 | Recover 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. | ||
| recoverValue | int | 1 | 0 ~ 2147483646 | Recover 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. | ||
| initialCapacity | int | ✓ | 0 ~ 2147483646 | Initial 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. | ||
| isOverflow | bool | ✓ | 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. | |||
| maxCapacity | int | {isOverflow} == true | ✓* | 0 ~ 2147483646 | Max 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 | |
| maxStaminaTable | MaxStaminaTable | Max 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. | ||||
| recoverIntervalTable | RecoverIntervalTable | Recover 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. | ||||
| recoverValueTable | RecoverValueTable | Recover 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.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Maximum Stamina Table Name Maximum Stamina Table-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| metadata | string | ~ 128 chars | Metadata 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. | |||
| experienceModelId | string | ✓ | ~ 1024 chars | Experience 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. | ||
| values | List<int> | ✓ | 1 ~ 1024 items | Maximum 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.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Stamina recovery interval table name Stamina recovery interval table-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| metadata | string | ~ 128 chars | Metadata 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. | |||
| experienceModelId | string | ✓ | ~ 1024 chars | Experience 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. | ||
| values | List<int> | ✓ | 1 ~ 1024 items | Recovery 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.
| Type | Condition | Required | Default | Value Limits | Description | |
|---|---|---|---|---|---|---|
| name | string | ✓ | ~ 128 chars | Stamina Recovery Amount Table name Stamina Recovery Amount Table-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). | ||
| metadata | string | ~ 128 chars | Metadata 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. | |||
| experienceModelId | string | ✓ | ~ 1024 chars | Experience 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. | ||
| values | List<int> | ✓ | 1 ~ 1024 items | Recovery 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. |