Thread Tools Display Modes
07/10/14, 05:43 AM   #1
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Whole bunch of ItemLink and Ability functions on PTS 1.3.0

ItemLinks (source: EsoUI\Ingame\Tooltip\ItemTooltips.lua):
Lua Code:
  1. local name = GetItemLinkName(itemLink)
  2. local quality = GetItemLinkQuality(itemLink)
  3. local itemType = GetItemLinkItemType(itemLink)
  4. local equipType = GetItemLinkEquipType(itemLink)
  5. local siegeType = GetItemLinkSiegeType(itemLink)
  6. local maxHP = GetItemLinkSiegeMaxHP(itemLink)
  7. local weaponType = GetItemLinkWeaponType(itemLink)
  8. local armorType = GetItemLinkArmorType(itemLink)
  9. local title = GetItemLinkBookTitle(itemLink)
  10. local craftingSkillType = GetItemLinkCraftingSkillType(itemLink)
  11. local runeClassification = GetItemLinkEnchantingRuneClassification(itemLink)
  12. local bindType = GetItemLinkBindType(itemLink)
  13. local weaponPower = GetItemLinkWeaponPower(itemLink)
  14. local armorRating = GetItemLinkArmorRating(itemLink, CONSIDER_CONDITION) --CONSIDER_CONDITION is boolean
  15. local requiredLevel = GetItemLinkRequiredLevel(itemLink)
  16. local requiredVeteranRank = GetItemLinkRequiredVeteranRank(itemLink)
  17. local value = GetItemLinkValue(itemLink, CONSIDER_CONDITION)
  18. local condition = GetItemLinkCondition(itemLink)
  19. local charges = GetItemLinkNumEnchantCharges(itemLink)
  20. local maxCharges = GetItemLinkMaxEnchantCharges(itemLink)
  21. local hasEnchant, enchantHeader, enchantDescription = GetItemLinkEnchantInfo(itemLink)
  22. local hasAbility, abilityHeader, abilityDescription, cooldown = GetItemLinkOnUseAbilityInfo(itemLink)
  23. local hasTraitAbility, traitAbilityDescription, traitCooldown = GetItemLinkTraitOnUseAbilityInfo(itemLink, i) --for i = 1, GetMaxTraits() do
  24. local traitType, traitDescription = GetItemLinkTraitInfo(itemLink)
  25. local hasSet, setName, numBonuses, numEquipped, maxEquipped = GetItemLinkSetInfo(itemLink)
  26. local numRequired, bonusDescription = GetItemLinkSetBonusInfo(itemLink, equipped, i) --for i = 1, numBonuses do
  27. local flavorText = GetItemLinkFlavorText(itemLink)
  28. local minLevel, maxLevel, minVeteranRank, maxVeteranRank = GetItemLinkGlyphMinMaxLevels(itemLink)
  29.  
  30. local unique = IsItemLinkUnique(itemLink)
  31. local uniqueEquipped = IsItemLinkUniqueEquipped(itemLink)
  32. local consumable = IsItemLinkConsumable(itemLink)
  33. local rune = IsItemLinkEnchantingRune(itemLink)
  34. local bound = IsItemLinkBound(itemLink)
  35. local crafted = IsItemLinkCrafted(itemLink)
  36. local known = IsItemLinkBookKnown(itemLink)
  37. local trash = IsItemLinkVendorTrash(itemLink)
  38.  
  39. local creator = GetItemCreatorName(bagId, slotIndex)


Abilities (source: EsoUI\Ingame\Tooltip\AbilityTooltips.lua):
Lua Code:
  1. local abilityName = GetAbilityName(abilityId)
  2. local rank = GetAbilityProgressionRankFromAbilityId(abilityId)
  3. local hasProgression, progressionIndex, lastRankXP, nextRankXP, currentXP, atMorph = GetAbilityProgressionXPInfoFromAbilityId(abilityId)
  4. local channeled, castTime, channelTime = GetAbilityCastInfo(abilityId)
  5. local targetDescription = GetAbilityTargetDescription(abilityId)
  6. local minRangeCM, maxRangeCM = GetAbilityRange(abilityId)
  7. local radiusCM = GetAbilityRadius(abilityId)
  8. local distanceCM = GetAbilityAngleDistance(abilityId)
  9. local durationMS = GetAbilityDuration(abilityId)
  10. local cost, mechanic = GetAbilityCost(abilityId)
  11. local descriptionHeader = GetAbilityDescriptionHeader(abilityId)
  12. local description = GetAbilityDescription(abilityId)
  13.  
  14. local exists = DoesAbilityExist(abilityId)
  Reply With Quote
