Repository navigation
Conversation
…#320) StoryLog (checkpoint log lines, stats counts) and StoryRangeOptions (the start/end checkpoint dropdowns, story_checkpoint_database()) moved unchanged from #312, so the SV program (#320) and the engine (#114) can share them without the story engine. story_checkpoint_database() now takes the checkpoints' labels instead of StoryCheckpoint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ge-options The log lines and story counts now live in #45: keep #45's StoryLog, AutoStoryStats and their tests, drop this branch's copies. The range option tests get their own header, Pokemon_StoryRangeOptions_Tests.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Move the checkpoint log line formatters (Pokemon_StoryLog) and their tests here from #325, and put StoryRunCounts and record_story_counts() with AutoStoryStats, which they add to. StoryLog now holds only log lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
It builds a dropdown database like make_story_select_database(), so it lives next to it in Pokemon_AutoStorySelect.h (header-only, inline) with a test beside that function's. StoryRangeOptions keeps only the option group. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…select test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…reen-state Brings in #312's typed step args (StoryArgs gave way to StoryActionArg there) and #45/#325's split of StoryLog, AutoStoryStats and the range options. Conflicts were only the file and test registration lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ptions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
The tutorial and main story checkpoint dropdowns are now the shared StoryRangeOptions, added under the same keys (START_CHECKPOINT_TUTORIAL, END_CHECKPOINT_TUTORIAL, START_CHECKPOINT_MAINSTORY, END_CHECKPOINT_MAINSTORY) over the same databases, so saved settings load unchanged; the end stays unlocked while running. The start-before-end check is the range's. The checkpoint loops log the shared attempt and reset lines, and the run logs the shared checkpoint start line. Rebased onto autostory/story-range-options (#325) and squashed: it uses only the shared range options (#325) and log lines (#45), not #312. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…tory-options Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…tory-options Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
…ange-options Folded leaf PR #320; tree equals the leaf tip. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
| #include "ML/Inference/ML_YOLONavigation.h" | ||
| #include "NintendoSwitch/NintendoSwitch_SingleSwitchProgram.h" | ||
| #include "Pokemon/AutoStory/Pokemon_AutoStoryStats.h" | ||
| #include "Pokemon/AutoStory/Pokemon_StoryLog.h" |
There was a problem hiding this comment.
should this be included in the .cc fille? then we can keep the header unchanged?
There was a problem hiding this comment.
Yes. The Pokemon_StoryLog.h include now sits in PokemonSV_AutoStoryTools.cpp and PokemonSV_AutoStory.cpp, not the header (#45, 1e49c4f). #325 drops it from the header in d24b86d, so this PR no longer touches PokemonSV_AutoStoryTools.h. In #45 the header still changes one line: checkpoint_text() loses its "Checkpoint:: " prefix, since the [Checkpoint] log line adds it now, and that needs <format>.
There was a problem hiding this comment.
| std::string describe_entries(const std::vector<std::pair<std::string, std::string>>& entries){ | ||
| std::string text; | ||
| for (const auto& [slug, label] : entries){ | ||
| text += std::format("{}{} \"{}\"", text.empty() ? "" : ", ", slug, label); |
There was a problem hiding this comment.
is there a StrJoin function that avoid repeated append?
There was a problem hiding this comment.
No, Common/Cpp/Strings (StringTools, Unicode) has no join helper, and nothing else in the repo has one. C++23 std::views::join_with would do it, but older libc++ (the Mac CI's Xcode) doesn't have it yet, so I left this loop as it is. It's a small test-only helper. A shared join in StringTools would be its own PR.
| // section's entry i is then story_index(true, i, first of the section). | ||
| // The program keeps it in a function-local static: the options hold a | ||
| // reference. | ||
| inline StringSelectDatabase story_checkpoint_database(std::span<const std::string> labels){ |
There was a problem hiding this comment.
not directly related here: but what if there are multiple orders, e.g. in FRLG for different starter choice? would that work with here?
There was a problem hiding this comment.
Yes for FRLG's starter choice. The starter doesn't change the order of checkpoints: every starter goes through the same story beats. Only what happens inside some of them changes, such as which ball to walk to and the rival's team. Today FRLG has one table (story_checkpoints()) and assumes Squirtle (TODO at PokemonFRLG_AutoStory.cpp:457). A starter option would feed into those events and battle data, as SV's STARTERCHOICE does, and this dropdown stays as it is.
It would break for a game whose order really branches, with different checkpoints per choice. The slugs are list indices, so a saved "12" would point at a different checkpoint in another order. The database is also a function-local static, so it can't follow an option change. The smallest fix is to keep one list with every branch's checkpoints and skip the ones that don't apply at run time, the way FRLG already joins or skips handoff rows. If we ever need several real lists, slug by checkpoint id ("01.05") instead of index, so saved settings stay valid. That isn't a one-liner, so I haven't done it here.
SV's checkpoint loops and its start line use Pokemon_StoryLog's format (moved here from #325, as asked in review). The log header is included from the .cpp files, not AutoStoryTools.h. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…autostory/story-range-options
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ions: #45 review fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ions: #45 review fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ions: optional display text on [Checkpoint] lines
…ions: StoryRunCounts moves to #114 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…dd_checkpoint_prefix (#45) Conflict in PokemonSV_AutoStoryTools.cpp reset lines: took #45's add_checkpoint_prefix form. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss
…ions Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKYzhrMnPK61XHWEch4a6E
Base:
autostory/r3-shared-stats(#45); the diff shows only this change. Parent of #114, which merges it in.What the user picks, shared by every AutoStory program:
StoryRangeOptionsis the start/end checkpoint dropdown group with the check that the start does not come after the end, so SV (#320) and the story engine's programs use one copy.story_checkpoint_database()builds those dropdowns from a game's checkpoint labels and sits next tomake_story_select_database()inPokemon_AutoStorySelect.h, with a test beside that function's; the log lines and stats counts that used to be here are now in #45. Tested with a local build and the unit test runner: the StoryRangeOptions and AutoStorySelect suites and the other Pokemon:: suites pass; fork CI dispatched on Windows, Windows clang, Ubuntu and Mac.🤖 Generated with Claude Code
https://claude.ai/code/session_013VUubhHeYSMGSSDXZkKZss