Download
(24 Kb)
Download
Updated: 03/18/23 12:37 PM
Pictures
File Info
Compatibility:
Scribes of Fate (8.3.5)
Updated:03/18/23 12:37 PM
Created:12/26/16 04:20 PM
Monthly downloads:71
Total downloads:16,608
Favorites:28
MD5:
Group Food & Drink Buffs  Popular! (More than 5000 hits)
Version: 1.22
by: Phinix [More]
Group Food & Drink Buffs


(Click your flag to translate the page. Addon includes in-game support for all listed languages.)

REQUIRED LIBRARIES: LibAddonMenu


Features:

Group food & drink tracking currently supports vanilla, Foundry Tactical Combat, Lui Extended, Bandits User Interface, and AUI group & raid frames.

Group Food & Drink Buffs will optionally show the icon of each member's active food or drink buff next to their group or raid frame. All craftable and Cyrodilic food is supported, as well as Crown and garbage food you find in the world. When someone's food buff runs out there is an option to show a red X icon which makes it obvious so they can be reminded.

By default the addon will simply show the icon for the active buff when they have it, and no icon at all when they have no food or drink buff. There are also options to configure the left-right and up-down offset position for group and raid icons separately in order to show them where you want them.




Gold donations are always welcome!
PC NA: @IllusoryID



Click here to view my other addons.
Hi all, I’m back and working on addons again. Times are tough and I am desperately in need of financial support at the moment dealing with disability due to a bleeding brain cavernoma and other expenses on less than $600 monthly fixed income. If anyone can help, or knows anyone that can help, or can possibly feature some of my work on their stream to help drive support my way, I would be immensely grateful. It will help me to continue to bring cool content and updates to you all!


Version 1.22:
- Updated for Scribes of Fate.

Version 1.21:
- Fixed bug causing group food buff icons to disappear when entering mouse cursor mode.
- Updated tooltips for special foods/drinks to use non-generic information.
- Various minor code maintenance.
- EDIT: Removed some testing functions.

Version 1.20:
- Added tooltips to group food/drink buff icons on mouseover.
- Updated for High Isle.

Version 1.19:
- Updated for Ascending Tide.
- Removed dependency on LibPhinixFunctions (too many libs).
- Minor code maintenance.

Version 1.18:
- Updated API for Waking Flame update.

Version 1.17:
- Updated API for Blackwood.
- Minor code maintenance.

1.16:
- Added support for AUI group and raid unit frames.
- Added support for several quest and other random junk food/drink items.
- Code maintenance and future proofing. Updated API for current PTS as well as live game.

1.15:
- Updated API for Flames of Ambition.

1.14:
- Updated API version for Stonethorn.

1.13:
- Updated API version for Greymoor.

1.12:
- Added event filters for food/drink buff checks to speed up performance.

1.11:
- Added support for new Witch's Festival food buffs.

1.10:
- Updated API for Harrowstorm.
- Removed dependency on LibStub.
- Various fixes and code maintenance.

1.09:
- Updated API version for Scalebreaker.

1.08:
- Hopefully fixed a typo causing errors with the Bandit UI support module.

1.07:
- Added proper detection of enabled group and raid frame addons on startup. Group Food & Drink Buffs should now automatically configure the proper frame type under addon settings based on your currently enabled group/raid frames.
- Added the chat command "/ready" to send a group ready check.
- Migrated global functions to LibPhinixFunctions for speed and streamlining of code. Please manually install the LibPhinixFunctions library.

1.06:
- Slightly modified the options for icon size to use a table instead of a slider which is more intuitive.
- Minor cleanup and consolidation of some language strings and code.

1.05:
- Complete re-write for Wrathstone.
- Removed included libs and added note to install separately to avoid possible out of date errors.
- Added support for all new food and drinks currently in the game.
- Added support for Foundry Tactical Combat, LUI Extended, and Bandits User Interface group and raid frames (NOTE: You must select the frames you are using in the options!).
- Added ability to move icons up and down as well as left and right.
- Many other improvements.
Post A Reply Comment Options
Unread 03/18/23, 12:43 PM  
DakJaniels
AddOn Author - Click to view AddOns

Forum posts: 27
File comments: 120
Uploads: 4
A request

Report comment to moderator  
Reply With Quote
Unread 06/22/22, 08:37 PM  
vazelle

