Skip to content

feat(quest): track one-time quests, split quest goals per period - #2724

Merged
KochiyaOcean merged 3 commits into
masterfrom
feat/one-time-quests
Sep 15, 2026
Merged

KochiyaOcean merged 3 commits into
masterfrom
feat/one-time-quests

Conversation

@KochiyaOcean

Copy link
Copy Markdown
Member

What

Tracks one-time (単発) quests, and splits the quest goal source into one file per period so it stays readable.

1. Split quest_goal.cson (refactor, data unchanged)

assets/data/quest_goal.cson becomes assets/data/quest_goal/*.cson — daily, weekly, monthly, quarterly, yearly-01…yearly-12, one-time*, limited-time — with a README.

  • The runtime loader (views/redux/info/quests/goals.ts) and fcd/build.js merge the directory. The fcd payload is still a single assets/data/fcd/questgoal.json; the refactor commit leaves its data identical.
  • fcd/build.js now asserts each quest's type against its file name (replacing the section-header check) and rejects a quest id defined in two files. An unrecognised file name fails the build.
  • A broken file is skipped on its own at runtime instead of emptying the whole table.
  • fcd/__tests__/payloads.spec.ts merges the directory the same way, so a goal edit without node fcd/build.js still fails npm test.

Heads-up for external readers. poi-plugin-quest-planner (scripts/build-data.js, --poi-goals) and yahagi-kancolle-browser read assets/data/quest_goal.cson by path. They should switch to assets/data/fcd/questgoal.json — the same data as one plain JSON file, table under data.

2. One-time quests (286 added)

File Quests
one-time-sortie-1.cson B1–B99 · 98
one-time-sortie-2.cson B100–B139 · 40
one-time-sortie-3.cson B140–B179 · 39
one-time-sortie-4.cson B180– · 37
one-time-exercise.cson 33
one-time-expedition.cson 27
one-time-other.cson supply/repair/arsenal/modernization · 12

All carry no type, so no period reset can drop their progress; same-day exercise quests use resetInterval: 1.

Sources, in order of trust.

  1. wikiwiki 任務/出撃任務・演習任務・遠征任務・工廠任務 — the reference every entry was checked against. Its rendered pages truncate when fetched; the raw-source form reaches B179.
  2. kcwiki-quest-data — structured, so most entries were converted from it mechanically, then corrected. It was calibrated first against the 80 quests poi already tracks, and checked row by row against wikiwiki. It is last updated 2024-06 and was wrong often enough to matter: wrong ranks (905, B45, B113, B139, C15), base ids where the quest names 改二 (B120), "4 of 5" encoded as four fixed ships (B35/B36), 他の艦 read as a fleet-size cap for type-based fleets (B29/B30/B63), and type: 1 on quest 330, which the game reports as quarterly.
  3. KC3Kai kc3-translations memo — for the tie-breaks where kcwiki and wikiwiki disagreed (B40/B68/B102/B135 name ships that must be in the fleet, not flagship; B140/B141 maps; B142 rank), and as the only readable source for B180–B216. Those entries carry a comment saying so.

Not tracked (199), by design: 94 fleet-composition quests (A), 103 equipment preparation/conversion quests (F), a sortie from the 2nd fleet (B3 — sally carries no fleet), and a 7-4 gauge kill (B176).

Tracked loosely, with a comment on the quest where poi cannot express the condition: OR between escort groups (B138, B191, B201, B205), speed (B89), level (B102, B117, C21), "no other ship types" (B29, B30, B63), a named remodel that excludes a later one (B106), the target ship of a modernization (G5, G10, G11), and resource or item preparation.

Verification

  • Master-data validator over all 425 quests: no unknown events or fields, every maparea in master data, every mapcell a real edge of its map, every mission and ship id valid.
  • Gauge-boss cells are read from fcd/map.json and asserted against poi's existing conventions (7-2-M = [15], 7-3-P = [18, 23, 24, 25], 7-5-T = [24, 25]).
  • The generated CSON is re-parsed and deep-compared with its source before being written.
  • Base-ship audit: of 745 goal ids that name a remodelled stage, none accepts an unremodelled ship.
  • npx jest → 489 passed (43 suites); npm run typecheck and eslint clean.

🤖 Generated with Claude Code

KochiyaOcean and others added 2 commits September 15, 2026 12:40
assets/data/quest_goal.cson becomes assets/data/quest_goal/*.cson, merged at
runtime and by fcd/build.js, so the fcd payload is still a single
questgoal.json with unchanged data. The build now checks each quest's type
against its file name and rejects an id defined twice.

External tools reading quest goals should use assets/data/fcd/questgoal.json.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds 286 one-time quests in assets/data/quest_goal/one-time-*.cson. Most are
converted from kcwiki-quest-data and corrected row by row against wikiwiki;
quests it lacks are written from wikiwiki, or from KC3Kai's quest memo where
wikiwiki could not be read, and say so. Conditions poi cannot express are
tracked loosely with a comment naming what is not checked.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 15, 2026 03:41

@petit-chiba petit-chiba Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: No actionable findings.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Address the two moderate validation findings and the documented test and inventory nits.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This pull request splits quest-goal data by period and adds tracking for 286 one-time quests while preserving the merged FCD payload.

Changes:

  • Replaces the monolithic CSON source with period-specific files.
  • Updates runtime loading, FCD generation, validation, and tests.
  • Adds one-time quest definitions and updates documentation.
File summaries
File Summary / findings
views/redux/middlewares/quest-goals-fcd.ts Updated goal-path documentation; no final finding.
views/redux/info/quests/types.ts Updated source-path documentation; no final finding.
views/redux/info/quests/goals.ts Loads per-file goals. Moderate (1 vote): reject top-level arrays. Nit (2 votes): add coverage for skipping one broken file while retaining others.
views/redux/info/__tests__/quests.spec.ts Updated quest-goal test documentation; no final finding.
views/redux/info/__tests__/quest-goals-fcd.spec.ts Updated FCD tests; no final finding.
views/redux/fcd.ts Updated fallback documentation; no final finding.
views/redux/actions/quest.ts Updated quest-goal documentation; no final finding.
skills/quest-goal-data/SKILL.md Updated data-layout documentation. Nit (3 votes): include one-time-sortie-3.cson and one-time-sortie-4.cson.
skills/combat-mechanics/SKILL.md Updated quest-data references; no final finding.
fcd/build.js Merges and validates goal files. Moderate (1 vote): reject top-level arrays.
fcd/__tests__/payloads.spec.ts Verifies merged payload consistency; no final finding.
assets/data/quest_goal/yearly-12.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-11.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-10.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-09.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-08.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-07.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-06.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-05.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-04.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-03.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-02.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/yearly-01.cson Yearly quest definitions; no final finding.
assets/data/quest_goal/weekly.cson Weekly quest definitions; no final finding.
assets/data/quest_goal/README.md Documents the split data layout; no final finding.
assets/data/quest_goal/quarterly.cson Quarterly quest definitions; no final finding.
assets/data/quest_goal/one-time.cson One-time quest definitions; no final finding.
assets/data/quest_goal/one-time-sortie-2.cson One-time sortie definitions; no final finding.
assets/data/quest_goal/one-time-sortie-1.cson One-time sortie definitions; no final finding.
assets/data/quest_goal/one-time-other.cson One-time miscellaneous definitions; no final finding.
assets/data/quest_goal/one-time-expedition.cson One-time expedition definitions; no final finding.
assets/data/quest_goal/one-time-exercise.cson One-time exercise definitions; no final finding.
assets/data/quest_goal/monthly.cson Monthly quest definitions; no final finding.
assets/data/quest_goal/limited-time.cson Limited-time quest definitions; no final finding.
assets/data/quest_goal/daily.cson Daily quest definitions; no final finding.
assets/data/fcd/meta.json Updated FCD metadata; no final finding.
AGENTS.md Updated project guidance; no final finding.
Review details

Suppressed comments (2)

fcd/build.js:121

  • This validation also accepts a top-level array because typeof data === 'object' is true for arrays. A malformed CSON file containing an array of goal-like objects can then be merged with ids 0, 1, etc. and pass the generic subgoal checks, producing invalid quest entries in questgoal.json; reject arrays before iterating the table.
    views/redux/info/quests/goals.ts:49
  • typeof parsed === 'object' also accepts arrays. A syntactically valid but malformed goal file with a top-level list would be assigned into merged under numeric keys instead of being skipped, so invalid entries can reach the quest table despite the per-file isolation described above. Reject arrays as non-table parses.
  • Files reviewed: 40/41 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread skills/quest-goal-data/SKILL.md Resolved
Comment thread views/redux/info/quests/goals.ts Outdated
Comment on lines +49 to +53
if (parsed instanceof Error || !parsed || typeof parsed !== 'object') {
console.warn('Broken quest goal file!', file, parsed instanceof Error ? parsed.message : '')
continue
}
Object.assign(merged, parsed)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 50526ed: views/redux/info/__tests__/quest-goal-files.spec.ts reads the real assets/data/quest_goal/ directory with CSON mocked per file — daily.cson returns a parse error (CSON returns rather than throws), weekly.cson a list, every other file a one-quest table — and asserts both broken files are skipped while the rest load. Checked that it bites: with the array guard removed it fails on the list leaking in under id 0.

A goal file whose top level is a list parsed fine and merged its entries in
under ids 0, 1, …, both at runtime and in fcd/build.js. Covers the per-file
skip with a test, and lists every one-time file in the skill.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@petit-chiba

petit-chiba Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review failed before a result could be published. Please retry with /ai-review.

@KochiyaOcean

Copy link
Copy Markdown
Member Author

Copilot's two suppressed findings (top-level arrays accepted as goal tables in fcd/build.js and views/redux/info/quests/goals.ts) were both correct and are fixed in 50526ed: a list parses fine but is not a table, so its entries would have merged in under ids 0, 1, …. The build now fails with "did not parse to a table of quests", and the runtime loader skips the file with a warning like any other broken file. The payload is unchanged; full suite 490 passed, typecheck and lint clean. petit-chiba reported no findings.

@KochiyaOcean
KochiyaOcean merged commit 556387c into master Sep 15, 2026
11 of 15 checks passed
@KochiyaOcean
KochiyaOcean deleted the feat/one-time-quests branch September 15, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants