[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. |
I'd love to see a follow up on this. Has anything changed?
|
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). |
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.
|
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. :D
|
Quote:
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? |
Quote:
|
Quote:
Lua Code:
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. |
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.
|
Many thanks ! :banana:
|
Quote:
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? |
All times are GMT -6. The time now is 10:11 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI