Quantcast
Download
(11 Kb)
Download
Updated: 08/12/19 08:54 AM
Pictures
File Info
Compatibility:
Scalebreaker (5.1.5)
Elsweyr (5.0.5)
Wrathstone (4.3)
Murkmire (4.2)
Wolfhunter (4.1)
Updated:08/12/19 08:54 AM
Created:09/12/18 03:16 PM
Monthly downloads:503
Total downloads:2,196
Favorites:17
MD5:
5.1.5
Grubmaster Food & Drink Auto Consume
Version: 1.04
by: aethronx [More]
Description:
This addon allows a food or drink to be easily chosen from inventory and used automatically whenever the player's current food buff is nearing expiration.

To select a food to use automatically, right click on it in inventory and chose the "Consume Automatically" option.

After selecting a food, it will be used immediately if no food buff is active. If a food buff is active, it will be used when the buff is nearing expiration (5 minutes before by default).

The expiration buffer can be changed to anything between 0 and 10 minutes (0 and 600 seconds) using the /grubmasterbufferseconds command in chat (see below).

Right clicking the selected food in inventory again will show an option to stop automatic consumption.

A message will be shown in the chat window when food is used. When the food count reaches 5 or less in player inventory, a low inventory warning will be shown in chat. When food count is 0 and the expiration buffer has been reached, a warning will be shown in chat every minute. This can be turned off by using the /grubmasteroff slash command (see below).

Food or drinks cannot be used automatically while in combat. This is a limitation of the game's API. If a food cannot be used for any reason, it will try again 10 seconds later.

Using any food manually at any time while Grubmaster is running is perfectly fine.


Available Slash Comands:
  • /grubmasteron - Turns auto consumption on if food has been previously selected
  • /grubmasteroff - Turns auto consumption off
  • /grubmastershowsettings - Shows the current settings including food, expiration buffer, and current bag count
  • /grubmasterbufferseconds [seconds] - Shows the current buffer in seconds, or optionally changes it. Can be a number between 0 and 600.

Known Issues:
  • Food and drink items do not show option to autoconsume in gamepad mode. Turn off gamepad mode to select food, then turn it back on.
  • Text is not localized (however, it should work for all locations.)

Technical:
  • Runs on a 10 second EVENT_MANAGER:RegisterForUpdate timer.
  • Combat and other player statuses are checked first and will immediately exit the timer function

Acknowledgements:
  • Uses the LibFoodDrinkBuff library by Scootworks, Baertram. (Saved a lot of time, huge thanks!)
  • Uses LibStub by sirinsidiator, Seerah
Optional Files (0)


Archived Files (4)
File Name
Version
Size
Uploader
Date
1.03
11kB
aethronx
05/19/19 09:59 AM
1.02
10kB
aethronx
02/25/19 11:19 AM
1.01
10kB
aethronx
10/22/18 01:26 PM
1.00
10kB
aethronx
09/12/18 03:16 PM


Post A Reply Comment Options
Unread 08/12/19, 09:09 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2277
File comments: 2515
Uploads: 57
Hey there, please DO NOT include the librraies loaded from your addon's manifest txt file!
This might kill other addons.
Read this wiki entry abouit libraries, especially the section "Shipped with your addon (loaded via your addon's txt manifest file -> maybe causing problems)" please: https://wiki.esoui.com/Libraries

If you really need to include the libraries you should include them as total library with their own txt file so the game will find and load newer versions correctly.

And your included LibFoodDrinkBuff was even old and missing the language files! So this is a double no go

And LibStub is not needed anymore. Please don't use it in this addon and don't provide it with your addon anymore if not needed.
See this forum thread:
https://www.esoui.com/forums/showthread.php?t=8492

LibFoodDrinkBuff can be access without LibStub via the global variable LIB_FOOD_DRINK_BUFF directly (which you already did, so LibStub was never needed for your addon to work).

But this needs you to update the addon, remove the libraries from your addon manifest txt file and if you include them, include them with their own manifest txt file (LibFoodDrinkBuff.txt) containing the ##AddOnVersion: tag, + add them to your manifest txt file via the tag ## DependsOn: LibFoodDrinkBuff LibOtherLibraryNeeded

If you need help just ask, I'm glad to assist.
This would be basically your addon changed to the described stuff from above:
Grubmaster v1.05
-> Untested. Please test if all works as expected!

-Removed LibStub
-Removed call to LibFoodDrinkBuff in Grubmaster.txt
-Changed ## OptionalDependsOn: to ## DependsOn: so the library will be always loaded or the addon fails to start
-Updated version
-Corrected LibFoodDrinkBuff in Libs folder (added lang folder, added txt file, updated to newest version)


At best you wouldn't include libraries in your addons at all and let users download them as standalone version. But this is your choice.


Oh and another hint about the context menu:
If you add options to the context menu you should not use AddMenuItem but the library LibCustomMenu and it's function AddCustomMenuItem.
We had several problems in the past where the game said using AddMenuItem will taint the source code and raise an call to unsecure code afterwards (somewhere, not in your addon, maybe somewhere else in the Vanilla UI code).
The library is really simple. Just add it to ## DependsOn: LibCustomMenu LibFoodDrinkBuff
and then in your code at the line where you use AddMenuItem replace it with AddCustomMenuItem.
That's all.
Last edited by Baertram : 08/12/19 at 09:29 AM.
Report comment to moderator  
Reply With Quote
Unread 06/29/19, 01:16 AM  
Kahsa

Forum posts: 0
File comments: 7
Uploads: 0
Stopped Working??

Installed this AddOn and it worked fine for several days, then just stopped working. I have tried various foods, turning on and off, switching to drinks, etc. I have watched it tick down to time it should consume and it doesn't (making sure I'm not in combat). Seems really random. Any ideas guys?
Report comment to moderator  
Reply With Quote
Unread 05/19/19, 12:53 PM  
kindredspirit

Forum posts: 2
File comments: 70
Uploads: 0
Thank You

I don't think this addon needs anything more than it has. I love it. It's easy, it's simple, and It has never let me down!
Report comment to moderator  
Reply With Quote
Unread 11/10/18, 02:32 PM  
cag_dk

Forum posts: 21
File comments: 100
Uploads: 0
notification?

any chance for a notification Y seconds before consuming next meal?
(if autoconsume set to X seconds before expire, then Y would be X+20 ?? )
Report comment to moderator  
Reply With Quote
Unread 09/13/18, 06:14 PM  
aethronx
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 6
Uploads: 1
Originally Posted by SlippyCheeze
It is mostly cosmetic, but it'd be nice to have an addon settings page for this (eg: libAddonMenu-2.0) that had the currently selected food, an option to clear it, and an on/off switch.

Bonus points for listing other foods in inventory and letting it be selected there, but the context menu serves the purpose fine for that.

...and thank you so much. I very much like this. It is what I want in terms of food management. No more "don't suck" button to press every time food runs out, which is how it should have been from day one, ZOS.

So, good stuff!
Thanks for the suggestions (and compliment). A settings page is definitely in the works.
Report comment to moderator  
Reply With Quote
Unread 09/13/18, 04:22 PM  
SlippyCheeze
AddOn Author - Click to view AddOns

Forum posts: 52
File comments: 234
Uploads: 1
It is mostly cosmetic, but it'd be nice to have an addon settings page for this (eg: libAddonMenu-2.0) that had the currently selected food, an option to clear it, and an on/off switch.

Bonus points for listing other foods in inventory and letting it be selected there, but the context menu serves the purpose fine for that.

...and thank you so much. I very much like this. It is what I want in terms of food management. No more "don't suck" button to press every time food runs out, which is how it should have been from day one, ZOS.

So, good stuff!
Last edited by SlippyCheeze : 09/13/18 at 04:23 PM.
Report comment to moderator  
Reply With Quote
Unread 09/13/18, 04:02 PM  
aethronx
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 6
Uploads: 1
Originally Posted by Baertram
Just as hints:
LibDialog for the poupup to ask
LibCustomMenu for the context menu entries, instead of base game functions. More lua error safe then using it the way it is currently done
Thanks for the tip, I'll check them out.
Report comment to moderator  
Reply With Quote
Unread 09/13/18, 01:52 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2277
File comments: 2515
Uploads: 57
Just as hints:
LibDialog for the poupup to ask
LibCustomMenu for the context menu entries, instead of base game functions. More lua error safe then using it the way it is currently done
Report comment to moderator  
Reply With Quote
Unread 09/12/18, 06:26 PM  
SilverWF
 
