Thread Tools Display Modes
08/16/21, 02:28 PM   #1
Phinix
 
Phinix's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 186
[open] Return CURRENT order with GetCharacterInfo(i)

This function currently returns character CREATED order. However, it has not been updated since the ability to manually re-order characters was added to the game, rendering it largely useless (for getting character order anyway; getting the ID for each current character name is still handy).

EDIT: It should be clarified that the function itself does not actually return ANY order as one of the return values. Instead it is used in a for loop to iterate through the table it returns, which is ordered by creation date.

For example: esoui/pregameandingame/zo_addonmanager/zo_addonmanager.lua

Code:
for i=1, self:GetNumCharacters() do
            local name = self:GetCharacterInfo(i)

Last edited by Phinix : 08/16/21 at 02:32 PM.
  Reply With Quote
08/17/21, 01:44 AM   #2
Irniben
 
Irniben's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 6
Originally Posted by Phinix View Post
This function currently returns character CREATED order. However, it has not been updated since the ability to manually re-order characters was added to the game, rendering it largely useless (for getting character order anyway; getting the ID for each current character name is still handy).

EDIT: It should be clarified that the function itself does not actually return ANY order as one of the return values. Instead it is used in a for loop to iterate through the table it returns, which is ordered by creation date.

For example: esoui/pregameandingame/zo_addonmanager/zo_addonmanager.lua

Code:
for i=1, self:GetNumCharacters() do
            local name = self:GetCharacterInfo(i)
I didn't check, but doesn't "order" as a return value work? It's not yet documented in the wiki but used in the character selection screen.

local name, gender, level, championPoints, class, race, alliance, id, locationId, order, needsRename = GetCharacterInfo(characterIndex)
  Reply With Quote
08/17/21, 02:39 AM   #3
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 626
Probably only on the PTS though

https://github.com/ESOUIMods/esoui/b...nager.lua#L303
  Reply With Quote
08/17/21, 03:36 AM   #4
Irniben
 
Irniben's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2021
Posts: 6
Ok, nevermind - I think the function just behaves differently when called pre-game...
  Reply With Quote
08/17/21, 03:42 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Originally Posted by Irniben View Post
Ok, nevermind - I think the function just behaves differently when called pre-game...
Yep, you are right. This was answered by ZOs in the past. After pre-game the param is either not returned or not correct somehow.

And no: It does not differ on live or PTS but is just a pre-game vs. in-game thing.
  Reply With Quote

ESOUI » Developer Discussions » Wish List » [open] Return CURRENT order with GetCharacterInfo(i)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off