Download
(256Kb)
Download
Updated: 06-12-10 02:46 PM
Pictures
File Info
Updated:06-12-10 02:46 PM
Created:12-03-08 04:31 PM
Downloads:20,067
Favorites:230
MD5:
Categories:TradeSkill Mods, ToolTip

GatherSage2  Popular! (More than 5000 hits)

Version: 2010-06-12
by: kellewic [More]

GatherSage2 is a re-write of the original GatherSage. Almost all of the original GatherSage functionality made its way into GatherSage2 and a lot more was added.

GatherSage2 shows what level is required to mine, pick, smelt, prospect, mill, or skin a resource (vein, deposit, ore, animal, plant, etc). The tooltip will show all skills for which the resource can be gathered or used up (i.e. an herb that can be both picked and milled).

It also shows you your current skill, how many skill ups you have gained since you logged in, and the difference between the skill you need to work with the resource and the skill you currently have.

It displays this information in the tooltip when you mouse over a resource in the world, minimap, inventory, auction house, mailbox, guild bank, and pretty much anywhere the item can be displayed. It will also show you if that resource has a chance of yielding special items (such as stone, gems, or other herbs).

A lot of testing has gone into making sure GatherSage2 does not interfere with other addons you may have loaded. Please report any problems found.

There is a readme.txt file that contains detailed information on GatherSage2

CHANGELOG

* (2010-06-12): No code changes. Added all Perl code-generation code to the package in case someone
needs to update the English locale or module Lua files.

* (2010-06-06): Fixed a bug where a creature has the same name as something else (i.e. Jade)
Also fixed a bug in the pattern matching of targets.

* (2010-06-04): Fixed bug with GameTooltip text going "wonky"... that's what happens when
you move stuff around :)

* (2010-05-30): Code cleanup and a few bug fixes.
Removed AceEvent-3.0, AceHook-3.0, AceAddon-3.0 dependencies
Added basic module code.
Changed how the locale strings work.
Cleaned up the GUI options panel.
Removed FR locale since it hasn't been updated
Updated DE locale
Added skill strings to items when the skill is different per item

* (2010-04-26): Removed support for ItemLevel module. It doesn't look to be maintained and the game now
provides the item level in the tooltip.

Removed all functionality related to quests. I have never used it and no one has ever
asked about it. It was a PITA to keep maintaining. Items gathered for quests should
still be listed on the tooltip.

Updated all module's data with what seems the most recent skill levels.

Updated code to fix reported issues. I cannot replicate the issues now so hopefully
they are good to go.

* (2009-09-08): Removed most tabs from the GUI options and condensed them to the "General" tab.

When disabling the addon in the options, all modules will be disabled.

When enabling the addon in the options, only modules for which you have a skill in
will be re-enabled by default. Manually enabling additional modules still works after
the addon is re-enabled.

When enabling parent modules (such as Mining), their child modules will also enable
(such as Smelting). If, for some reason, you don't want the child enabled, just uncheck it
after loading the parent. If for some reason you only want the child, uncheck both and re-check
the child.

Removed informational messages from displaying by default. This includes enable/disable
messages. They will appear if you set the log level to DEBUG.

Fixed an issue with deep copying game objects for no good reason. This resolved an issue
with the BasicChatMods addon and likely reduced memory footprint a tiny bit, which is
hardly ever a bad thing.

Fixed some creatures that used to be skinnable, but are no longer skinnable.

* (2009-09-04): Removed GUI configuration "Debugging" tab; placed all items under "General" tab.

Added options to only show tooltip information when a configured modifier key is used. All
modifier keys are supported (feature request).

* (2009-08-30): Updated herbalism, mining, and skinning locales and module files with new data from WoWHead.

Fixed an issue where adjusting the tooltip money frame was causing a lot of blank lines
to appear. In addition to removing the blank lines, the money frame and text was changed
to match the new in-game style.

Manually added in Titanium prospecting data.
Updated TOC for 3.2

