Go To Console

TPStashEvent

TPStashEvent

Class in TentuPlay.Api / Implemented in: TentuPlay.Api

Description

An API class required for data collection.

TPStashEvent.Join User registration
TPStashEvent.PlayerLogin Player’s login.
TPStashEvent.CharacterLogin Character’s login.
TPStashEvent.PlayerPurchase Player’s in-app purchase.
TPStashEvent.CharacterPurchase Character’s in-app purchase.
TPStashEvent.PlayerAd In-app ad for the player.
TPStashEvent.CharacterAd In-app ad for the character.
TPStashEvent.PlayerBonus Player’s acquisition of a bonus.
TPStashEvent.CharacterBonus Character’s acquisition of a bonus.
TPStashEvent.PlayerQuest Player’s progress in a quest.
TPStashEvent.CharacterQuest Character’s progress in a quest.
TPStashEvent.PlayerGetCharacter Player’s acquisition of a character.
TPStashEvent.PlayerDismissCharacter Player’s dismissal of a character.
TPStashEvent.PlayerLevelUp Player’s level up.
TPStashEvent.CharacterLevelUp Character’s level up.
TPStashEvent.CharacterRankUp Character’s rank up.
TPStashEvent.PlayerGetCurrency Player’s acquisition of in-game currency.
TPStashEvent.CharacterGetCurrency Character’s acquisition of in-game currency.
TPStashEvent.PlayerUseCurrency Player’s spending of in-game currency.
TPStashEvent.CharacterUseCurrency Character’s spending of in-game currency.
TPStashEvent.PlayerStage Stage the player plays.
TPStashEvent.CharacterStage Stage the character plays.
TPStashEvent.PlayerPlayItem Item the player uses in the stage.
TPStashEvent.CharactePlayItem Item the character uses in the stage.
TPStashEvent.PlayerPlayCharacter Character the player brings to the stage.
TPStashEvent.PlayerUpgrade Player's game system upgrade.
TPStashEvent.CharacterUpgrade Character's game system upgrade.
TPStashEvent.PlayerChangeStat Player's stat change.
TPStashEvent.CharacterChangeStat Character's stat change.
TPStashEvent.PlayerLevelUpSkill Player's skill levelup.
TPStashEvent.CharacterLevelUpSkill Character's skill levelup.
TPStashEvent.PlayerEquipSkill Skill the player equips/unequips.
TPStashEvent.CharacterEquipSkill Skill the character equips/unequips.
TPStashEvent.PlayerGetItem Player's acquisition of an item.
TPStashEvent.CharacterGetItem Character's acquisition of an item.
TPStashEvent.PlayerUseItem Player’s spending of an item.
TPStashEvent.CharacterUseItem Character’s spending of an item.
TPStashEvent.PlayerLevelUpItem The item the player levels up.
TPStashEvent.CharacterLevelUpItem The item the character levels up.
TPStashEvent.PlayerRankUpItem The item the player ranks up.
TPStashEvent.CharacterRankUpItem The item the character ranks up.
TPStashEvent.PlayerEquipItem The player equipped or unequipped an item
TPStashEvent.CharacterEquipItem A character equipped or unequipped an item
TPStashEvent.PlayerEnhanceInfrastructure The player (NOT a character) directly enhances an infrastructure.
TPStashEvent.CharacterEnhanceInfrastructure A character enhances an infrastructure.
TPStashEvent.PlayerEquipItemToInfrastructure The player (not a character) directly equipped or unequipped an item to an infrastructure
TPStashEvent.CharacterEquipItemToInfrastructure Collects the event when a character equipped or unequipped an equipment.
TPStashEvent.PlayerChangeStatOfInfrastructure The player (NOT by character) directly changed stats of an infrastructure.
TPStashEvent.CharacterChangeStatOfInfrastructure A character changed stats of an infrastructure.
TPStashEvent.StashAdviceEvent Events related with showing, closing an advice (in-game mail and pop-ups) and associated button actions.

TPStashEvent.Join

public int Join(string player_uuid);

Description

It collects data of user registration. It is called only once when the user registers, and must be called again when the user’s player_uuid is altered through re-registration. It gathers essential data that is used in analysis of every persona.

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

TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

TPStashEvent.PlayerLogin

public int PlayerLogin(string player_uuid, [string app_version = null]);

Description

It collects player’s login data. This method is to be called when the player logs into the game. It is called before any other TPStashEvents and used in analysis of almost every persona.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

app_version

The version of the game client when the player logs in.

TPStashEvent.CharacterLogin

public int CharacterLogin(string player_uuid, string character_uuid);

Description

It collects character’s login data when a character signs into separate servers.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

TPStashEvent.PlayerPurchase

public int PlayerPurchase(string player_uuid, string purchasable_slug, float purchase_quantity, float purchase_unit_price, float purchase_total_price, currencyCode purchase_currency_code, [bool? is_ad_remove = null]);

Description

It collects data of a player’s in-app purchases.

This method is to be called when an in-app purchase occurs and used in analysis of purchase-related personas.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

purchasable_slug

Unique identifier of the purchased product.

