You can only get the characterIds and their names, but no bags, items, achievements (afaik), or any other info while not having those characters logged in.
Here is an example function how to retrieve that from my addon FCOItemSaver with 2 possibilities to create a table with different keys:
Lua Code:
--Function to get all characters of the currently logged in @account: server's unique characterID and non unique name.
--Returns a table:nilable with 2 possible variants, either the character ID is key and the name is the value,
--or vice versa.
--Parameter boolean, keyIsCharName:
-->True: the key of the returned table is the character name
-->False: the key of the returned table is the unique character ID (standard)
function FCOIS.GetCharactersOfAccount(keyIsCharName)
keyIsCharName = keyIsCharName or false
local charactersOfAccount
--Check all the characters of the account
for i = 1, GetNumCharacters() do
local name, _, _, _, _, _, characterId = GetCharacterInfo(i)
local charName = zo_strformat(SI_UNIT_NAME, name)
if characterId ~= nil and charName ~= "" then
if charactersOfAccount == nil then charactersOfAccount = {} end
if keyIsCharName then
charactersOfAccount[charName] = characterId
else
charactersOfAccount[characterId]= charName
end
end
end
return charactersOfAccount
end
Therefor several libraries have been created, or addons, like
Inventory Insight from Ashes, What pledges at my alts, LibCharacterKnowledge, etc.
which store that other char's data in the SavedVariables so you can have a look at that from your currently logged in char.