Go Back   WowAce Forums > Official Addon Threads > General AddOns
General AddOns Authors, post your release ready addons here to get feedback or just to let everyone know about it.

Reply
 
Thread Tools
Old 04-08-2010   #1
kunda
Senior Member
 
Join Date: Oct 2006
Posts: 464
Default AllYouCanEat

http://www.wowace.com/addons/allyoucaneat/

Code:
-- -------------------------------------------------------------------------- --
-- AllYouCanEat by kunda                                                      --
-- -------------------------------------------------------------------------- --
--                                                                            --
-- AllYouCanEat is digging for details about the following statistics:        --
-- - 1774 = Different beverages consumed                                      --
-- - 1775 = Different foods eaten                                             --
-- - 1298 = Different bandage types used                                      --
-- - 1300 = Different health potions used                                     --
-- - 1302 = Different mana potions used                                       --
-- - 1304 = Different elixirs used                                            --
-- - 1306 = Different flasks consumed                                         --
--                                                                            --
-- With this AddOn it's easy to see which beverages, foods, bandage types,    --
-- potions, elixirs and flasks were consumed/used and which not.              --
-- The default statistic interface does not show such details.                --
--                                                                            --
-- The result is shown in a movable & resizable frame (accessible via LDB,    --
-- InterfaceOptions, '/allyoucaneat' or '/ayce'). If the statistic data is    --
-- saved to SavedVariables ('Data Manager' Button) it's possible to enable    --
-- an option to see this information in the various Tooltips or with other    --
-- characters.                                                                --
--                                                                            --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- !   It's impossible to consume everything because some items are class   ! --
-- !   dependent, profession dependent, faction dependent, quest rewards    ! --
-- !   (which you usually not get back if you finished the quest), some     ! --
-- !   items are only available via a TCG NPC and finally some items are    ! --
-- !   simply not available ingame.                                         ! --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- !!!  YES, this AddOn is absolutely USELESS, unless it's fun for you to !!! --
-- !!!  do a drink & food hunt across the whole WoW world :)              !!! --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--                                                                            --
-- Notes:                                                                     --
-- -> The Tooltip server query code is may be a bit annoying, but this is     --
--    necessary to avoid disconnects, because some itemIDs that are returned  --
--    from the server in the initial statistic scan are invalid respectively  --
--    currently not available ingame.                                         --
--    This means: A Tooltip server query (mouseover an item in the MainFrame) --
--    via GameTooltip:SetHyperlink() is restricted to one server query every  --
--    5 seconds, for the same itemID to 10 seconds.                           --
--    - I never got a disconnect with this 2 intervals.                       --
--    - But just in case: A warning text is shown.                            --
--                                                                            --
-- -------------------------------------------------------------------------- --
Screenshot:


Download:
http://www.wowace.com/addons/allyoucaneat/files/

Last edited by kunda; 08-31-2012 at 10:08 AM. Reason: update
kunda is offline   Reply With Quote
Old 05-20-2011   #2
Zidomo
Amazing Member
 
Zidomo's Avatar
 
Join Date: Jun 2005
Posts: 1,179
Default Re: AllYouCanEat

This has been a fine replacement for some of the features of the long obsolete Historian. The changes in the recent r20 & later builds are not so fine, though: "Saved data from previous AllYouCanEat versions are completely deleted because of a new storage system."

