Cogito, ergo sum

UE3:OnlineStatsRead (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 11:47, 6 November 2009 by (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

ColumnIds

Type: array<int>

Modifiers: const

The columns to read in the view we are interested in

ColumnMappings

Type: array<ColumnMetaData>

Modifiers: const

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

Rows

Type: array<OnlineStatsRow>

The rows of data returned by the online service

SortColumnId

Type: int

Modifiers: const

The column id to use for sorting rank

TitleId

Type: int

Modifiers: const

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

TotalRowsInView

Type: int

Modifiers: const

The total number of rows in the view

ViewId

Type: int

The unique id of the view that these stats are from

ViewName

Type: string

Modifiers: const

The name of the view in human readable terms

Structs

ColumnMetaData

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

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

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

Native functions

AddPlayer

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

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

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

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

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

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

OnReadComplete

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.