Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ read_globals = {
"HousingDashboardFrame",
"MenuUtil",
"StaticPopup_Show",
"StaticPopupDialogs",
"CANCEL",
"HousingFramesUtil",
"GetMouseButtonClicked",
Expand Down Expand Up @@ -189,6 +188,9 @@ read_globals = {

-- Constants
"Enum",
"WOW_PROJECT_ID",
"WOW_PROJECT_FOREVER",
"WOW_PROJECT_CAMELOT",
"LE_EXPANSION_WAR_WITHIN",
"LE_EXPANSION_SHADOWLANDS",
"LE_EXPANSION_DRAGONFLIGHT",
Expand Down
5 changes: 3 additions & 2 deletions Bridge/Context.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ end
---@param includeDetails boolean|nil Load run history and raid lockouts for tooltips
---@return VaultContext
function Context:BuildVaultContext(categoryID, includeDetails)
local activities = C_WeeklyRewards.GetActivities(categoryID) or {}
-- Forever has no Great Vault; a missing API simply means no activities.
local activities = C_WeeklyRewards and C_WeeklyRewards.GetActivities(categoryID) or {}

-- Sort by index for consistent ordering
table.sort(activities, function(a, b)
Expand All @@ -139,7 +140,7 @@ function Context:BuildVaultContext(categoryID, includeDetails)
}

-- Get M+ run history for dungeons
if includeDetails and categoryID == 1 then
if includeDetails and categoryID == 1 and C_MythicPlus and C_ChallengeMode then
local runs = C_MythicPlus.GetRunHistory(false, false)
if runs then
-- Add map names
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to Weekly will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

- World of Warcraft: Forever support: the manifest accepts Interface 16001, the loader detects the client flavor, and a Forever launch dataset auto-selects on Forever clients
- Settings only offer datasets that belong to the running client flavor and label Forever datasets as content updates

### Changed

- Great Vault, Mythic+, and Journal collection APIs are checked for presence so clients without them load and run without errors

## [1.3.11] - 2026-09-23

### Changed
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Thanks for your interest in contributing! Weekly is a lightweight HUD for tracki
```
World of Warcraft\_retail_\Interface\AddOns\Weekly\
```
A World of Warcraft: Forever client uses its own `Interface\AddOns` folder; a junction or symlink from one checkout serves both clients
3. **Install validation tools** using the setup below and run `python Tools/validate.py` from the repository root
4. **Restart WoW** for the first installation, then use `/reload` after source edits. Check that the loaded copy is the checkout you are editing

Expand Down
63 changes: 43 additions & 20 deletions ConfigUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,41 @@ local TRACKABLE_TYPES = {
prey = true,
}

local function IsForeverClient()
local flavor = ns.Data.GetClientFlavor and ns.Data:GetClientFlavor()
return flavor ~= nil and flavor == ns.Data.FLAVOR_FOREVER
end

local function IsForeverExpansion(expansionID)
return ns.Data.GetExpansionFlavor ~= nil and ns.Data:GetExpansionFlavor(expansionID) == ns.Data.FLAVOR_FOREVER
end

local function GetExpansionName(expansionID)
if expansionID == 11 then
return L["The War Within"]
elseif expansionID == 12 then
return L["Midnight"]
elseif IsForeverExpansion(expansionID) then
return L["World of Warcraft: Forever"]
end
return L["Expansion %d"]:format(expansionID)
end

local function GetSeasonName(expansionID, seasonID)
if seasonID == 3.5 then
return L["Season 3 (Midnight Pre-Patch)"]
elseif IsForeverExpansion(expansionID) then
return L["Content Update %s"]:format(seasonID)
end
return L["Season %s"]:format(seasonID)
end

-- Only offer datasets that belong to the running client flavor.
local function GetClientExpansions()
local flavor = ns.Data.GetClientFlavor and ns.Data:GetClientFlavor() or nil
return ns.Data:GetExpansions(flavor)
end

local function BuildTrackingArgs()
local args = {
desc = {
Expand Down Expand Up @@ -118,16 +153,9 @@ function ConfigUI:Initialize()
name = L["Expansion"],
order = 1,
values = function()
local exps = ns.Data:GetExpansions()
local t = { ["auto"] = L["Automatic (Recommended)"] }
for _, id in ipairs(exps) do
if id == 11 then
t[id] = L["The War Within"]
elseif id == 12 then
t[id] = L["Midnight"]
else
t[id] = L["Expansion %d"]:format(id)
end
for _, id in ipairs(GetClientExpansions()) do
t[id] = GetExpansionName(id)
end
return t
end,
Expand All @@ -151,7 +179,9 @@ function ConfigUI:Initialize()
},
season = {
type = "select",
name = L["Season"],
name = function()
return IsForeverClient() and L["Content Update"] or L["Season"]
end,
order = 2,
values = function()
local t = { ["auto"] = L["Automatic (Recommended)"] }
Expand All @@ -167,11 +197,7 @@ function ConfigUI:Initialize()

local seasons = ns.Data:GetSeasons(activeExp)
for _, id in ipairs(seasons) do
if id == 3.5 then
t[id] = L["Season 3 (Midnight Pre-Patch)"]
else
t[id] = L["Season %s"]:format(id)
end
t[id] = GetSeasonName(activeExp, id)
end
return t
end,
Expand All @@ -188,11 +214,8 @@ function ConfigUI:Initialize()
type = "description",
name = function()
local exp, sea = ns.Data:GetRecommendedSeason()
local expName = (exp == 11 and L["The War Within"])
or (exp == 12 and L["Midnight"])
or (L["Expansion %d"]:format(exp))
local seaName = (sea == 3.5 and L["Season 3 (Midnight Pre-Patch)"])
or (L["Season %s"]:format(sea))
local expName = GetExpansionName(exp)
local seaName = GetSeasonName(exp, sea)

local currentStatus = ""
if ns.Config.selectedExpansion == "auto" or ns.Config.selectedSeason == "auto" then
Expand Down
8 changes: 5 additions & 3 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,14 @@ function Weekly:SlashHandler(msg)
self:SetDebugEnabled(not (type(ns.Config.debug) == "table" and ns.Config.debug.enabled))
self:Printf(L["Debug Mode: %s"]:format(ns.Config.debug.enabled and "|cff00ff00ON|r" or "|cffff0000OFF|r"))

-- Dump Vault Info
-- Dump Vault Info (the Great Vault does not exist on every client flavor)
self:Printf(L["--- DEBUG VAULT (Raid) ---"])
local acts = C_WeeklyRewards.GetActivities(3) -- Raid
local acts = C_WeeklyRewards and C_WeeklyRewards.GetActivities(3) -- Raid
local tierID = nil

if acts then
if not C_WeeklyRewards then
self:Printf(L["Great Vault API unavailable on this client."])
elseif acts then
self:Printf(L["Activities Found: %d"], #acts)
for i, act in ipairs(acts) do
self:Printf(
Expand Down
5 changes: 3 additions & 2 deletions Data/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ns.Data:Register(11, 4, data, "Data/ExpansionName/Season4.lua") -- Example: Exp
```

3. Add the new file to `Weekly.toc` after `Data/Loader.lua` and `Data/Factories.lua`.
4. Update `Data:GetRecommendedSeason()` in `Loader.lua` if the new season should be selected automatically, and cover its build boundary in `Tests/test_data_loader.lua`.
4. Update `Data:GetRecommendedSeason()` in `Loader.lua` if the new season should be selected automatically, and cover its build boundary in `Tests/test_data_loader.lua`. Forever datasets are selected by client flavor rather than by build threshold.

## Sections and Settings

Expand All @@ -37,7 +37,8 @@ Each dataset is an ordered array of sections with a `title` and an `items` array
- `showAfter` and `hideAfter` optionally gate a section using `YYYY-MM-DD` dates at local midnight. Use `Data:IsSectionVisible()` so settings and rendering agree.
- Use `Data:GetItemConfigKey(item)` for visibility settings. Keys are namespaced by type; placeholder IDs (`0`) use the label. An explicit `key` provides a stable identity for composite trackers.
- Unknown quest IDs must use `Factory.PlaceholderQuest(label, icon, coords)`. A bare `Quest(0, ...)` fails dataset validation, keeping placeholders explicit and searchable.
- Expansion IDs in this registry use addon numbering (11 = The War Within, 12 = Midnight), not the zero-based IDs returned by item APIs.
- Expansion IDs in this registry use addon numbering (1 = World of Warcraft: Forever, 11 = The War Within, 12 = Midnight), not the zero-based IDs returned by item APIs.
- Each expansion belongs to a client flavor (`Data:GetExpansionFlavor()`). Forever datasets live under `Data/Forever/` and are the only ones offered on Forever clients. Forever has no Great Vault, so its datasets must not use `Factory.Vault`; its "season" slot numbers content updates.

`Data/Validation.lua` provides pure-Lua schema checks for tooling and tests. It validates every registered season, including array shape, tracker requirements, time gates, coordinates, and settings-key collisions. Keep it out of refresh paths; call `ns.Data:ValidateRegistry()` after all season files have loaded.

Expand Down
37 changes: 37 additions & 0 deletions Data/Forever/Season1.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local _, ns = ...

--------------------------------------------------------------------------------
-- World of Warcraft: Forever - Launch (Expansion 1, Content Update 1, 1.60.x)
--
-- Forever ships content updates rather than seasons; the registry's season slot
-- numbers those updates. Forever has no Great Vault or Mythic+, so this dataset
-- must never use Factory.Vault. Weekly objectives, currency IDs, and raid
-- lockouts (raids open 2026-12-09) need in-game confirmation after the
-- 2026-11-04 launch.
--
-- Merchant's Favor is confirmed in the beta client (Waylaid Supplies turn-ins
-- for Azeroth Commerce Authority / Durotar Supply and Logistics). ID 3402 was
-- confirmed in the beta client on 2026-09-21. Its cap is unknown, so it uses a
-- plain currency row rather than Cap.
--------------------------------------------------------------------------------

local Factory = ns.DataFactory
local Currency, PlaceholderQuest = Factory.Currency, Factory.PlaceholderQuest

local data = {
{
title = "Currencies",
items = {
Currency(3402, "Merchant's Favor"),
},
},
{
title = "Forever",
noSort = true,
items = {
PlaceholderQuest("Weekly objectives arrive with the November 4 launch", "Interface\\GossipFrame\\AvailableQuestIcon"),
},
},
}

ns.Data:Register(ns.Data.FOREVER_EXPANSION, 1, data, "Data/Forever/Season1.lua")
45 changes: 43 additions & 2 deletions Data/Loader.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,38 @@ ns.Data = ns.Data or {}
ns.Data.Registry = {}
ns.Data.Sources = {}

-- Client flavors. World of Warcraft: Forever runs on the modern client with a
-- 1.60+ build line, so its datasets share this schema but must never be
-- auto-selected on Retail (and vice versa).
ns.Data.FLAVOR_MAINLINE = "mainline"
ns.Data.FLAVOR_FOREVER = "forever"
ns.Data.FOREVER_EXPANSION = 1

--- Detect which client flavor is running.
-- Prefers a project constant when the client exposes one, then falls back to
-- the build line: Forever builds are 1.60.x (16000+) while Classic Era stays
-- on 1.15.x, so the range is unambiguous.
-- @return string: ns.Data.FLAVOR_FOREVER or ns.Data.FLAVOR_MAINLINE
function ns.Data:GetClientFlavor()
local foreverProject = WOW_PROJECT_FOREVER or WOW_PROJECT_CAMELOT
if foreverProject and WOW_PROJECT_ID == foreverProject then
return self.FLAVOR_FOREVER
end
local _, _, _, tocversion = GetBuildInfo()
if type(tocversion) == "number" and tocversion >= 16000 and tocversion < 20000 then
return self.FLAVOR_FOREVER
end
return self.FLAVOR_MAINLINE
end

--- Flavor that owns a registered expansion ID.
function ns.Data:GetExpansionFlavor(expansionID)
if expansionID == self.FOREVER_EXPANSION then
return self.FLAVOR_FOREVER
end
return self.FLAVOR_MAINLINE
end

local parsedDates = {}

local function ParseDate(dateStr)
Expand Down Expand Up @@ -81,6 +113,12 @@ end

--- Get the recommended expansion and season based on client version
function ns.Data:GetRecommendedSeason()
-- Forever ships content updates instead of seasons. Its build line (1.60.x)
-- sits below every Retail threshold, so resolve the flavor first.
if self:GetClientFlavor() == self.FLAVOR_FOREVER then
return self.FOREVER_EXPANSION, 1
end

local _, _, _, tocversion = GetBuildInfo()

-- Expansion 12.1.0+ (Curse of Ula'tek / Midnight Season 2)
Expand Down Expand Up @@ -112,10 +150,13 @@ function ns.Data:Get(expansionID, seasonID)
end

--- Get all registered expansions (for Config)
function ns.Data:GetExpansions()
-- @param flavor string|nil: Only expansions owned by this client flavor
function ns.Data:GetExpansions(flavor)
local exps = {}
for id, _ in pairs(self.Registry) do
table.insert(exps, id)
if flavor == nil or self:GetExpansionFlavor(id) == flavor then
table.insert(exps, id)
end
end
table.sort(exps)
return exps
Expand Down
16 changes: 14 additions & 2 deletions Dev/Discovery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ local function GetCurrentZoneInfo()
}
end

-- Forever quests report no expansion and its reworked zones are not in the
-- retail continent table, so label them by client flavor instead of "nil".
local function ResolveExpansionName(expansion)
if expansion ~= nil then
return ns.TrackerCore.GetExpansionName(expansion)
end
if ns.Data and ns.Data.GetClientFlavor and ns.Data:GetClientFlavor() == ns.Data.FLAVOR_FOREVER then
return "Forever"
end
return nil
end

--------------------------------------------------------------------------------
-- Persistence: Save/Load discovered items
--------------------------------------------------------------------------------
Expand Down Expand Up @@ -355,7 +367,7 @@ function Discovery:OnCurrencyUpdate(currencyID, _quantity, _quantityChange)
name = info.name,
icon = info.iconFileID,
expansion = expansion,
expansionName = ns.TrackerCore.GetExpansionName(expansion),
expansionName = ResolveExpansionName(expansion),
hasCap = hasCap,
hasMax = hasMax,
maxWeekly = info.maxWeeklyQuantity,
Expand Down Expand Up @@ -419,7 +431,7 @@ function Discovery:OnQuestEvent(questID, eventType)
self.tracker:LogItem("quest", questID, {
name = questName,
expansion = expansion,
expansionName = ns.TrackerCore.GetExpansionName(expansion),
expansionName = ResolveExpansionName(expansion),
eventType = eventType,
isWeekly = isWeekly,
isDaily = isDaily,
Expand Down
2 changes: 2 additions & 0 deletions Docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ The migration helper returns false without running steps for unknown or future s

The dataset tests read ordered `Data/*.lua` entries from `Weekly.toc`, then validate the entire registry. Adding a new season to the TOC automatically includes it in these tests. The static validator also rejects a `Data/*/Season*.lua` file omitted from the TOC.

One manifest serves both Retail and World of Warcraft: Forever (`## Interface: 120100, 16001`). All datasets load on both clients; `Data:GetClientFlavor()` decides which flavor is running (a Forever project constant if the client exposes one, otherwise the 1.60+ build line), `Data:GetRecommendedSeason()` resolves the flavor before any Retail build threshold, and settings list only the running flavor's expansions. Game APIs that a flavor lacks, such as the Great Vault, Mythic+, battle pets, toys, and housing, are checked for presence rather than assumed.

Use `Factory.PlaceholderQuest` for unconfirmed IDs rather than `Quest(0, ...)`. The validator checks data structure, required tracker fields, dates, coordinates, and conflicting settings keys without querying the game API. It reports source and row paths and rejects malformed arrays without scanning arbitrary numeric ranges. Validation is invoked by tooling/tests, not by the UI refresh loop. See [Data Management](../Data/AGENTS.md) for the full format.

Run `python Tools/validate.py` before submitting changes. CI uses the same command and the tool versions from `Tools/toolchain.json`. It includes both Lua suites, validation-tool tests, localization references, TOC/XML dependencies, release exclusions, orphan seasons, lint, and whitespace checks. See [Contributing](../CONTRIBUTING.md) for installation and executable overrides.
Expand Down
24 changes: 17 additions & 7 deletions Journal/Journal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -496,21 +496,31 @@ function Journal:Initialize()
LoadJournalData()
end

-- Register events
self.tracker:RegisterEvents({
-- Register events. Collection APIs vary by client flavor (Forever has no
-- battle pets, toys, or housing), so only subscribe to what exists here.
local events = {
ACHIEVEMENT_EARNED = ResetAware(OnAchievementEarned),
NEW_MOUNT_ADDED = ResetAware(OnNewMountAdded),
NEW_PET_ADDED = ResetAware(OnNewPetAdded),
NEW_TOY_ADDED = ResetAware(OnNewToyAdded),
HOUSE_DECOR_ADDED_TO_CHEST = ResetAware(OnDecorAddedToChest),
CHAT_MSG_LOOT = OnChatMsgLoot,
GET_ITEM_INFO_RECEIVED = OnItemInfoReceived,

-- Save on logout
PLAYER_LOGOUT = function(_tracker, _event)
SaveJournalData()
end,
})
}
if C_MountJournal then
events.NEW_MOUNT_ADDED = ResetAware(OnNewMountAdded)
end
if C_PetJournal then
events.NEW_PET_ADDED = ResetAware(OnNewPetAdded)
end
if C_ToyBox then
events.NEW_TOY_ADDED = ResetAware(OnNewToyAdded)
end
if C_HousingDecor then
events.HOUSE_DECOR_ADDED_TO_CHEST = ResetAware(OnDecorAddedToChest)
end
self.tracker:RegisterEvents(events)

-- Print status
local itemCount = self.tracker.itemCount or 0
Expand Down
Loading