Forum posts: 3
File comments: 74
Uploads: 0
Hello sometimes the buff "bleeds out" to my inventory screen, since my raid frame is behind the equipment info. Would be great if it can be fixed thanks before.

Last edited by vazelle : 06/22/22 at 08:38 PM.
Report comment to moderator  
Reply With Quote
Unread 06/07/22, 12:08 PM  
Neverlands
 
Neverlands's Avatar

Forum posts: 7
File comments: 559
Uploads: 0
Hello,
sometimes the food buff icons are displayed, when they shouldn't be - for example when talking to an NPC (I am not sure if this occured before High Isle):



Today I got this error (High Isle):
Lua Code:
  1. user:/AddOns/GroupFDBuffs/GroupFDBuffs.lua:49: attempt to index a nil value
  2. stack traceback:
  3. user:/AddOns/GroupFDBuffs/GroupFDBuffs.lua:49: in function 'OnMouseEnter'
  4. <Locals> aura = ud, abilityDescription = "" </Locals>
Last edited by Neverlands : 06/07/22 at 04:29 PM.
Report comment to moderator  
Reply With Quote
Unread 03/31/20, 05:41 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Hm interesting. Maybe this works for all of the food and drink buffs but I doubt as ZOs is not very consistent with it's data And 66125 actually could also be an itemId of a normal item like the Alessian Cuirass. The ids are not unque afaik. At least not "across their intended usages" like itemIds and abilityIds.


The lib is not using itemlinks, but a collector checking all the possible ability Ids info (radius, distance, duration, costs of powertypes, channel and cast time and target descriptor = "yourself" + blacklisted ability names) to match only the food and drink abilityIds.
Maybe there are still old ones in the ZOs data but they curerntly still return the appropriate ability names like
"Increase maximum life" so we asume they can still be active on the player.
Report comment to moderator  
Reply With Quote
Unread 03/31/20, 05:09 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 186
File comments: 1779
Uploads: 32
*edit: please ignore!*

The ID a food uses for the buff effect isn't the same as for the food item itself, or not consistently anyway.
Last edited by Phinix : 05/02/21 at 11:25 PM.
Report comment to moderator  
Reply With Quote
Unread 03/31/20, 04:37 PM  
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view AddOns

Forum posts: 312
File comments: 64
Uploads: 28
Originally Posted by Phinix
Originally Posted by Baertram
What does "Alessian Cuirass" have to do with an abilityId opf a buff? These are no itemIds of itemlinks! So what do you mean you have created a link string of them? Makes no sense!
The block of bad ID's I pasted before is not in any special format. I just put the ID from the beta LibFoodDrinkBuff followed by the name of the actual item that ID is associated with in game.

As for how I did that? It is easy! From the wiki article "How to create custom links", you can make a working link using any valid game ID by wrapping it in the proper syntax and pasting it in chat. The game engine will send this to the link interpreter and output an actual working link you can click.

So to test these ID's what I did was take each ID, for example 66125, and wrap it in the proper (generic) syntax:

Code:
|H1:item:66125:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h
Paste that into chat and it will create an actual working link for that ID, which is how you can get the name of the item it links to. If you want to use it in functions in place of an actual link you have to wrap it in ur double quotes ("").
aaaaah wait. this id‘s are not itemId‘s! they are abilityId‘s
Report comment to moderator  
Reply With Quote
Unread 03/31/20, 04:24 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 186
File comments: 1779
Uploads: 32
Originally Posted by Baertram
What does "Alessian Cuirass" have to do with an abilityId opf a buff? These are no itemIds of itemlinks! So what do you mean you have created a link string of them? Makes no sense!
The block of bad ID's I pasted before is not in any special format. I just put the ID from the beta LibFoodDrinkBuff followed by the name of the actual item that ID is associated with in game.

As for how I did that? It is easy! From the wiki article "How to create custom links", you can make a working link using any valid game ID by wrapping it in the proper syntax and pasting it in chat. The game engine will send this to the link interpreter and output an actual working link you can click.

So to test these ID's what I did was take each ID, for example 66125, and wrap it in the proper (generic) syntax:

Code:
|H1:item:66125:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h
Paste that into chat and it will create an actual working link for that ID, which is how you can get the name of the item it links to. If you want to use it in functions in place of an actual link you have to wrap it in double quotes ("").
Last edited by Phinix : 03/31/20 at 04:27 PM.
Report comment to moderator  
Reply With Quote
Unread 03/31/20, 03:01 PM  
Scootworks
 