SilverWF's Avatar
AddOn Author - Click to view AddOns

Forum posts: 49
File comments: 331
Uploads: 2
Originally Posted by aethronx
Originally Posted by SilverWF
Just let it would be consumed while in combat only
Sometimes I'm just can do nothing important (i.e. building house) and I don't need food to be refreshed there

Also food can be used while in combat, dunno, why you posted it a limitation. And while swimming, riding whatever
Hi, it's a limitation of the game API. The function call used to use items (like food and drinks) is protected, which means it won't execute if the player is in combat. I'll try to make that a little clearer in the description. As far as eating while swimming, it didn't work when we tested it, but I'll take another look at it.

If you're doing something and you don't want the food to refresh for a while, just use /grubmasteroff or turn it off via the food's right click menu.
Oh, I see, thx.
Well, better add a keybind then to turn it on or off - it's pretty easy to do
__________________
A long out of game time - just has no wish to play ESO. | ESO PC EU: @SilverWF
Addons: Advanced Autoloot Renewed, BeggingTheGear, Wykkyd Toolbar Updated
Report comment to moderator  
Reply With Quote
Unread 09/12/18, 06:21 PM  
aethronx
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 6
Uploads: 1
Originally Posted by SilverWF
Just let it would be consumed while in combat only
Sometimes I'm just can do nothing important (i.e. building house) and I don't need food to be refreshed there

Also food can be used while in combat, dunno, why you posted it a limitation. And while swimming, riding whatever
Hi, it's a limitation of the game API. The function call used to use items (like food and drinks) is protected, which means it won't execute if the player is in combat. I'll try to make that a little clearer in the description. As far as eating while swimming, it didn't work when we tested it, but I'll take another look at it.

If you're doing something and you don't want the food to refresh for a while, just use /grubmasteroff or turn it off via the food's right click menu.
Report comment to moderator  
Reply With Quote
Unread 09/12/18, 06:01 PM  
SilverWF
 
SilverWF's Avatar
AddOn Author - Click to view AddOns

Forum posts: 49
File comments: 331
Uploads: 2
Just let it would be consumed while in combat only
Sometimes I'm just can do nothing important (i.e. building house) and I don't need food to be refreshed there

Also food can be used while in combat, dunno, why you posted it a limitation. And while swimming, riding whatever
__________________
A long out of game time - just has no wish to play ESO. | ESO PC EU: @SilverWF
Addons: Advanced Autoloot Renewed, BeggingTheGear, Wykkyd Toolbar Updated
Last edited by SilverWF : 09/12/18 at 06:03 PM.
Report comment to moderator  
Reply With Quote
Unread 09/12/18, 04:33 PM  
aethronx
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 6
Uploads: 1
Originally Posted by Tonyleila
This sounds very cool! Can you add an option like a popup that makes me confirm that I want to refresh the food if it is golden food e.g.? Maybe you coud extend it even more by adding different food based on where you are: Food a) enter pvp zone and food b) enter a trail / veteran DLC dungeon etc.
Great ideas, I'll definitely add those to the list.
Report comment to moderator  
Reply With Quote
Unread 09/12/18, 03:48 PM  
Tonyleila
 
Tonyleila's Avatar
AddOn Author - Click to view AddOns

Forum posts: 289
File comments: 772
Uploads: 7
This sounds very cool! Can you add an option like a popup that makes me confirm that I want to refresh the food if it is golden food e.g.? Maybe you coud extend it even more by adding different food based on where you are: Food a) enter pvp zone and food b) enter a trail / veteran DLC dungeon etc.
__________________
My Addons @ WoWInterface
Last edited by Tonyleila : 09/12/18 at 03:56 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: