Faction Addict

Description:Faction Addict is a stand-alone addon that provides additional faction information to your characters working towards faction based achievements. Intended for those players who work on gaining exalted with many factions but also helpful to those that do not. There are in game achievements for being exalted with 1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, and 60 factions respectively.

Faction Addict also provides a reputation logging system that allows the player to see what reputation gains they have made in the current and previous sessions.

Use slash commands /fa or /factionaddict or click the new button on the upper right corner of your characters reputation panel to open and/or close the addon window.

Usage: (slash commands)

/fa

/factionaddict

*click button* on upper right corder of character's reputation page

Features:

Factions - Shows all factions - including those not "known" by your character.

Log - Reputation gain logging - shows reputation gains your characters has made in the current and previous sessions.

Faction info panel - click on a faction in the addon to see more specific info.

Exalted Count - Shows count of exalted factions and how many required for next achievement.

Exalted Achievements Tooltip - Show which character earned which achievement on what date

Display Ordering - Faction display can be ordered by % to exalted or faction name.

Auto-Change Reputation Bar - reputation bar will auto-change to faction that had last gain

Hide Inactive Factions - Set a faction as 'inactive' from the faction detail window. Inactive factions are moved to the bottom of the list and have a red background. Inactive factions can be hidden from the faction list by clicking 'Hide Inactive Factions' in the Config.

Search - click the search icon to toggle the input field to search the factions

Localizations:

Files are in place for basic localization support. If you would like to help complete the Faction Addict localizations please contact us!

In the FactionAddict\Locales addon folder are the following files for localization. They should be your starting point if you want to help out.

v1.33 (2016-07-19)
------------------
* updates to work with WoW 7.0+ - Legion pre-expansion patch
* NOTE: The addon changes have been tested on PTR version 7.0.3.22210. Please report any issues you find on Live version.

v1.30 (2015-04-22)
------------------
* NEW FEATURE ADDED! - Move Faction to Inactive
* Factions can now be marked as inactive in the addon by clicking the 'Move to Inactive' checkbox on the detailed faction info window.
* Inactive factions are moved to the bottom of the faction list and have a red background.
* Inactive factions can be hidden from the faction list by clicking 'Hide Inactive Factions' in the Config.
* Any 'Move to Inactive' setting you've made in the default client reputation window is now ignored.
* Feedback/Issues - Please let me know (comments or email) if you run into any issues with the new feature. I wanted to get it out before 6.2 to iron out any issues there might be. Thanks!

v1.27 (2015-01-06)
------------------
* 'Last Gain' entry at the top of the Log page of the addon has been modified to better accomodate long faction names. For example - displaying 'Steamwheedle Preservation Society' would cause the gain digits to be chopped off. Now long faction names will be truncated so that at least 4 gain digits can be displayed on that line.

v1.25 (2014-11-25)
------------------
* BUGFIX: Auto-Change Reputation Bar - auto-change would not work if the Faction Addict window had not been opened prior to there being a CHAT_MSG_COMBAT_FACTION_CHANGE event. (for example - 'Reputation with Lower City increased by 300.' in the chat) Changed to make sure required data is loaded prior to addon window being opened.

v1.23 (2014-11-11)
------------------
* NEW FEATURE: a search feature has been added to the main factions tab. Click the search icon in the top right of the addon (next to standing filter) to toggle the search field

v1.22 (2014-10-28)
------------------
* BUGFIX: exalted achievements tooltip - there was a case where character name was not returned by server when getting achievement data causing the name to be blank () in tooltip. This usually occurs on lower lever characters with few addons where the character loads into the game very quickly.

v1.21 (2014-10-27)
------------------
* German Localization Added - All credit and thanks to Harry! for submitting the changes for the german [deDE] localization.
* Exalted Achievements Tooltip UPDATED! - Now more easily tell which character on your account earned which exalted achievement and the date it was earned. To show this summary tooltip hover the mouse over the Next/Shown/Exalted text at the bottom of the main addon tab.

v1.20 (2014-10-24)
------------------
* BUGFIX: fix for error 'attempt to concatenate local faction a nil value' - lua error when the first reputation gain of the sessions was for your guild

v1.19 (2014-10-14)
------------------
* BUGFIX: fix for error 'attempt to concatenate upvalue lfgBonusFactionID' if you were seeing that one

v1.18 (2014-10-14)
------------------
* Added 'Star' indicator from default UI to support LFG Bonus Faction
* [ESC] will now close the addon with all other UI elements.
* Clean up some unnecessary table allocations.
* Force data update on PLAYER_LOGIN event - client was not getting all faction data on initial addon load
* Other minor bugfixes

v1.12 (2013-04-06)
------------------
* New Feature! - Auto-Change Reputation Bar - reputation bar will now auto-change to faction that had last gain, not including your guild faction gains. This feature can be turned on/off via the config tab.
* New Feature! - Hide Inactive Factions - Faction display will hide any factions your mark as inactive in the default reputation ui. (Click 'Move to Inactive') This feature can be turned on/off via the config tab.
* Much credit to Phanx for help on this update. Thanks Phanx!

v1.11 (2013-03-28)
------------------
* Added indicator on reputation bars for account wide 'bonus reputation'. This is the bonus unlocked when you buy the various Grand Commendations from faction quartermasters. (Same indicator as used in the default ui)
* NOTE - 'Champion a faction' star indicators still to be added in future release

