Gah - a solution with more questions. – EntropicLqd

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

AsyncState

Type: EOnlinePlayerStorageAsyncState

Modifiers: const

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

ProfileMappings

Type: array<Settings.SettingsPropertyPropertyMetaData>

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

ProfileSettings

Type: array<OnlineProfileSetting>

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

VersionNumber

Type: int

Modifiers: const

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

Default value: -1

Enums

EOnlinePlayerStorageAsyncState

Enum indicating the current async action happening on the player data

OPAS_None 
OPAS_Read 
OPAS_Write 

EOnlineProfilePropertyOwner

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

OnlineProfileSetting

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

NotifySettingValueUpdated

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

Native functions

AddSettingFloat

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

SetToDefaults

event SetToDefaults ()

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