purchase_quantity

The number/amount of purchased products.

purchase_unit_price

Unit price of the purchased product.

purchase_total_price

Total price of the purchased products.

purchase_currency_code

3 letter Currency code, as defined by ISO 4217

is_ad_remove

True if purchased item includes or is related to in-app ad removal.

TPStashEvent.CharacterPurchase

public int CharacterPurchase(string player_uuid, string character_uuid, string purchasable_slug, float purchase_quantity, float purchase_unit_price, float purchase_total_price, currencyCode purchase_currency_code, [bool? is_ad_remove = null]);

Description

It collects data of a character’s in-app purchases.

This method is to be called when an in-app purchase occurs and used in analysis of purchase-related personas.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

purchasable_slug

Unique identifier of the purchased product.

purchase_quantity

The number/amount of purchased products.

purchase_unit_price

Unit price of the purchased product.

purchase_total_price

Total price of the purchased products.

purchase_currency_code

3 letter Currency code, as defined by ISO 4217

is_ad_remove

True if purchased item includes or is related to in-app ad removal.

TPStashEvent.PlayerAd

public int PlayerAd(string player_uuid, string ad_slug, adType ad_type, adPlacement placed_at, adStatus ad_status, [string placed_at_slug = null]);

Description

It collects data of an in-app ad for the player. This method is to be called when events like ad exposure, ad play, and ad end, and used in analysis of ad-related personas.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

ad_slug

Unique identifier of the ad

ad_type

Ad type.

public enum adType
{
    Interstitial,
    Reward,
}
placed_at

When to watch the advertisement.

public enum adPlacement
{
    Etc,
    Join,
    Login,
    Purchase,
    Quest,
    Bonus,
    StageStart,
    StageEnd,
    PlayerLevelUp,
    CharacterLevelUp,
    CharacterRankUp,
    PlayerUpgrade,
    GetCharacter,
    DismissCharacter,
    UpgradeCharacter,
    EquipItem,
    GetItem,
    LevelUpItem,
    UseItem,
    RankUpItem,
    ChangeStat,
    EquipSkill,
    LevelUpSkill,
    ChangeStatOfInfrastructure,
    EnhanceInfrastructure,
    EquipItemToInfrastructure,
    FinishedTutorial,
}
ad_status

Ad exposure/Ad status

  • Ready: The ad is ready to be played after a cooldown ends
  • Start: The ad starts to play
  • Quit: The ad was quitted while playing.
  • End: The entire ad was fully watched.
public enum adStatus
    {
        Ready,
        Start,
        Quit,
        End
    }
placed_at_slug

When to watch the advertisement(detailed)

TPStashEvent.CharacterAd

public int CharacterAd(string player_uuid, string character_uuid, string ad_slug, adType ad_type, adPlacement placed_at, adStatus ad_status, [string placed_at_slug = null]);

Description

It collects data of an in-app ad for the character. This method is to be called when events like ad exposure, ad play, and ad end, and used in analysis of ad-related personas.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

ad_slug

Unique identifier of the ad

ad_type

Ad type.

public enum adType
{
    Interstitial,
    Reward,
}
placed_at

When to watch the advertisement.

public enum adPlacement
{
    Etc,
    Join,
    Login,
    Purchase,
    Quest,
    Bonus,
    StageStart,
    StageEnd,
    PlayerLevelUp,
    CharacterLevelUp,
    CharacterRankUp,
    PlayerUpgrade,
    GetCharacter,
    DismissCharacter,
    UpgradeCharacter,
    EquipItem,
    GetItem,
    LevelUpItem,
    UseItem,
    RankUpItem,
    ChangeStat,
    EquipSkill,
    LevelUpSkill,
    ChangeStatOfInfrastructure,
    EnhanceInfrastructure,
    EquipItemToInfrastructure,
    FinishedTutorial,
}
ad_status

Ad exposure/Ad status

  • Ready: The ad is ready to be played after a cooldown ends
  • Start: The ad starts to play
  • Quit: The ad was quitted while playing.
  • End: The entire ad was fully watched.
public enum adStatus
    {
        Ready,
        Start,
        Quit,
        End
    }
placed_at_slug

When to watch the advertisement(detailed)

TPStashEvent.PlayerBonus

public int PlayerBonus(string player_uuid, string bonus_slug, bool is_automated, [string bonus_category_slug = null]);

Description

It collects data of the player’s acquisition of a bonus in the game.

“Bonus” means an effortless reward a player/character gets regardless of whether they play in-game content or not. For example,

  • Every system that gives a player/character a reward or an opportunity to get a reward if they are logged in for a certain amount of time. ‘Every N minutes,’ ‘Only N times a day', and other additional reward systems that give limited rewards.
  • Rewards that a player/character gets from using a coupon or any free giveaway.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

bonus_slug

Unique identifier of the bonus

bonus_category_slug

Category of the bonus.

is_automated

Whether the bonus is acquired automatically or manually.

  • True: The bonus is automatically acquired without the user doing any actions.
  • False: The user should execute a certain action to get the bonus, such as spinning a roulette wheel, or pressing a button.

