------------------------------------------------------
Fizzwidget FactionFriend
by Gazmik Fizzwidget
http://www.fizzwidget.com/factionfriend
gazmik@fizzwidget.com
------------------------------------------------------

It's amazing the lengths some will go to to win friends. Gaining the trust of furbolg tribes, Dark Iron dwarves, and other organizations of demi-goblinoid races can be a lot of work, and it can be easy sometimes to lose rack of one's progress. That's where Fizzwidget Industries comes in! Our newest gadget not only helps you keep tabs on whose respect you're earning, but also how much more you could earn by turning in certain items you're carrying.

------------------------------------------------------

INSTALLATION: Put the GFW_FactionFriend folder into your World Of Warcraft/Interface/AddOns folder and launch WoW.

FEATURES: 
	- Automatically switches the Blizzard builtin reputation watch bar (i.e. the "Show as experience bar" option in the Reputation pane)...
		- When entering certain zones. (Argent Dawn in Plaguelands, Zandalar Tribe in Zul'Gurub, etc.)
		- When gaining reputation while in other zones. (If gaining reputation with multiple factions at once, the bar will switch for only the first.)
	- Factions marked as "Inactive" in the reputation pane won't be automatically switched to.
	
	- In cases where faction can be gained through repeatable item turnins, the faction you can earn by turning in whatever's in your inventory is shown on the reputation watch bar in a similar fashion to how rest state is shown on the experience bar. (For example, if you're watching Timbermaw Hold faction and have 23 Winterfall Spirit Beads in your inventory, a marker and partially-shaded area on the bar will show that you can gain 200 reputation points by turning in four sets of five beads each.)
	
	- Mousing over the reputation watch bar (or the aforementioned marker) will show a summary of the reputation points that can be earned through turning in or consuming items.
	- If your potential reputation gain from turnins is enough to reach a new standing (e.g. Friendly vs. Honored), the "empty" part of the bar will be shaded differently, and the tooltip will show your new standing (and how many points into it you'd be) after all turnins.
	- Right-clicking the bar (or marker) will open a menu allowing you to quickly switch which faction it shows. (TIP: Marking a faction as "Inactive" in the reputation pane will hide it in the menu.)
	
CHAT COMMANDS:
	/factionfriend (or /ff): shows or hides the options window.

CAVEATS, KNOWN BUGS, ETC.: 
	- The potential reputation gain shown on the bar is just an estimate: actual reputation gain may vary. (This is especially true for humans, as FactionFriend's rounding may not match Blizzard's when calculating the racial 10% increase in faction gain.)
	- Some repeatable faction turnins offer an increased amount of reputation the first time they're completed; FactionFriend has no way of knowing whether you've done a turnin before, so it always assumes the smaller amount.
	- Some repeatable faction turnins only become available at a certain level, or once prerequisite quests are completed. FactionFriend can't keep track of all the reasons a turnin might or might not be available; it just shows how much reputation you'd be able earn if the turnins are possible. 

------------------------------------------------------
VERSION HISTORY

v. 2.4 - 2008/03/24
- Updated TOC to indicate compatibility with WoW Patch 2.4.
- Reputation levels are now color-coded using a scheme similar to that on Blizzard's Armory site. (For example, the four levels of Friendly through Exalted are no longer all displayed as the same shade of green.) This change also applies to the default UI's Reputation panel and other UIs that use its color table.
- Fixed an issue where Argent Dawn and Zandalar tokens were likely to show in the reputation bar tooltip as "Unknown Item #".
- Configuration controls are moved into a pane in the new Interface Options panel provided by the default UI.
- Updated German localization by "Zara".

v. 2.3 - 2007/11/13
- Updated TOC to indicate compatibility with WoW Patch 2.3.

v. 2.2 - 2007/09/25
- Updated TOC to indicate compatibility with WoW Patch 2.2.
- Updated info for Argent Dawn, Cenarion Circle, and Timbermaw Hold item turnins to reflect increases to their reputation gain in WoW Patch 2.2.
- When you have enough Scourgestones or ZG coins/bijous to turn in, we now also count the reputation gain from using the resulting [Argent Dawn Valor Token]s or [Zandalar Honor Token]s towards the total potential gain shown in the reputation bar.
- When the reputation tooltip shows several available turnins, they're now sorted into sensible categories.
- Fixed some bugs with calculating reputation gain for quests involving multiple items (e.g. The Thorium Brotherhood's Fiery Flux quests, Argent Dawn cauldrons).

v. 2.1.1 - 2007/07/20
- Added quests introduced in Patch 2.1 for tracking potential reputation gain from item turnins.
- Uses a simpler, more reliable means of hooking item tooltips.
- Added support for the Ace [AddonLoader][] -- when that addon is present, FactionFriend will load in the background shortly after login (reducing initial load time).
[AddonLoader]: http://www.wowace.com/wiki/AddonLoader

v. 2.1 - 2007/05/22
- Updated TOC for WoW Patch 2.1.

v. 2.0.6 - 2007/04/13
- Fixed an issue where multiple turnins for the same faction involving the same item wouldn't always be calculated in the proper order.
- Fixed error when watching The Sha'tar faction.
- It's now more easily possible for third-party addon authors to make use of FactionFriend's ability to calculate potential reputation gain from turnins (which may be useful for other addons that show reputation bars). See "API NOTES" at the bottom of this readme.

See http://fizzwidget.com/notes/factionfriend/ for older release notes.

------------------------------------------------------
API NOTES
---------

FFF_GetFactionPotential:
	Gets info on potential reputation gain from turnins for a given faction

potential, reportLines = FFF_GetFactionPotential(faction, withReport)

Parameters:
	faction:
		String, Number, or nil - The faction to calculate potential rep gain for; can be be a string (localized name of the faction), number (index of the faction as used by GetFactionInfo and other faction-related Blizzard API functions), or nil (in which case we default to the faction currently set as "watched" in the Blizzard UI).
	withReport:
		Boolean - Pass a non-nil, non-false value to get a report summarizing available turnins (a la FactionFriend's tooltip on the Blizzard reputation bar). Omit if you're not interested in such and we won't waste time and resources preparing the report.
	
Returns:
	potential:
		Number - The amount of reputation gain available from turnins for the specified faction. (e.g. If you're looking at one of the racial factions and have enough Runecloth for one turuning, this value will be 75.)
	reportLines:
		Table - If requested, a table containing the information used to construct FactionFriend's tooltip on the Blizzard reputation bar. Example:
			reportLines = {
				["75 points (3 turnins):"] = {
					"12x[Iron Bar]",
					"6x[Incendosaur Scale] (4 in bank)",
				},
			}

---------

FFF_StandingForValue:
	Gets standing (e.g. Friendly vs. Honored) information for a given absolute reputation value.

standing, pointsInto, max = FFF_StandingForValue(absoluteReputation)

Parameters:
	absoluteReputation:
		Number - An absolute reputation value -- such as returned by GetFactionInfo, not the standing-relative values you see in the UI. (e.g. 0 = 0/3000 Neutral, -2800 = 200/3000 Unfriendly, 9100 = 100/12000 Honored)
	
Returns:
	standing:
		Number - The standingID (http://www.wowwiki.com/API_TYPE_StandingId) represented by the input value.
	pointsInto:
		Number - The relative reputation value (as seen in the Blizzard reputation UI) within the given standing.
	max:
		Number - The maximum relative value within the given standing (e.g. 12000 for Honored).

---------

FFF_GetFactionInfoByName:
	A wrapper for the Blizzard API function GetFactionInfo that lets you query by name (which is localized, but constant for a given faction) instead of by index (which can change as the player moves factions to the "Inactive" group).

... = FFF_GetFactionInfoByName(factionName)

Parameters:
	factionName:
		String - Localized name of a faction.
	
Returns:
	Same as for the Blizzard API function GetFactionInfo (http://www.wowwiki.com/API_GetFactionInfo), or nil if no faction by the given name is found.