* (2009-07-19): Changes made to Herbalism broke a few things so I had to fix them.
Minor code optimizations

* (2009-07-18): Re-organizing core code
Minor code optimizations

Fixed herbalism gathering from creatures skill levels. It seems these are the
same as skinning (based on level).

* (2009-07-11): Fixed issue with Fishing skill not being read correctly.

* (2009-06-23): Added fishing stub module for future development (was requested)

Removed data recording as the feature is fairly useless since GS2 keeps its own
database of information.

Removed locale files with no translations.

* (2009-04-18): Added debugging routines and associated GUI options. If the logging level is DEBUG or greater,
additional information will be shown in the default chat window.

There is a new dump state function that will dump all of GS2's internal state to the database. This
will allow people to PM the file to me for debugging purposes. Some people see 'tonumber' errors that
do not always show up. Hopefully this feature will help track down what is going on. This data is cleared
at login.

This version was not released.

* (2009-04-14): Fixed a bug related to numbers being compared with strings.
Fixed some other miscellaneous bugs that came up in daily use of the addon.
Updated the readme.txt file.
Added some more "unknown" items to be ignored in the locale/ignore.lua file (only available for enUS).
Bumped TOC interface number to 3.1.0

Fixed herbalism skill for Frozen Herb. It seems Wowhead has 3 entries for it and only
one of them is corect.

Updated herbalism, skinning, and mining locale and modules files from Wowhead.

Fixed Tiger Lily skill to 375 from 400 as per 3.1 patch notes.

* (2009-03-08): The "Auctioneer" bug had nothing to do with Auctioneer after further testing.
I think I finally have this fixed, although I still don't know the cause of it.

Added a logging library to aid in future debugging. Modified the Print()
method to be more friendly to the logging library.

Removed the DEBUG variable as it's not longer needed.

* (2009-03-07): Fixed a weird bug when Auctioneer was loaded. For some reason the right
FontStrings of the GameTooltip would shift left in some instances.

* (2009-01-31): Created a locale "ignore.lua" file that contains items that appear to be of
interest, but are not. This only affects the recording of unknown data.

Mining has its own locale file now that is automatically generated from
Wowhead data.

Fixed bug where known data was being recorded as unknown data.

This version was not released.

* (2009-01-28): Updated deDE locale files with name changes that Peter sent me via email. Thanks!

Herbalism has its own locale file now, others will follow this paradigm soon.
Added many more creatures and items that herbalists can gather from.

Updated skinning locale and module files - 8 new creatures, 1 new item

* (2009-01-19): Fixed the skinning locale and module data. Known NPCs should now show the correct
skinning information in the tooltip.

* (2009-01-08): Fixed a bug that caused Altoholic tooltip lines to flow off the tooltip.
Releasing this version.

* (2009-01-03): Removed all slash commands in favor of a GUI configuration screen, which
can be found in the game Interface screen.

Fixed herbalism skill levels to follow the +25, +50, +100 progression.

Added code to save items and units it does not recognize to the database. These
will need to be posted on the mod forum so they can be added to the static data
and be recognized.

Unknown items are saved in global.UNKNOWN_DATA.
Recorded items are saved in global.RECORDED_DATA.
The file these are saved to is WOW_DIR\WTF\Account\NAME\SavedVariables\GatherSage2.lua

Removed esES localization file as it was empty.

Separated out pieces of the locale files as they were getting really big
with the addition of skinning.

Changed the version number to be shorter since the mod hosting sites don't like
it to be really long and it kept getting truncated.

Added a "skill distance" in the tooltip, which is the difference
between your current level and the required level. The format is
(without the dashes):

Required (req. level) -------- curSkill (skillUps/distance)

Requires XXXXX (250) --------- 105 (+10/-145)

Filled in all known skinning targets and items. These files are automatically
generated from WoWHead so it's a bit easier to accomplish now.

Fixed a few small display bugs. Wrong colors, bad line wrapping, etc.

