Thread Tools Display Modes
04/16/15, 12:27 AM   #1
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
[outdated] Skills functions need a bit love

Hello,

With my last project, I was adding to release a skill builder ingame.

But despite of my efforts, we lack of lot of love, a lot of things could be added here.

API limitations :

Ability ID is hard to get :

- You cannot get an abilityId that you didn't discovered (other class, skilllines not discovered).
- You cannot get an abilityId of rank+2/3/4/5/x of passive, neither rank-1, only actual rank and rank+1
- You cannot get abilityId of rank+1 of passive abilities if you don't unblock rank+1

- Having AbilityId don't give you the whole stuff :
texturePath is the biggest problem. earningRank is also missing. maxRank too.


SkilTooltip :

SkillTooltip is really a problem.

I would LOVE to get an SkillTooltip:SetAbilityId(abilityId).
From now, we only get the skillType/skillLine/abilityIndex, and sometimes progressionIndex.

Building a skill tooltip is quite hard if our character don't know the skill itself.
Writing the statsSection as it's actually displayed (with a pair of label/value) is almost impossible

Races :

We do not get GetUnitRaceId. And yes, if could help in skills too.

Constants :

There is no ABILITY_TYPE_ACTIVESKILL, ABILITY_TYPE_PASIVESKILL, ABILITY_TYPE_ULTIMATE
There is no ABILITY_SKILL_BASE, ABILITY_UPPER_MORPH, ABILITY_LOWER_MORPH


To finish, here few exemple which could help (you) and us.

GetUnitRaceId("unitTag") : returns a constant with UnitRace.
GetNumRaces() : returns available races playable
GetRaceInfo(raceId) : Returns the localized name of a raceId. Plus a boolean is this one is playable

SkillTooltip:SetAbilityId(abilityId) : Build the Tooltip of abilityId. Layout, etc

GetAbilityId(skillType, skillLineIndex, abilityIndex, abilityLevel, rank) : returns ablityId
GetAbilityInfo(skillType, skillLineIndex, abilityIndex, abilityLevel) : Returns earnedAt, texturePath. abilityLevel can be 0/1/2 for active/ults or 1/2/3/4/5/6/7/8/9 for passives
GetAbilityType(skillType, skillLineIndex, abilityIndex) : Returns abilityType, maxRank for an ability. Didn't found another name but it could be named differently. It's important that this function returns maxRank too, because if abilityType ~= passive, it will return nil (or 4, but nil is better).


+ a way to get undiscovered / unavailable ability ID.
Here, I dont get any ideas, adding classId, raceId and undiscovered skill lines could multiply the args and complexify some pretty simple functions.


Bit long, maybe will never be released , but thank you anyways.
 
02/10/16, 05:00 PM   #2
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
I'd love to see a follow up on this. Has anything changed?
 
02/10/16, 05:10 PM   #3
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
GetUnitRaceId became a thing.
There are also functions that allow you to access abilityIds of other classes afaik (GetNumAbilities(), GetAbilityInfoByIndex())
I also wrote a library that allows to display a tooltip for any abilityId, but it is not yet uploaded (you can find it as part of sidWarTools and sidTools if you want to take a look).
 
02/10/16, 05:11 PM   #4
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
A lot of this should be in and in use in AbilityTooltips.lua. The tooltip function for SetAbilityId probably isn't a big deal to add.
 
02/10/16, 05:16 PM   #5
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Would it be possible to change the API to return information about unlearned skills like Ayantir mentioned in the OP? Right now there is no way to see which morphs I haven't unlocked or leveled yet. Would be awesome if we could make an addon with a list of all skills for the character that shows what still needs to be leveled, for the perfectionists among us.
 
02/10/16, 05:21 PM   #6
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Originally Posted by sirinsidiator View Post
Would it be possible to change the API to return information about unlearned skills like Ayantir mentioned in the OP? Right now there is no way to see which morphs I haven't unlocked or leveled yet. Would be awesome if we could make an addon with a list of all skills for the character that shows what still needs to be leveled, for the perfectionists among us.
THIS!

I was just testing some code and realized that 'progressionIndex' is individual, so I can't quite have access to tooltip for morphs I never learned. Is there any other way around it? If not, could it be possible in the future?
 
02/10/16, 05:25 PM   #7
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by sirinsidiator View Post
Would it be possible to change the API to return information about unlearned skills like Ayantir mentioned in the OP? Right now there is no way to see which morphs I haven't unlocked or leveled yet. Would be awesome if we could make an addon with a list of all skills for the character that shows what still needs to be leveled, for the perfectionists among us.
Do you mean some way to query the ability ids for the morphs so you don't have to hard code data tables?
 
02/10/16, 05:33 PM   #8
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
Originally Posted by ZOS_ChipHilseberg View Post
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:
  1. local function PrintAbilityInfo(abilityId)
  2.             local name = GetAbilityName(abilityId)
  3.             local icon = GetAbilityIcon(abilityId)
  4.             local hasProgression, progressionIndex, lastRankXp, nextRankXp, currentXp, atMorph = GetAbilityProgressionXPInfoFromAbilityId(abilityId)
  5.             if(hasProgression and nextRankXp > 0) then -- not maxed
  6.                 local rank = GetAbilityProgressionRankFromAbilityId(abilityId)
  7.                 local percent = currentXp / nextRankXp * 100
  8.                 df("%d: %s |t100%%:100%%:%s|t: %d (%.2f%%)", abilityId, name, icon, rank, percent)
  9.                 return GetAbilityProgressionAbilityId(progressionIndex, 1, 1), GetAbilityProgressionAbilityId(progressionIndex, 2, 1)
  10.             end
  11.         end
  12.      
  13.         for i = 1, GetNumAbilities() do
  14.             local morphA, morphB = PrintAbilityInfo(GetAbilityIdByIndex(i))
  15.             if(morphA) then PrintAbilityInfo(morphA) end
  16.             if(morphB) then PrintAbilityInfo(morphB) end
  17.         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.
 
02/11/16, 12:28 PM   #9
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
We added SetAbilityId to TooltipControl. The other changes are a bit more involved. If we have some time later on we can look into it.
 
02/11/16, 12:41 PM   #10
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Many thanks !
 
02/11/16, 01:51 PM   #11
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Originally Posted by ZOS_ChipHilseberg View Post
We added SetAbilityId to TooltipControl. The other changes are a bit more involved. If we have some time later on we can look into it.
Awesome, Chip, thanks a lot!

So not being able to see tooltips of morphs you never had was not intended (to avoid advantage or exploit) but rather because it wasn't required, is that correct?
 

ESOUI » Developer Discussions » Wish List » [outdated] Skills functions need a bit love


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