v1.06 (2012-8-28)
------------------
* Changes to support Mists of Pandaria, client 5.0.4.
* Added many new factions identified in MoP. More sorting and config options will be added for them in the future.

I agree it would be neat to have that in the addon and it's something I thought about when building it. But the problem is there is no automated access to that type of data (via an api in-game). That data would have to be manually copied from a site like wowhead for every faction and then every time a new faction is added to the game (or a faction is updated) another bunch of copied data from wowhead.

That is a massive amount of work and would add a large amount of maintenance overhead to keep the addon supported well and working with each new patch/expansion/etc. The wowhead URLs are available in the addon for each faction to provide quick access to that type of data. I realize it's more work to [copy url, alt-tab to browser, paste url, visit wowhead] than to just display something on [hover]. But you get the most up to date and accurate data from them at this time. So currently no plans to add that type of feature.

I appreciate the feedback!

Thank you for the explanation. I had requested this as a stand-alone addon in the forums, but no one explained why it wasn't feasible. I appreciate your hard work on your addons and look forward to your future addon endeavors

I agree it would be neat to have that in the addon and it's something I thought about when building it. But the problem is there is no automated access to that type of data (via an api in-game). That data would have to be manually copied from a site like wowhead for every faction and then every time a new faction is added to the game (or a faction is updated) another bunch of copied data from wowhead.

That is a massive amount of work and would add a large amount of maintenance overhead to keep the addon supported well and working with each new patch/expansion/etc. The wowhead URLs are available in the addon for each faction to provide quick access to that type of data. I realize it's more work to [copy url, alt-tab to browser, paste url, visit wowhead] than to just display something on [hover]. But you get the most up to date and accurate data from them at this time. So currently no plans to add that type of feature.

I don't know why Blizzard designs APIs like this... the pet journal is the same, but infinitely worse. Anyway, a simple flag to prevent recursion should be sufficient. I updated my previous code and combined them:

You can continue to call UpdateInactiveFactionList() in response to UPDATE_FACTION; it won't run again if it's already in the middle of a run. SetWatchedFactionByID(factionID) will still trigger the events, but won't cause UpdateInactiveFactionList to run while it's running. Instead of a table lookup to determine if a faction is inactive, call IsFactionInactive(factionID).

With the latter, you just need to call the UpdateInactiveFactionsList function in response to the UPDATE_FACTION event, and then you can check InactiveFactions[factionID] to see if a particular faction should be ignored...

Hi Phanx. I was able to implement the auto-change reputation bar without issue. However having some problem with inactive factions.

The problem is that UpdateInactiveFactionsList itself generates multiple UPDATE_FACTION events as the headers are expanded and collapsed. So the whole thing kind of recurses on itself and stack overflows when you call it in response to an UPDATE_FACTION event. I had a thought of unregistering that event handler while in the function but seems a bit risky. Any thoughts?

With the latter, you just need to call the UpdateInactiveFactionsList function in response to the UPDATE_FACTION event, and then you can check InactiveFactions[factionID] to see if a particular faction should be ignored:

Code:

if InactiveFactions[factionID] then
-- don't display
else
-- display
end

Both functions will have no visible impact on the state of the default faction panel, so even if the user is currently viewing it, they won't notice the headers being collapsed/expanded.

This is somewhat difficult with the current implementation of Faction Addict. FA was written to be independent of the default reputation UI. That means it can only use faction APIs that pass faction ID and can't really use those that pass a faction INDEX. When I looked into workaround sometime back for mapping INDEXes to IDs I realized that the indexes keep changing based on what is currently displayed and/or folded/unfolded in the default display. It added a level of complexity that I didn't want to deal with.

This is also why I've not been able to easily implement the quick change reputation bar as SetWatchedFactionIndex(index) uses the indexes instead of Faction IDs.

It is more likely that I would implement custom standalone active/inactive and reputatation bar features into the addon than try to find a workaround with the indexes. But it will take some time.

Thanks!

Originally Posted by Phanx

Could you add an option to not display factions the player has moved to the Inactive group? When you're scanning the faction list, just check the text of each header you encounter against the FACTION_INACTIVE global. If it's a match, stop the scan; all the remaining factions are in the Inactive group.

This would help keep the list clean. For example, I don't need to see Forest Hozen at the top of the list (99.52% Revered)... Blizzard failed to consider that not all players are guilded (with the +rep bonus from their guild) when setting the rep rewards for those quests, and didn't fix it until after I'd already leveled through Jade Forest and done all the quests, so I can never gain any more rep with them to get Exalted. Then there are some factions that are just totally useless, like the Gelkis and Magram Clan Centaur from the level 30 quests in Desolace back in Vanilla... I'm not even sure those quests exist anymore.

Could you add an option to not display factions the player has moved to the Inactive group? When you're scanning the faction list, just check the text of each header you encounter against the FACTION_INACTIVE global. If it's a match, stop the scan; all the remaining factions are in the Inactive group.

This would help keep the list clean. For example, I don't need to see Forest Hozen at the top of the list (99.52% Revered)... Blizzard failed to consider that not all players are guilded (with the +rep bonus from their guild) when setting the rep rewards for those quests, and didn't fix it until after I'd already leveled through Jade Forest and done all the quests, so I can never gain any more rep with them to get Exalted. Then there are some factions that are just totally useless, like the Gelkis and Magram Clan Centaur from the level 30 quests in Desolace back in Vanilla... I'm not even sure those quests exist anymore.