Functions that allow the game to add events to the timeline that is displayed alongside recorded video.
See
Steam Timelines and diagram at the bottom of page for more information.
Member Functions
Member functions for
ISteamTimeline
are called through the global accessor function
SteamTimeline
.
SetTimelineStateDescription
void SetTimelineStateDescription( const char *pchDescription, float flTimeDelta );
Name | Type | Description |
pchDescription | const char * | A localized string in the language returned by SteamUtils()->GetSteamUILanguage() |
flTimeDelta | float | The time offset in seconds to apply to this state change. Negative times indicate an event that happened in the past. |
Sets a description
(B) for the current game state in the timeline. These help the user to find specific
moments in the timeline when saving clips. Setting a new state description replaces any previous
description.
Examples could include:
- Where the user is in the world in a single player game
- Which round is happening in a multiplayer game
- The current score for a sports game
ClearTimelineStateDescription
void ClearTimelineStateDescription( float flTimeDelta );
Name | Type | Description |
flTimeDelta | float | The time offset in seconds to apply to this state change. Negative times indicate an event that happened in the past. |
Clears the previous set game state in the timeline.
AddTimelineEvent
void AddTimelineEvent( const char *pchIcon, const char *pchTitle, const char *pchDescription, uint32 unPriority, float flStartOffsetSeconds, float flDurationSeconds, ETimelineEventClipPriority ePossibleClip ) ;
Name | Type | Description |
pchIcon | const char * | The name of the icon to show at the timeline at this point. This can be one of the icons uploaded through the Steamworks partner Site for your title, or one of the provided icons that start with steam_ . The Steam Timelines overview includes a list of available icons. |
pchTitle | const char * | Title-provided localized string in the language returned by SteamUtils()->GetSteamUILanguage() . |
pchDescription | const char * | Title-provided localized string in the language returned by SteamUtils()->GetSteamUILanguage() . |
unPriority | uint32 | Provide the priority to use when the UI is deciding which icons to display in crowded parts of the timeline. Events with larger priority values will be displayed more prominently than events with smaller priority values. This value must be between 0 and k_unMaxTimelinePriority . |
flStartOffsetSeconds | float | The time offset in seconds to apply to the start of the event. Negative times indicate an event that happened in the past.
One use of this parameter is to handle events whose significance is not clear until after the fact. For instance if the player starts a damage over time effect on another player, which kills them 3.5 seconds later, the game could pass -3.5 as the start offset and cause the event to appear in the timeline where the effect started. |
flDurationSeconds | float | The duration of the event, in seconds. Pass 0 for instantaneous events. |
ePossibleClip | ETimelineEventClipPriority | Allows the game to describe events that should be suggested to the user as possible video clips. |
Use this to mark an event
(A) on the Timeline. The event can be instantaneous or take some amount of time to complete, depending on the value passed in flDurationSeconds.
Examples could include:
- a boss battle
- a cut scene
- a large team fight
- picking up a new weapon or ammo
- scoring a goal
The game can nominate an event as being suitable for a clip by passing
k_ETimelineEventClipPriority_Standard
or
k_ETimelineEventClipPriority_Featured
to
ePossibleClip
. Players can make clips of their own at any point, but this lets the game suggest some options to Steam to make that process easier for players.
SetTimelineGameMode
void SetTimelineGameMode( ETimelineGameMode eMode );
Changes the color of the timeline bar
(C). See
ETimelineGameMode for how to use each value.
Enums
These are enums which are defined for use with ISteamTimeline.
ETimelineGameMode
Controls the color of the timeline bar segments. The value names listed here map to a multiplayer game, where
the user starts a game (in menus), then joins a multiplayer session that first has a character selection lobby
then finally the multiplayer session starts. However, you can also map these values to any type of game. In a single
player game where you visit towns & dungeons, you could set
k_ETimelineGameMode_Menus
when the player is in a town
buying items,
k_ETimelineGameMode_Staging
for when a dungeon is loading and
k_ETimelineGameMode_Playing
for when
inside the dungeon fighting monsters.
Name | Value | Description |
k_ETimelineGameMode_Playing | 1 | The player is fully loaded into the game and playing. |
k_ETimelineGameMode_Staging | 2 | The player is in a multiplayer lobby. |
k_ETimelineGameMode_LoadingScreen | 4 | The player is waiting for a loading screen. |
ETimelineEventClipPriority
Used in AddTimelineEvent, where Featured events will be offered before Standard events.
Name | Value | Description |
k_ETimelineEventClipPriority_None | 1 | This event is not appropriate as a clip. |
k_ETimelineEventClipPriority_Standard | 2 | The user may want to make a clip around this event. |
k_ETimelineEventClipPriority_Featured | 3 | The player will be likely to want a clip around event, and those clips should be promoted more prominently than clips with the k_ETimelineEventClipPriority_Standard priority. |
Diagrams