TPStashEvent.CharacterBonus

public int CharacterBonus(string player_uuid, string character_uuid, string bonus_slug, bool is_automated, [string bonus_category_slug = null]);

Description

It collects data of the character’s acquisition of a bonus in the game.

“Bonus” means an effortless reward a player/character gets regardless of whether they play in-game content or not. For example,

  • Every system that gives a player/character a reward or an opportunity to get a reward if they are logged in for a certain amount of time. ‘Every N minutes,’ ‘Only N times a day', and other additional reward systems that give limited rewards.
  • Rewards that a player/character gets from using a coupon or any free giveaway.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

bonus_slug

Unique identifier of the bonus

bonus_category_slug

Category of the bonus.

is_automated

Whether the bonus is acquired automatically or manually.

  • True: The bonus is automatically acquired without the user doing any actions.
  • False: The user should execute a certain action to get the bonus, such as spinning a roulette wheel, or pressing a button.

TPStashEvent.PlayerQuest

public int PlayerQuest(string player_uuid, string quest_slug, string quest_status, [string quest_category_slug = null]);

Description

It collects data of the player’s progress in a quest. This method is to be called when the player is accepting a given quest or end/complete the quest.

"Quest" is defined as follows:

  • Every system that gives a player a predetermined reward after they fulfill certain conditions, such as ‘mission,’ ’duty,’ and ‘quest,’
  • E.g. daily quest, scenario completion quest, event dungeon.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

quest_slug

Unique identifier of the quest.

quest_category_slug

Category of the quest.

quest_status

Quest progress status

  • Accept: Active acceptance of the quest
  • Clear: Quest completion
  • Fail: Quest failure
  • Abandon: Active abandonment of the quest
  • Timeover: Used when the quest is automatically considered “failed” or “cancelled.” as it surpasses the time limit and is automatically (ex. “Complete the quest in five minutes”, daily quest)
public enum questStatus
    {
        Accept,
        Clear, 
        Fail,
        Abandon, 
        Timeover
    }

TPStashEvent.CharacterQuest

public int CharacterQuest(string player_uuid, string character_uuid, string quest_slug, string quest_status, [string quest_category_slug = null]);

Description

It collects data of the character’s progress in a quest. This method is to be called when the character is accepting a given quest or end/complete the quest.

“Quest” is defined as:

  • All the systems in which a character accomplish certain conditions, such as “mission,” “duty,” or “quest” and receives predetermined rewards.
  • E.g. daily quest, scenario completion quest, event dungeon.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

quest_slug

Unique identifier of the quest.

quest_category_slug

Category of the quest.

quest_status

Quest progress status

  • Accept: Active acceptance of the quest
  • Clear: Quest completion
  • Fail: Quest failure
  • Abandon: Active abandonment of the quest
  • Timeover: Used when the quest is automatically considered “failed” or “cancelled.” as it surpasses the time limit and is automatically (ex. “Complete the quest in five minutes”, daily quest)
public enum questStatus
    {
        Accept,
        Clear, 
        Fail,
        Abandon, 
        Timeover
    }

TPStashEvent.PlayerGetCharacter

public int PlayerGetCharacter(string player_uuid, string character_uuid, string characterarchetype_slug, [string reference_category_slug = null], [entity reference_entity = entity.None], [string reference_slug = null]);

Description

It collects data of the player’s acquisition/creation of a character. It is to be called when an event of a character acquisition occurs during or at the beginning of the game, and used in analysis of personas related to character acquisition and destruction.

Character acquisition means possession of a character. Character destruction refers to an event in which the player does not have the character any more as they have sold it away or consumed it as ingredient for something. Character destruction may not exist in certain games.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

characterarchetype_slug

Unique identifier of the character archetype.

reference_entity

The path where the player acquires the character.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the player acquires the character.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the player acquires the character.

TPStashEvent.PlayerDismissCharacter

public int PlayerDismissCharacter(string player_uuid, string character_uuid, string characterarchetype_slug, [string reference_category_slug = null], [entity reference_entity = entity.None], [string reference_slug = null]);

Description

It collects data of the player’s destruction of a character. It is to be called when an event of a character destruction occurs during or at the beginning of the game and used in analysis of personas related to character acquisition and destruction.

Character acquisition means possession of a character. Character destruction refers to an event in which the player does not have the character any more as they have sold it away or consumed it as ingredient for something. Character destruction may not exist in certain games.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

characterarchetype_slug

Unique identifier of the character archetype.

reference_entity

The path where the player dimisses the character.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the player dismisses the character.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the player dismisses the character.

TPStashEvent.PlayerLevelUp

public int PlayerLevelUp(string player_uuid, int level_to, [int? level_from=null]);

Description

It collects data of the player’s level up.

It is to be called when the event of the player’s level up occurs, and used in analysis of personas related to their growth.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

level_to

Player's level after leveling up.

level_from

Player's level before leveling up.

TPStashEvent.CharacterLevelUp

public int CharacterLevelUp(string player_uuid, string characterarchetype_slug, int level_to, [int? level_from = null]);

Description