Added inscription data to show what inks can be made from
which pigments. This revealed a weakness in how data is
associated and a small display change was made. If a single item
(i.e. Alabaster Pigment) can be used to create more than one item
at differing skill levels, then for the main "Requires" line, the
skill level is not shown; instead "varies" is shown. In the "Chance of"
listing, the skill level will appear per item line in the right column
correctly color coded. A screenshot is provided as an example. So far,
Alabaster Pigment is the only item in the addon that follows this, but I
added the ability so any module can use it in case more are encountered as
I suspect they will be with jewelcrafting.

Inscription locale data added to the English locale. Other locales will need
someone to translate them.

Corrected code comments.
Added more code comments in case anyone else feels like messing with it :)

* (2008-12-25): Added initial skinning information
Fixed a few bugs and potential problems

Added more items to the locale tables. Hopefully I didn't break
the German locale again.

If the threat meter is showing on the tooltip, it is adjusted
down the tooltip and it's little diamond texture is hidden (along
with all other textures since there is no easy way to differentiate
what texture belongs to which line).

Added support for more than a dozen other tooltip mods. GatherSage2
should co-exist with a good portion of the tootlip mods out there.

These changes also cover the 2008-12-25-2 release which was a minor bug
fix for skinning.

* (2008-12-05-4): Fix for German clients (I hope)

* (2008-12-05): Added prospecting information and a stub for jewelcrafting.

Re-wrote portions of code to get smelting and prospecting data
sets to play nice. Tooltips will now display both skills on
things such as "Copper Ore". If more than one skill has
"chance of" items, these will be tagged by skill. This is really
only relevant for Mining Jewelcrafters and other such combinations
that have two skills that use much of the same items.

German localizations added thanks to EnSabahNur

Added support for RatingBuster and ItemLevel as they modify the
tooltip in ways that interferes with GatherSage2 displaying all
pretty :)

Added colorization of all "chance of" items.

* (2008-12-03): Re-structured code a bit more.
This version is being tagged as Alpha since it does pretty much
what the original GatherSage did minus the "You can now pick..."
functionality.

* (2008-11-30): More code optimization and structuring.
This version was not released.

* (2008-11-27): Split code up to be more manageable (hopefully :))
Verified all data sets via wowhead, wowwiki, and thotbot.
Added "quest-awareness" for quest items that can be gathered.
This version was not released.

* (2008-11-08): Initial re-write of GatherSage.
This version was not released.
Post A Reply Comment Options
Unread 03-08-09, 07:37 PM  
smedeley
An Aku'mai Servant
 
smedeley's Avatar
AddOn Author - Click to view AddOns

Forum posts: 30
File comments: 34
Uploads: 1
I guess the only thing I can do in that instance is advise you to change line 647 in GS2_Main.lua from:

Code:
skillLevelRequired = itemRef["skill"][1]
to

Code:
skillLevelRequired = tonumber(itemRef["skill"][1]) or 0

OK, I may have fixed this. If you all can add the following line in GS2_Main.lua at line 832:

Code:
self:Tooltip_FixRightFontStrings(tooltip)
In case your GS2_Main.lua is different than mine, this is in the processTooltip() function and should look like this after added:

Code:
        -- Wrap all lines that match these texts.
        WrapLongLines(
            tooltip,
            strconcat(L["USE"], ": "),
            [["Commonly found .*%."]],
            [["Commonly obtained .*%."]],
            [["Rarely found .*%."]],
            [["Rarely obtained .*%."]]
        )
        
        self:Tooltip_HideAllTextures(tooltip, true)
        self:Tooltip_FixRightFontStrings(tooltip)
        tooltip:Show()
I did both of these as you described and... No More Errors! I just spent 10 minutes hovering over everything in my backpack, bank, and even spent a few minutes in the AH hovering over stuff. NO ERRORS!!!

Thank you so very much!
Report comment to moderator  
Reply With Quote
Unread 03-08-09, 07:58 PM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
Originally posted by smedeley
I did both of these as you described and... No More Errors! I just spent 10 minutes hovering over everything in my backpack, bank, and even spent a few minutes in the AH hovering over stuff. NO ERRORS!!!

Thank you so very much!
Good news. Thanks for testing it. If others report the same success, I will release this new bug fix version.
Report comment to moderator  
Reply With Quote
Unread 03-08-09, 11:31 PM  
RHuebner
A Kobold Labourer

Forum posts: 1
File comments: 17
Uploads: 0
I think you've nailed it. Made both changes (though I've never seen that "arithmetic on string" error either) and after an hour+ of hard leveling with frequent mouse scrubbing (which always caused an error pretty quickly before), I've not seen a single tooltip glitch, from GS2, DrDamage, Recount, or the standard skills.

As for the way the /run command moved the tooltip to the right position, and then it moved back... doesn't OnShow() tick once a second or maybe faster? To support dynamic content like timers, etc.? Sounds like the addon displayed the tooltip with the glitch, the /run updated it to be without the glitch, and then the addon ticked and redisplayed it with the glitch again.

It may well be that this started with 3.09. I know I never saw this when testing in January, so it started after your 1-30 release. I'd thought it might be tied to an Auctioneer update, but it does make sense that it's some kind of client LUA bug, since it's so random and inconsistent despite the fixed and static addon code.
Last edited by RHuebner : 03-09-09 at 12:55 AM.
Report comment to moderator  
Reply With Quote
Unread 03-08-09, 11:48 PM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
Originally posted by RHuebner
I think you've nailed it. Made both changes (though I've never seen that "arithmetic on string" error either) and after an hour+ of hard leveling with frequent mouse scrubbing (which always caused an error pretty quickly before), I've not seen a single tooltip glitch, from GS2, DrDamage, Recount, or the standard skills.

As for the way the /run command moved the tooltip to the right position, and then it moved back... doesn't OnShow() tick once a second or maybe faster? To support dynamic content like timers, etc.? Sounds like the addon displayed the tooltip with the glitch, the /run updated it to be without the glitch, and then the addon ticked and redisplayed it with the glitch again.

It may well be that this started with 3.08. I know I never saw this when testing in January, so it started after your 1-30 release. I'd thought it might be tied to an Auctioneer update, but it does make sense that it's some kind of client LUA bug, since it's so random and inconsistent despite the fixed and static addon code.
The OnShow() does not tick like the OnUpdate() does (which is way more than once a second). If it did, I wouldn't have the combat tooltip bug where the threat percent shows up and if you keep the mouse hovered over the target the tooltip won't update how GS2 wants it; if you mouse out then back over, it updates fine since OnShow() is then called.

Same happens if you keep the mouse over the mob when it dies... when the tooltip changes to show the target is skinnable, GS2 does not pick this up since it operates via catching the OnShow() event. Again, if you mouse out then back in, the tooltip shows up appropriately.

I think the game itself updates the tooltip in the background dynamically without ever kicking off OnShow()... I suspect it might kick off OnUpdate(), but every time I try to hook this, it ends up very badly, especially if I change the tooltip in the OnUpdate(). This method fires so often, it can really corrupt the tooltip if special attention is not made and there is no way to know what other mods are firing via OnUpdate and in what order.

I can't see anything hooking OnUpdate() that would cause this issue since my fix simply re-positions the right FontStrings before GameTooltip:Show() is called and that is right before the tooltip is shown... GameTooltip:Show() is simply a way to tell the engine to re-layout the tooltip before showing it (resizing, etc). I can only attribute this to some change in how the game handles the tooltip.

Since this seems to be fixed, I am posting the new version...
Last edited by kellewic : 03-09-09 at 12:22 AM.
Report comment to moderator  
Reply With Quote
Unread 04-07-09, 08:06 AM  
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1360
File comments: 829
Uploads: 55
I am getting the following error with version 2009-03-08
Code:
GatherSage2-2009-03-08\GS2_Main.lua:457: attempt to compare string with number
GatherSage2-2009-03-08\GS2_Main.lua:634: in function `ProcessTooltip'
GatherSage2-2009-03-08\GS2_Main.lua:265: in function <Interface\AddOns\GatherSage2\GS2_Main.lua:251>
It happens when I mouse-over a mob whose name starts with same sub-string as another resource.

Examples:
Mosshoof Runner
Ironfur Bear
etc.

After it breaks on one of those, more and more tooltips start showing the problem,
but I *think* it always starts with such mobs.
Last edited by Dridzt : 04-07-09 at 05:04 PM.
Report comment to moderator  
Reply With Quote
Unread 04-07-09, 08:26 PM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
Originally posted by Dridzt
I am getting the following error with version 2009-03-08
Code:
GatherSage2-2009-03-08\GS2_Main.lua:457: attempt to compare string with number
GatherSage2-2009-03-08\GS2_Main.lua:634: in function `ProcessTooltip'
GatherSage2-2009-03-08\GS2_Main.lua:265: in function <Interface\AddOns\GatherSage2\GS2_Main.lua:251>
It happens when I mouse-over a mob whose name starts with same sub-string as another resource.

Examples:
Mosshoof Runner
Ironfur Bear
etc.

After it breaks on one of those, more and more tooltips start showing the problem,
but I *think* it always starts with such mobs.
First look at it, I think the mob names are just a coincidence. The error relates to either 'skilLevel' or 'n' not being considered a number for whatever reason at line 457 in GS2_Main.lua. I say this because if it couldn't correctly identify the mob name, the code referenced in the error would never be run.

I ran into the same error that someone posted before and the code that runs fine in most instances, for some reason simply breaks so it seems I will likely have to add another tonumber() conversion on both vars to force them to numbers (even though they should already be numbers).

The baffling part is this code is run on every object GatherSage2 knows about regardless of if it is a mob, a plant, a mine, etc so it stands to reason it should break every time.

If you could do a test I would appreciate it... change GS2_Main.lua line 457 from:

Code:
if (skillLevel < n) then
to

Code:
if (tonumber(skillLevel) < tonumber(n)) then
and see if it fixes the problem. If not, then I will have to dig deeper into possible causes and might just find out those mob names simply do screw it up somehow.

Thanks.
Report comment to moderator  
Reply With Quote
Unread 04-14-09, 09:51 PM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
New version

Nothing real huge in this update:
  • Hopefully fixed a few more "tonumber" bugs. Hard to find these since I don't see them.
  • Updated herbalism, skinning, and mining from Wowhead
  • Fixed herbalism skill levels for Tiger Lily and Frozen Herb

Nothing really broke for 3.1 but I bumped to TOC file in case anyone doesn't load outdated mods.
Report comment to moderator  
Reply With Quote
Unread 04-17-09, 04:06 PM  
lewal
A Kobold Labourer

Forum posts: 0
File comments: 153
Uploads: 0
not hooking properly

when out in he baisin farming saronite ..at some point when i hover over a nod i get a hooking error and the mod shuts down \Addons\Sagegather2\GS2_Main.lua line 458: attempt to compare nil with number
Last edited by lewal : 04-17-09 at 06:50 PM.
Report comment to moderator  
Reply With Quote
Unread 04-17-09, 09:20 PM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
Re: not hooking properly

Originally posted by lewal
when out in he baisin farming saronite ..at some point when i hover over a nod i get a hooking error and the mod shuts down \Addons\Sagegather2\GS2_Main.lua line 458: attempt to compare nil with number
I'm going to add some debugging in there since people seem to be having trouble with that one function.

Will post a new version this weekend to allow for some debugging. I don't see these errors at all so I will have to rely on users to help me pinpoint this problem.
Report comment to moderator  
Reply With Quote
Unread 05-16-09, 04:59 PM  
tednik
An Aku'mai Servant
 
tednik's Avatar
AddOn Author - Click to view AddOns

