View Single Post
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.