🌱

Crop Optimizer

Farm Forecast HUD & Hover Tooltip|

v1.3.0
Thunderstore Nexus Mods Combined

Crop Optimizer watches your planted crops and gives you two answers at a glance: what is growing, and when. A draggable HUD shows every crop you have in the ground with a running gold forecast at the tier it will roll. Hover any crop in-world and a card pops up with its quality, growth ETA, water and fertilizer status, projected sell value, and the exact tile it sits on.

Everything is soft-integrated. Sun Haven Todo, Birthday Reminder, The Vault, and Haven’s Almanac will pick up Crop Optimizer’s data if they are installed — but Crop Optimizer stands alone without any of them.

Quick Controls

F3
Toggle Crop HUD
Hover
Crop tooltip card (move the mouse onto any crop in-world)
Click HUD icon
Toggle hover tooltips on / off (speech-bubble button, top-right of the HUD header; saved to config)
Drag HUD header
Move HUD; position persists between sessions

Core Features

🌾

Crop HUD

Compact draggable panel that lists how many crops you are tracking and forecasts total projected gold at shop prices. Uses a wood-framed dark card so cream/gold text stays readable over any farm tile.

🔍

Hover Tooltip

Point at any crop in the world: a uGUI card appears with crop name, quality stripe (normal / silver / gold), growth ETA, watered / fertilized / mana-infused state, projected sell value, and the tile coordinate.

Growth ETA

Harmony-patches Sun Haven’s Crop growth callbacks to build a per-crop forecast. ETA short-circuits to ready now when the game flags the crop as fully grown, and reads PercentGrown for fractional progress in between.

Quality Tier Display

Same quality mapping your shop uses — normal, silver, gold — with a matching accent stripe across the top of the tooltip card and a tinted quality line in the body.

💧

Water & Fertilizer Detection

Water status reads directly from TileManager.waterTileMap (the game’s source of truth) and the farmingData dictionary keyed by tile coord, so it stays accurate even when Crop.Position disagrees with the world cell. Fertilizer and mana-infused flags are resolved off the Wish.Crop instance.

🪙

Projected Sell Value

Each tracked crop reports a ∼Xg at shop line using the same quality multiplier the game applies at sale time. The HUD footer rolls up the total across everything you are currently growing.

🎨

Sun Haven uGUI

Dedicated ScreenSpaceOverlay canvas (owned by a persistent runner, so it survives scene transitions), TextMeshPro typography using the game’s default TMP font, drop-shadow-free panels, pixel-crisp 18×18 icons for sprout / water / fertilizer / mana / coin / clock / tile / check.

🧭

Tile Coords & Clamping

Tooltip shows the crop’s grid cell and clamps itself inside the screen — flips left / up when the default below-right placement would overflow. Useful for spotting when farming state, crop instance, and tile data disagree.

🔔

Tooltip Toggle

Speech-bubble button on the HUD header flips HUD.HoverTooltip with a single click — gold bubble on, dimmed with a diagonal slash off. A small hover label on the button always says what it will do, regardless of the tooltip toggle itself.

Soft Integrations

Crop Optimizer detects these mods at load time and hooks in when they are present. None are required.

📝

Sun Haven Todo

Publishes the current crop count and total projected gold as a todo line so you can see it alongside your other tasks.

🎂

Birthday Reminder

Lets the morning briefing flag crops that are ripe on a villager’s birthday so you have a gift candidate ready.

🔒

The Vault

Registers “Projected Value” as a tracked currency so your vault HUD can roll it into its totals.

📖

Haven’s Almanac

Registers an Almanac panel so the unified dashboard and daily briefing can show crop counts, next-ready ETAs, and projected gold from Crop Optimizer.

Stand-alone ready: install just Crop Optimizer and the HUD + hover tooltip work on their own. Add any of the integrations above and data flows into them automatically — no configuration needed.

How It Works

1

Plant & Load In

Install Crop Optimizer in BepInEx/plugins/CropOptimizer/, launch the game, and load a character. The HUD appears at the configured position (defaults to the top-left).

2

Watch the Forecast

As you plant, water, and fertilize, the mod patches into Crop.SetMeta / Crop.Water / Crop.Grow to track every crop instance. The HUD updates automatically.

3

Hover for Details

Move the mouse onto a crop. The tooltip resolves the active gameplay camera, projects the cursor onto the ground plane, and looks up the crop, its quality, ETA, water / fertilizer state, and projected gold.

4

Toggle & Drag

Press F3 to hide the HUD, click the speech-bubble icon to disable hover tooltips, and drag the HUD header to place it wherever it fits your layout. All three preferences persist in CropOptimizer.cfg.

Tooltip Anatomy

Every row on the hover card maps to one piece of live game state. Here is what you are looking at.

🌱

Crop name

Resolved from Wish.ItemDatabase / ItemInfoDatabase by the crop’s item id.

Quality stripe

Normal / silver / gold accent color across the top of the card; same tier the shop pays for.

ETA / Ready

Hours-to-full-grown when growing; “ready now” when FullyGrown is true.

💧

Water

Blue “Watered” when waterTileMap.HasTile returns true; muted brown “Hoed (dry — needs water)” otherwise.

💩

Fertilizer

Green when the crop has fertilizer applied; neutral when not.

Mana-infused

Shown when the Wish.Crop.ManaInfused flag is set.

🪙

Projected gold

“∼Xg at shop” using the same multiplier as MapQualityMultiplier.

🧭

Tile coord

Grid cell the crop resolves to after a nearest-farmingData-key search; handy for debugging “wrong tile” cases.

Configuration

Setting Default Description
General → Enabled true Master on / off for Crop Optimizer. When false, no patches are applied.
HUD → Enabled true Show the Crop Optimizer HUD panel.
HUD → Scale 1.0 HUD / tooltip scale multiplier (allowed range 0.5–2.5).
HUD → PositionX / PositionY 20 / 80 Saved HUD position in pixels; updated automatically when you drag the panel.
HUD → ToggleKey F3 Key to toggle the HUD on / off.
HUD → HoverTooltip true Show the hover tooltip card when the mouse is over a crop. Flip this with the speech-bubble button on the HUD header or edit the config directly.
HUD → HoverTooltipMaxWorldDistance 5 Maximum world-space distance from the cursor that a crop can be and still be treated as “hovered” (allowed range 0.25–16).
Debug → DebugLogging false Enables extra diagnostic logs for crop / tile / water state resolution.

Configuration file: BepInEx/config/CropOptimizer.cfg · also visible live in the BepInEx Configuration Manager.

Compatibility & Notes

BepInEx 5.x

Standard BepInEx 5 plugin targeting net48. Drop the DLL into BepInEx/plugins/CropOptimizer/.

Scene Persistence

HUD and hover canvas are owned by a persistent runner that survives scene loads (game menu → farm → town → back again). No flicker across transitions.

Reflection-Backed

All game-side reads (Wish.Crop, Wish.TileManager, Wish.ItemDatabase) are done via silent reflection with graceful fallbacks — no AccessTools log spam if a member name drifts.

Multiplayer

Client-side only. Crop Optimizer reads the local player’s view of crop state and does not send anything over the network.