> For the complete documentation index, see [llms.txt](/llms.txt)

# 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.

[Introduction to Microservices / GS2-Grade](../../microservices/grade)



- [GS2-Grade Deploy/CDK Reference](/api_reference/grade/deploy/)
  
- [GS2-Grade Master Data Reference](/api_reference/grade/master_data/)
  
- [GS2-Grade Script Trigger Reference](/api_reference/grade/script/)
  
- [GS2-Grade SDK API Reference](/api_reference/grade/sdk/)
  
- [GS2-Grade SDK for Game Engine API Reference](/api_reference/grade/game_engine/)
  
- [GS2-Grade Transaction Actions](/api_reference/grade/stamp_sheet/)
  
