GS2-Enchant Master Data Reference

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

Master Data Format

{
  "version": "2023-07-18",
  "balanceParameterModels": [
    {
      "name": "[string]Balance Parameter Model name",
      "metadata": "[string?]Metadata",
      "totalValue": "[long]Total value",
      "initialValueStrategy": "[string enum]Initial value setting policy",
      "parameters": [
        {
          "name": "[string]Name",
          "metadata": "[string?]Metadata"
        }
      ]
    }
  ],
  "rarityParameterModels": [
    {
      "name": "[string]Rarity Parameter Model name",
      "metadata": "[string?]Metadata",
      "maximumParameterCount": "[int]Maximum number of parameters to be given",
      "parameterCounts": [
        {
          "count": "[int]Count",
          "weight": "[int]Draw Weight"
        }
      ],
      "parameters": [
        {
          "name": "[string]Name",
          "metadata": "[string?]Metadata",
          "resourceName": "[string]Parameter Resource Name for Game (Not used for GS2)",
          "resourceValue": "[long]Parameter Resource Value for Game (Not used for GS2)",
          "weight": "[int]Draw Weight"
        }
      ]
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2023-07-18Format version of master data
balanceParameterModelsList<BalanceParameterModel>~ 10000 itemsBalance Parameter Model
Defines the drawing conditions for balance parameters.
Balance parameters distribute a fixed total value across multiple parameter slots. For example, a weapon with a total power of 100 might have ATK=60, DEF=30, SPD=10. The initial value strategy determines how values are assigned: average distributes evenly, while lottery randomly allocates the total across parameters.
rarityParameterModelsList<RarityParameterModel>~ 10000 itemsRarity Parameter Model
Defines the drawing conditions for rarity parameters. Rarity parameters use a weighted lottery system to determine both the number of parameters granted and the specific values assigned. First, the number of parameter slots to fill is determined by a weighted draw from the parameter count model list. Then, each slot’s value is selected by a weighted draw from the parameter value model list, providing randomized equipment attributes with controlled probability distributions.

Model

BalanceParameterModel

Balance Parameter Model

Defines the drawing conditions for balance parameters. Balance parameters distribute a fixed total value across multiple parameter slots. For example, a weapon with a total power of 100 might have ATK=60, DEF=30, SPD=10. The initial value strategy determines how values are assigned: average distributes evenly, while lottery randomly allocates the total across parameters.

TypeConditionRequiredDefaultValue LimitsDescription
balanceParameterModelIdstring
*
~ 1024 charsBalance Parameter Model GRN
* Set automatically by the server
namestring
~ 128 charsBalance Parameter Model name
Balance Parameter Model-specific name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.).
metadatastring~ 2048 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.
totalValuelong
0 ~ 9223372036854775805Total value
The fixed total that is distributed across all parameter slots. When parameters are drawn, the individual values will always sum to this total regardless of the allocation strategy used.
initialValueStrategyString Enum
enum {
  “average”,
  “lottery”
}
“average”Initial value setting policy
Determines how the total value is distributed across parameter slots when first assigned. average divides the total evenly among all parameters, while lottery randomly distributes the total to create varied parameter combinations.
DefinitionDescription
“average”Average
“lottery”Lottery
parametersList<BalanceParameterValueModel>
1 ~ 10 itemsBalance parameter value model list
Defines the parameter slots available for this balance parameter. Each entry specifies a named parameter slot (e.g., ATK, DEF, SPD) with optional metadata. The total value is distributed across these slots.

BalanceParameterValueModel

Balance Parameter Value Model

Defines a single parameter slot available within a balance parameter. Each entry specifies a named slot (e.g., ATK, DEF, SPD) that receives a portion of the total value during the drawing process.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 64 charsName
The identifier for this parameter slot (e.g., ATK, DEF, SPD). Must be unique within the balance parameter model. Used as the key when storing and retrieving drawn parameter values.
metadatastring~ 512 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.

RarityParameterModel

Rarity Parameter Model

Defines the drawing conditions for rarity parameters. Rarity parameters use a weighted lottery system to determine both the number of parameters granted and the specific values assigned. First, the number of parameter slots to fill is determined by a weighted draw from the parameter count model list. Then, each slot’s value is selected by a weighted draw from the parameter value model list, providing randomized equipment attributes with controlled probability distributions.

TypeConditionRequiredDefaultValue LimitsDescription
rarityParameterModelIdstring
*
~ 1024 charsRarity Parameter Model GRN
* Set automatically by the server
namestring
~ 128 charsRarity Parameter Model name
Rarity Parameter Model-specific name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.).
metadatastring~ 2048 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.
maximumParameterCountint
1 ~ 10Maximum number of parameters to be given
The upper limit on the number of parameter slots that can be granted to a resource. The actual number granted is determined by a weighted draw from the parameter count model list, but will never exceed this value.
parameterCountsList<RarityParameterCountModel>
1 ~ 10 itemsRarity parameter count model list
Defines the weighted lottery entries for determining how many parameter slots are granted. Each entry specifies a count and a draw weight. Higher weights increase the probability of that count being selected.
parametersList<RarityParameterValueModel>
1 ~ 1000 itemsRarity parameter value model list
Defines the pool of possible parameter values that can be drawn. Each entry specifies a parameter name, resource details, and a draw weight. When filling parameter slots, values are selected from this pool via weighted lottery without replacement.

RarityParameterCountModel

Rarity Parameter Count Model

Defines a single entry in the weighted lottery for determining how many parameter slots are granted to a resource. Each entry pairs a parameter count with a draw weight, allowing fine-grained control over the probability distribution of parameter quantities.

TypeConditionRequiredDefaultValue LimitsDescription
countint
0 ~ 10Count
The number of parameter slots to grant when this entry is drawn. For example, a count of 3 means the resource will receive 3 parameter values selected from the value model pool.
weightint
1 ~ 2147483646Draw Weight
The relative weight used in the weighted lottery when determining the parameter count. Higher values increase the probability of this count being selected. The actual probability is this weight divided by the sum of all weights in the count model list.

RarityParameterValueModel

Rarity Parameter Value Model

Defines a single entry in the weighted lottery pool for rarity parameter values. Each entry specifies a parameter name, game-defined resource details, and a draw weight that determines its selection probability relative to other entries in the pool.

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 64 charsName
The identifier for this lottery entry. Must be unique within the rarity parameter model’s value pool. When drawn, this name is stored in the resulting Rarity Parameter Value.
metadatastring~ 512 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.
resourceNamestring
~ 64 charsParameter Resource Name for Game (Not used for GS2)
A game-defined resource type name associated with this parameter value (e.g., “fire_attack”, “ice_resist”). GS2 does not use this value for its own operations; it is passed through to the drawn result for use in game logic.
resourceValuelong
0 ~ 9223372036854775805Parameter Resource Value for Game (Not used for GS2)
A game-defined numeric value for this parameter (e.g., 50 for +50 attack power). GS2 does not use this value for its own operations; it is passed through to the drawn result for use in game logic.
weightint
1 ~ 2147483646Draw Weight
The relative weight used in the weighted lottery when selecting parameter values. Higher values increase the probability of this entry being selected. The actual probability is this weight divided by the sum of all weights in the pool.