Scootworks's Avatar
AddOn Author - Click to view AddOns

Forum posts: 312
File comments: 64
Uploads: 28
Originally Posted by Baertram
doh, sorry. I had copied the text 66125 with the blank at the end and pasted it into the search
Originally Posted by Baertram
But still: What does "Alessian Cuirass" have to do with an abilityId opf a buff? These are no itemIds of itemlinks! So what do you mean you have created a link string of them? Makes no sense!
These numbers are abilityIds (of the buffs on your player).
Check the library's function code of the "collector" for an example how to scan all buff ids ingame (chat slash command /dumpfdb). Those are not itemIds nor itemLinks.

The group stuff can be checked via the unitTag as well, like "player" can be used for yourself the unittags for the group members was somethiing like group1, group2 etc. I think (or maybe differently, not sure anymore).

Edit:
Yes I was right. There is a fixed prefix "grouP" or "boss" and a counter after that creating the unitTag concatenated at the end:

Code:
REGISTER_FILTER_UNIT_TAG    Any event with a unitTag argument    string unitTag    Filter for the exact unitTag
REGISTER_FILTER_UNIT_TAG_PREFIX    Any event with a unitTag argument    string unitTagPrefix    Filter for a unitTag that has multiple instances (e.g. group, boss)


here is an example:

Lua Code:
  1. LIB_FOOD_DRINK_BUFF:RegisterAbilityIdsFilterOnEventEffectChanged("Test", function(...)
  2.     local output = ""
  3.     local changeType = select(1, ...)
  4.     if changeType == EFFECT_RESULT_FADED then
  5.         output = "fade"
  6.     elseif changeType == EFFECT_RESULT_GAINED then
  7.         output = "gain"
  8.     end
  9.     if output ~= "" then
  10.         df("%s: %s effect", GetUnitName(select(4, ...)), output)
  11.     end
  12. end, REGISTER_FILTER_UNIT_TAG_PREFIX, "group")
Report comment to moderator  
Reply With Quote
Unread 03/31/20, 02:43 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
doh, sorry. I had copied the text 66125 with the blank at the end and pasted it into the search
But still: What does "Alessian Cuirass" have to do with an abilityId opf a buff? These are no itemIds of itemlinks! So what do you mean you have created a link string of them? Makes no sense!
These numbers are abilityIds (of the buffs on your player).
Check the library's function code of the "collector" for an example how to scan all buff ids ingame (chat slash command /dumpfdb). Those are not itemIds nor itemLinks.
You can use GetAbilityName(abilityId) for those ids and they should return values.

The group stuff can be checked via the unitTag as well, like "player" can be used for yourself the unittags for the group members was somethiing like group1, group2 etc. I think (or maybe differently, not sure anymore).

Edit:
Yes I was right. There is a fixed prefix "grouP" or "boss" and a counter after that creating the unitTag concatenated at the end:

