Files
Its-Achievable/module.json
Kaysser Kayyali f2ef1ef4f3 v0.1.0 — initial extraction from battle-focus v0.5.0-alpha.12
Stage 2 of the Hax's Tools split. its-achievable ships as a
standalone module that subscribes to hax-hooks-lib's envelope
stream and provides achievements + custom rules + rewards +
achievement wall + combat HUD.

## What's new

scripts/ — moved from battle-focus/scripts/, MODULE_ID retagged
battle-focus → its-achievable:
- achievement-rules.js (323 lines) — rule engine: OPERATORS,
  TRIGGER_TYPES, evaluateCondition(s), testRule, evaluateRulesFor*
- achievements.js (1150 lines) — 24-entry catalog + award path,
  per-event evaluators, encounter-end + career-update evaluation
- achievement-wall.js (333 lines) — renderAchievementWall,
  getAchievementWallProgress, renderAchievementPopover
- custom-achievements-app.js (270 lines) — GM FormApplication
  for editing custom rules
- hud.js (624 lines) — combat HUD (ApplicationV2 +
  HandlebarsApplicationMixin); removed dead import of
  battle-focus's encounter.js (it was unused even in the
  original)

scripts/main.js — Foundry entry point. Registers settings at
its-achievable.* namespace; exposes the public API on mod.api;
registers chatBubble popover listener + HUD singleton on ready.

templates/ + styles/ — moved verbatim.

tests/PLAN.md — per-project test plan (sections A-F).
tests/test-helpers.mjs — Foundry stub.
tests/verify-achievable-v1.mjs — smoke test, 75 assertions
covering rule engine, catalog, awards, hooks-lib wiring, HUD
payload derivation, and wall/popover rendering. Runs in <2s.

## Architecture

- **Settings namespace**: its-achievable.* (was battle-focus.*).
  No migration (per Kaysser's decision); users with existing
  worlds re-create their custom rules. Documented in README.
- **HUD derives its own state from hooks-lib envelopes.** Stage 2
  keeps the legacy battle-focus:hud-update broadcast subscription
  for now (battle-focus still emits it); Stage 3 will switch the
  HUD to subscribe to hooks-lib directly and remove the
  battle-focus broadcasts.
- **Encounter singleton**: accessed via battle-focus's public
  api.getActiveEncounter() — no direct import of battle-focus's
  encounter.js.

## Dependencies

- hax-hooks-lib ^0.2.0 (declared in module.json relationships).
- battle-focus (soft, runtime) — provides the encounter singleton.

## Tests

- 75/75 smoke assertions pass in 0.07s.
- Module manifest validates: 0 errors, 1 warning (no icon —
  Stage 2+ work).

Push: Gitea only.
2026-06-20 14:04:56 -04:00

46 lines
1.6 KiB
JSON

{
"id": "its-achievable",
"title": "Hax's Tools — It's Achievable",
"description": "Foundry VTT module: achievements engine, custom rules, rewards, achievement wall, and combat HUD. Consumes the generic Foundry hook facade from hax-hooks-lib and the encounter state from battle-focus.",
"version": "0.1.0",
"library": false,
"manifestPlusVersion": "1.2.0",
"authors": [
{
"name": "Kaysser Taylor",
"url": "https://git.homelab.local/kaykayyali"
}
],
"compatibility": {
"minimum": 13,
"verified": 14
},
"relationships": {
"systems": [],
"modules": [
{
"id": "hax-hooks-lib",
"type": "module",
"manifest": "https://git.homelab.local/kaykayyali/hooks-lib/raw/branch/main/module.json",
"compatibility": {
"minimum": "0.2.0"
}
}
],
"requires": []
},
"esmodules": ["scripts/main.js"],
"url": "https://git.homelab.local/kaykayyali/its-achievable",
"manifest": "https://git.homelab.local/kaykayyali/its-achievable/raw/branch/main/module.json",
"download": "https://git.homelab.local/kaykayyali/its-achievable/raw/branch/main/its-achievable-0.1.0.zip",
"readme": "https://git.homelab.local/kaykayyali/its-achievable/blob/main/README.md",
"changelog": "https://git.homelab.local/kaykayyali/its-achievable/commits/main",
"bugs": "https://git.homelab.local/kaykayyali/its-achievable/issues",
"license": "https://git.homelab.local/kaykayyali/its-achievable/blob/main/LICENSE",
"socket": false,
"flags": {
"allowBugReporter": true,
"hotReload": { "extensions": [], "paths": [] }
}
}