TPStashEvent.GetCharacter

public int GetCharacter(
    string player_uuid,
    string character_uuid,
    string characterarchetype_slug,
    [entity from_entity = entity.None],
    [string from_category_slug = null],
    [string from_slug = null]
);

Description

GetCharacter collects the data of the player’s acquisition or creation of a character. It needs to be called when an event of a character acquisition occurs during or at the start of game. It can be used for the analysis of personas about character acquisition and destruction.

A character acquisition denotes the possession of a character whereas a character destruction refers to a state of not having the character any more because the player has sold it away or consumed it as an ingredient to make something. Character destruction may not exist in certain games.

It returns 1 for success and -1 for failure. If -1 is returned, you can see the following message in the Unity editor console in TentuPlay debug mode:

TPError||ERROR inserting table_name: exception_error_message

Parameters

Name Description Required

player_uuid

Player’s unique ID (not a character’s ID) such as Steam user ID and Google Play user ID

Required

character_uuid

Player’s character’s unique lD

If there is no character in the game or If you want to use it for the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

Required

characterarchetype_slug

Unique identifier of the character’s archetype

Required

from_entity

The action that causes the player to gain the character

Entities
public enum entity {
    None,
    Etc,
    Join,
    LoginApp,
    LoginAsCharacter,
    InAppPurchase,
    ShopPurchase,
    Trade,
    WatchAd,
    PlayQuest,
    GetBonus,
    ChangeCharacterArchetype,
    ChangeStat,
    ChangeCustomAbility,
    PlayStage,
    GetCharacter,
    GetCurrency,
    GetInfrastructure,
    GetPet,
    GetToken,
    GetConsumable,
    GetMaterial,
    GetEquipment,
    GetCostume,
    GetRandomBox,
    UseCurrency,
    EquipInfrastructure,
    EquipPet,
    UseToken,
    UseConsumable,
    UseMaterial,
    EquipEquipment,
    EquipCostume,
    OpenRandomBox,
    EquipSkill,
    DismissCharacter,
    DismissInfrastructure,
    DismissPet,
    DismissToken,
    DismissConsumable,
    DismissMaterial,
    DismissEquipment,
    DismissCostume,
    DismissRandomBox,
    LevelUpCharacter,
    LevelUpInfrastructure,
    LevelUpPet,
    LevelUpConsumable,
    LevelUpMaterial,
    LevelUpEquipment,
    LevelUpCostume,
    LevelUpSkill,
    Deposit,
    Withdraw,
    FinishedTutorial,
}

Optional

from_category_slug

The category of place, source, or situation from which the player gets the character

Optional

from_slug

The name of place, source, or situation from which the player gets the character

Optional