The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall

UE3:OnlineStatsRead (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
(Redirected from UE3:ColumnMetaData (UDK))
Jump to: navigation, search
UDK Object >> OnlineStats >> OnlineStatsRead
Package: 
Engine
Direct subclass:
UTLeaderboardReadBase
This class in other games:
UT3

Stats class that holds the read request definitions and the resulting data

Properties[edit]

ColumnIds[edit]

Type: array<int>

Modifiers: const

The columns to read in the view we are interested in

ColumnMappings[edit]

Type: array<ColumnMetaData>

Modifiers: const

Provides metadata for column ids so that we can present their human readable form

Rows[edit]

Type: array<OnlineStatsRow>

The rows of data returned by the online service

SortColumnId[edit]

Type: int

Modifiers: const

The column id to use for sorting rank

TitleId[edit]

Type: int

Modifiers: const

An optional title id to specify when reading stats (zero uses the default for the exe)

TotalRowsInView[edit]

Type: int

Modifiers: const

The total number of rows in the view

ViewId[edit]

Type: int

The unique id of the view that these stats are from

ViewName[edit]

Type: string

Modifiers: const

The name of the view in human readable terms

Structs[edit]

ColumnMetaData[edit]

Modifiers: native

Provides human readable values for column ids

int Id 
Id for the given string
name Name 
Human readable form of the Id
string ColumnName 
The name displayed in column headings in the UI

OnlineStatsColumn[edit]

Modifiers: native

A single instance of a stat in a row

int ColumnNo 
The ordinal value of the column
Settings.SettingsData StatValue 
The value of the stat for this column

OnlineStatsRow[edit]

Modifiers: native

Holds a single player's set of data for this stats view

OnlineSubsystem.UniqueNetId PlayerId 
The unique player id of the player these stats are for
Settings.SettingsData Rank 
The rank of the player in this stats view
string NickName 
Player's online nickname
array<OnlineStatsColumn> Columns 
The set of columns (stat instances) for this row

Functions[edit]

Native functions[edit]

AddPlayer[edit]

native function AddPlayer (string PlayerName, OnlineSubsystem.UniqueNetId PlayerId)

Adds a player to the results if not present

Parameters:

  • PlayerName - the name to place in the data
  • PlayerId - the player to search for

GetFloatStatValueForPlayer[edit]

native function bool GetFloatStatValueForPlayer (OnlineSubsystem.UniqueNetId PlayerId, int StatColumnNo, out float StatValue)

Searches the stat rows for the player and then finds the stat value from the specified column within that row

Parameters:

  • PlayerId - the player to search for
  • StatColumnNo - the column number to look up
  • StatValue - the out value that is assigned the stat

Returns:

whether the value was found for the player/column or not

GetIntStatValueForPlayer[edit]

native function bool GetIntStatValueForPlayer (OnlineSubsystem.UniqueNetId PlayerId, int StatColumnNo, out int StatValue)

Searches the stat rows for the player and then finds the stat value from the specified column within that row

Parameters:

  • PlayerId - the player to search for
  • StatColumnNo - the column number to look up
  • StatValue - the out value that is assigned the stat

Returns:

whether the value was found for the player/column or not

GetRankForPlayer[edit]

native function int GetRankForPlayer (OnlineSubsystem.UniqueNetId PlayerId)

Searches the rows for the player and returns their rank on the leaderboard

Parameters:

  • PlayerId - the player to search for

Returns:

the rank for the player

SetFloatStatValueForPlayer[edit]

native function bool SetFloatStatValueForPlayer (OnlineSubsystem.UniqueNetId PlayerId, int StatColumnNo, float StatValue)

Searches the stat rows for the player and then sets the stat value from the specified column within that row

Parameters:

  • PlayerId - the player to search for
  • StatColumnNo - the column number to look up
  • StatValue - the value to set that column to

Returns:

whether the value was found for the player/column or not

SetIntStatValueForPlayer[edit]

native function bool SetIntStatValueForPlayer (OnlineSubsystem.UniqueNetId PlayerId, int StatColumnNo, int StatValue)

Searches the stat rows for the player and then sets the stat value from the specified column within that row

Parameters:

  • PlayerId - the player to search for
  • StatColumnNo - the column number to look up
  • StatValue - the value to set that column to

Returns:

whether the value was found for the player/column or not

Events[edit]

OnReadComplete[edit]

event OnReadComplete ()

This event is called post read complete so that the stats object has a chance synthesize new stats from returned data, e.g. ratios, averages, etc.