Stardew Valley Butler: A DSH Plugin That Lets AI Play Stardew Valley Without Vision

Preface

The philosophy behind DeepSeek Harness (DSH) is “everything is a plugin” — any tool or service can be integrated into DSH’s session context through a plugin. In game automation scenarios, the traditional approaches either rely on vision models (screenshots + OCR) or require hand-written scripts. The former needs extra model calls; the latter comes with high maintenance costs. Stardew Valley is a great test bed for “blind play”: the screen is information-dense, the operation steps are numerous, yet all critical state can be read through the game’s API.

This plugin is a fork of the dsh-stardew-blind-whale-farmer mod developed by Darian. It retains the mod’s original game logic (A* pathfinding, cross-map navigation, fishing, combat, guide-following, etc.) and adds the “steward” features on the DSH side: a visual dashboard, session management, forced mood logging, scheduled launches, window control, and more. The plugin does not modify the in-game mod implementation; it only enhances the DSH-side experience.

Plugin Positioning

  • Name: Stardew Valley Steward (dsh-stardewvalley-panel)
  • Maintainer: jiaxusummer
  • Type: Client plugin
  • Core value: Enables a DSH session to automatically perform daily farming, socializing, and exploration tasks in Stardew Valley using text-based observation + function calls — no vision model required. It also provides a dashboard and session controls to lower the barrier to “blind play.”

Core Features

Visual Dashboard

The dashboard lives under DSH’s Settings → Stardew Valley Steward page and is divided into three tabs:

  • Play Management: Current status (time/weather · money · energy · inventory · location), what the character was last doing (collapsible), mood curve, “not in the mood” reference values, and action buttons.
  • Settings: Game-play session / auto-launch session / main session, launch & scheduling, game & mod settings.
  • About: Version, paths, plugin description, and credits.

The dashboard provides a set of action buttons:

  • Start Game: Launches SMAPI + loads a save.
  • Stop Actions: Turns off the built-in AI + terminates the current session.
  • Resume Actions: Re-enables the built-in AI.
  • Close Game: Runs a save check; if the last action recorded is not sleep, it refuses to close.
  • Force Go Home & Sleep: Walk home → interact with bed → sleep; stops at whichever step fails.
  • Check Mod Updates: Compares GitHub release version numbers and updates in-game mods to the latest.
  • Append Experience: Manually triggers one append (also runs automatically when closing the game).
  • Send Summary to Main Session: Manually triggers one push (also runs automatically when closing the game).

Session & Window Control

  • Two windows are managed independently: the SMAPI console and the game window have separate settings, supporting Normal / Minimized / Hidden / Maximized. You can hide the console while keeping the game window visible. On Windows 11, SMAPI’s console runs inside Windows Terminal (window class CASCADIA_HOSTING_WINDOW_CLASS); the plugin recognizes three console window classes.
  • Only the designated “game-play session” can modify the game: the session specified on the dashboard can water crops, start the game, close the game, etc. Other sessions (e.g., your daily chat session) can only view status, list sessions, wake the character, and schedule time — preventing two windows from issuing conflicting commands that make the character walk erratically.

Mandatory Mood Log

Two values need to be recorded daily: mood and excitement. The plugin checks before sleep executes:

  • If the log is current up to yesterday → the character is allowed to sleep.
  • If it’s one or more days behind → sleep is blocked, and the table row is displayed for the user to fill in.

Writing “—” does not count as a record — latestMood only recognizes rows where both numbers are present. The dashboard also shows “Game is on day X” as a hint; this does not appear if the gap is 0.

Launch & Scheduling

“Next play session” is one-time: the model sets it via stardew action="schedule", or you can set it manually from the dashboard. When the time arrives, the game is launched and the game-play session is woken up to load the save. The plugin is only responsible for waking on time; the decision to actually play is still yours.

End-of-Session Wrap-up

Once the save check passes, three things happen automatically:

  1. The raw text of the last three game days is extracted from StarDewNotes.md and appended to StarDewExperience.md (a status-coordinate line is added at the end).
  2. A summary is pushed to the main session.
  3. A “current status + mood reference” is pushed to the auto-launch session (which decides when to start the next session).

