Once I get that upgrade to 36-hour days, I will tackle that. – Mychaeel

UE3:OnlinePlayerStorage (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> OnlinePlayerStorage
Package: 
Engine
Direct subclass:
OnlineProfileSettings

This class holds the data used in reading/writing online player data. The online player data is stored by an external service.

Properties[edit]

AsyncState[edit]

Type: EOnlinePlayerStorageAsyncState

Modifiers: const

Indicates the state of the profile (whether an async action is happening and what type)

ProfileMappings[edit]

Type: array<Settings.SettingsPropertyPropertyMetaData>

Holds the set of mappings from native format to human readable format

ProfileSettings[edit]

Type: array<OnlineProfileSetting>

Current set of player data that is either returned from a read or to be written out

VersionNumber[edit]

Type: int

Modifiers: const

Used to determine if the read online player data is the proper version or not

Default value: -1

Enums[edit]

EOnlinePlayerStorageAsyncState[edit]

Enum indicating the current async action happening on the player data

OPAS_None 
OPAS_Read 
OPAS_Write 

EOnlineProfilePropertyOwner[edit]

Enum indicating who owns a given online profile proprety

OPPO_None 
No owner assigned
OPPO_OnlineService 
Owned by the online service
OPPO_Game 
Owned by the game in question

Structs[edit]

OnlineProfileSetting[edit]

Modifiers: native

Structure used to hold the information for a given profile setting

EOnlineProfilePropertyOwner Owner 
Which party owns the data (online service vs game)
Settings.SettingsProperty ProfileSetting 
The profile setting comprised of unique id and union of held types

Delegates[edit]

NotifySettingValueUpdated[edit]

delegate NotifySettingValueUpdated (name SettingName)

Notification that the value of a ProfileSetting in this object has been updated.

Parameters:

  • SettingName - the name of the setting that was changed.

Functions[edit]

Native functions[edit]

AddSettingFloat[edit]

native function AddSettingFloat (int SettingId)

Adds an id to the array, assuming that it doesn't already exist

Parameters:

  • SettingId - the id to add to the array

AddSettingInt[edit]

native function AddSettingInt (int SettingId)

Adds an id to the array, assuming that it doesn't already exist

Parameters:

  • SettingId - the id to add to the array

FindProfileMappingIndex[edit]

native final function int FindProfileMappingIndex (int ProfileSettingId) const

Finds the index of SettingsPropertyPropertyMetaData struct, given its settings id.

Parameters:

  • ProfileSettingId - the id of the struct to search for

Returns:

the index into the ProfileMappings array for the struct with the matching id.

FindProfileMappingIndexByName[edit]

native final function int FindProfileMappingIndexByName (name ProfileSettingName) const

Finds the index of SettingsPropertyPropertyMetaData struct, given its settings name.

Parameters:

  • ProfileSettingId - the id of the struct to search for

Returns:

the index into the ProfileMappings array for the struct with the matching name.

FindProfileSettingIndex[edit]

native final function int FindProfileSettingIndex (int ProfileSettingId) const

Finds the index of an OnlineProfileSetting struct given its settings id.

Parameters:

  • ProfileSettingId - the id of the struct to search for

Returns:

the index into the ProfileSettings array for the struct with the matching id.

GetProfileSettingColumnHeader[edit]

native function string GetProfileSettingColumnHeader (int ProfileSettingId)

Finds the localized column header text for the profile setting

Parameters:

  • ProfileSettingId - the id to look up in the mappings table

Returns:

the string to use as the list column header for the profile setting that matches the id, or an empty string if not found.

GetProfileSettingId[edit]

native function bool GetProfileSettingId (name ProfileSettingName, out int ProfileSettingId)

Searches the profile setting array for the matching string setting name and returns the id

Parameters:

  • ProfileSettingName - the name of the profile setting being searched for
  • ProfileSettingId - the id of the context that matches the name

Returns:

true if the seting was found, false otherwise

GetProfileSettingMappingType[edit]

native function bool GetProfileSettingMappingType (int ProfileId, out Settings.EPropertyValueMappingType OutType)

Determines the mapping type for the specified property

Parameters:

  • ProfileId - the ID to get the mapping type for
  • OutType - the out var the value is placed in

Returns:

TRUE if found, FALSE otherwise

GetProfileSettingName[edit]

native function name GetProfileSettingName (int ProfileSettingId)

Finds the human readable name for the profile setting

Parameters:

  • ProfileSettingId - the id to look up in the mappings table

Returns:

the name of the string setting that matches the id or NAME_None if not found

GetProfileSettingRange[edit]

native function bool GetProfileSettingRange (int ProfileId, out float OutMinValue, out float OutMaxValue, out float RangeIncrement, out byte bFormatAsInt)

Determines the min and max values of a property that is clamped to a range

Parameters:

  • ProfileId - the ID to get the mapping type for
  • OutMinValue - the out var the min value is placed in
  • OutMaxValue - the out var the max value is placed in
  • RangeIncrement - the amount the range can be adjusted by the UI in any single update
  • bFormatAsInt - whether the range's value should be treated as an int.

Returns:

TRUE if found and is a range property, FALSE otherwise

GetProfileSettingValue[edit]

native function bool GetProfileSettingValue (int ProfileSettingId, out string Value, optional int ValueMapID)

Finds the human readable name for a profile setting's value. Searches the profile settings mappings for the specifc profile setting and then searches the set of values for the specific value index and returns that value's human readable name

Parameters:

  • ProfileSettingId - the id to look up in the mappings table
  • Value - the out param that gets the value copied to it
  • ValueMapID - optional parameter that allows you to select a specific index in the ValueMappings instead of automatically using the currently set index (if -1 is passed in, which is the default, it means to just use the set index

Returns:

true if found, false otherwise

GetProfileSettingValueByName[edit]

native function bool GetProfileSettingValueByName (name ProfileSettingName, out string Value)

Finds the human readable name for a profile setting's value. Searches the profile settings mappings for the specifc profile setting and then searches the set of values for the specific value index and returns that value's human readable name

Parameters:

  • ProfileSettingName - the name of the profile setting to find the string value of
  • Value - the out param that gets the value copied to it

Returns:

true if found, false otherwise

GetProfileSettingValueFloat[edit]

native function bool GetProfileSettingValueFloat (int ProfileSettingId, out float Value)

Searches for the profile setting by id and gets the value index

Parameters:

  • ProfileSettingId - the id of the profile setting to return
  • Value - the out value of the setting

Returns:

true if the profile setting was found and not id mapped, false otherwise

GetProfileSettingValueId[edit]

native function bool GetProfileSettingValueId (int ProfileSettingId, out int ValueId, optional out int ListIndex)

Searches for the profile setting by id and gets the value index

Parameters:

  • ProfileSettingId - the id of the profile setting to return
  • ValueId - the out value of the id
  • ListIndex - the out value of the index where that value lies in the ValueMappings list

Returns:

true if the profile setting was found and id mapped, false otherwise

GetProfileSettingValueInt[edit]

native function bool GetProfileSettingValueInt (int ProfileSettingId, out int Value)

Searches for the profile setting by id and gets the value index

Parameters:

  • ProfileSettingId - the id of the profile setting to return
  • Value - the out value of the setting

Returns:

true if the profile setting was found and not id mapped, false otherwise

GetProfileSettingValueName[edit]

native function name GetProfileSettingValueName (int ProfileSettingId)

Finds the human readable name for a profile setting's value. Searches the profile settings mappings for the specifc profile setting and then searches the set of values for the specific value index and returns that value's human readable name

Parameters:

  • ProfileSettingId - the id to look up in the mappings table

Returns:

the name of the value or NAME_None if not value mapped

GetProfileSettingValues[edit]

native function bool GetProfileSettingValues (int ProfileSettingId, out array<nameValues)

Searches the profile settings mappings for the specifc profile setting and then adds all of the possible values to the out parameter

Parameters:

  • ProfileSettingId - the id to look up in the mappings table
  • Values - the out param that gets the list of values copied to it

Returns:

true if found and value mapped, false otherwise

GetRangedProfileSettingValue[edit]

native function bool GetRangedProfileSettingValue (int ProfileId, out float OutValue)

Gets the value of a ranged property

Parameters:

  • ProfileId - the ID to get the value of
  • OutValue - the out var that receives the value

Returns:

TRUE if found and is a range property, FALSE otherwise

IsProfileSettingIdMapped[edit]

native function bool IsProfileSettingIdMapped (int ProfileSettingId)

Determines if the setting is id mapped or not

Parameters:

  • ProfileSettingId - the id to look up in the mappings table

Returns:

TRUE if the setting is id mapped, FALSE if it is a raw value

SetProfileSettingValue[edit]

native function bool SetProfileSettingValue (int ProfileSettingId, const out string NewValue)

Searches for the profile setting by name and sets the value index to the value contained in the profile setting meta data

Parameters:

  • ProfileSettingName - the name of the profile setting to set the string value of
  • NewValue - the string value to use

Returns:

true if the profile setting was found and the value was set, false otherwise

SetProfileSettingValueByName[edit]

native function bool SetProfileSettingValueByName (name ProfileSettingName, const out string NewValue)

Searches for the profile setting by name and sets the value index to the value contained in the profile setting meta data

Parameters:

  • ProfileSettingName - the name of the profile setting to find
  • NewValue - the string value to use

Returns:

true if the profile setting was found and the value was set, false otherwise

SetProfileSettingValueFloat[edit]

native function bool SetProfileSettingValueFloat (int ProfileSettingId, float Value)

Searches for the profile setting by id and sets the value

Parameters:

  • ProfileSettingId - the id of the profile setting to return
  • Value - the new value

Returns:

true if the profile setting was found and not id mapped, false otherwise

SetProfileSettingValueId[edit]

native function bool SetProfileSettingValueId (int ProfileSettingId, int Value)

Searches for the profile setting by id and sets the value

Parameters:

  • ProfileSettingId - the id of the profile setting to return
  • Value - the new value

Returns:

true if the profile setting was found and id mapped, false otherwise

SetProfileSettingValueInt[edit]

native function bool SetProfileSettingValueInt (int ProfileSettingId, int Value)

Searches for the profile setting by id and sets the value

Parameters:

  • ProfileSettingId - the id of the profile setting to return
  • Value - the new value

Returns:

true if the profile setting was found and not id mapped, false otherwise

SetRangedProfileSettingValue[edit]

native function bool SetRangedProfileSettingValue (int ProfileId, float NewValue)

Sets the value of a ranged property, clamping to the min/max values

Parameters:

  • ProfileId - the ID of the property to set
  • NewValue - the new value to apply to the

Returns:

TRUE if found and is a range property, FALSE otherwise

Events[edit]

SetToDefaults[edit]

event SetToDefaults ()

Clear out the settings. Subclasses can override to set their own defaults.