Download
(3 Kb)
Download
Updated: 03/05/15 08:08 PM
Compatibility:
Update 6 (1.6.5)
Updated:03/05/15 08:08 PM
Created:08/04/14 12:44 PM
Monthly downloads:80
Total downloads:24,554
Favorites:53
MD5:
Compatibility tool for Update 6  Popular! (More than 5000 hits)
Version: 6A
by: Garkin, merlight
Many addons are not updated for the latest patch, so you might find useful this tool (install it as any other addon).

This tool emulates removed/changed functions in Updates 3 to 5, so addons should work with even if they are not updated yet - just enable "Allow out of date addons" option in the addon manager.
However this tool isn't almighty, if some addon uses removed/changed functions before this tool is loaded you will still get an UI error and you will have to wait until that addon is properly updated for the latest patch.

Covered functions:
  • Update 3
    • GetBagInfo(bagId)
    • GetItemArmorType(itemLink)
    • GetItemWeaponType(itemLink)
    • GetShortAllianceName(alliance)
  • Update 4
    • GetAchievementItemLink(achievementId, rewardIndex, linkStyle)
    • GetAchievementRewardInfo(achievementId, rewardIndex)
    • IsSmithingStyleKnown(styleItemIndex)
    • GetNumLastCraftingResultItems()
  • Update 5
    • GetNumHeraldryItems()
    • GetHeraldryItemInfo()
    • BuyHeraldryItem()
    • GetHeraldryItemLink()
    • IsThirdAlchemySlotUnlocked()
    • ZO_OptionsWindow_InitializeControl()
    • IsControlAnOption()
    • ZO_Options_UpdateOption()
    • ZO_Options_SetupSlider()
    • ZO_Options_SetupDropdown()
    • ZO_Options_SetupCheckBox()
    • ZO_Options_OnMouseEnter()
    • ZO_OptionsWindow_LoadDefaults()
    • ZO_OptionsWindow_UpdatePanelOptions()
    • ZO_OptionsWindow_UpdateAllPanelOptions()
    • ZO_OptionsWindow_ChangePanels()
  • Update 6
    • GetMaxMountLevel()
    • GetTimeUntilMountCanBeFed()
    • PlayEmote()
    • GetAchievementCategoryInfo()

Update 5 also removes some fonts which were commonly used with LibMediaProvider library. If you are using any addon with this library, you might be interested in my other compatibility addon - LMP Removed Fonts.

Special thanks to merlight for new and corrected code.
6A:
- added changes for Update 6

5A:
- added changes for Update 5

4A:
- added changes for Update 4 - GetAchievementItemLink(...), GetAchievementRewardInfo(...), IsSmithingStyleKnown(...), GetNumLastCraftingResultItems().

3B:
- added Merlight's fix for player inventory
- fixed hooks for GetItemArmorType() and GetItemWeaponType() - thanks merlight!

3A:
- initial release
Archived Files (4)
File Name
Version
Size
Uploader
Date
5A
3kB
Garkin
11/03/14 10:12 AM
4A
2kB
Garkin
10/03/14 07:39 AM
B
2kB
Garkin
08/06/14 08:54 AM
A
2kB
08/04/14 12:44 PM


Post A Reply Comment Options
Unread 11/04/14, 06:53 AM  
manavortex
 
manavortex's Avatar
AddOn Author - Click to view AddOns

Forum posts: 138
File comments: 511
Uploads: 46
Wow, if I wasn't already married... you rock, man!
Report comment to moderator  
Reply With Quote
Unread 11/04/14, 06:20 AM  
QuadroTony
Banned
 
QuadroTony's Avatar
AddOn Author - Click to view AddOns

Forum posts: 828
File comments: 3866
Uploads: 3
great work, man ! it fixed all my problems except one


Report comment to moderator  
Reply With Quote
Unread 11/03/14, 10:38 PM  
dopiate
AddOn Author - Click to view AddOns

Forum posts: 142
File comments: 677
Uploads: 11
Almost there

Garkin Rules!

-d
Last edited by dopiate : 11/04/14 at 01:48 PM.
Report comment to moderator  
Reply With Quote
Unread 11/03/14, 04:56 PM  
Morwo
 
Morwo's Avatar

Forum posts: 44
File comments: 100
Uploads: 0
Oh Garkin you take care! i realy aprichiate your work here on esoui!
thanks alot
Report comment to moderator  
Reply With Quote
Unread 10/23/14, 06:13 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Originally Posted by Auldjohn
Is a Compatibility tool for Update 5 forthcoming? I'll be glad to be a beta tester...
EDIT: Version for Update 5 is uploaded.

FYI: Update 5 removes some fonts which were commonly used with LibMediaProvider library. If you are using any addon with this library, you might be interested in my other compatibility addon - LMP Removed Fonts.
Last edited by Garkin : 11/03/14 at 12:30 PM.
Report comment to moderator  
Reply With Quote
Unread 10/21/14, 11:17 PM  
Auldjohn
 
Auldjohn's Avatar

Forum posts: 9
File comments: 6
Uploads: 0
Is a Compatibility tool for Update 5 forthcoming? I'll be glad to be a beta tester...
Report comment to moderator  
Reply With Quote
Unread 08/06/14, 08:33 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Originally Posted by merlight
Originally Posted by SkOODaT
not 100% positive on this but renaming this to !CompatibilityTool with the ! may cause it to be loaded first before any other addons ... world of warcraft worked like this
Doesn't work. I tried several characters, ! * % $ #, numeric prefix, #number prefix, none produced guarranteed order. I hope that if ZOS implements some sort of addon priority, they do it with a manifest directive rather than file naming ^^
The only way I found is dirty hack. Almost all addons have set optional dependecy on something what is usually not there - LibAddonMenu. So I can create fake LibAddonMenu which will have set dependency on this addon. Its a hack, but it works... (No worries, I'm not going to use this hack)
Report comment to moderator  
Reply With Quote
Unread 08/06/14, 04:08 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Originally Posted by CrazyDutchGuy
I appreciate the effort in this work, but i somehow feel it has a negative side to the overall addon quality being delivered.
Well the point is with this gadget some addons could work transparently without even being looked into. Could help some people who stick with addons whose author is on vacation / left.

The 4 compatibility functions are so simple that they can't break a working addon. My inventory hack is dubious, I know, and that's why I'm using it myself so as to not avoid its consequences
Report comment to moderator  
Reply With Quote
Unread 08/06/14, 03:56 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Originally Posted by SkOODaT
not 100% positive on this but renaming this to !CompatibilityTool with the ! may cause it to be loaded first before any other addons ... world of warcraft worked like this
Doesn't work. I tried several characters, ! * % $ #, numeric prefix, #number prefix, none produced guarranteed order. I hope that if ZOS implements some sort of addon priority, they do it with a manifest directive rather than file naming ^^
Last edited by merlight : 08/06/14 at 04:09 PM.
Report comment to moderator  
Reply With Quote
Unread 08/06/14, 03:33 PM  
CrazyDutchGuy
 
CrazyDutchGuy's Avatar
AddOn Author - Click to view AddOns

Forum posts: 89
File comments: 187
Uploads: 9
I am not sure if I am happy with this addon. (a) It overrides default api functionality and (b) it tries to fix unmaintained addons.

(a) has the 'potential' problem that it can cause issues with other addons (b) is just a problem of lack of addon developers. If an addon is unmaintained, either patch it, or move it to the outdated section.

I appreciate the effort in this work, but i somehow feel it has a negative side to the overall addon quality being delivered.
Report comment to moderator  
Reply With Quote
Unread 08/06/14, 10:31 AM  
SkOODaT
 
SkOODaT's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 169
Uploads: 11
not 100% positive on this but renaming this to !CompatibilityTool with the ! may cause it to be loaded first before any other addons ... world of warcraft worked like this
Report comment to moderator  
Reply With Quote
Unread 08/06/14, 09:26 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Originally Posted by merlight
Unfortunatelly GetItemArmorType and GetItemWeaponType hooks don't work. Tested with AdvancedFilters (broken on purpose).

The return value of your hook is only used to decide whether the original func gets called or not - if you return GetItemLinkArmorType and the result is truthy, the new-original GetItemArmorType(bagId, slotIndex) function won't be called, but your return value won't be returned to the caller either.

In order to make both updated and outdated add-ons work side by side, it's necessary to check the first arg and decide where to get the type:
Lua Code:
  1. local newGetItemArmorType = GetItemArmorType
  2. GetItemArmorType = function(bagId, slotIndex)
  3.     if type(bagId) == "string" then
  4.         return GetItemLinkArmorType(bagId)
  5.     else
  6.         return newGetItemArmorType(bagId, slotIndex)
  7.     end
  8. end
  9.  
  10. local newGetItemWeaponType = GetItemWeaponType
  11. GetItemWeaponType = function(bagId, slotIndex)
  12.     if type(bagId) == "string" then
  13.         return GetItemLinkWeaponType(bagId)
  14.     else
  15.         return newGetItemWeaponType(bagId, slotIndex)
  16.     end
  17. end
Thank you for testing. I have added suggested changes to the new version. If you want to add or correct something, feel free to do so. I have added you as a team member.
Report comment to moderator  
Reply With Quote
Unread 08/05/14, 04:13 PM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Unfortunatelly GetItemArmorType and GetItemWeaponType hooks don't work. Tested with AdvancedFilters (broken on purpose).

The return value of your hook is only used to decide whether the original func gets called or not - if you return GetItemLinkArmorType and the result is truthy, the new-original GetItemArmorType(bagId, slotIndex) function won't be called, but your return value won't be returned to the caller either.

In order to make both updated and outdated add-ons work side by side, it's necessary to check the first arg and decide where to get the type:
Lua Code:
  1. local newGetItemArmorType = GetItemArmorType
  2. GetItemArmorType = function(bagId, slotIndex)
  3.     if type(bagId) == "string" then
  4.         return GetItemLinkArmorType(bagId)
  5.     else
  6.         return newGetItemArmorType(bagId, slotIndex)
  7.     end
  8. end
  9.  
  10. local newGetItemWeaponType = GetItemWeaponType
  11. GetItemWeaponType = function(bagId, slotIndex)
  12.     if type(bagId) == "string" then
  13.         return GetItemLinkWeaponType(bagId)
  14.     else
  15.         return newGetItemWeaponType(bagId, slotIndex)
  16.     end
  17. end
Report comment to moderator  
Reply With Quote
Unread 08/05/14, 11:38 AM  
merlight
AddOn Author - Click to view AddOns

Forum posts: 671
File comments: 213
Uploads: 12
Great. It eludes me why ZOS didn't just keep these functions around till the next update.

Anyway, first I want to ask whether you think it's a good idea to optionally depend on this addon for future updates.

Second, http://www.esoui.com/downloads/info6...ootWindow.html used PLAYER_INVENTORY.inventories[INVENTORY_BACKPACK].numUsedSlots and numSlots, which were removed. This particular addon is easy to fix, but instead of fixing it I made a compatibility hack that provides these values. Include it if you like, or not.
Lua Code:
  1. local inventory_mt =
  2. {
  3.     __index = function(self, key)
  4.         if key == "numSlots" then
  5.             return GetBagSize(self.backingBag)
  6.         elseif key == "numUsedSlots" then
  7.             return GetNumBagUsedSlots(self.backingBag)
  8.         end
  9.     end
  10. }
  11. for i, inventory in pairs(PLAYER_INVENTORY.inventories) do
  12.     setmetatable(inventory, inventory_mt)
  13. end
Last edited by merlight : 08/05/14 at 11:39 AM.
Report comment to moderator  
Reply With Quote
Unread 08/05/14, 07:08 AM  
OmniObsessed

Forum posts: 9
File comments: 70
Uploads: 0
Thanks!

You're always sharing information and helping out... very much appreciated!
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: