GS2-Enhance Master Data Reference

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

Master Data Format

{
  "version": "2020-08-22",
  "rateModels": [
    {
      "name": "[string]Enhancement Rate Model name",
      "description": "[string?]Description",
      "metadata": "[string?]Metadata",
      "targetInventoryModelId": "[string]GS2-Inventory Inventory Model GRN usable for enhancement targets",
      "acquireExperienceSuffix": "[string]Suffix to be assigned to the property ID that stores the experience value obtained from GS2-Experience",
      "materialInventoryModelId": "[string]GS2-Inventory Inventory Model GRN usable as enhancement material",
      "acquireExperienceHierarchy": [
        "[string]Hierarchical structure of JSON data defining acquisition experience values to be stored in ItemModel metadata"
      ],
      "experienceModelId": "[string]GS2-Experience Experience Model GRN gained as a result of enhancement",
      "bonusRates": [
        {
          "rate": "[float]Experience bonus multiplier (1.0 = no bonus)",
          "weight": "[int]Lottery weight"
        }
      ]
    }
  ],
  "unleashRateModels": [
    {
      "name": "[string]Unleash Rate Model name",
      "description": "[string?]Description",
      "metadata": "[string?]Metadata",
      "targetInventoryModelId": "[string]GS2-Inventory Inventory Model GRN usable for unleash targets",
      "gradeModelId": "[string]Grade Model GRN",
      "groupKeyHierarchy": [
        "[string]Hierarchy of the JSON data that stores the group key in the ItemModel metadata"
      ],
      "gradeEntries": [
        {
          "gradeValue": "[long]Target grade",
          "type": "[string]Type of material condition",
          "needCount": "[int]How many items of the same type to consume",
          "recipes": [
            {
              "name": "[string]Recipe name",
              "metadata": "[string?]Metadata",
              "targetGroupKeys": [
                "[string]Group key"
              ],
              "materials": [
                {
                  "name": "[string]Material name",
                  "materialType": "[string]Type of material",
                  "individualSetting": {
                    "matchType": "[string]How the material is matched against the target",
                    "gradeCondition": "[string]Grade condition of the material",
                    "gradeValue": "[long]Grade the material must have",
                    "count": "[int]Number of item sets to consume"
                  },
                  "quantitySetting": {
                    "matchType": "[string]How the item model to consume is decided",
                    "materialInventoryModelId": "[string]GS2-Inventory inventory model GRN to search for the material",
                    "itemModelId": "[string]GS2-Inventory item model GRN to consume",
                    "count": "[int]Quantity to consume"
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
Type Condition Required Default Value Limits Description
version string
✓
2020-08-22 Master data format version
rateModels List<RateModel> ~ 10000 items Enhancement Rate Model
The enhancement rate is data that defines the materials used for enhancement and the target of enhancement.

Both material data and enhancement target data must be managed in GS2-Inventory.
The experience value obtained from the enhancement is recorded in GS2-Inventory metadata in JSON format.
Here, it is necessary to describe at which level of the metadata the experience value is stored.

A correction value can be applied to the amount of experience value that can be obtained with a certain probability of great success during enhancement.
The probability of that draw is also defined in this entity.

targetInventoryModelId specifies the inventory model that holds the items to be enhanced, and materialInventoryModelId the inventory model that holds the items usable as material.
These can be separate inventory models, so an arrangement in which characters are the target and enhancement-only items are the material is possible.

The experience each material grants is written in the metadata of its item model, and acquireExperienceHierarchy tells GS2-Enhance where in that JSON it is stored.
For a structure such as { "aaa": { "bbb": { "experienceValue": 100 } } }, specify [ "aaa", "bbb", "experienceValue" ]. Up to 10 levels can be specified.

The gained experience is added to GS2-Experience, on the experience model specified by experienceModelId.
The property ID it is added to is the property ID of the target item with acquireExperienceSuffix appended, so a single item can hold several kinds of experience, such as level for the character level and like for affection.

bonusRates defines a weighted draw over the bonus multipliers applied to the gained experience.
Each entry holds a multiplier (1.5 meaning 150%) and a draw weight, one entry is chosen by weighted draw on each enhancement, and up to 1,000 entries can be registered.
unleashRateModels List<UnleashRateModel> ~ 10000 items Unleash Rate Model
Defines the conditions for limit breaking (unleashing) items.

A limit break here is an enhancement that raises the grade managed by GS2-Grade by consuming duplicates of the same item as material.
Raising the grade raises the rank cap on the GS2-Experience side, which lets the target be grown to a higher level.

targetInventoryModelId specifies the GS2-Inventory inventory model that holds the items eligible for a limit break.
Both the item being unleashed and the duplicates consumed as material must belong to this inventory model.
gradeModelId specifies the GS2-Grade grade model that tracks the grade of the target item; the grade is raised by 1 on a successful limit break.

gradeEntries defines, for each grade, how many duplicates must be consumed to reach it, and between 1 and 1,000 entries can be registered.
Setting, for example, 1 duplicate for grade 1 and 3 duplicates for grade 2 lets you control the cost of each limit break step individually.

A resource consumed as material is discarded together with whatever it held.
Even when the material holds experience or other resources, they are not carried over to the target, so convert them into a resource for handover beforehand if that is required.

Models

RateModel

Enhancement Rate Model

The enhancement rate is data that defines the materials used for enhancement and the target of enhancement.

Both material data and enhancement target data must be managed in GS2-Inventory. The experience value obtained from the enhancement is recorded in GS2-Inventory metadata in JSON format. Here, it is necessary to describe at which level of the metadata the experience value is stored.

A correction value can be applied to the amount of experience value that can be obtained with a certain probability of great success during enhancement. The probability of that draw is also defined in this entity.

targetInventoryModelId specifies the inventory model that holds the items to be enhanced, and materialInventoryModelId the inventory model that holds the items usable as material. These can be separate inventory models, so an arrangement in which characters are the target and enhancement-only items are the material is possible.

The experience each material grants is written in the metadata of its item model, and acquireExperienceHierarchy tells GS2-Enhance where in that JSON it is stored. For a structure such as { "aaa": { "bbb": { "experienceValue": 100 } } }, specify [ "aaa", "bbb", "experienceValue" ]. Up to 10 levels can be specified.

The gained experience is added to GS2-Experience, on the experience model specified by experienceModelId. The property ID it is added to is the property ID of the target item with acquireExperienceSuffix appended, so a single item can hold several kinds of experience, such as level for the character level and like for affection.

bonusRates defines a weighted draw over the bonus multipliers applied to the gained experience. Each entry holds a multiplier (1.5 meaning 150%) and a draw weight, one entry is chosen by weighted draw on each enhancement, and up to 1,000 entries can be registered.

Type Condition Required Default Value Limits Description
rateModelId string
*
~ 1024 chars Enhancement Rate Model GRN
* Set automatically by the server
name string
✓
~ 128 chars Enhancement Rate Model name
Unique Enhancement Rate Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
description string ~ 1024 chars Description
metadata string ~ 2048 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.
targetInventoryModelId string
✓
~ 1024 chars GS2-Inventory Inventory Model GRN usable for enhancement targets
Specifies the GS2-Inventory inventory model that holds the items eligible for enhancement. The item to be enhanced must belong to this inventory model.
acquireExperienceSuffix string
✓
~ 1024 chars Suffix to be assigned to the property ID that stores the experience value obtained from GS2-Experience
A string appended to the item’s property ID to form the GS2-Experience property ID where experience is stored. This allows the same item to have multiple experience types (e.g., “level” for character level, “like” for affinity).
materialInventoryModelId string
✓
~ 1024 chars GS2-Inventory Inventory Model GRN usable as enhancement material
Specifies the GS2-Inventory inventory model that holds the items usable as enhancement materials. The experience value each material provides is defined in the item model’s metadata using the JSON hierarchy specified by acquireExperienceHierarchy.
acquireExperienceHierarchy List<string> 0 ~ 10 items Hierarchical structure of JSON data defining acquisition experience values to be stored in ItemModel metadata
GS2-Enhance features a mechanism that works in conjunction with GS2-Inventory to perform enhancements. It sets the experience value when used as enhancement material in JSON format within the ItemModel metadata.
For example, to define metadata with a structure like: { “aaa”: { “bbb”: { “experienceValue”: 100 } } } Specify it as: [ “aaa”, ‘bbb’, “experienceValue” ]
Details are explained in the Microservices Introduction / GS2-Enhance section.
experienceModelId string
✓
~ 1024 chars GS2-Experience Experience Model GRN gained as a result of enhancement
Specifies the GS2-Experience experience model where the experience points obtained from enhancement are recorded. The experience is added to the property identified by combining the target item’s property ID with the acquireExperienceSuffix.
bonusRates List<BonusRate> 0 ~ 1000 items Experience gain bonus
Defines a weighted lottery for bonus experience multipliers during enhancement. Each entry specifies a multiplier (e.g., 1.5 for 150%) and a draw weight. When enhancement is performed, one entry is selected by weighted lottery to determine whether a “great success” bonus applies to the experience gained.

BonusRate

Experience Gain Bonus

Defines a single entry in the weighted lottery for determining the experience bonus multiplier during enhancement. By configuring multiple entries with different rates and weights, you can implement “great success” or “super success” mechanics with controlled probabilities.

Type Condition Required Default Value Limits Description
rate float 1.0 0 ~ 10000 Experience bonus multiplier (1.0 = no bonus)
The multiplier applied to the base experience value when this entry is drawn. A value of 1.0 means normal enhancement with no bonus, 1.5 means 150% experience (great success), 2.0 means 200% experience (super success), and so on.
weight int 1 0 ~ 2147483645 Lottery weight
The relative weight used in the weighted lottery when selecting the bonus rate. Higher values increase the probability of this bonus rate being selected. The actual probability is this weight divided by the sum of all weights in the bonus rate list.

UnleashRateModel

Unleash Rate Model

Defines the conditions for limit breaking (unleashing) items.

A limit break here is an enhancement that raises the grade managed by GS2-Grade by consuming duplicates of the same item as material. Raising the grade raises the rank cap on the GS2-Experience side, which lets the target be grown to a higher level.

targetInventoryModelId specifies the GS2-Inventory inventory model that holds the items eligible for a limit break. Both the item being unleashed and the duplicates consumed as material must belong to this inventory model. gradeModelId specifies the GS2-Grade grade model that tracks the grade of the target item; the grade is raised by 1 on a successful limit break.

gradeEntries defines, for each grade, how many duplicates must be consumed to reach it, and between 1 and 1,000 entries can be registered. Setting, for example, 1 duplicate for grade 1 and 3 duplicates for grade 2 lets you control the cost of each limit break step individually.

A resource consumed as material is discarded together with whatever it held. Even when the material holds experience or other resources, they are not carried over to the target, so convert them into a resource for handover beforehand if that is required.

Type Condition Required Default Value Limits Description
unleashRateModelId string
*
~ 1024 chars Unleash Rate Model GRN
* Set automatically by the server
name string
✓
~ 128 chars Unleash Rate Model name
Unique Unleash Rate Model name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
description string ~ 1024 chars Description
metadata string ~ 2048 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.
targetInventoryModelId string
✓
~ 1024 chars GS2-Inventory Inventory Model GRN usable for unleash targets
Specifies the GS2-Inventory inventory model that holds the items eligible for limit breaking. The item to be unleashed and the duplicate items consumed as material must both belong to this inventory model.
gradeModelId string
✓
~ 1024 chars Grade Model GRN
Specifies the GS2-Grade grade model that tracks the limit break level of the target item. When a limit break is successfully performed, the item’s grade is incremented in this grade model.
groupKeyHierarchy List<string> [] 0 ~ 10 items Hierarchy of the JSON data that stores the group key in the ItemModel metadata
The group key classifies item models, such as the equipment slot, and is used by recipes to compare materials with the target.
For metadata with a structure like { “unleash”: { “group”: “weapon” } }, specify [ “unleash”, “group” ].
The value must be a string. Required when a recipe uses “Same Group” or targetGroupKeys.
gradeEntries List<UnleashRateEntryModel>
✓
1 ~ 1000 items List of Grade Entry
Defines the material cost for each grade level of the limit break. Each entry maps a grade value to the number of duplicate items that must be consumed to reach that grade. For example, grade 1 might require 1 duplicate, grade 2 might require 3 duplicates, and so on.

UnleashRateEntryModel

Unleash Rate Entry Model

Defines the material cost for a single grade level in a limit break progression. Each entry specifies which grade value it applies to and how many duplicate items of the same type must be consumed to achieve that grade.

Type Condition Required Default Value Limits Description
gradeValue long
✓
1 ~ 1000 Target grade
The grade value that this entry defines the cost for. When performing a limit break to this grade level, the number of items specified by needCount will be consumed.
type string (enum)
enum {
  “simple”,
  “recipe”
}
“simple” Type of material condition
“Simple (simple)” consumes needCount duplicates of the same item model as the target. This is the conventional behavior.
“Recipe (recipe)” lets the player choose one of the recipes, and consumes the materials defined by the chosen recipe.
DefinitionDescription
simpleSimple
recipeRecipe
needCount int {type} == “simple”
✓*
1 ~ 1000 How many items of the same type to consume
The number of duplicate items that must be consumed to perform the limit break to the target grade. These items are of the same item model as the item being unleashed.
* Required if type is “simple”
recipes List<UnleashRecipe> {type} == “recipe”
✓*
1 ~ 10 items Recipes
Used when type is “Recipe”. The player chooses one of these recipes when executing an unleash.
* Required if type is “recipe”

UnleashRecipe

Unleash Recipe

One way to raise the grade by one step. When a grade entry has several recipes, the player chooses one of them, and all the materials of the chosen recipe are required.

Type Condition Required Default Value Limits Description
name string
✓
~ 128 chars Recipe name
A name unique within the grade entry. The player specifies the recipe by this name when executing an unleash.
metadata string ~ 2048 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.
targetGroupKeys List<string> [] 0 ~ 10 items Group keys of the targets this recipe can be used for
When empty, the recipe can be used for any target.
When set, the recipe can be used only when the group key of the target’s item model is included. The group key is read from the item model metadata using groupKeyHierarchy of the Unleash Rate Model.
materials List<UnleashMaterial>
✓
1 ~ 10 items Materials required by this recipe
All the materials are consumed when this recipe is used.

UnleashMaterial

Unleash Material

Defines one kind of material required by a recipe. “Individual (individual)” consumes item sets chosen by the player, such as duplicate equipment. “Quantity (quantity)” consumes a quantity of an item decided by the setting, such as a general-purpose enhancement material.

Type Condition Required Default Value Limits Description
name string
✓
~ 128 chars Material name
A name unique within the recipe. When executing an unleash, the player specifies the item sets for each individual material by this name.
materialType string (enum)
enum {
  “individual”,
  “quantity”
}
✓
Type of material
“Individual (individual)” consumes item sets chosen by the player.
“Quantity (quantity)” consumes a quantity of an item decided by the setting.
DefinitionDescription
individualIndividual
quantityQuantity
individualSetting UnleashIndividualMaterialSetting {materialType} == “individual”
✓*
Individual material setting
Used when materialType is “Individual”.
* Required if materialType is “individual”
quantitySetting UnleashQuantityMaterialSetting {materialType} == “quantity”
✓*
Quantity material setting
Used when materialType is “Quantity”.
* Required if materialType is “quantity”

UnleashIndividualMaterialSetting

Individual Material Setting

Defines a material that is consumed as individual item sets, such as a duplicate piece of equipment. The player chooses which item sets to consume, and each chosen item set must belong to the same inventory model as the item being unleashed. Because each individual can have its own grade in GS2-Grade, the grade of the material can also be made a condition.

Type Condition Required Default Value Limits Description
matchType string (enum)
enum {
  “sameItem”,
  “sameGroup”
}
✓
How the material is matched against the target
“Same Item (sameItem)” accepts only item sets of the same item model as the target.
“Same Group (sameGroup)” accepts item sets whose item model has the same group key as the target’s item model. The group key is read from the item model metadata using groupKeyHierarchy of the Unleash Rate Model.
DefinitionDescription
sameItemSame Item
sameGroupSame Group
gradeCondition string (enum)
enum {
  “any”,
  “sameAsTarget”,
  “equal”
}
“any” Grade condition of the material
“Any (any)” does not check the grade of the material.
“Same as Target (sameAsTarget)” requires the material to have the same grade as the target’s current grade.
“Equal (equal)” requires the material to have the grade specified by gradeValue.
The grade is verified in the transaction with GS2-Grade, using the grade model of the Unleash Rate Model.
DefinitionDescription
anyAny
sameAsTargetSame as Target
equalEqual
gradeValue long {gradeCondition} == “equal”
✓*
0 ~ 1000 Grade the material must have
Used when gradeCondition is “Equal”.
* Required if gradeCondition is “equal”
count int
✓
1 ~ 1000 Number of item sets to consume
The number of item sets the player must specify for this material. Each item set is consumed by one.

UnleashQuantityMaterialSetting

Quantity Material Setting

Defines a material that is consumed by quantity, such as a general-purpose enhancement material. The player does not choose the item; the item model to consume is decided by this setting, and the specified quantity is consumed. Both GS2-Inventory standard inventories and simple inventories can be used.

Type Condition Required Default Value Limits Description
matchType string (enum)
enum {
  “sameGroup”,
  “specified”
}
✓
How the item model to consume is decided
“Same Group (sameGroup)” consumes the item model in materialInventoryModelId whose group key is the same as the target’s item model. Exactly one item model must have that group key.
“Specified (specified)” consumes the item model specified by itemModelId.
DefinitionDescription
sameGroupSame Group
specifiedSpecified
materialInventoryModelId string {matchType} == “sameGroup”
✓*
~ 1024 chars GS2-Inventory inventory model GRN to search for the material
Used when matchType is “Same Group”. A simple inventory model GRN can also be specified.
* Required if matchType is “sameGroup”
itemModelId string {matchType} == “specified”
✓*
~ 1024 chars GS2-Inventory item model GRN to consume
Used when matchType is “Specified”. A simple item model GRN can also be specified.
* Required if matchType is “specified”
count int
✓
1 ~ 2147483645 Quantity to consume