It collects data of the character’s level up. It is to be called when an event of the character's level up occurs in the middle of the game and is used in analysis of personas related to character growth.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

level_to

Character's level after leveling up.

level_from

Character's level before leveling up.

TPStashEvent.CharacterRankUp

public int CharacterRankUp(string player_uuid, string character_uuid, string characterarchetype_slug, int rank_to, [string characterarchetype_to_slug =null], [int? rank_from=null]);

Description

It collects data of the character’s rank up. It is to be called when an event of a character's rank up occurs and used in the analysis of personas related to characters.

Character’s rank up is different from character’s level up. It refers to an event in which the character’s ability improves drastically. 'Rank up’ may have different names like “awakening,’ ‘advancement,’ ‘evolution,’ and so on, or not exist in certain games. Character’s archetype can be changed after character’s rank up.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

characterarchetype_slug

Unique identifier of the character archetype.

characterarchetype_to_slug

Unique identifier of character archetype after ranking up. If the identifier has changed after ranking up, the new identifier is inserted. If not, the old one is.

rank_to

Character’s rank after ranking up.

rank_from

Character’s rank before ranking up.

TPStashEvent.PlayerGetCurrency

public int PlayerGetCurrency(string player_uuid, string currency_slug, float currency_quantity, [float? currency_total_quantity = null], [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug=null]);

Description

It collects data of the player’s acquisition of in-game currency. It is to be called when an event of currency acquisition occurs in the middle of the game, and used in analysis of personas related to currency acquisition.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

currency_slug

Unique identifier of currency. Ex) 'gold,' 'diamond,' 'crystal,' etc.

currency_quantity

The number/amount of the player's acquired currency.

currency_total_quantity

The total number/amount of reserved currency after the player's currency acquisition. This parameter is not mandatory but highly recommended as it helps create more accurate currency reserve status.

reference_entity

The path where the player acquires the currency.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the player acquires the currency.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the player acquires the currency.

TPStashEvent.CharacterGetCurrency

public int CharacterGetCurrency(string player_uuid, string character_uuid, string currency_slug, float currency_quantity, [float? currency_total_quantity = null], [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug=null]);

Description

It collects data of the character’s acquisition of in-game currency. It is to be called when an event of currency acquisition occurs in the middle of the game, and used in analysis of personas related to currency acquisition.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

currency_slug

Unique identifier of currency. Ex) 'gold,' 'diamond,' 'crystal,' etc.

currency_quantity

The number/amount of the character's acquired currency.

currency_total_quantity

The total number/amount of reserved currency after the character's currency acquisition. This parameter is not mandatory but highly recommended as it helps create more accurate currency reserve status.

reference_entity

The path where the character acquires the currency.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the character acquires the currency.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the character acquires the currency.

TPStashEvent.PlayerUseCurrency

public int PlayerUseCurrency(string player_uuid, string currency_slug, float currency_quantity, [float? currency_total_quantity = null], [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug=null]);

Description

It collects data of the player’s spending of in-game currency. It is to be called when an event of spending in-game currency occurs in the middle of the game, and used in analysis of personas related to currency acquisition.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

currency_slug

Unique identifier of currency. Ex) 'gold,' 'diamond,' 'crystal,' etc.

currency_quantity

The number/amount of the player's used currency.

currency_total_quantity

The total number/amount of reserved currency after the player's currency spending. This parameter is not mandatory but highly recommended as it helps create more accurate currency reserve status.

reference_entity

The path where the player spends the item.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the player spends the currency.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the player spends the currency.

TPStashEvent.CharacterUseCurrency

public int CharacterUseCurrency(string player_uuid, string character_uuid, string currency_slug, float currency_quantity, [float? currency_total_quantity = null], [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug=null]);

Description

It collects data of the character’s spending of in-game currency. It is to be called when an event of spending in-game currency occurs in the middle of the game, and used in analysis of personas related to currency acquisition.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

currency_slug

Unique identifier of currency. Ex) 'gold,' 'diamond,' 'crystal,' etc.

currency_quantity

The number/amount of the character's used currency.

currency_total_quantity

The total number/amount of reserved currency after the character's currency spending. This parameter is not mandatory but highly recommended as it helps create more accurate currency reserve status.

reference_entity

The path where the character spends the currency.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the character spends the currency.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the character spends the currency.

TPStashEvent.PlayerStage

public int PlayerStage(string player_uuid, stageType stage_type, string stage_slug, [string stage_category_slug=null], [string stage_level = null], [int? stage_score = null], [stageStatus stage_status=stageStatus.None], [int? stage_playtime = null], [isAutocombat is_autocombat_committed = isAutocombat.NotExist]);

Description

It collects data of various stages the player plays in the game. It is to be called when an event in which an stage begins or ends, and used in analysis of personas related to stage playing.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Caution- In case of inconsistency of occurrence time and call time of stage event : PlayerStage should be called at the same time as the event occurrence time in the beginning/end of a stage. However, in cases where the call time of each method is inconsistent with the actual beginning/end of the stage, stage_playtime parameter should be filled in with a value. It causes an error in calculating play hours if stage_playtime is left empty of a value in an event of stage end. If it is difficult to measure the exact amount of time to complete the stage, approximate values should be added.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

stage_type

Stage type

public enum stageType
{
        Unknown,
	PvP,
	PvE
}
stage_slug

Unique identifier of the stage.

stage_category_slug

Category of the stage type.

stage_level

String of the stage level.

stage_score

Stage score when the stage ends.

stage_status

Stage status.

  • Start
  • Win
  • Lose
  • Draw
  • Quit: Quit in the middle
  • Timeout
  • Error: Abnormal termination
public enum stageStatus
{
	Start
	Win
	Lose
	Draw
	Quit
	Timeout
	Error
}
stage_playtime

Stage play time until the stage ends.

is_autocombat_committed

Whether to use auto-battle option.

  • NotExist: Auto-battle option doesn't exist
  • AutocombatOn: Use auto-battle option
  • AutocombatOff: Turn auto-battle option off
  • Switchable: Auto-battle option is switchable or player/character can use partial auto-battle option.
public enum isAutocombat
  {
      NotExist,
      AutocombatOn,
      AutocombatOff,
      Switchable
  }

TPStashEvent.CharacterStage

public int CharacterStage(string player_uuid, string character_uuid, stageType stage_type, string stage_slug, [string stage_category_slug=null], [string stage_level = null], [int? stage_score = null], [stageStatus stage_status=stageStatus.None], [int? stage_playtime = null], [isAutocombat is_autocombat_committed = isAutocombat.NotExist]);

Description

It collects data of various stages the character plays in the game. It is to be called when an event in which an stage begins or ends, and used in analysis of personas related to stage playing.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Caution- In case of inconsistency of occurrence time and call time of stage event: CharacterStage should be called at the same time as the event occurrence time in the beginning/end of a stage. However, in cases where the call time of each method is inconsistent with the actual beginning/end of the stage, stage_playtime parameters should be filled in with a value. It causes an error in calculating play hours if stage_playtime is left empty of a value in an event of stage end. If it is difficult to measure the exact amount of time to complete the stage, approximate values should be added.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

stage_type

Stage type

public enum stageType
{
        Unknown,
	PvP,
	PvE
}
stage_slug

Unique identifier of the stage.

stage_category_slug

Category of the stage type.

stage_level

String of the stage level.

stage_score

Stage score when the stage ends.

stage_status

Stage status.

  • Start
  • Win
  • Lose
  • Draw
  • Quit: Quit in the middle
  • Timeout
  • Error: Abnormal termination
public enum stageStatus
{
	Start
	Win
	Lose
	Draw
	Quit
	Timeout
	Error
}
stage_playtime

Stage play time until the stage ends.

is_autocombat_committed

Whether to use auto-battle option.

  • NotExist: Auto-battle option doesn't exist
  • AutocombatOn: Use auto-battle option
  • AutocombatOff: Turn auto-battle option off
  • Switchable: Auto-battle option is switchable or player/character can use partial auto-battle option.
public enum isAutocombat
  {
      NotExist,
      AutocombatOn,
      AutocombatOff,
      Switchable
  }

TPStashEvent.PlayerPlayItem

public int PlayerPlayItem(string player_uuid, string item_slug, itemCategory item_category, [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug = null]);

Description

It collects data of the item the player brings to the stage. The item may be "consumable" or "infrastructure."

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Console window of Unity Editor in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

reference_entity

The path where the player brings the item.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the player brings the item.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the player brings the item.

TPStashEvent.CharactePlayItem

public int CharactePlayItem(string player_uuid, string character_uuid, string item_slug, itemCategory item_category, [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug = null]);

Description

It collects data of the item the character brings to the stage. The item may be "consumable" or "infrastructure."

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Console window of Unity Editor in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

reference_entity

The path where the character brings the item.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the character brings the item.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the character brings the item.

TPStashEvent.PlayerPlayCharacter

public int PlayerPlayCharacter(string player_uuid, string character_uuid, [string reference_category_slug = null], [entity reference_entity = entity.None], [string reference_slug = null]);

Description

It collects data of the character the player brings to the stage.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Console window of Unity Editor in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

reference_entity

The path where the player brings the character.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the player brings the character.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the player brings the character.

TPStashEvent.PlayerUpgrade

public int PlayerUpgrade(string player_uuid, string upgrade_slug, int level_to, [int? level_from = null], [string upgrade_category_slug = null]);

Description

It collects data of the player's game system upgrade.

"Upgrade" can be defined as:

  • Generic term for irreversible game system-wise enhancements.
  • Different from leveling/strengthening up a specific character.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

upgrade_slug

Unique string identifier of the upgrade.

upgrade_category_slug

The category of the upgrade.

level_to

Level after leveling up.

level_from

Level before leveling up.

TPStashEvent.CharacterUpgrade

public int CharacterUpgrade(string player_uuid, string character_uuid, string upgrade_slug, int level_to, [int? level_from = null], [string upgrade_category_slug = null]);

Description

It collects data of the character's game system upgrade.

"Upgrade" can be defined as:

  • Generic term for irreversible game system-wise enhancements.
  • Different from leveling/strengthening up a specific character.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