07/10/14, 06:09 AM   #2
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 89
I put in a request to extract more information from itemLinks, seems they are doing it :P
  Reply With Quote
07/10/14, 06:28 AM   #3
farangkao
 
farangkao's Avatar
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 59
Very Nice

Allows to write some Addons a little bit cleaner
  Reply With Quote
07/10/14, 07:49 AM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
A small change in itemlink format:
Code:
|H0:item:45040:3:12:26848:3:12:0:0:0:0:0:0:0:0:0:4:0:0:153:0|hp^n|h
It means that function ZO_LinkHandler_ParseLink() does not return empty string but p^ and some code.

Also zo_strformat() leaves one space before link, so the old bug is fixed. By the way if you want to have more then one space before itemlink you should use "X" in the pattern:
Lua Code:
  1. zo_strformat("Text            <<t:1>>", itemLink)
  2. --returns "Text itemLink"
  3.  
  4. zo_strformat("Text            <<X:1>>", itemLink)
  5. --returns "Text            itemLink")
  Reply With Quote
07/10/14, 09:32 AM   #5
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Lua Code:
  1. local requiredLevel = GetItemLinkRequiredLevel(itemLink)
  2. local requiredVeteranRank = GetItemLinkRequiredVeteranRank(itemLink)
Great, I've been trying to figure these out for so long Plus GetItemLinkName, finally
  Reply With Quote
07/10/14, 09:44 AM   #6
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
Changes to the keybindstrip:
  • callback function argument changed - was descriptor table, now is boolean (true if the callback was called on key up, false otherwise),
  • handlesKeyUp - new entry in the descriptor table - if set to true, callback will be called on key down and up

Changes to FRAGMENT_GROUP table (used in ZO_Scene:AddFragmentGroup()):
  • changed UI_WINDOW to MOUSE_DRIVEN_UI_WINDOW,
    - keybindstrip frament is now MOUSE_DRIVEN_UI_WINDOW.KEYBIND_STRIP_FADE_FRAGMENT,
  • changed UI_WINDOW_NO_COMBAT_OVERLAY to MOUSE_DRIVEN_UI_WINDOW_NO_COMBAT_OVERLAY,
    - keybindstrip frament is now MOUSE_DRIVEN_UI_WINDOW_NO_COMBAT_OVERLAY.KEYBIND_STRIP_FADE_FRAGMENT,
  • added GAMEPAD_DRIVEN_UI_WINDOW

Last edited by Harven : 07/10/14 at 02:53 PM.
  Reply With Quote
07/10/14, 02:55 PM   #7
Khaibit
 
Khaibit's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2014
Posts: 26
Hallelujah! Comparison of item names when all you have is links will be possible again, quite pleased
  Reply With Quote
07/10/14, 03:04 PM   #8
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Ability functions get more than just player skills. One amusing one I ran across:

GM AOE Death Touch
Hits all targets for 100,000 Direct Damage, in a 1000 meter radius from the caster.

Separate ranks of an ability have separate ability IDs. The IDs range from 3 to about 58,000, with about 27k values returning something.
  Reply With Quote
07/10/14, 04:35 PM   #9
Halja
 
Halja's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 111
Originally Posted by Sasky View Post
Ability functions get more than just player skills. One amusing one I ran across:

GM AOE Death Touch
Hits all targets for 100,000 Direct Damage, in a 1000 meter radius from the caster.

Separate ranks of an ability have separate ability IDs. The IDs range from 3 to about 58,000, with about 27k values returning something.
lol I remember back in DAoC early days the GM Ashay on Pendragon test server was give a custom golden hockey stick animation when GM AOE Death Touch was used. It was funny to see the stick come out and spin when testing encounters bugged out.
  Reply With Quote
07/11/14, 09:18 AM   #10
Flagrick
 
Flagrick's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 24
Originally Posted by Khaibit View Post
Hallelujah! Comparison of item names when all you have is links will be possible again, quite pleased
Lua Code:
  1. local name = GetItemLinkName(itemLink)

I hope it works with items from EVENT_LOOT_RECEIVED
  Reply With Quote
07/12/14, 08:14 PM   #11
katkat42
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 155
Originally Posted by Flagrick View Post
Lua Code:
  1. local name = GetItemLinkName(itemLink)

I hope it works with items from EVENT_LOOT_RECEIVED
I hope the functions work with the GetCraftingResultLink links.
  Reply With Quote
07/12/14, 09:00 PM   #12
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Originally Posted by Flagrick View Post
Lua Code:
  1. local name = GetItemLinkName(itemLink)

I hope it works with items from EVENT_LOOT_RECEIVED
Me too .. once addons are activated I'll be testing that in my addon amongst others.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Whole bunch of ItemLink and Ability functions on PTS 1.3.0


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