Skip to content

feat(inventory,quest): declare renamed and retired content - #2747

Open
houko wants to merge 2 commits into
mainfrom
feat/issue-1540-content-updates
Open

houko wants to merge 2 commits into
mainfrom
feat/issue-1540-content-updates

Conversation

@houko

@houko houko commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Summary

A live game can now declare what a release did to content, and the gameplay packages restore older saves through that declaration instead of refusing them. A version 2 item catalog adds renamed (old ID to current ID) and retired entries with an optional replacement and refund; Container.RestoreContent, Equipment.RestoreContent and their SavePartContent parts apply them, split a stack into free slots when the replacement's maxStack is lower, and return a RestoreReport for refunds and notices. A version 2 quest book adds renamed quests and objectives and retired quests and objectives; Log.RestoreContent and SavePartContent apply them, clamp progress above a lowered count, complete an active quest that clamping finishes, drop a retired quest's record with a report, and move or drop retired objective progress. Version 1 catalogs and books stay valid and round-trip byte for byte, strict Restore, RestoreMigrated and SavePart keep today's refusals, and docs/en and docs/zh document the formats under "Changing content after release", with an agent note and a changelog fragment. The game check comparison against the last release tag that the issue sketches is not included: a project declares no content file paths and assetcheck.Check has no Git access, so it is left as follow-up work.

Related issue

Fixes #1540

Verification

  • gofmt -l pkg/inventory pkg/quest produces no output
  • go tool nsgo check ./pkg/inventory, ./pkg/quest, ./internal/repocheck pass (run on the remote build machine through ubuild)
  • go tool nsgo test ./pkg/inventory ./pkg/quest ./pkg/save/savetest ./internal/repocheck passes (run on the remote build machine through ubuild, with repocheck once under a fresh build cache so the docs changes were read)
  • bun run verify-notes passes
  • go run ./tools/changelog check passes
  • Both docs/en/ and docs/zh/ updated
  • The whole-repository test suite and the multi-target go tool nsgo check from the template were not run: this change is package-scoped and only the affected packages were checked and tested.

Screenshots

None: no visible UI changes.

Acceptance for every editor PR

Not an editor change; the editor checklist does not apply.

Item catalogs and quest books gain version 2 renamed and retired sections, and RestoreContent plus SavePartContent apply them so a save written before a content update still loads and reports every change; strict Restore and RestoreMigrated keep their behavior.

Fixes #1540
@github-actions github-actions Bot added enhancement New feature or request size/XL documentation Improvements or additions to documentation pkg/internal area/agents pkg/inventory pkg/quest labels Dec 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/agents documentation Improvements or additions to documentation enhancement New feature or request pkg/internal pkg/inventory pkg/quest size/XL

Projects

None yet

1 participant