Skip to content

Getting Started

Chronic Tinkerer edited this page May 6, 2026 · 1 revision

Getting Started

This page covers the standard pattern for embedding LibCodex-1.0 into your addon. For the public API surface, see API Reference.

Two ways to load LibCodex

1. Embed it (recommended). Vendor LibCodex into your addon's Libs/ (or libs/) folder and load it via your TOC's ## libs directive (BigWigs Packager) or by listing the files directly. Your addon owns its copy; users only see one folder.

2. Standalone. Install LibCodex from CurseForge / Wago / WoWInterface like any other addon. Other addons that embed LibCodex still use their own copy — LibStub resolves to whichever version registered first.

The embed path is what most addons should pick. Standalone is mostly useful for development, testing, and the in-game /codex slash command.

Embedding via BigWigs Packager

If you use BigWigs Packager (.pkgmeta driven releases), add LibCodex to your externals block:

externals:
  Libs/LibCodex-1.0:
    url: https://github.com/ChronicTinkerer/LibCodex-1.0
    tag: latest

Then in your addon's TOC, reference whichever modules you actually need:

## libs: LibCodex-1.0\LibCodex-1.0.xml

Or include the module TOCs directly in the order you need them.

Per-module LoadOnDemand

LibCodex ships as a small core plus 73 LoadOnDemand sub-addons, one per data module. You only pay the memory cost for the modules your addon actually uses.

For example, an addon that only needs NPC and Quest data would embed:

  • LibCodex-1.0 (core)
  • LibCodex-1.0-NPCs
  • LibCodex-1.0-Quests

…and skip the other 71 modules. Each module is a separate sub-addon directory under LibCodex-1.0/.

See Module Reference for the full list of available modules grouped by tier.

First call

Once LibCodex is loaded:

local Codex = LibStub("LibCodex-1.0")

Modules are accessed through this object. The exact accessor names and patterns are covered in API Reference.

Standalone testing

If you want to poke at LibCodex without writing a consumer addon, install it standalone and use the in-game /codex slash command. It opens a log/inspect window backed by the same library code your consumer addons use.

Distribution requirements

If you redistribute LibCodex inside your addon (the embed pattern), you don't need to do anything special — MIT license permits this. A credit in your addon's README or about page is appreciated but not required.

Clone this wiki locally