Originally Posted by ZOS_ChipHilseberg
Do you mean some way to query the ability ids for the morphs so you don't have to hard code data tables?
|
I already seem to get them for abilities that I have learned with the following code:
Lua Code:
local function PrintAbilityInfo(abilityId)
local name = GetAbilityName(abilityId)
local icon = GetAbilityIcon(abilityId)
local hasProgression, progressionIndex, lastRankXp, nextRankXp, currentXp, atMorph = GetAbilityProgressionXPInfoFromAbilityId(abilityId)
if(hasProgression and nextRankXp > 0) then -- not maxed
local rank = GetAbilityProgressionRankFromAbilityId(abilityId)
local percent = currentXp / nextRankXp * 100
df("%d: %s |t100%%:100%%:%s|t: %d (%.2f%%)", abilityId, name, icon, rank, percent)
return GetAbilityProgressionAbilityId(progressionIndex, 1, 1), GetAbilityProgressionAbilityId(progressionIndex, 2, 1)
end
end
for i = 1, GetNumAbilities() do
local morphA, morphB = PrintAbilityInfo(GetAbilityIdByIndex(i))
if(morphA) then PrintAbilityInfo(morphA) end
if(morphB) then PrintAbilityInfo(morphB) end
end
But if I never leveled the skill it does not seem to work and it also does not return the currentXp for the morph if I haven't put a skillpoint into it. Same for a skill where I have chosen morphA, but never morphB.