Elvui Profile Converter -

ElvUI Profile Converter — Step-by-step Guide

This guide shows how to export, convert, and import ElvUI profiles between different client versions or across characters/realms. It assumes you have ElvUI installed and basic familiarity with the World of Warcraft addon folder.

Why Would You Need One?

5. Fixing the "Table Expected" Error

Nothing is more frustrating than pasting a string into ElvUI and seeing: "Error: bad argument #1 to 'format' (table expected, got string)." This usually means the copy/paste included a space, a new line, or a UTF-8 character (like a quote from Microsoft Word). A clean converter will strip these "invisible" breakpoints. elvui profile converter


Understanding ElvUI Profiles

Before diving into the conversion process, it's essential to understand how ElvUI profiles work. A profile is a collection of settings that define the layout, appearance, and behavior of the ElvUI interface. There are two main types of profiles: ElvUI Profile Converter — Step-by-step Guide This guide

  1. ElvUI Profile: A standard ElvUI profile, which contains all the settings for the interface, including layout, colors, fonts, and more.
  2. ElvUI Config Profile: A config profile is a subset of the ElvUI profile, focusing on the layout and some specific settings.

The Two States of ElvUI Profiles

  1. The In-Game String: When you type /ec (ElvUI Config) and click "Profiles," you can export your profile as a massive block of text (Base64 encoded Lua). This is a string.
  2. The File System (WTFs): ElvUI saves your configuration in your World of Warcraft WTF folder (e.g., Account/SERVER/Character/SavedVariables/ElvUI.lua).

Code Implementation

local E, L, V, P, G = unpack(ElvUI)
local ProfileConverter = E:NewModule("ProfileConverter", "elvui")
function ProfileConverter:Initialize()
    -- Profile detection and conversion logic
    self:RegisterEvent("PLAYER_ENTERING_WORLD", function()
        local profileName = E.db.name
        if profileName then
            local profileVersion = E.db.profileVersion
            if profileVersion and profileVersion < 12 then
                self:ConvertProfile(profileName, profileVersion)
            end
        end
    end)
end
function ProfileConverter:ConvertProfile(profileName, profileVersion)
    -- Conversion logic for profiles from version 10.00 to 11.99
    local conversionFunctions = 
        ["10.00"] = function() self:ConvertFrom1000(profileName) end,
        ["11.00"] = function() self:ConvertFrom1100(profileName) end,
        -- Add more conversion functions as needed
if conversionFunctions[profileVersion] then
        conversionFunctions[profileVersion]()
    else
        -- Handle unknown profile version
        E:Print("Unknown profile version:", profileVersion)
    end
end
function ProfileConverter:ConvertFrom1000(profileName)
    -- Conversion logic from ElvUI 10.00
    local profile = E:CopyProfile(profileName)
    -- Apply conversion changes
    -- ...
E:UpdateProfile(profileName)
    E:Print("Profile converted from 10.00:", profileName)
end
function ProfileConverter:ConvertFrom1100(profileName)
    -- Conversion logic from ElvUI 11.00
    local profile = E:CopyProfile(profileName)
    -- Apply conversion changes
    -- ...
E:UpdateProfile(profileName)
    E:Print("Profile converted from 11.00:", profileName)
end
-- Register the ProfileConverter module
E:RegisterModule(ProfileConverter:GetName())

Error A: "Invalid Profile Data"

Overview

The ElvUI Profile Converter is a feature designed to convert ElvUI profiles from one version to another, ensuring seamless compatibility and minimizing the need for manual reconfiguration. ElvUI Profile : A standard ElvUI profile, which