Master Data Reference of GS2-Buff

Reference of the format of master data and various models to be imported
{
  "version": "2024-04-15",
  "buffEntryModels": [
    {
      "name": "[string]Buff entry name",
      "metadata": "[string?]Metadata",
      "expression": "[string]Application type of buff",
      "targetType": "[string]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 to apply buff"
    }
  ]
}
TypeConditionRequiredDefaultValue LimitsDescription
versionstring
2024-04-15Format version of master data
buffEntryModelsList<BuffEntryModel>~ 100 itemsBuff 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.

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",
}
~ 128 charsTypes 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

OverrideBuffRate

Buff application rate override model

TypeConditionRequiredDefaultValue LimitsDescription
namestring
~ 128 charsBuff entry name
ratefloat
0 ~ 100Rate

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",
}
~ 128 charsTypes 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

BuffEntryModel

Buff 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 entity model GRN
namestring
~ 128 charsBuff entry name
metadatastring~ 2048 charsMetadata
expressionString Enum
enum {
    “rate_add”,
    “mul”,
    “value_add”
}
~ 128 charsApplication type of buff
Enumerator String DefinitionDescription
“rate_add”Rate Add
“mul”Mul
“value_add”Value Add
targetTypeString Enum
enum {
    “model”,
    “action”
}
~ 128 charsType 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 to apply buff