Skip to content

PvZ lore relevance and AI-route initialization ​

Dave's keyword selector matched tin anywhere in the latest player message. Ordinary words such as planting, waiting, interesting and continue therefore selected the tin-sales examples. Likewise, spot and potato selected the pot/bonk material. Spanish escarlata matched lata.

Latin keywords now have word boundaries and retain common inflections. Chinese keywords remain unsegmented. Actual native interactions and tin encounters still select their material independently of text. The source stories, character writing, account persona, current provider/model and gameplay effects are unchanged. This is a deterministic context-selection correction, not a claim that every generated line will be good. The separate experimental tactical-observation reply format is not included.

The original four lore checks passed before editing. The new ordinary-question regression failed on the captured Plantern question before the fix. Positive checks preserve real pot/tin references in English, Chinese and Spanish, and the native interaction/encounter triggers.

The broader NPC suite exposed an existing module-initialization cycle:

game-npc route → usage-log → quest-auto-collect → edition → game route → game-npc route

Five route suites failed before their assertions with Cannot access 'gameNpcRoutes' before initialization. The usage writer now loads the quest collector after initialization, only for qualifying completed world-chat turns. It captures the event timestamp before the asynchronous import so a reward-day boundary cannot move the event. Durable usage insertion/retry, billing policy, quest qualification, debounce, cooldown, claim idempotency and reward logic are unchanged. Load failures go through existing server-error reporting.

The combined NPC, usage-log and quest collector unit/integration suites pass 563 checks after that correction. The failed run is retained in output-lore-tests.log; successful evidence is in output-lore-integration-tests.log. Hosted build/typecheck and an initial full OSS export verification also pass. Final validation on base 5b5a322d7, after the independent purchase-checkout merge, again passes 563 checks, hosted build (5/5 tasks), typecheck (8/8) and OSS verification (7/7). These final runs are recorded in output-lore-current-* and output-lore-final-oss.log.

No native build, art upload, production configuration, user settings or player save migration is needed. Publication should preserve the current game HTML and configured production-variable hashes, with the receipt in the game worktree's output/lore-keywords/ directory.