Thread Tools Display Modes
10/28/15, 07:02 PM   #1
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
ability tooltips

Is there any way to get ability tooltips for abilities, by abilityId, that your character does not have (without building them myself)? Like abilities from other classes.
I found these, but they only work for skills the character has (or can have).
Lua Code:
  1. SkillTooltip:SetProgressionAbility(progressionIndex, morph, rank)
  2. SkillTooltip:SetSkillAbility(skillType, lineIndex, abilityIndex)


This looks like it could be useful, but how is this used?
Lua Code:
  1. function ZO_Tooltip:LayoutAbility(abilityId, hideRank, overrideRank, pendingChampionPoints, addNewEffects)
I assumed it would be accessible from any of the tooltips, like SkillTooltip or AbilityTooltip, but its not. I also do not see a ZO_Tooltip:New() anywhere, so what has access to that function?
  Reply With Quote
10/28/15, 08:10 PM   #2
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
If you want the tooltip for Keyboard mode, it's impossible, it is hardcoded.

ZO_Tooltip:LayoutAbility() is unused. Maybe now it's used for gamepad mode, but I don't think so, it was during my checks at 1.4 or 1.5

I wrote a lib (LibSkillsFactory) -- which I should update in order to create something similar. But didn't succeed to reproduce tooltip exactly same as the are.

Look a bit in superstar if you didn't tried yet..
  Reply With Quote
10/28/15, 08:12 PM   #3
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Actually I figured it out...partially:

Lua Code:
  1. if not MyAbilityTooltip then
  2.     --AbilityTooltipTopLevel
  3.     --ZO_Tooltip
  4.         MyAbilityTooltip = CreateControlFromVirtual("someUniqueName", ZO_Compass, "ZO_Tooltip")
  5.         local ZO_Dyeing_Gamepad_Tooltip_Styles = ZO_ShallowTableCopy(ZO_TOOLTIP_STYLES)
  6.         ZO_Tooltip:Initialize(MyAbilityTooltip, ZO_Dyeing_Gamepad_Tooltip_Styles, style)
  7.     end
  8.    
  9.     MyAbilityTooltip:ClearAnchors()
  10.     MyAbilityTooltip:SetOwner(self, TOPLEFT, 100, 100, TOPLEFT)
  11.    
  12.     InitializeTooltip(MyAbilityTooltip, GuiRoot, TOPLEFT, 100, 100, TOPLEFT)
  13.    
  14.         local upgradeSection = MyAbilityTooltip:AcquireSection(MyAbilityTooltip:GetStyle("abilityUpgradeSection"))
  15.         MyAbilityTooltip:AddSectionEvenIfEmpty(upgradeSection)
  16.     MyAbilityTooltip:LayoutAbility(abilityId, hideRank, overrideRank, pendingChampionPoints, addNewEffects)

But it takes up the whole screen and MyAbilityTooltip:SetDimensions(xx, yy) seems to have no effect. The styles are messing it up, going to try to write my own style table for it, to change dimensions & see if that works.
  Reply With Quote
10/29/15, 12:16 AM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
This is how I do it in Potion Maker:
Code:
    <Tooltip name="PotionMakerTooltip" inherits="ZO_ItemIconTooltip" mouseEnabled="true" movable="true" hidden="true">
      <ResizeToFitPadding width="48" height="57"/>
      <DimensionConstraints minX="416" maxX="416" />
    </Tooltip>
No issue with the size.

Last edited by votan : 10/29/15 at 03:26 AM.
  Reply With Quote
10/30/15, 10:04 PM   #5
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Thank you both for the information.

@votan
Yeah if I use a normal tooltip it works just fine, no problem with size. I was trying to find a way to create an object that would allow me to directly use the function to set a tooltip by ability Id, which is what caused the sizing problem. Writing my own style table fixed the problem, but as Ayantir said we can't access all of the ability information so it was a pointless effort

@Ayantir
I looked at the lib, nice work btw, but I think I just can't get what I want. I was hoping to create tooltips for all of the effects you receive through EVENT_EFFECT_CHANGED. Some abilities actually fire multiple effects on you each with their own abilityId. I was trying to find a way to build tooltips for those, but the ability functions, like GetAbilityDescription(), don't return any descriptions for those effects even though they have their own abilityId.

I thought I might still be able to do it for debuffs, but apparently not. The abilityIds received when debuffed are not the same abilityIds as those in the skill lines (so you can't get any information about them). The debuffs must be counted as those special effects that have their own unique abilityId and I don't see any way to tell which "real" abilityId the effect came from to display the original tooltip.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » ability tooltips


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