Code:
REGISTER_FILTER_UNIT_TAG	Any event with a unitTag argument	string unitTag	Filter for the exact unitTag
REGISTER_FILTER_UNIT_TAG_PREFIX	Any event with a unitTag argument	string unitTagPrefix	Filter for a unitTag that has multiple instances (e.g. group, boss)
Last edited by Baertram : 03/31/20 at 03:10 PM.
Report comment to moderator  
Reply With Quote
Unread 03/31/20, 11:34 AM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 186
File comments: 1779
Uploads: 32
Originally Posted by Baertram
Just noticed: You should also maybe add an event filter on the unitTag "player" for the food stuff to be sure the event only triggers for your own buffs!
With Group Food & Drink Buffs, the OnEffectChanged callback actually fires OnGroupChanged() which only processes if you are in a group (it includes the player's group ID). It doesn't actually track anything if the player is solo. Not sure if you can set up an event filter to only fire for group members? Can't find the documentation on the feature yet.

I might try and add an option in Srendarr to only track things that are whitelisted for people that value performance over completeness, and re-register the events with filters if they select that option. Not sure if anyone would want such a feature.

Originally Posted by Baertram
My hybrid solution was just an attempt to make your addon maintainable automatically even if you are not around but the users decide to install the library.
I appreciate that. If it looks like I will be gone for an extended time I will reconsider.

Originally Posted by Baertram
Thanks for the hint about the nil abilityIds but are those abilityIds you have posted? Looks like item names at least? And the number 66125 is not in our library data at all?
It probably isn't in the live version. In the beta version you linked me though it is, along with the others. I just made a link string out of them and tested them in game with a chat script to see what they were because I saw there were things in the beta database that weren't in mine. The ID 66125 is on line 13:

Code:
	[66125] = LFDB_BUFF_TYPE_MAX_HEALTH, -- Increase Max Health
It is in the lib.DRINK_BUFF_ABILITIES table.
Last edited by Phinix : 03/31/20 at 11:35 AM.
Report comment to moderator  
Reply With Quote
Unread 03/31/20, 05:09 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Originally Posted by Phinix
I never did any performance tests to see if the difference between running an index nil check against a small database and pre-adding filters was actually noticeable in demanding situations (like big battles) but I will take your word for it and agree that any performance increase it brings certainly can't hurt, even if there wasn't an immediately noticeable difference (since things do add up).
It makes a difference in the end as the filtering happens before lua and all unneeded calls to lua functions + code would be just "skipped". So each simply nil check etc. would be skipped as well, which can make quite a noticeable difference if there will most likely be 200+ buff changes = 200 functions calls + nil checks in a table structure in only 1 fight.

Just noticed: You should also maybe add an event filter on the unitTag "player" for the food stuff to be sure the event only triggers for your own buffs!

For Srendarr it could help as well, I think yes we were talking about that in the past. But it would be complicated to keep track of all registered buffIds and filters and to clean them up (unregistering the appropriate event names) each time a change in the settings is done.
In the end I guess it could make a real diference if there are several buffs manually tracked on "whitelists" or "show at buff bar x". But maybe the filters would also just skip all other buffs this way and thus make the addon not work properly anymore. Not sure if you can add a filter to e.g. 5 abilityIds but also keep track of others in general, but I doubt it as this would be against the filter idea



LibFoodDrinkBuff
No problem and not taken as offense
The lib actually is used in some addons about food/drinks and inventory management already.

My hybrid solution was just an attempt to make your addon maintainable automatically even if you are not around but the users decide to install the library.


Thanks for the hint about the nil abilityIds but are those abilityIds you have posted? Looks like item names at least? And the number 66125 is not in our library data at all?
Code:
66125 - Alessian Cuirass
66132 - Alessian Cuirass
66137 - Alessian Pauldron
66141 - Alessian Gauntlets
84732 - Maul of the Sun
84733 - Greatsword of the Sun
85497 - Maul of Salvation
86560 - nil
86674 - Restoration Staff of the Storm Knight
86678 - Gauntlets of the Storm Knight
86747 - Sword of Necropotence
92433 - nil
92476 - Barkskin Bow
17407 - nil
17577 - nil
17581 - nil
17608 - nil
17614 - nil
66128 - Alessian Helm
66130 - Alessian Pauldron
84736 - Inferno Staff of the Sun
85484 - Restoration Staff of Salvation
92435 - nil
92437 - nil
92474 - Barkskin Greatsword
92477 - Barkskin Inferno Staff
127537 - Pillar Of Nirn Shield
127578 - Pillar Of Nirn Jack
127619 - Pillar Of Nirn Boots
127736 - Earthgore Epaulets
Last edited by Baertram : 03/31/20 at 05:21 AM.
Report comment to moderator  
Reply With Quote
Unread 03/30/20, 06:17 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 186
File comments: 1779
Uploads: 32
Originally Posted by Baertram
Warning: Spoiler
Hi Baertram.

I really appreciate you bringing up the event filter functions they added a while back and showing an example how they can be used in this case which is helpful. I remember talking to someone (maybe you?) about it back when it came out and how it wouldn't be of much use for Srendarr since you really have to track EVERYTHING in that addon.

I never did any performance tests to see if the difference between running an index nil check against a small database and pre-adding filters was actually noticeable in demanding situations (like big battles) but I will take your word for it and agree that any performance increase it brings certainly can't hurt, even if there wasn't an immediately noticeable difference (since things do add up).

I will definitely add food/drink ID pre-filters fo the Effect_Changed event next update.

I also took a look at the beta for LibFoodDrinkBuff 15, and while I definitely see the benefit for such a library in many use cases, I do not at this time see a need for this addon to include it.

My reasoning is simply this: There are many functions LibFoodDrinkBuff provides which this addon simply would not make use of as others may. The only aspect of the library I could see this one using would be the food/drink database, however I already have a script to automate updating the database this addon already contains (assuming I am around) and so adding support for LibFoodDrinkBuff just to have another database source of food/drink ID's seems unnecessarily redundant.

I also found that many of the IDs in the beta release are either not for food/drink items or have been removed from the game (?):

Warning: Spoiler

I hope you will understand and do not take offense. I do think LibFoodDrinkBuff will find use in many applications.
Report comment to moderator  
Reply With Quote
Unread 03/30/20, 05:47 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Hey Phinix,

already asked you a while ago but now i've prepared a version including LibFoodDrinkBuff for you so you might have a look:
https://www.dropbox.com/s/a7h1tz2wa4...kBuff.zip?dl=0

It supports both: Your code and LibFoodDrinkBuff (added as optional dependency in version 15 -> It's not out yet but we worked on it to provide more API functions and global constants to support addons like yours properly. You can find verison 15 here: https://github.com/Scootworks/LibFoo...Buff/tree/beta)

What I have changed in your addon:
-Updated DE translations a bit
-Added optional dependecy to LibFoodDrinkBuff>=15
-Changed your table creation in /bin/fdbDB.lua so it will either run your normal code or use LibFoodDrinkBuff (if loaded properly) to get the abilityIds and buffTypes.
-Added the difference of your internal code table and LFDB table to the detection of the junk/normal food buffs in the group frames
-Changed your event_effect_changed callback function to ONLY register the event for each abilityId in the table GroupFDB.fdbDB, using event filters.
This way you do not need to react in your addon on each effect changed, which will be quite thousands during fights!!! You checked the abilityId of the effect against your table then GroupFDB.fdbDB.
But this will trigger the callback function way too often, where as the event filter will register the filter before the lua code at the C code already and will make the callback function ONLY fire for the abilityIds needed.
-Added some local speed up variables like local fdbDB = GroupFDB.fdbDB etc. for reused table variables

I did not test it so far as LibFoodDrinkBuff v15 is still untested but I hope you see via my example how to use it, and that it's easy to implement for you as well.
And if not you'll at least be able to port the eventfilters to your code as it makes a difference, + maybe the changed translations (minor change)

Feel free to write me a PM if you got questions about my code example.
Last edited by Baertram : 03/30/20 at 05:50 AM.
Report comment to moderator  
Reply With Quote
Unread 03/29/20, 04:20 PM  
Phinix
 
Phinix's Avatar
AddOn Author - Click to view AddOns

Forum posts: 186
File comments: 1779
Uploads: 32
Originally Posted by Nudel
This addon doesn't recognize the new Witches' Festival foods, including Bewitched Sugar Skulls, Disastrously Bloody Mara, and Pack Leader's Bone Broth. If a party member is using any of those, the addon displays the icon for having no food buff active.
Thanks for reminding me! Lots of addons to update...

Originally Posted by Kenza
To fix, add these lines to fdbDB.lua, under Festivals, Chapters, and DLC

[127572] = {buffType = 5}, -- Pack Leader's Bone Broth
[127596] = {buffType = 5}, -- Bewitched Sugar Skulls
[127531] = {buffType = 5}, -- Disastrously Bloody Mara
Just verified these ID's are correct in-game and re-uploaded with the new recipes added.
Last edited by Phinix : 03/29/20 at 04:38 PM.
Report comment to moderator  
Reply With Quote
Unread 03/29/20, 03:03 PM  
Kenza
AddOn Author - Click to view AddOns

Forum posts: 31
File comments: 175
Uploads: 1
Originally Posted by Nudel
This addon doesn't recognize the new Witches' Festival foods, including Bewitched Sugar Skulls, Disastrously Bloody Mara, and Pack Leader's Bone Broth. If a party member is using any of those, the addon displays the icon for having no food buff active.
To fix, add these lines to fdbDB.lua, under Festivals, Chapters, and DLC

[127572] = {buffType = 5}, -- Pack Leader's Bone Broth
[127596] = {buffType = 5}, -- Bewitched Sugar Skulls
[127531] = {buffType = 5}, -- Disastrously Bloody Mara
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.