GS2-Buff API Reference

Buff feature

GS2-Buff provides a function to centrally manage correction values for the compensation and rewards of various microservices, and the maximum value of user data.

Each microservice has fields that can implement buffs, and by applying buffs, the value of that field can be corrected. GS2-Buff manages how much to apply buffs to which entries of each microservice.

The amount of buff application is managed by BuffEntryModel, and Multiple Buff Entry Models can be associated with the same target. 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 multiplies the current application rate by the specified value. Value Add is an instruction that adds to the value after buff correction calculations. For example, if the default rate is 1.0 and Rate Add 0.2 is set, the buff application rate becomes 1.2. Setting Mul 0.5 makes the buff application rate 0.5 times the current rate.

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

The state of the buff being applied is applied using the “context stack” field that each GS2 API has. GS2-Buff responds with a “context stack” that stores the state of the buff application, and each microservice refers to the “context stack” to apply the buff. Each microservice API has an interface that accepts the context stack, and by passing the context stack when applying the buff, the buff can be applied.

Even APIs that seem static, such as obtaining master data, apply buffs, and the response content responds with the value based on the assumption that the buff is applied. If you want to get the value in a state where the buff is not applied, you can get it by calling the API without specifying the context stack.


GS2-Buff SDK for Game Engine API Reference

Specifications of models and API references for GS2-Buff SDK for Game Engine

GS2-Buff SDK API Reference

Specification of models and API references for GS2-Buff SDK for various programming languages

GS2-Buff Script Trigger Reference

Reference for event triggers that call extended scripts

GS2-Buff Deploy/CDK Reference

The template format used when creating stacks with GS2-Deploy, and implementation examples of template output in various languages using CDK

GS2-Buff Master Data Reference

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