Skip to content

feat: draw output aspects from a random pool - #12

Draft
XxFran10xX wants to merge 1 commit into
mainfrom
feat/aspect-pool
Draft

XxFran10xX wants to merge 1 commit into
mainfrom
feat/aspect-pool

Conversation

@XxFran10xX

Copy link
Copy Markdown
Contributor

Summary

Shaymin's request: runestone research should not need the same aspects every time. An output can now list an aspect_pool and a pick count. Each new project draws that many distinct aspects from the pool, at random, and adds them to the output's fixed aspects (which stay optional).

a_minor_runestone:
  # ...displays, product_reveal and result as before...
  aspects:            # optional: always required
    magic:
      required_points: 4
  aspect_pool:
    pick: 3           # draw 3 of these per project
    aspects:
      earth:  {required_points: 3}
      nature: {required_points: 3}
      fire:   {required_points: 3}
      ice:    {required_points: 3}
      water:  {required_points: 3}
      air:    {required_points: 3}
  • Draws are made when the project starts and saved with the station (pool_aspects), so they survive restarts. Pool aspects that were not drawn count as off-recipe and are rejected like any other wrong aspect.
  • Loader validation: pick must be between 1 and the pool size. A pool aspect must exist, need more than 0 points, and not also be a fixed aspect. Fixed aspects plus pick must fit the 6 GUI rows.
  • Old saves and pool edits: on load, draws that are no longer in the pool are replaced from it, and the plugin logs a warning. A station started before a pool was added gets its draws on load.
  • Outputs without aspect_pool behave exactly as before.
  • Known limit: after /research reload, a running station keeps its current draws until the next restart. Fixed aspects already behave the same way.

Tests

  • mvn verify: 240 tests pass and the 100% line-coverage gate is met. New tests cover loading and validation, draws and reconciliation, persistence, and the manager flow. Locally ResearchPersistenceTest#completedProjectsAreDeletedAndFailedDeletionIsLogged was excluded: it fails on Windows on main too because the file is still open when the test deletes it. Linux CI runs it.
  • TFMCDev01 bot test (temporary zz_pool_test output: pick 3 of earth/nature/fire/ice/water/air):
    • A station started on the old 1.1.3 jar loaded on this build with draws [air, ice, earth] and reshuffled rows (warnings logged), opened, and could be scrapped.
    • In 3 new projects, the draws were fire+water+ice, ice+nature+earth and earth+air+fire. The GUI rows were exactly the draws.
    • In each project, an undrawn pool aspect stayed TESTING at 2 points (off-recipe). Each drawn aspect was confirmed, and the third completed the research (Codex stub ... completed output zz_pool_test).
    • No Research errors in the log. The temporary configs and bot data were removed afterwards.

Docs: TF-Minecraft/Docs projects/Research/overview.md (outputs config row) should get the aspect_pool keys once this is merged.

🤖 Generated with Claude Code

Outputs can list an aspect_pool with a pick count. Each new project
draws that many distinct aspects from the pool and adds them to the
output's fixed aspects, so the same research needs different aspects
each time. Draws are saved with the station; on load, draws that left
the pool are replaced from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant