Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:CharacterSettingsImportUiProfile

From RoR Wiki
Revision as of 19:41, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Replaces the contents of one of the current character's UI profiles with a copy of another profile folder.

CharacterSettingsImportUiProfile(profileName, sourcePath)

Arguments

profileName
wstring – Name of the current character's profile to import into.
sourcePath
wstring – Folder to copy from. The stock UI passes the path field of a profile from CharacterSettingsGetAllUiProfiles.

Returns

Nothing.

Details

  • The target profile must exist for the current character and be owned by it. Otherwise one of the errors below is logged and nothing is copied.
  • If sourcePath does not exist on disk, nothing happens.
  • Otherwise the target profile's folder is replaced with a copy of sourcePath.
  • If the target is the active profile, the client clears its active profile setting and starts a profile switch, the same kind of switch CharacterSettingsSetActiveUiProfile starts.
  • The client then fires SystemData.Events.CHARACTER_SETTINGS_UPDATED.
  • Both arguments must be wide strings. The function needs at least two arguments and only reads the last two.

Errors

Logged; the call does not raise a Lua error:

  • ERROR Importing to UI Profile '%s'. Profile does not exist for this character.
  • ERROR Importing UI Profile '%s'. You may not modify a profile owned by another character.

Example

Importing into the active profile, from ea_uiprofileswindow/source/manageuiprofileswindow.lua:

function EA_Window_ManageUiProfiles.OnNewCharacterImportPromptDoImport( profileData )

    -- Import to the active profile
    CharacterSettingsImportUiProfile( EA_Window_ManageUiProfiles.characterSettings.activeUiProfile, profileData.path )
end

See also