upgrade_slug

Unique string identifier of the upgrade.

upgrade_category_slug

The category of the upgrade.

level_to

Level after an upgrade.

level_from

Level before leveling up.

TPStashEvent.PlayerChangeStat

public int PlayerChangeStat(string player_uuid, string stat_slug, int stat_to, [string stat_category_slug=null], [int? stat_from=null]);

Description

It collects data of the player's stat change. Use this method only when the player can change specific stat selectively.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

stat_slug

Unique slug (similar to ID) for a stat (e.g. "Strength", "Perception", "Endurance" .. )

stat_category_slug

Unique category slug (similar to the name of the category) of stats.

e.g. "CharacterSkills", "CharacterAbilities"

stat_to

Stat value as number after changed

stat_from

Stat value as number before the change

TPStashEvent.CharacterChangeStat

public int CharacterChangeStat(string player_uuid, string character_uuid, string stat_slug, int stat_to, [string stat_category_slug=null], [int? stat_from=null]);

Description

It collects data of the character's changed stats. Use this method only when the player can change specific stat selectively.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Console window of Unity Editor in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

stat_slug

Unique slug (similar to ID) for a stat (e.g. "Strength", "Perception", "Endurance" .. )

stat_category_slug

Unique category slug (similar to the name of the category) of stats.

e.g. "CharacterSkills", "CharacterAbilities"

stat_to

Stat value as number after changed

stat_from

Stat value as number before the change

TPStashEvent.PlayerLevelUpSkill

public int PlayerLevelUpSkill(string player_uuid, string skill_slug, int level_to, [string skill_category_slug=null], [int? level_from=null], [int? player_level=null]);

Description

It collects data of level up of the player's skill.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

skill_slug

Unique identifier of the skill.

skill_category_slug

Category name of the skill.

level_to

Player's skill's level after leveling up.

level_from

Player's skill's level before leveling up.

player_level

Player's level when leveling up the player's skill.

TPStashEvent.CharacterLevelUpSkill

public int CharacterLevelUpSkill(string player_uuid, string character_uuid, string skill_slug, int level_to, [string skill_category_slug=null], [int? level_from=null], [int? character_level=null]);

Description

It collects data of level up of a character’s skill.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

skill_slug

Unique identifier of the skill.

skill_category_slug

Category name of the skill.

level_to

Character's skill's level after leveling up.

level_from

Character's skill's level before leveling up.

character_level

The level of the character (not player itself) when the skill levels up.

TPStashEvent.PlayerEquipSkill

