Skip to content

Development

D4rkL1ch edited this page Nov 8, 2026 · 4 revisions

Development

Everything needed to work on Reagent Atlas is in the repository. SPEC.md there is the full design: features, data model, APIs and open questions. Read it before larger changes.

Setup

  1. Clone the repo outside the WoW folder.

  2. Open it in VS Code with the Lua (LuaLS) and WoW API extensions. The repo's .luarc.json configures them.

  3. Deploy to the game:

    tools/deploy.ps1 -GamePath "<Forever client folder>"

    Or set REAGENTATLAS_GAME_PATH once and run tools/deploy.ps1. It copies only what ships (*.toc, top-level *.lua, Data/, Modules/, UI/, Media/) into Interface\AddOns\ReagentAtlas.

  4. In game: /reload. Keep BugSack and BugGrabber installed to catch errors.

Layout

Path What
ReagentAtlas.toc Interface version, SavedVariables, load order: Data → Core → Modules → UI
Core.lua Namespace, events, module registry, slash command, saved data
Data/ Generated recipe, reagent and source tables. Don't edit by hand.
Modules/ Inventory, professions, pricing, valuation, sources, tracking, tooltip, bag markers, loot alerts
UI/ Browser, Crafting tab, tracking window, loot notice, settings, minimap button
tools/ Data builder, deploy script, tests. Not shipped.
docs/ Project landing page (GitHub Pages) and icon. Not shipped.

Code rules

  • Lua 5.1 (the WoW runtime): no goto, no //, no require.
  • Every file starts with local addonName, ns = .... The only global is the SavedVariable ReagentAtlasDB (plus the /ratlas slash command registration).
  • Frames are created in Lua, not XML. Use Blizzard's own mixins and templates (ScrollBox, Settings API).
  • Never touch protected frames in combat; check InCombatLockdown().
  • No automation of any kind. The addon only displays information.
  • Auctionator is optional; wrap every call to it in pcall.
  • Modules register with ns:RegisterModule(name, mod) and can implement OnInit() (after ADDON_LOADED) and OnLogin() (after PLAYER_LOGIN). Modules talk through ns.<Module>, never through globals.

Tests

Offline tests run the addon against stubbed WoW APIs:

tools/tests/run.ps1

This uses the LuaLS binary from the VS Code extension as the Lua interpreter. The data builder has Python tests in tools/tests/test_build_data.py.

Rebuilding the recipe data

Needs Python 3.12 or newer.

python tools/fetch_db2.py        # download the latest Forever DB2 tables from wago.tools into tools/db2/
python tools/build_data.py       # generate Data/*.lua
python tools/build_data.py --sample   # or build from the small fixture in tools/sample/
  • Client tables come from wago.tools, which tracks WoW Forever as product wowf.
  • Recipe sources come from QuestieDB at a commit pinned in tools/fetch_db2.py. Bump the pin on purpose and review the diff of Data/Sources.lua.
  • tools/spell_reagents.csv and tools/vendor_reagents.csv are hand-maintained lists that fill gaps in the client data.

Rebuild on every client build. The addon warns players once when its data build differs from the client.

See SPEC.md → Data sourcing and Value tier & Auctionator for the details and the scoring weights.

Releases

Releases are built by GitHub Actions with the BigWigs packager. Push a tag and it builds the zip, publishes a GitHub release and uploads it to Wago:

git tag 0.2.0
git push origin 0.2.0
  • A tag containing alpha or beta (e.g. 0.2.0-beta1) is released as alpha or beta.
  • The TOC's ## Version: @project-version@ is filled in from the tag. A copy deployed straight from the repo reports itself as a development copy.
  • .pkgmeta lists what stays out of the zip. Keep it in step with tools/deploy.ps1. LICENSE must always ship.
  • The changelog is built from the commit messages since the previous tag.

Contributing

Issues and pull requests are welcome. Please:

  • Keep to the code rules above.
  • Run the tests and fix LuaLS warnings in files you changed.
  • Say what you tested in-game.

By contributing you agree that your contribution is licensed under the GPL-3.0.

Clone this wiki locally