Its a problem several historical database mods have had in the past. If such a mod is new and in development, its no big problem changing the database format over a limited period of time until it is stable. It is a very big problem when the mod has been around for a long time (in AllYouCanEat's case, over a year), then it suddenly requires old database deletion.

It really defeats the point of having used AllYouCanEat in the past. And what's the point of using this in the future if the same thing might happen again?

A couple of the aforementioned historical database mods like this in the past reversed course (after initially requiring database deletion) and later provided an upgrade mechanism. Hope you can do the same for r19 and prior database formats of AllYouCanEat.
Zidomo is offline   Reply With Quote
Old 05-21-2011   #3
kunda
Senior Member
 
Join Date: Oct 2006
Posts: 464
Default Re: AllYouCanEat

This is important: No data is lost. AllYouCanEat is NOT a 'historical' addon like Historian or so, because ALL data is stored on the WoW server. AllYouCanEat is simply digging (deeep dig via GetAchievementCriteriaInfo() calls) for that data and shows them in a nice frame.


Sorry. But the deletion of all saved data (with AllYouCanEat-40100-1 / Patch 4.1) was necessary.

I try to explain:
I made a big db design error when I first made this addon, because it was not future proof. Now it is future proof.
[Details: The old db design saved only items which was not consumed/used to SavedVariables (sv). First, I thought this is the best way to minimize sv filesize/loadtime/mem because it's obvious that over time a player will consume/use more and more items - and so, over time, the sv file is getting smaller and smaller... But this is a big problem if the statistics are extended (happened with Patch 4.1). There was no way to check if it is a newly added item or if it was consumed/used. Because of that I had to delete all old data. I really tried to avoid deletion but it was not possible.]

Another big problem with Patch 4.1: GetAchievementCriteriaInfo() calls (with criteriaID) are round about 10 times slower than pre 4.1. The funny thing is: the more your character has consumed/used the longer it takes. The first GetAchievementCriteriaInfo() call is needed to get itemName, itemID and criteriaID. The second call to get isCompleted...and exactly this one is slow as hell if you have consumed/used many many (like me) items... Because of that I decided to skip the init scan at PLAYER_LOGIN. This scan (with can take up to 30sec and completely freeze WoW for that time) MUST BE DONE manually by clicking the SCAN-Button...not really nice, but it's better than have a long login duration.


Back to the saved data: Saving data to sv is ONLY needed if you want to see that data with other chars. Just log-in with a char, click 'SCAN', click 'Data Manager' and click 'Save Data' (and if you want to see this data in tooltips: enable 'Show statistic data in GameTooltip').


Hey! Thanks for feedback. I really thought no one would ever use such an 'useless' addon

Last edited by kunda; 05-21-2011 at 04:38 AM.
kunda is offline   Reply With Quote
Old 12-04-2011   #4
Dungrath
Newbie
 
Join Date: Oct 2009
Posts: 4
Default Re: AllYouCanEat

Is AYCE supposed to remember what you've consumed across sessions? That doesn't seem to work for me; if I log out it forgets that it's scanned any data. If I look at the saved variables file, it appears to have stored what it's found through scanning, it just doesn't bother to load that information. It would just be nice if you only had to scan once, or whenever you suspected the db had gotten out of sync, rather than every session. I assume that's how it's supposed to work, given that the data manager page suggests that you should be able to look at stored data from your other characters... But they always show up as "NOT SAVED".

I tried looking through the code to figure it out, but it's beyond me... Though my hunch is that the variable "DataIsScanned" is the culprit. It's not saved between sessions, it's set to false when the addon is loaded, it appears to be checked to determine whether data has been scanned or not, and it's only set to true after performing a scan. All that means to me is that it will never be true at the beginning of a session, and thus it will always force you to scan, rather than load data.
Dungrath is offline   Reply With Quote
Old 12-07-2011   #5
kunda
Senior Member
 
Join Date: Oct 2006
Posts: 464
Default Re: AllYouCanEat

Quote:
Originally Posted by Dungrath View Post
Is AYCE supposed to remember what you've consumed across sessions?
yes.

The 'force to scan' is intended. This makes sure that the data on the client is in sync with the server.
But you are right, the usability is not good. ...saving the criteriaIDs would reduce the need to do a scan at every login. I try to change it. sometime
__________________
addons
kunda is offline   Reply With Quote
Old 04-06-2012   #6
tegara
Newbie
 
Join Date: Feb 2012
Posts: 2
Default Re: AllYouCanEat

Hi Kunda,

Just wanted to say thank you for a great addon that satisfies my morbid curiosity about statistics of what i've eaten /drunk and what i haven't. I am wondering though since i've found some foods that's aren't in the list how they can be added. It doesn't seem to do it automatically so i was wondering if it's a hard-coded thing?
tegara is offline   Reply With Quote
Old 04-08-2012   #7
kunda
Senior Member
 
Join Date: Oct 2006
Posts: 464
Default Re: AllYouCanEat

No, no hard-coded list. The list is generated by the scan with data from the WoW server.
I know that there are some items missing in that list, but I will not add the possibility to manually add items, because such functionality can produce sync problems.
I think it's better to ask Blizzard to add the missing items to the server side database table(s).
__________________
addons
kunda is offline   Reply With Quote
Old 08-30-2012   #8
Lombra
Senior Member
 
Lombra's Avatar
 
Join Date: Jan 2006
Location: Sweden
Posts: 409
Default Re: AllYouCanEat

Hey,
have you looked into getting this updated for Panda? I have a similar addon myself, but it seems some of the stat IDs are no good any longer. At least on beta.
__________________
Grab your sword and fight the Horde!

Shattered Hand-EU
Lombra is offline   Reply With Quote
Old 08-30-2012   #9
kunda
Senior Member
 
Join Date: Oct 2006
Posts: 464
Default Re: AllYouCanEat

Update is here:
AllYouCanEat-50001-1: http://www.wowace.com/addons/allyoucaneat/files/

Lombra, I found this differences to 4.3.4:
- The arguments and how to use the function GetAchievementCriteriaInfo() has changed a little bit with 5.0.
- Some GetAchievementNumCriteria(statID) does not return correct values (e.g. 1774 and 1775).
- A wrong criteriaID in a GetAchievementCriteriaInfo(achievementID, criteriaID) call can produce a bug. Which happens if you iterate over GetAchievementCriteriaInfo(achievementID, criteriaID) with a fixed number insteed GetAchievementNumCriteria(statID), which is necessary to overcome the possible wrong return value from GetAchievementNumCriteria(statID). This means, it's necessary to write code that bugs to get the correct value.
- GetAchievementCriteriaInfo() calls are now as fast as prior 4.1. That's very good.
__________________
addons
kunda is offline   Reply With Quote
Old 08-31-2012   #10
Lombra
Senior Member
 
Lombra's Avatar
 
Join Date: Jan 2006
Location: Sweden
Posts: 409
Default Re: AllYouCanEat

Ah, so those values need to be hardcoded? That's a bummer.
__________________
Grab your sword and fight the Horde!

Shattered Hand-EU
Lombra is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:44 PM.