Stardew Valley: a mod on the Yumina kit
You don't write a Stardew mod from scratch. Yumina has a Stardew kit (Yumina.Games.Stardew), and the developer console makes a SMAPI project from your game's manifest that builds and plays as it is.
From the console to the game
- Register the game. Developer → Register, kind "mod", and Stardew Valley's Steam link (
steam:413150). - Write the manifest. Manifest → Start from a template → "Stardew Valley (Yumina kit)". The kit knows every input and action in it. Change what you like: what villagers may give, from how many hearts (each action's "When it's on offer"), how often.
- Try it. Talk to a villager in Try it and check the lines and the actions.
- Download the starter project. Code → Download the starter project. Unzip and run
dotnet build <Project>: it installs into the game's Mods folder. - Play. Start the game with SMAPI, load a save, face a villager and press Q. The first time, the player signs in (one click in the browser), or picks a provider in the settings and pastes their own API key.
- Submit for review from Overview when it's ready; once approved, every player can sign in.
What the kit does
- The game's own UI: Stardew's text box, dialogue box and question menu; gifts from the game's backpack grid; settings drawn like the game's menus.
- Easy to find: a section at the top of the Options tab, F9, Lewis's letter the day after install, and the talk key in a speech bubble over the villager you face.
- Two ways to play: with a Yumina account (free mushies every month), or the player's own API key: DeepSeek, OpenAI, OpenRouter, Gemini, Claude, Kimi, SiliconFlow, a local Ollama, or any OpenAI-compatible API. Signed in to Yumina, the key goes with each turn (never stored) so memory, action checks and your stats work as usual; signed out, or on a local model, turns run on the player's PC.
- Villager cards from the player's own game: age, manner, birthday, gift tastes and some of their real lines, in the game's language; villagers from other mods work too. No game text ships with the mod.
- Gifts, items, gold and plans to meet follow the game's rules and are reported back to the character; a villager waits where you agreed, and remembers if you didn't come.
- What they remember (a page per villager), help pages, a connection test, Generic Mod Config Menu.
- Memory lives in the save: an older save rewinds what villagers know.
The ids the kit knows
| Kind | ids |
|---|---|
| inputs | player_name, hearts, relationship, date, season, day, year, time, weather, location, holding, gifted_today, first_talk_today, your_birthday_today, festival_today, player_spouse, player_money, farm_name |
| actions | give_item (item: the game's item name, in English or the player's language), give_gold (amount), invite (place: a location's name such as Stardrop Saloon or Beach; hour) |
| output | friendship_delta (capped per day; players can change the cap) |
Any other id in your manifest gets a stub in the starter's ModEntry.cs:
var valley = Valley.Start(this, new ValleyOptions { ClientId = "ym_…", Name = "My Mod" });
valley.Input("quest_board", npc => Game1.player.questLog.Count); // an input of your own
valley.Action("teach_recipe", ctx => // an action of your own
{
string recipe = ctx.Action.Text("recipe");
Game1.player.cookingRecipes.TryAdd(recipe, 0);
ctx.Report(true, "the player learned " + recipe);
});Put rules in the manifest where you can (an action's "When it's on offer") rather than in code: Yumina checks them every turn, and the character declines with your reason.
Let players change it without code: content packs
Add a packs block to the manifest and the game page offers "Make a content pack": players write who villagers are and what the whole town knows, set each action on or off, how close you must be, which items and how much money, try it in the browser, and download one folder for Mods. The kit reads every content pack in Mods whose ContentPackFor is your mod (yumina-pack.json): the words go into the villager's card, the rules into each turn's allow / blocked. A pack can only narrow; it can't add actions your manifest doesn't have.
"packs": {
"loader": "smapi",
"modId": "your mod's UniqueID",
"characters": [{ "id": "Abigail", "name": "Abigail", "names": { "zh": "阿比盖尔" } }]
}characters are the people the editor offers, by the game's internal name (NPC.Name). A manifest change is reviewed like any other.
Reference
examples/stardew-valley/YuminaValley in the SDK repo is the kit plus a manifest and nothing else; the kit's source is dotnet/Yumina.Games.Stardew.
