TPStashEvent.PlayStage

TPStashEvent.PlayStage(
    userId,
    character_uuids,
    stage_type,
    stage_slug,
    stage_category_slug,
    stage_level --[[Optional--]],
    stage_score --[[Optional--]],
    stage_status --[[Optional--]],
    stage_playtime --[[Optional--]]
)

Description

PlayStage collects the data of various stages that the character plays in the game. It needs to be called when an stage begins or ends. It can be used for the analysis of personas about stage playing.

When there is a difference in time between event occurrence and method call of a stage event

PlayerStage is mostly expected to be called at the same time when the event occurs, that is, in the beginning or end of a stage. There are times, however, when the method cannot be called right on the occurrence due to the nature of the game. In that case, put a value in the stage_playtime parameter to prevent a wrong calculation of play hours that would cause an incorrect data analysis as a result. The value doesn’t need to be the precise amount of time spent to complete the stage. Just an approximate value will do.

Parameters

Name Description Required

UserId

Player’s unique user ID (not a character’s ID) that is given by Roblox: Player.UserId

Required

character_uuids

A list of unique character IDs of a player

If a game does not have characters, or includes players which are not characters, the list becomes { TentuPlayKeyword._DUMMY_CHARACTER_ID_ }.

Required

stage_type

Stage type

TPStashEvent.StageType.Unknown
TPStashEvent.StageType.PvP
TPStashEvent.StageType.PvE

Required

stage_slug

Unique identifier of the stage

Required

stage_category_slug

Category of the stage type

Optional

stage_level

String of the stage level

Optional

stage_score

Stage score when the stage ends

Optional

stage_status

Stage status

TPStashEvent.StageStatus.Start
TPStashEvent.StageStatus.Win
TPStashEvent.StageStatus.Lose
TPStashEvent.StageStatus.Draw
TPStashEvent.StageStatus.Quit -- Exit in the middle of play
TPStashEvent.StageStatus.Timeout
TPStashEvent.StageStatus.Error -- Abnormal termination

Optional

stage_playtime

Stage play time until the stage ends

Optional