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

UE3:OnlineProfileSettings (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT3 Object >> OnlineProfileSettings
Package: 
Engine
Direct subclass:
UTProfileSettings
This class in other games:
UDK

This class holds the data used in reading/writing online profile settings. Online profile settings are stored by an external service.

Properties[edit]

AsyncState[edit]

Type: EOnlineProfileAsyncState

Modifiers: const

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

DefaultSettings[edit]

Type: array<OnlineProfileSetting>

These are the settings to use when no setting has been specified yet for a given id. These values should be used by subclasses to fill in per game default settings

OwnerMappings[edit]

Type: array<Settings.IdToStringMapping>

Modifiers: const

Mappings for owner information

Default value, index 1:

Member Value
Id 1
Name 'Online Service Setting'

Default value, index 2:

Member Value
Id 2
Name 'Game Setting'

ProfileMappings[edit]

Type: array<Settings.SettingsPropertyPropertyMetaData>

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

Default value, index 0:

Member Value
Id 1
MappingType PVMT_IdMapped
Name 'Controller Vibration'
ValueMappings
Member Value
Name 'Off'
Member Value
Id 3
Name 'On'

Default value, index 1:

Member Value
Id 2
MappingType PVMT_IdMapped
Name 'Invert Y'
ValueMappings
Member Value
Name 'Off'
Member Value
Id 1
Name 'On'

Default value, index 2:

Member Value
Id 5
MappingType PVMT_IdMapped
Name 'Mute Voice'
ValueMappings
Member Value
Name 'No'
Member Value
Id 1
Name 'Yes'

Default value, index 3:

Member Value
Id 6
MappingType PVMT_IdMapped
Name 'Voice Via Speakers'
ValueMappings
Member Value
Name 'Off'
Member Value
Id 1
Name 'On'
Member Value
Id 2
Name 'Both'

Default value, index 4:

Member Value
Id 7
Name 'Voice Volume'

Default value, index 5:

Member Value
Id 12
MappingType PVMT_IdMapped
Name 'Difficulty Level'
ValueMappings
Member Value
Name 'Normal'
Member Value
Id 1
Name 'Easy'
Member Value
Id 2
Name 'Hard'

Default value, index 6:

Member Value
Id 13
MappingType PVMT_IdMapped
Name 'Controller Sensitivity'
ValueMappings
Member Value
Name 'Medium'
Member Value
Id 1
Name 'Low'
Member Value
Id 2
Name 'High'

Default value, index 7:

Member Value
Id 14
MappingType PVMT_IdMapped
Name 'First Preferred Color'
ValueMappings
  1. No value definitions.
Member Value
Id 1
Name 'Black'
Member Value
Id 2
Name 'White'
Member Value
Id 3
Name 'Yellow'
Member Value
Id 4
Name 'Orange'
Member Value
Id 5
Name 'Pink'
Member Value
Id 6
Name 'Red'
Member Value
Id 7
Name 'Purple'
Member Value
Id 8
Name 'Blue'
Member Value
Id 9
Name 'Green'
Member Value
Id 10
Name 'Brown'
Member Value
Id 11
Name 'Silver'

Default value, index 8:

Member Value
Id 15
MappingType PVMT_IdMapped
Name 'Second Preferred Color'
ValueMappings
  1. No value definitions.
Member Value
Id 1
Name 'Black'
Member Value
Id 2
Name 'White'
Member Value
Id 3
Name 'Yellow'
Member Value
Id 4
Name 'Orange'
Member Value
Id 5
Name 'Pink'
Member Value
Id 6
Name 'Red'
Member Value
Id 7
Name 'Purple'
Member Value
Id 8
Name 'Blue'
Member Value
Id 9
Name 'Green'
Member Value
Id 10
Name 'Brown'
Member Value
Id 11
Name 'Silver'

Default value, index 9:

Member Value
Id 16
MappingType PVMT_IdMapped
Name 'Auto Aim'
ValueMappings
Member Value
Name 'Off'
Member Value
Id 1
Name 'On'

Default value, index 10:

Member Value
Id 17
MappingType PVMT_IdMapped
Name 'Auto Center'
ValueMappings
Member Value
Name 'Off'
Member Value
Id 1
Name 'On'

Default value, index 11:

Member Value
Id 18
MappingType PVMT_IdMapped
Name 'Movement Control'
ValueMappings
Member Value
Name 'Left Thumbstick'
Member Value
Id 1
Name 'Right Thumbstick'

Default value, index 12:

Member Value
Id 19
MappingType PVMT_IdMapped
Name 'Transmission Preference'
ValueMappings
Member Value
Name 'Auto'
Member Value
Id 1
Name 'Manual'

Default value, index 13:

Member Value
Id 20
MappingType PVMT_IdMapped
Name 'Race Camera Preference'
ValueMappings
Member Value
Name 'Behind'
Member Value
Id 1
Name 'Front'
Member Value
Id 2
Name 'Inside'

Default value, index 14:

Member Value
Id 21
MappingType PVMT_IdMapped
Name 'Brake Preference'
ValueMappings
Member Value
Name 'Trigger'
Member Value
Id 1
Name 'Button'

Default value, index 15:

Member Value
Id 22
MappingType PVMT_IdMapped
Name 'Accelerator Preference'
ValueMappings
Member Value
Name 'Trigger'
Member Value
Id 1
Name 'Button'

ProfileSettingIds[edit]

Type: array<int>

Holds the list of profile settings to read from the service. NOTE: Only used for a read request and populated by the subclass

ProfileSettings[edit]

Type: array<OnlineProfileSetting>

Holds the set of profile settings that are either returned from a read or to be written out

VersionNumber[edit]

Type: int

Modifiers: const

Used to determine if the read profile is the proper version or not

Default value: -1

Enums[edit]

See OnlineProfileSettings enums.

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

Functions[edit]

Native functions[edit]

SetToDefaults[edit]

native event SetToDefaults ()

Sets all of the profile settings to their default values

AppendVersionToReadIds[edit]

native function AppendVersionToReadIds ()

Adds the version id to the read ids if it is not present

AppendVersionToSettings[edit]

native function AppendVersionToSettings ()

Adds the version number to the read data if not present

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)

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

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)

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

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

GetVersionNumber[edit]

native function int GetVersionNumber ()

Returns the version number that was found in the profile read results

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

ReconcileProfileSettings[edit]

native function ReconcileProfileSettings ()

Compares the data inside the profile with default values to ensure that every entry exists

 and sets to default values where appropriate

SetDefaultVersionNumber[edit]

native function SetDefaultVersionNumber ()

Sets the version number to the class default

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]

ScriptSetToDefaults[edit]

event ScriptSetToDefaults ()

Allows script to set defaults without being native.