feat(events): four event recipes for the New event page #53

Merged
whitlocktech merged 1 commits from feat/event-recipes into main 2026-12-01 17:37:59 -06:00
Member

What & why

Authoring flows phase 2 (docs website/AUTHORING_FLOWS_PLAN.md §5, §6.4; decisions D418–D419). Module-uo had no event templates, so on a UO-only site the New event page offered no starting point. This adds four, through registerEventTemplates (MODULE_API 1.13.0 — no contract change, coreApi stays ^1.20.0):

Template What it builds
uo.template.announce — Announcement uo.broadcast, plus an optional Town Cryer uo.news.post held up for N minutes (default a day)
uo.template.boss_raid — Boss raid uo.boss.spawn at a landmark + broadcast, held for N minutes; cleared at run end
uo.template.seasonal — Seasonal event for a few hours (D418) core.lease uo.seasonal.status → Active for one of ServUO's seasonal events, ≤ 12 h, reverts itself
uo.template.gathering_giveaway — Gathering giveaway (D419) broadcast + uo.participation.open at a landmark for a window, then collect + uo.item.grant to everyone counted + thanks

D418 replaces the planned skill-cap lease: PlayerCaps.SkillCap is the starting cap (read in CharacterCreation.cs), so it never helps existing players.

build() makes no shard call — a recipe fills in with the shard down; the dry run checks the live world. Every input has an example and a plain description; defaults live in build() (core drops a default key).

Real-core build check: server/scripts/templateBuild.js + a new frozen-manifest step. It loads a staged copy of the module through the pinned core's real loader and fills every recipe in through buildFromTemplate, so core's own spec.validate sees the plans (the server-tests job only has a fake core). Fixture coverage is checked both ways.

Docs: RunicGateway/docs docs/authoring-flows-phase-2 (PR announced alongside).

How it was tested

Local, Windows, against website main 9e58fd0 (MODULE_API 1.21.0):

  • npm test --prefix server — 762/762 pass (new test/eventTemplates.test.js: specs, defaults, every refusal, no live call).
  • check:imports, check:bundle pass. check:swagger reports STALE on this Windows checkout from CRLF only — the same on clean main; no routes changed.
  • node server/scripts/templateBuild.js --core ../website --module . — all 14 fixtures OK; proven to fail (exit 1, template named) on a deliberately bad phase key.

Not tested: the CI run against the pinned core 7bd93b8 (this PR's CI does that); no walk — phase 3 walks every recipe from picker to a published, dry-run-clean event on a live shard.

Checklist

  • I have read CONTRIBUTING.md.
  • The change builds and existing tests/checks pass locally.
  • I have added or updated tests/docs where it makes sense.
  • My commits are reasonably scoped with clear messages.

AI-assisted contributions (required)

  • No AI tools were used to produce this contribution.
  • AI tools were used. Tool(s): Claude Code (Claude Opus 5.5, Claude Sonnet). I have reviewed and understand
    every change, and take responsibility for it. AI-authored commits are
    marked with a Co-Authored-By / Assisted-By trailer.

License

  • I agree that my contribution is licensed under this project's license
    (GNU GPL v3.0 or later), and I have the right to contribute it.

🤖 Generated with Claude Code

https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t

## What & why Authoring flows **phase 2** (docs `website/AUTHORING_FLOWS_PLAN.md` §5, §6.4; decisions D418–D419). Module-uo had no event templates, so on a UO-only site the New event page offered no starting point. This adds four, through `registerEventTemplates` (MODULE_API 1.13.0 — no contract change, `coreApi` stays `^1.20.0`): | Template | What it builds | |---|---| | `uo.template.announce` — Announcement | `uo.broadcast`, plus an optional Town Cryer `uo.news.post` held up for N minutes (default a day) | | `uo.template.boss_raid` — Boss raid | `uo.boss.spawn` at a landmark + broadcast, held for N minutes; cleared at run end | | `uo.template.seasonal` — Seasonal event for a few hours (D418) | `core.lease` `uo.seasonal.status` → `Active` for one of ServUO's seasonal events, ≤ 12 h, reverts itself | | `uo.template.gathering_giveaway` — Gathering giveaway (D419) | broadcast + `uo.participation.open` at a landmark for a window, then collect + `uo.item.grant` to everyone counted + thanks | D418 replaces the planned skill-cap lease: `PlayerCaps.SkillCap` is the *starting* cap (read in `CharacterCreation.cs`), so it never helps existing players. `build()` makes **no shard call** — a recipe fills in with the shard down; the dry run checks the live world. Every input has an example and a plain description; defaults live in `build()` (core drops a `default` key). **Real-core build check:** `server/scripts/templateBuild.js` + a new `frozen-manifest` step. It loads a staged copy of the module through the pinned core's real loader and fills every recipe in through `buildFromTemplate`, so core's own `spec.validate` sees the plans (the server-tests job only has a fake core). Fixture coverage is checked both ways. Docs: RunicGateway/docs `docs/authoring-flows-phase-2` (PR announced alongside). ## How it was tested Local, Windows, against website `main` 9e58fd0 (MODULE_API 1.21.0): - `npm test --prefix server` — 762/762 pass (new `test/eventTemplates.test.js`: specs, defaults, every refusal, no live call). - `check:imports`, `check:bundle` pass. `check:swagger` reports STALE on this Windows checkout from CRLF only — the same on clean `main`; no routes changed. - `node server/scripts/templateBuild.js --core ../website --module .` — all 14 fixtures OK; proven to fail (exit 1, template named) on a deliberately bad phase key. **Not tested:** the CI run against the pinned core 7bd93b8 (this PR's CI does that); no walk — phase 3 walks every recipe from picker to a published, dry-run-clean event on a live shard. ## Checklist - [x] I have read [CONTRIBUTING.md](CONTRIBUTING.md). - [x] The change builds and existing tests/checks pass locally. - [x] I have added or updated tests/docs where it makes sense. - [x] My commits are reasonably scoped with clear messages. ## AI-assisted contributions (required) - [ ] No AI tools were used to produce this contribution. - [x] AI tools were used. Tool(s): `Claude Code (Claude Opus 5.5, Claude Sonnet)`. I have reviewed and understand every change, and take responsibility for it. AI-authored commits are marked with a `Co-Authored-By` / `Assisted-By` trailer. ## License - [x] I agree that my contribution is licensed under this project's license (**GNU GPL v3.0 or later**), and I have the right to contribute it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t
wtclaude added 1 commit 2026-12-01 15:47:59 -06:00
feat(events): four event recipes for the New event page
All checks were successful
PR Checks / client-build (pull_request) Successful in 31s
PR Checks / server-tests (pull_request) Successful in 38s
PR Checks / frozen-manifest (pull_request) Successful in 50s
be713728ee
Authoring flows phase 2 (docs AUTHORING_FLOWS_PLAN.md §5, §6.4, D418-D419).
Registers four templates through registerEventTemplates (MODULE_API 1.13.0,
no contract change): Announcement, Boss raid, Seasonal event for a few hours
(core.lease on uo.seasonal.status, up to the 12 h lease ceiling) and
Gathering giveaway (participation count at a landmark, then uo.item.grant to
everyone counted). build() makes no shard call.

Adds server/scripts/templateBuild.js and a frozen-manifest CI step that load
the module through the pinned core's real loader and fill every recipe in
through buildFromTemplate, so core's own spec validator sees them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014HJEmd5sBSpNXicS4gmT1t
whitlocktech merged commit aba06eb7cf into main 2026-12-01 17:37:59 -06:00
whitlocktech deleted branch feat/event-recipes 2026-12-01 17:37:59 -06:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Module-uo#53
No description provided.