public int PlayerEquipSkill(string player_uuid, string skill_slug, equipStatus equip_status, [string skill_category_slug=null], [int? skill_level=null], [int? player_level=null]

Description

It collects data of the player equipping/unequipping the skill.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

skill_slug

Unique identifier of the skill.

skill_category_slug

Category name of the skill.

equip_status

Status code represents if the skill is equipped or not.

public enum equipStatus
{
    Equip,
    Unequip,
}
skill_level

Skill level when the player equips/unequips the skill

player_level

Player's level when equipping/unequipping the player's skill

TPStashEvent.CharacterEquipSkill

public int CharacterEquipSkill(string player_uuid, string character_uuid, string skill_slug, equipStatus equip_status, [string skill_category_slug=null], [int? skill_level=null], [int? character_level=null]);

Description

It collects data of the character equipping/unequipping the skill.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

skill_slug

Unique identifier of the skill.

skill_category_slug

Category name of the skill.

equip_status

Status code represents if the skill is equipped or not.

public enum equipStatus
{
    Equip,
    Unequip,
}
skill_level

Skill level when the character equips/unequips the skill

character_level

The level of the character (not player itself) when the skill is equipped/unequipped.

TPStashEvent.PlayerGetItem

public int PlayerGetItem(string player_uuid, itemCategory item_category , string item_slug, float item_quantity, [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug = null]);

Description

This method collects data of the player getting an item. It is called when a player gets an item, and it is used to analyze item acquisitions.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor console in TentuPlay debug mode:
TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

item_quantity

The number/amount of item acquired.

reference_entity

The path where the player acquires the item.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the player acquires the item.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the player acquires the item.

TPStashEvent.CharacterGetItem

public int CharacterGetItem(string player_uuid, string character_uuid, itemCategory item_category , string item_slug, float item_quantity, [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug = null]);

Description

This method collects the data of the character getting an item. It is called when a character gets an item, and it is used to analyze item acquisitions.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

item_quantity

The number/amount of item acquired.

reference_entity

The path where the character acquires the item.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the character acquires the item.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the character acquires the item.

TPStashEvent.PlayerUseItem

public int PlayerUseItem(string player_uuid, itemCategory item_category , string item_slug, float item_quantity, [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug = null]);

Description

This method collects the data of the player using an item. It is called when a player uses an item, and it is used to analyze item uses.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

item_quantity

The number/amount of item used.

reference_entity

The path where the player spends the item.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the player spends the item.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the player spends the item.

TPStashEvent.CharacterUseItem

public int CharacterUseItem(string player_uuid, string character_uuid, itemCategory item_category , string item_slug, float item_quantity, [entity reference_entity = entity.None], [string reference_category_slug = null], [string reference_slug = null]);

Description

This method collects the data of the character using an item. It is called when a character uses an item, and it is used to analyze item uses.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

item_quantity

The number/amount of item used.

reference_entity

The path where the character spends the item.

public enum entity
    {
        Ads,
        Bonuses,
        CharacterArchetypes,
        Currencies,
        Items,
        Purchasables,
        Quests,
        Shop,
        Stages,
        Upgrades,
        Etc
    }
reference_category_slug

The name of the category of the path where the character spends the item.. It is referenced to the in-game names. If reference_entity is entity.Items, it is encouraged to write itemCategory as ToString() in reference_category_slug.

reference_slug

Details on the path where the character spends the item.

TPStashEvent.PlayerLevelUpItem

public int PlayerLevelUpItem(string player_uuid, string item_slug, itemCategory item_category, int item_level_to, [int? item_level_from=null]);

Description

This method collects the data of item levelups the player makes.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

level_to

Player's item's level after leveling up.

level_from

Player's item's level before leveling up.

TPStashEvent.CharacterLevelUpItem

public int CharacterLevelUpItem(string player_uuid, string character_uuid, string item_slug, itemCategory item_category, int item_level_to, [int? item_level_from=null]);

Description

It collects data of the event in which the character levels up an item.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

level_to

Character's item's level after leveling up.

level_from

Character's item's level before leveling up.

TPStashEvent.PlayerRankUpItem

public int PlayerRankUpItem(string player_uuid, itemCategory item_category, string item_slug, int rank_to, [string item_to_slug=null], [int? rank_from=null]);

Description

It collects data of the event in which the player ranks up an item.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

item_to_slug

Unique string identifier of the item after rank-up.

rank_to

Player's item's rank after ranking up.

rank_from

Player's item's rank before ranking up.

TPStashEvent.CharacterRankUpItem

public int CharacterRankUpItem(string player_uuid, string character_uuid, itemCategory item_category, string item_slug, int rank_to, [string item_to_slug=null], [int? rank_from=null]);

Description

It collects data of the event in which the character ranks up an item.

It returns 1 for success and -1 for failure. If -1 is returned, you will see the following message in the Unity Editor Console in TentuPlay debug mode: TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

item_to_slug

Unique string identifier of the item after rank-up.

rank_to

Character’s item's rank after ranking up.

rank_from

Character’s item's rank before ranking up.

TPStashEvent.PlayerEquipItem

public int PlayerEquipItem(string player_uuid, string item_slug, itemCategory item_category, equipStatus equip_status, [int? player_level = null], [int? item_level = null]);

Description

Collects the event when the player equipped or unequipped an item. Must be called when an item such as equipment, costume, jewelry, runestone or banner is equipped to the player.

Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

equip_status

Status code represents if the item is equipped or not.

public enum equipStatus
{
    Equip,
    Unequip,
}
player_level

Player's level when the item is equipped.

item_level

The level of the item which was equipped.

TPStashEvent.CharacterEquipItem

public int CharacterEquipItem(string player_uuid, string character_uuid, string item_slug, itemCategory item_category, equipStatus equip_status, [int? character_level = null], [int? item_level = null]);

Description

Collects the event when a character equipped or unequipped an item. Must be called when an item such as equipment, costume, jewelry, runestone or banner is equipped to a character.

Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

equip_status

Status code represents if the item is equipped or not.

public enum equipStatus
{
    Equip,
    Unequip,
}
character_level

The level of the character (not player itself) when the item is equipped.

item_level

The level of the item which was equipped.

TPStashEvent.PlayerEnhanceInfrastructure

public int PlayerEnhanceInfrastructure(string player_uuid, string infrastructure_slug, string enhance_slug);

Description

Collects the event when the player (NOT a character) directly enhances an infrastructure (e.g. Factory, Mine, Wizard Tower, Skill Trainer, Blacksmith)

Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

infrastructure_slug

Unique string value (similar to ID) for an infrastructure. Devs can freely enter any string value but it should be able to tell between diffrent infrastructure.

enhance_slug

unique string value (similar to ID) for the enhancement. e.g. "max_damage" , "fire_resistance", "stealth"

TPStashEvent.CharacterEnhanceInfrastructure

public int CharacterEnhanceInfrastructure(string player_uuid, string character_uuid, string infrastructure_slug, string enhance_slug);

Description

Collects the event when a character enhances an infrastructure (e.g. Factory, Mine, Wizard Tower, Skill Trainer, Blacksmith)

Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

infrastructure_slug

Unique string value (similar to ID) for an infrastructure. Devs can freely enter any string value but it should be able to tell between diffrent infrastructure.

enhance_slug

unique string value (similar to ID) for the enhancement. e.g. "max_damage" , "fire_resistance", "stealth"

TPStashEvent.PlayerEquipItemToInfrastructure

public int PlayerEquipItemToInfrastructure(string player_uuid, string infrastructure_slug, itemCategory item_category, string item_slug, equipStatus equip_status, [int? infrastructure_level=null], [int? item_level=null]);

Description

Collects the event when the player (not a character) directly equipped or unequipped an item to an infrastructure

Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

infrastructure_slug

Unique string value (similar to ID) for an infrastructure. Devs can freely enter any string value but it should be able to tell between diffrent infrastructure.

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

equip_status

Status code represents if the item is equipped or not.

public enum equipStatus
{
    Equip,
    Unequip,
}
infrastructure_level

The level of the infrastructure which the item is equipped to.

item_level

The level of the item which was equipped.

TPStashEvent.CharacterEquipItemToInfrastructure

public int CharacterEquipItemToInfrastructure(string player_uuid, string character_uuid, string infrastructure_slug, itemCategory item_category, string item_slug, equipStatus equip_status, [int? infrastructure_level=null], [int? item_level=null]);

Description

Collects the event when a character equipped or unequipped an equipment.

Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

infrastructure_slug

Unique string value (similar to ID) for an infrastructure. Devs can freely enter any string value but it should be able to tell between diffrent infrastructure.

item_category

Category of the item

  • Equipment: Weapons, armors, accessories, and other gears
  • Consumable: Potion, bandage, and other consumable items
  • Cosmetics: Costumes that do not affect the player/character's ability, etc.
  • Token: Alternative currency with limited use such as 'token for pvp shop'. Token includes an entrance ticket.
  • Material: Raw materials for gear upgrades, character ranking up, etc.
  • Infrastructure: Items that indirectly affects the whole game. Fixed assets.
  • RandomBox: A random box that can be opened, in which the content depends on the probability.
  • Etc
public enum itemCategory
{
	Equipment,
	Consumable,
	Cosmetics,
	Token,
	Material,
        Infrastructure,
        RandomBox,
	Etc
}
item_slug

Unique string identifier of the item.

e.g."weapon_sword_dagger", "shield_kite_rare"

equip_status

Status code represents if the item is equipped or not.

public enum equipStatus
{
    Equip,
    Unequip,
}
infrastructure_level

The level of the infrastructure which the item is equipped to.

item_level

The level of the item which was equipped.

TPStashEvent.PlayerChangeStatOfInfrastructure

public int PlayerChangeStatOfInfrastructure(string player_uuid, string infrastructure_slug, string stat_slug, int stat_to, [string stat_category_slug=null], [int? stat_from=null]);

Description

Collects the event which changed stats of an infrastructure (e.g. Factory, Mine, Wizard Tower, Skill Trainer, Blacksmith) , initiated directly by the player itself (in other words, NOT by character). Use only when the player can choose how much resources to invest on stats of the infrastructure.

Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

infrastructure_slug

Unique string value (similar to ID) for an infrastructure. Devs can freely enter any string value but it should be able to tell between diffrent infrastructure.

stat_slug

Unique slug (similar to ID) for a stat (e.g. "Strength", "Perception", "Endurance" .. )

stat_category_slug

Unique category slug (similar to the name of the category) of stats.

e.g. "CharacterSkills", "CharacterAbilities"

stat_to

Stat value as number after changed

stat_from

Stat value as number before the change

TPStashEvent.CharacterChangeStatOfInfrastructure

public int CharacterChangeStatOfInfrastructure(string player_uuid, string character_uuid, string infrastructure_slug, string stat_slug, int stat_to, [string stat_category_slug=null], [int? stat_from=null]);

Description

Events changed stats of an infrastructure (e.g. Factory, Mine, Wizard Tower, Skill Trainer, Blacksmith) , initiated by a character. Use only when a character can choose how much resources to invest on stats of the infrastructure.

Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

character_uuid

Player’s character’s unique lD.
If there is no character in the game or when referring to the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

infrastructure_slug

Unique string value (similar to ID) for an infrastructure. Devs can freely enter any string value but it should be able to tell between diffrent infrastructure.

stat_slug

Unique slug (similar to ID) for a stat (e.g. "Strength", "Perception", "Endurance" .. )

stat_category_slug

Unique category slug (similar to the name of the category) of stats.

e.g. "CharacterSkills", "CharacterAbilities"

stat_to

Stat value as number after changed

stat_from

Stat value as number before the change

TPStashEvent.StashAdviceEvent

public int StashAdviceEvent(string player_uuid, int advice_id, adviceStatus advice_status, string advice_detail=null);

Description

Events related with showing, closing an advice (in-game mail and pop-ups) and associated button actions. Returns 1 if the collection of event was successful, -1 if was not. If -1 was returned (unsuccessful), you can check error messages in the Unity console when TentuPlay is in debug mode.

TPError||ERROR inserting table_name: exception_error_message

Parameter

player_uuid

Player’s unique lD (Not a character's ID).

e.g. Steam User ID, Google Play User ID ..

advice_id

Unique ID assigned to the advice.

advice_status

Advice status such as showing, closing an advice and button actions.

public enum adviceStatus
{
    Open,
    Dismiss,
    Interact
}
advice_detail

Unique ID of in-game contents which connected to the advertisement. e.g. advertised in-game item, DLC product, in-game gift card