TPStashEvent.ChangeStat

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

Description

ChangeStat collects the data related to the character’s stat changes. Use this method only when the player is able to change a specific stat selectively.

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

stat_slug

Unique slug (similar to ID) for a stat (for example, "Strength", "Perception", "Endurance")

Required

stat_to

Stat value as a number after the change

Required

stat_category_slug

Unique category slug (similar to the name of the category) of stats (for example, CharacterSkills, CharacterAbilities)

Optional

stat_from

Stat value as a number before the change

Optional