Forum posts: 33
File comments: 51
Uploads: 2
Is there anyway possible to add when you mouse over fish that you could add where they are fished at
Report comment to moderator  
Reply With Quote
Unread 05-30-09, 12:04 PM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
Originally posted by tednik
Is there anyway possible to add when you mouse over fish that you could add where they are fished at
I'll have to look into it, but I'm sure it's possible. If I do that, I'll probably also add the skill level needed when you mouseover a fishing pool.
Report comment to moderator  
Reply With Quote
Unread 06-08-09, 12:17 AM  
Grim Notepad
A Murloc Raider
 
Grim Notepad's Avatar

Forum posts: 6
File comments: 26
Uploads: 0
Re: Re: not hooking properly

Any News on fixing this? I looked at the entry in mining.lua for Saronite Deposit and the numbers are all there for the item references so i don't know why
458: if (level < tonumber(n)) then
is causing an error.

....


took another look and i think the error is here:
471: local function GetSkillLevelAndParent(skillName)

not the function declaration but the process of getting the skill level, i think that the mod is erroring finding the skill level and comparing it against the array of numbers in ["skill"] array for the SARONITE

(note: i have had this error crop up on more than just saronite)

Originally posted by kellewic
I'm going to add some debugging in there since people seem to be having trouble with that one function.

Will post a new version this weekend to allow for some debugging. I don't see these errors at all so I will have to rely on users to help me pinpoint this problem.
Report comment to moderator  
Reply With Quote
Unread 06-12-09, 09:55 AM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
Re: Re: Re: not hooking properly

I have looked at it many times and I cannot reproduce the error. I can add more checks to make sure everything is there, but there is no reason why that error should exist at all.

I am planning to make other changes today so I will revisit this and add as many checks as I can to try to prevent this.


Originally posted by Grim Notepad
Any News on fixing this? I looked at the entry in mining.lua for Saronite Deposit and the numbers are all there for the item references so i don't know why
458: if (level < tonumber(n)) then
is causing an error.

....


took another look and i think the error is here:
471: local function GetSkillLevelAndParent(skillName)

not the function declaration but the process of getting the skill level, i think that the mod is erroring finding the skill level and comparing it against the array of numbers in ["skill"] array for the SARONITE

(note: i have had this error crop up on more than just saronite)
Report comment to moderator  
Reply With Quote
Unread 06-25-09, 02:56 PM  
kellewic
Premium Member
 
kellewic's Avatar
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 131
Uploads: 4
New version

I uploaded a new version. There is no real new functionality only cleanup of code and adding more checks to avoid some reported Lua errors.

The only thing that is new is a Debugging tab in the options GUI. If you want to enable more aggressive code checks for some reported Lua errors, set the log level to DEBUG. This is off by default (set to INFO). Since I can't reproduce the errors reported, I haven't really been able to test the effectiveness of this -- feedback would be appreciated.

I also added a stub module for Fishing I will try to work on more as it was requested. Not sure when I will get to it actually due to work and raid schedule.
Report comment to moderator  
Reply With Quote
Unread 07-11-09, 07:01 AM  
Twidget
An Aku'mai Servant
 
Twidget's Avatar

Forum posts: 33
File comments: 401
Uploads: 0
Error

Hi,
I get the following error when fishing and I catch a fish:

Date: 2009-07-11 08:49:40
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\GatherSage2\GS2_Event.lua line 97:
attempt to perform arithmetic on a nil value
Debug:
(tail call): ?
GatherSage2\GS2_Event.lua:97: ?()
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:146:
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:146
[string "safecall Dispatcher[12]"]:4:
[string "safecall Dispatcher[12]"]:4
[C]: ?
[string "safecall Dispatcher[12]"]:13: ?()
...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:91: Fire()
Ace3\AceEvent-3.0\AceEvent-3.0.lua:70:
Ace3\AceEvent-3.0\AceEvent-3.0.lua:69


Thanks,
Twidget
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: