Repository navigation
Releases: BeadyTooth57254/WheatStook
Release list
v1.4.4 — follow 修好 + 剧情对白不再弹面板
v1.4.4 — follow 真的会跟了 + 剧情对白不再弹面板
发布包已带编译好的
WheatStook.dll,解压即可用,无需自己编译。本版两个压缩包:
WheatStook-v1.4.4.zip—— 模组本体。解压后把整个WheatStook/文件夹放进Stardew Valley/Mods/。WheatStook-v1.4.4-mcp_bridge.zip—— 联机 AI 用的 Python 桥(server.py+client.py+launcher.bat+gen_token.bat+scripts/mods_keybinds.json)。本地解压就行,不是装进 Mods,跑在电脑上。
🔧 follow 跟不动玩家 —— 两个 bug 叠在一起
以前让 farmhand 跟随房主,它会回 {"ok": true, "status": "tracking"},然后一步都不走。根因有两层:
- 不解析前缀:桥的工具说明写着支持
player:名字/npc:名字/x,y,但 mod 只拿整串去比名字 ——player:Es_099这种写法必然「找不到目标」。 - 从来不给玩家寻路:真正寻路那段只查
loc.characters(NPC 列表),玩家根本不在里面,所以对玩家目标永远是空转。
现在:
- 按前缀解析,三种写法都认(
player:/npc:/x,y)。 - 对玩家真的寻路,并在
Tick()里加了跟随循环 —— 玩家一直在动,一条路走完就重新规划。这才是「跟随」而不是「走过去一次」。 - 目标不在同一地点时明确报错:「我在 Mine,你在 Farm:先 warp 再 follow」,不再假装在跟。
follow传空 = 停止跟随(以前/stop清了路,下一帧跟随又接回来,根本停不下来)。move_to会自动取消跟随,两者不抢路。GET /state新增following字段,能直接看出它在跟谁。
🔧 剧情对白不再弹进聊天面板
- 新增配置
panelShowStoryDialogue(默认false):节日/剧情里那些没有选项的 NPC 对白不再塞进聊天面板 —— 它本来就不需要做决定,而且会把面板弹开,看剧情时很碍事。 - 文本仍照旧写进 SMAPI 日志,没丢东西。
- 要选择的对白完全不受影响:
【对话】选项、【升级】职业二选一、选了「…」照旧显示 —— 它只在你需要做决定时出现。 - GMCM 里多了一个开关「剧情对白也弹进面板」,想开回来随时开。
升级须知
- 版本号
1.4.3 → 1.4.4。覆盖Mods/里那个WheatStook.dll即可(顺便换掉manifest.json),重开游戏生效。 - MCP 桥不用动:这次改的全在 mod 里,
14159那个 Python 桥进程不用重启。 v1.4.2(联机夜晚卡死 + 桥默认端口改 14159)和v1.4.3(节日死锁)的说明在各自的 Release 页面。
v1.4.2
修复:联机时夜晚卡死
- farmhand 的日结自动确认不再点击「准备睡觉」握手框 —— 联机时那一下会把夜晚卡住,房主那边也跟着一起等。
- 新增诊断心跳:定期把
tick/ 游戏内时间 / 是否在床上 / 当前菜单 / 重复确认次数写进日志。下次再卡,直接看日志就知道卡在哪一步。
变更:MCP 桥默认端口 8000 → 14159
8000= irdmi,而且是 uvicorn / FastAPI / Docker / MCP 工具链的常见默认值 —— 本机实测已被另一个部署抢过端口。14159在 IANA 官方端口表里未分配,>1024 且不在动态端口段内(正好也是 π,和 token3.14159265同一个梗)。- 涉及
mcp_bridge/、ModConfig.cs、config.example.json与各 README。 ⚠️ 升级后请同步改客户端里的地址,否则连不上。
v1.4.1
⚠️ 端口已在 v1.4.2 改为14159(8000= irdmi,本机实测已被另一个部署占用),下面写的是 1.4.1 当时的默认值。
修复:不再掐断 Operit 的回复流
HttpClient.Timeout原来写死 60 秒,而且它连读取 SSE body 一起计时 —— AI 还在写就被 mod 自己切断,回复直接丢。- 改为:连接超时 15 秒(服务器不通快速失败),回复流不限时;新增
operitReplyTimeoutSeconds(0 = 不限,默认)。 - 新增
operitHistoryFallback(默认开):流没给出assistant_done时,轮询GET /api/web/chats/{id}/messages把新回复捞回来,并去掉<think>块。
背景(实测)
Operit 对冷启动的 agent 会报 Timed out while waiting for response stream 并关流,但它随后照样回答了。消息从来没丢,丢的是"读回复"这一步 —— 所以加了这层历史捞回。
v1.4.0
对话选项也交给 AI 临时决定
dialogueChoiceMode = "ai"(默认):带选项的对话(NPC 提问、商店问答)把选项报给 AI,等professionTimeoutSeconds秒。- 超时默认第一项,保证对话不卡死;也支持
first/random/off(留给真人点)。 - 新增
GET/POST /dialogue端点 +wheatstook_dialogue工具。 - 面板与日志都会显示:
【对话】[0] 你好 / [1] 走开→对话选项: 选了「你好」(AI 决定)。
修复
OperitChatClient之前静默吞掉event:error,读回复失败时完全无声;现在记警告。
v1.3.0
5/10 级职业二选一交给 AI 临时决定
professionMode = "ai"(默认):把两个选项连同技能/等级报给 AI,等professionTimeoutSeconds秒。- 超时兜底随机选一个,保证夜晚绝不卡死;也支持
left/right/random/off。 - 新增
GET/POST /profession端点 +wheatstook_profession工具 +AiNotify推送通道。 - 日志与面板都会写明选了哪个、是谁决定的:
职业选了 农场主(AI 决定)/(配置 random)/(AI 没回话,随机决定)。
v1.2.0
日结界面自动点(技能升级 / 职业二选一 / 卖货结算)
farmhand 睡下后这些界面会卡住夜晚,而房主无法替另一个玩家点。
LevelUpMenu(确定 / 职业选择)、ShippingMenu(多页结算)、ConfirmationDialog、DialogueBox。- 只在日结窗口内动作(
isInBed、/sleep后 30 秒,或界面出现时自动续期),20 tick 冷却防连点 —— 平时开箱子、逛商店的菜单绝不会被误点。 - 新增
autoConfirmDayEnd配置(默认开)+POST /autoconfirm+wheatstook_autoconfirm工具(可随时开关,不用重启)。
本区间还包含 1.1.0 之后未单独发版的修复
(当时 manifest 版本号仍是 1.1.0)
- 过夜/睡觉改走真正的床交互(修「晚上都睡了没渡过夜晚」)
/chat改走原版玩家聊天广播(修「消息只在 CMD 显示」)- 游戏内聊天面板支持中文输入(IME)
ForceWarp:手工换 location —— 实测Game1.warpFarmer对 farmhand 完全无效/warp支持location=home别名(小屋真名是 UUID)inBed时拒绝/move;/awake先下床再清标记- NPC 对话、
area批量收割/浇水、地面掉落物识别 - 记忆(
/memory)、送礼反应(/react)、事件包装、N 网尾号→链接 /status版本号改读 manifest(不再硬编码)
v1.0.0
首个公开版本
麦垛 WheatStook —— 联机 AI 聊天 + AI 控制 farmhand 的 SMAPI 模组。
- 干净重写为麦垛 WheatStook(原框架 NagiBridge 的上游遗留代码已全部移除)
- 兼容层 / 行为层(
CompatRules.json) /ctx方块地图- shop / buy 端点
- 联机 host/farmhand 角色端口 + MCP 桥(游戏内聊天 & AI 控 farmhand)
- 游戏内聊天面板、farmhand 移动 / 交互 / 耕种控制
说明:此 tag 指向 clean-room 重写完成的提交。版本号
1.0.0在 manifest 中覆盖了从项目初始化到 v1.1.0 之前的全部工作。
v1.1.0
WheatStook v1.1.0 — in-game AI chat + AI-controlled farmhand (co-op)
Ships with a compiled
WheatStook.dll— just unzip and use, no build required.This release includes two archives:
WheatStook.zip— the mod itself. Unzip the wholeWheatStook/folder intoStardew Valley/Mods/.WheatStook-mcp_bridge.zip— the Python bridge for co-op AI (server.py+client.py+launcher.bat+gen_token.bat+scripts/mods_keybinds.json). Unzip it locally — it is not installed into Mods; it runs on your PC.
New since v1.0.0
- Renamed NagiBridge → WheatStook (麦垛): packaging, manifest and README aligned; the compat
CompatRules.jsoncomments updated too. - AI-farmhand bridge: honest + expanded:
get_stateis light by default; a newget_state_fulldoes the full read (inventory/buildings/mods/teleports/enchantments) only when explicitly called (saves tokens, keeps the AI from being distracted by irrelevant data).inventory: reads one row (12 slots), injecting the in-game time + local map at the same time; labels the equip hotkeys (1-9,0) and how to switch rows (row=N) — Stardew has no hotkey to switch inventory rows, stated honestly.wheatstook_selftest: server binding / config / mod count / memory / compat + bridge-channel status, for the AI to self-diagnose.- Coordinate chunking: any returned coordinate carries precise (x,y) + the chunk coords + the sub-position inside that chunk (chunkSize defines the grid).
dropnow really drops on the ground (Game1.createItemDebris) and can be picked back up by walking over it — no more silent consummation.- In-game chat is visible: the AI's
chatmessages go through the mod's own ChatHud panel (drawn on the current viewport) and auto-open, replacing the vanillaGame1.chatBoxwhich only rendered in one player's viewport (so you couldn't see it before). - Every response now carries
timeOfDay/gameTime; thesend_ingame(host 58331) vschat(farmhand 58332) channel distinction is explicit.
- Fixed a batch of AI timing/truthfulness issues:
handle_tool/handle_select/handle_move/follow/areaok/used/found/steps are now computed synchronously or return "accepted/queued" (they used to report false);findModDirhas per-folder try/catch; GMCM uses the real API. - Auto-compat layer: data-driven
CompatRules.json+enableAutoCompatdetection by UniqueID (extra ring slots / bigger backpack / custom crops / new regions / professions); the active list is written into /state. - keybind: a static
scripts/mods_keybinds.json, re-read on every query (not once per startup); added Joja Express, removed the dead FA F6. - Mod knowledge base / long-term memory / auto-reaction layer: on-demand queries of installed-mod behavior,
wheatstook_memmemory, a short daily-morning briefing.
Install
- Install SMAPI (Stardew Valley 1.6+ / SMAPI 4.0+).
- Unzip
WheatStook.zip, put theWheatStookfolder intoStardew Valley/Mods/. - Launch the game via SMAPI.
Co-op + AI (advanced, optional)
Both instances (host / farmhand) share one config.json — copy from config.example.json, minimum:
{
"Mode": "operit",
"HostPort": 58331,
"FarmhandPort": 58332,
"OperitBridgeUrl": "http://127.0.0.1:8000",
"OperitBridgeToken": "<shared token>"
}Unzip WheatStook-mcp_bridge.zip, double-click launcher.bat to start the bridge (server :8000 + client), then point operit at http://<PC-LAN-IP>:8000/mcp (Authorization: Bearer <token>). Run gen_token.bat once to create token.txt. See the repo README for full details.
Platform
Windows / macOS / Linux.