LibS2kFactionalItems: Faction Item ID Converter for WoW

LibS2kFactionalItems converts item IDs between Alliance and Horde for World of Warcraft, helping addon authors handle faction-specific items correctly.

Download LibS2kFactionalItems for World of Warcraft 8.2.0, 8.0.1, 7.2.0, 7.1.0, 7.0.3, 6.2.4

Original name: LibS2kFactionalItems

World of Warcraft: 6.2.0, 6.2.3, 6.2.4, 7.0.3, 7.1.0, 7.2.0, 8.0.1, 8.2.0

FileVersionLoaderSize
LibS2kFactionalItems-1.0-6.2.0.zip6.2.0—51 КБDownload
LibS2kFactionalItems-1.0-6.2.3.zip6.2.3—51 КБDownload
LibS2kFactionalItems-1.0-6.2.3-1.zip6.2.3—51 КБDownload
LibS2kFactionalItems-1.0-6.2.4.zip6.2.4—51 КБDownload
LibS2kFactionalItems-1.0-7.0.3.zip7.0.3—56 КБDownload
LibS2kFactionalItems-1.0-7.1.0.zip7.1.0—59 КБDownload
LibS2kFactionalItems-1.0-7.2.0.zip7.2.0—68 КБDownload
LibS2kFactionalItems-1.0-8.0.1-prepatch.zip8.0.1—89 КБDownload
LibS2kFactionalItems-1.0-8.2.0.zip8.2.0—95 КБDownload

LibS2kFactionalItems

If you write World of Warcraft addons, you have probably run into the faction item problem. The Alliance version of a quest reward and the Horde version are technically different items with different item IDs, even though they look identical in the tooltip. Hardcoding both IDs works until it does not, and guessing which faction a player belongs to at the wrong moment can leave your addon pointing at an item that does not exist for that character. LibS2kFactionalItems exists to take that headache off your plate.

What This Library Actually Does

LibS2kFactionalItems is a small, focused library that converts an item ID into the equivalent item ID for a player's faction. Instead of maintaining your own lookup tables, you call a single function and get back the correct ID for Alliance, Horde, or whichever faction the current player belongs to. The synopsis is refreshingly short: load the library through LibStub, then call GetFactionalItemId with an item ID and an optional faction string. If no faction is passed, it defaults to the player's own faction, which covers the vast majority of use cases.

Why Factional Item IDs Matter

Blizzard has shipped faction-specific versions of items since the earliest days of the game, and the pattern shows no sign of disappearing. Mounts, tabards, PvP rewards, and vendor goods frequently come in mirrored pairs. An addon that displays "you need item 12345" to a Horde player when the Horde equivalent is 12346 is not just wrong, it is confusing. Libraries like this one keep your code honest across every faction without bloating your own addon with duplicated data.

Game Versions and Addon Compatibility

One of the strengths of a lightweight library is how far it travels. LibS2kFactionalItems for World of Warcraft is built to work across the modern Retail client as well as the Classic family of clients, including Classic Era, The Burning Crusade Classic, Wrath of the Lich King Classic, Cataclysm Classic, and Mists of Pandaria Classic. Because the conversion logic relies on stable item data rather than expansion-specific APIs, it slots into addons that target multiple client branches without special-casing. If you maintain a single codebase that ships to several game versions, this is exactly the kind of dependency you want in your TOC.

For players rather than developers, the library usually arrives bundled inside another addon, so you may never install it directly. If you do need it standalone, the process is the same as any other library: place the folder in your AddOns directory and confirm it appears in the addon list on the character select screen. Guides covering how to install library addons apply here without modification.

Installing and Keeping It Updated

Developers who want the latest build can grab it from the project's WowAce files page, and the source lives on GitHub under the author's repository, where issues and pull requests are welcome. End users have an easier path. If you would rather skip manual folder management entirely, the foxygame.net launcher handles LibS2kFactionalItems as part of its curated addon catalog, installing it in one click and pushing updates automatically so your dependencies never fall behind a client patch.

When you download LibS2kFactionalItems, pay attention to the folder name. WoW is strict about directory structure, and a nested folder such as LibS2kFactionalItems-master/LibS2kFactionalItems will cause the library to fail silently. The .toc file must sit directly inside the addon folder. After installing, a quick /reload confirms everything loaded cleanly.

A Quick Usage Example

  • Load the library: local S2KFI = LibStub("LibS2kFactionalItems-1.0")
  • Convert to Alliance: S2KFI:GetFactionalItemId(itemId, "alliance")
  • Convert to Horde: S2KFI:GetFactionalItemId(itemId, "horde")
  • Convert to the player's faction: S2KFI:GetFactionalItemId(itemId)

Every call returns the converted ID or the original ID if no factional variant exists, which means you can wrap the call in your item-handling code without adding nil checks everywhere. That fallback behavior is the detail that makes the library pleasant to adopt: it fails safe rather than failing loud.

Final Thoughts

LibS2kFactionalItems is not glamorous, and it is not meant to be. It solves one narrow problem, solves it across Retail and every Classic client from TBC through Mists of Pandaria, and stays out of your way. For addon authors tired of maintaining hand-written faction tables, and for players who just want their bundled libraries to work, that is more than enough. Add it to your dependency list, call one function, and get back to building the features that actually show up on screen.