GS2-Grade API Reference

Grade/rarity feature

Manages the grade, or rarity, of characters and equipment, and raises the rank cap of GS2-Experience as the grade goes up.

When growing a character or piece of equipment, the player accumulates experience to raise its level, but that level has an upper limit. Raising the grade in GS2-Grade lifts that upper limit, the rank cap, so the target can be grown further. This is the service used to express growth elements such as breaking through a limit or evolving.

A grade is managed as a Status for each propertyId that uniquely points to a target such as a character or piece of equipment, and holds the current grade as gradeValue, an integer starting at 0. The grade model defines, in gradeEntries, the value (rankCapValue) to be set as the rank cap of GS2-Experience for each grade. The rank cap is synchronized automatically when the grade changes; when the grade model itself is updated, call ApplyRankCap to reflect the new values on existing statuses.

You can set the initial grade value depending on whether the property ID matches a regular expression. For example, by starting at grade 3 when the GS2-Inventory ItemModel name begins with SSR, and at grade 2 when it begins with SR, you can change the initial rank cap depending on the type of ItemModel.

In the case of “synthesizing the same kind of character or equipment” as a method of upgrading, a feature is provided to support determining whether the resource being used as material is “the same kind of character or equipment.” propertyIdRegex extracts parameters such as the user ID and the ItemModel name from the property ID of the grade, those parameters are embedded into gradeUpPropertyIdRegex to build a regular expression, and the property ID of the resource to be used as material is then tested against it.

The grade model can have acquireActionRates configured to adjust the reward amounts of acquire actions according to the grade. Using this, you can incorporate growth elements such as “higher-grade characters earn more from quest rewards” or “the experience-point multiplier changes per grade”.

By including Gs2Grade:MultiplyAcquireActionsByUserId in the acquire actions of a transaction, you can convert them into a list of acquire actions with the multiplier of the specified grade applied.


GS2-Grade SDK for Game Engine API Reference

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

GS2-Grade SDK API Reference

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

GS2-Grade Script Trigger Reference

Reference for event triggers that call extended scripts

GS2-Grade 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-Grade Master Data Reference

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

GS2-Grade Transaction Actions

Specification of verify/consume/acquire transaction actions