Master Data Reference of GS2-Buff

Reference of the format of master data and various models to be imported

Master Data Format

{
  "version": "2024-04-15",
  "buffEntryModels": [
    {
      "name": "[string]Buff entry model name",
      "metadata": "[string?]Metadata",
      "expression": "[string enum]Application type of buff",
      "targetType": "[string enum]Type of target to apply buff",
      "targetModel": {
        "targetModelName": "[string]Types of model to apply buffs",
        "targetFieldName": "[string]Field name to which the buff is applied",
        "conditionGrns": [
          {
            "targetModelName": "[string]Buff application condition model name",
            "targetGrn": "[string]Buff application condition GRN"
          }
        ],
        "rate": "[float]Rate"
      },
      "targetAction": {
        "targetActionName": "[string]Types of action to apply buffs",
        "targetFieldName": "[string]Field name to which the buff is applied",
        "conditionGrns": [
          {
            "targetModelName": "[string]Buff application condition model name",
            "targetGrn": "[string]Buff application condition GRN"
          }
        ],
        "rate": "[float]Rate"
      },
      "priority": "[int]Priority of buff application",
      "applyPeriodScheduleEventId": "[string?]Event holding period GRN to apply buff"
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2024-04-15Format version of master data
buffEntryModelsList<BuffEntryModel>~ 100 itemsBuff Entry Model
The amount of buff is managed by BuffEntryModel, and it is possible to associate multiple BuffEntryModels with a specific entry.
The application order of BuffEntryModel is managed by the priority of BuffEntryModel, and the smaller the value of priority, the higher the priority.

Three buff application methods exist: “Rate Add”, ‘Mul’, and “Value Add”.
Rate Add is an instruction that adds to the buff application rate. Mul is an instruction that multiplies the buff application rate.
Value Add is an instruction that adds to the value after buff correction calculations.
For example, if the default rate is 1.0 and Add 0.2 is set, the buff application rate becomes 1.2.
Setting Mul 0.5 reduces the buff application rate to 0.5 times.

BuffEntryModel can be associated with events of GS2-Schedule, and it is possible to set to apply buffs only during the event holding period.

Model

BuffEntryModel

Buff Entry Model

The amount of buff is managed by BuffEntryModel, and it is possible to associate multiple BuffEntryModels with a specific entry. The application order of BuffEntryModel is managed by the priority of BuffEntryModel, and the smaller the value of priority, the higher the priority.

Three buff application methods exist: “Rate Add”, ‘Mul’, and “Value Add”. Rate Add is an instruction that adds to the buff application rate. Mul is an instruction that multiplies the buff application rate. Value Add is an instruction that adds to the value after buff correction calculations. For example, if the default rate is 1.0 and Add 0.2 is set, the buff application rate becomes 1.2. Setting Mul 0.5 reduces the buff application rate to 0.5 times.

BuffEntryModel can be associated with events of GS2-Schedule, and it is possible to set to apply buffs only during the event holding period.

TypeConditionRequiredDefaultValue LimitsDescription
buffEntryModelIdstring
✓*
~ 1024 charsBuff entry model GRN
* Automatically configured on the server
namestring
~ 128 charsBuff entry model name
Buff entry model-specific name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.).
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.
expressionString Enum
enum {
  “rate_add”,
  “mul”,
  “value_add”
}
Application type of buff
Enumerator String DefinitionDescription
“rate_add”Rate Add
“mul”Mul
“value_add”Value Add
targetTypeString Enum
enum {
  “model”,
  “action”
}
Type of target to apply buff
Enumerator String DefinitionDescription
“model”Model
“action”Action
targetModelBuffTargetModel{targetType} == “model”
✓*
Model to apply buff
* Required if targetType is “model”
targetActionBuffTargetAction{targetType} == “action”
✓*
Action to apply buff
* Required if targetType is “action”
priorityint
0 ~ 2147483646Priority of buff application
applyPeriodScheduleEventIdstring~ 1024 charsEvent holding period GRN to apply buff

BuffTargetModel

Buff Target Model

TypeConditionRequiredDefaultValue LimitsDescription
targetModelNameString Enum
enum {
"Gs2Exchange:RateModel",
"Gs2Exchange:IncrementalRateModel",
"Gs2Experience:Status",
"Gs2Formation:Mold",
"Gs2Idle:Status",
"Gs2Idle:CategoryModel",
"Gs2Inventory:Inventory",
"Gs2LoginReward:BonusModel",
"Gs2Mission:MissionTaskModel",
"Gs2Quest:QuestModel",
"Gs2Showcase:DisplayItem",
"Gs2Showcase:RandomDisplayItemModel",
"Gs2SkillTree:NodeModel",
"Gs2Stamina:Stamina",
}
Types of model to apply buffs
targetFieldNamestring
~ 64 charsField name to which the buff is applied
conditionGrnsList<BuffTargetGrn>
1 ~ 10 itemsList of buff application condition GRNs
ratefloat
0 ~ 1000000Rate

BuffTargetAction

Buff Target Action

TypeConditionRequiredDefaultValue LimitsDescription
targetActionNameString Enum
enum {
"Gs2Experience:AddExperienceByUserId",
"Gs2Experience:SubExperience",
"Gs2Experience:SubExperienceByUserId",
"Gs2Inventory:AcquireItemSetByUserId",
"Gs2Inventory:ConsumeItemSet",
"Gs2Inventory:ConsumeItemSetByUserId",
"Gs2Inventory:AcquireSimpleItemsByUserId",
"Gs2Inventory:ConsumeSimpleItems",
"Gs2Inventory:ConsumeSimpleItemsByUserId",
"Gs2Inventory:AcquireBigItemByUserId",
"Gs2Inventory:ConsumeBigItem",
"Gs2Inventory:ConsumeBigItemByUserId",
"Gs2Limit:CountUp",
"Gs2Limit:CountUpByUserId",
"Gs2Money:DepositByUserId",
"Gs2Money:Withdraw",
"Gs2Money:WithdrawByUserId",
"Gs2Money2:DepositByUserId",
"Gs2Money2:Withdraw",
"Gs2Money2:WithdrawByUserId",
"Gs2Stamina:ConsumeStamina",
"Gs2Stamina:ConsumeStaminaByUserId",
"Gs2Stamina:RecoverStaminaByUserId",
}
Types of action to apply buffs
targetFieldNamestring
~ 64 charsField name to which the buff is applied
conditionGrnsList<BuffTargetGrn>
1 ~ 10 itemsList of buff application condition GRNs
ratefloat
0 ~ 1000000Rate

BuffTargetGrn

Buff Target GRN pattern

TypeConditionRequiredDefaultValue LimitsDescription
targetModelNamestring
~ 64 charsBuff application condition model name
targetGrnstring
~ 1024 charsBuff application condition GRN