Installation & Setup

First, make sure SMAPI (Stardew Valley’s mod loader) is installed. You can download it from https://smapi.io . During development, SMAPI 4.5.2 + game 1.6.15 were used.

There are two ways to install the plugin:

  1. Via the DSH Plugin Marketplace:
    - Find dsh-stardew-blind-whale-farmer (the author’s version).
    - After installation, the plugin ships a pre-compiled mod and automatically installs it into the game’s Mods folder (if the game is running, it will install after you close it).
    - In the future, clicking “Update” in the marketplace will update both the plugin and the mod together.

  2. Via link: in a DSH profile (this fork):
    - Use link: in a DSH profile to install; see docs/ops.md for the installation path.
    - The plugin ships a pre-compiled mod and will automatically install it into the game’s Mods folder.
    - If the game directory cannot be found, fill in the “Stardew Valley directory” in the dashboard settings.

After installation, you need to provide a DeepSeek API Key. There are two options:

  • In GameDirectory\Mods\BlindWhaleFarmer\config.json, set ApiKey to your DeepSeek Key (https://platform.deepseek.com).
  • Alternatively, don’t put it in the file — set the system environment variable DEEPSEEK_API_KEY instead.

Once everything is set up, launch the game through SMAPI and load a save (it’s recommended to back up your save first, or create a fresh one for the AI to play). The plugin will automatically detect and update the in-game mod version.

Typical Usage

Playing Directly Through a DSH Session

  1. Install the plugin and mod; fill in the API Key.
  2. In DSH’s Settings → Stardew Valley Steward, configure the “game-play session” and the “auto-launch session.”
  3. In any session, first have the AI run stardew action="help" to see the available actions.
  4. When needed, call stardew action="launch_game" to let the AI start the game and load the save on its own.
  5. Click Start Game on the dashboard — the plugin will launch SMAPI and load the save. Once in the game, the AI will begin acting based on context.
  6. During gameplay, the dashboard displays the current status, mood curve, and action buttons.
  7. When done, click Close Game — the plugin will automatically perform the wrap-up: extract notes, push a summary, and send status to the auto-launch session.

Playing via an MCP Client

When the mod starts, it spins up a local MCP server: http://127.0.0.1:18080/mcp (localhost only). Clients that support MCP — such as WorkBuddy, Claude Code, Cursor, etc. — can connect; the client’s own AI reasons and calls the mod’s tools to play the game. This consumes the client’s quota and does not require a DeepSeek API Key.

Connection example (WorkBuddy):

  1. First launch the game through SMAPI and load a save (the SMAPI console will display MCP server started: http://127.0.0.1:18080/mcp).
  2. WorkBuddy → Settings / Connectors → Custom Connector → Configure MCP. Add the following to ~/.workbuddy/mcp.json:
   {
     "mcpServers": {
       "stardew": {
         "url": "http://127.0.0.1:18080/mcp"
       }
     }
   }

Save, then toggle it on in the My MCP list. If asked to select a transport method, choose Streamable HTTP.
3. Tell WorkBuddy: “Use the stardew tools to play Stardew Valley: first call get_state to check the status, then water all the crops today, sell the produce, and go to sleep at night.”

Use Cases & Notes

  • Ideal for long-running, automated Stardew Valley daily play, especially when you want a single DSH session to manage both game operations and other tasks.
  • The plugin runs with the permissions of the current DSH process. Review the source code and license before installing.
  • After updating the mod, you need to close the game, install the new version, open the game (to the title screen is enough), then restart DSH. Go back to your original session and say “continue” — this ensures the tool list and rules get refreshed.

Short Closing

This plugin lets a DSH session “blind-play” Stardew Valley while using the dashboard and session controls to lower the learning curve. If you want to automate a game through text observation + function calls, or manage game tasks alongside other work in a single session, give the Stardew Valley Steward a try.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye