GS2-Enhance

Enhanced function

This feature may be completely incomprehensible to some developers.

However, this feature is always present in de facto standard game systems for mobile games in Japan. This game mechanic itself should be useful knowledge to realize Game as a Service, so we will add an explanation of the game mechanic for developers who do not understand it.

If you have a good knowledge of the game mechanics of the extensions, you can skip the rest of this section.

Game Mechanics of the Reinforcement Function

Reinforcement itself is a very simple game system in which material items can be consumed to increase the experience value of the target. In addition to gaining experience by participating in combat, characters and equipment can be upgraded in a variety of ways. (Equipment also has levels.)

Now let me explain why this game system helps to realize Game as a Service.

In a nutshell, it plays an active role in filling the game time.

I’m sure you all know that the speed at which games are played is much faster than the speed at which they are developed. We game developers spend three years developing a game, and players finish it in 10 hours. But game as a service will not be possible without closing this gap. In other words, we need to slow down the rate at which players consume content. The magic of the game system is its enhancement.

A typical Game as a Service game has an event once a month. In that event, there is a boss of some sort, and players are expected to defeat that boss repeatedly for the duration of the event. Bosses are available at different levels of difficulty to match the player’s level of growth, and players can obtain character and equipment enhancement materials by defeating the bosses.

The enhancement materials collected are converted into character and equipment experience points, which are then used to grow the characters and equipment. As characters and equipment grow, they will be able to challenge bosses of higher difficulty.

In this way, all players can enjoy participating in the event, obtaining enhancement materials according to their character’s growth stage, and growing their characters and equipment.

In reality, the bosses may not directly drop enhancements. Instead, there are gachas that can only be challenged during the event, and you can collect points to draw those gachas and obtain the materials through the gachas or In the store, which is only open during the event period, players can collect in-game currency earned by defeating the bosses and purchase enhancement materials from the store, etc. While there are some innovations that allow players to make decisions about which areas to prioritize for buffing, the end result is to extend the time players need to train their characters and pad their play time.

What remains consistent throughout the event is that the player’s character gets stronger. When the event is over, players will use their stronger characters to enjoy the next round of fun, such as higher difficulty persistent content.

graph TD BossBattle["Boss Battle"] -- Acquire Event Point --> Shop Shop -- Buy Enhance Materials --> Enhance["Enhance Character"] Enhance -- More Formidable --> BossBattle

Architecture

GS2-Inventory, which manages the items used as enhancement materials, and GS2-Inventory or GS2-Dictionary, which manages the character or equipment to be enhanced. GS2-Experience, which manages the experience and level of the character or equipment, is then manipulated by GS2-Enhance.

actor Player
participant "GS2-Enhance#Namespace"
participant "GS2-Inventory#ItemSet(Material)"
participant "GS2-Experience#Status"
Player -> "GS2-Enhance#Namespace" : Enhance(Materials/Target Character)
"GS2-Enhance#Namespace" -> "GS2-Inventory#ItemSet(Material)" : Get experience value from metadata
"GS2-Enhance#Namespace" -> "GS2-Inventory#ItemSet(Material)" : Consume
"GS2-Enhance#Namespace" -> "GS2-Experience#Status": Add experience(Key: Target Character/Equipment Id)
"GS2-Enhance#Namespace" -> Player : Enhance result

Call the Enhancement Execution API to GS2-Enhance with the parameters “target to be enhanced” and “material to be used for enhancement”.

GS2-Enhance then retrieves the master data of the item to be used as a material from GS2-Inventory and obtains the amount of experience value recorded in the metadata when the item is used as a material. Once the amount of experience is determined, GS2-Experience consumes the item and performs the process of adding the experience value.

Although the enhancement target is specified, it is only used as a key to manage the experience value in GS2-Experience, and the enhancement target information is not used directly.

Enhancement Rate

To limit the materials that can be used for enhancement and the enhancement target, the enhancement rate must be set as master data.

Master data includes the GS2-Inventory namespace name and inventory name of the items that can be used as materials. Master data includes information such as the GS2 Inventory namespace name and inventory name of the item to be reinforced.

Master data must be uploaded to GS2 in advance. For details on managing master data, see the separate section on managing master data.

Example implementation

Execution of enhancement

    var result = await gs2.Enhance.Namespace(
        namespaceName: "namespace-0001"
    ).Me(
        gameSession: GameSession
    ).Enhance(
    ).EnhanceAsync(
        rateName: "rate-0001",
        targetItemSetId: "item-set-0001",
        materials: new [] {
            new Gs2.Unity.Gs2Enhance.Model.EzMaterial
            {
                MaterialItemSetId = "material-0001",
                Count = 1,
            },
        }
    );
    const auto Domain = Gs2->Enhance->Namespace(
        "namespace-0001" // namespaceName
    )->Me(
        AccessToken
    )->Enhance(
    );
    const auto Future = Domain->Enhance(
        "rate-0001",
        "item-set-0001",
        []
        {
            const auto v = MakeShared<TArray<TSharedPtr<Gs2::Enhance::Model::FMaterial>>>();
            v->Add({'materialItemSetId': 'material-0001', 'count': 1});
            return v;
        }()
    );
    Future->StartSynchronousTask();
    if (!TestFalse(WHAT, Future->GetTask().IsError())) return false;

Other Features

Great Success in Reinforcement

In some cases, the amount of experience gained will be multiplied by 1.5 or 2 times at a certain probability of “great success”. GS2-Enhance allows the user to set the enhancement rate, which is the probability of a “great success” and the experience gain multiplier in such a case.

Detailed Reference.