Skip to content

Any game: a Yumina mod for a game that has no Yumina support yet ​

This is the path for a game whose developers haven't added Yumina: you (or the AI you work with) read the game, write a small mod that lets the player talk to its characters, and the characters can do a few real things in the game. It was written from three runs where an AI built such a mod alone, for a Lua game (31 min), a Unity game (35 min) and an Unreal 5.4 game (40 min); with this tool and template a fresh AI did the Unity game again in 25 minutes. Everything below is something one of them had to find out the hard way.

Only for single-player games you own. Never for a game with anti-cheat (EasyAntiCheat, BattlEye, GameGuard…): players get banned. yumina-mod detect refuses those.

What you build ​

  1. A key (or a dialogue option) lets the player type their own words to a character who is on screen.
  2. The words go through Yumina with a card for that character, built from the player's own copy of the game at runtime (name, description, a few of its real lines). Nothing from the game ships in the mod.
  3. The reply shows in the game, best in the game's own speech bubble or dialog.
  4. A few manifest actions the game really performs (money, an item, healing, a discount, how the character feels about the player), reported back, and refused when the game's rules say no.
  5. Memory follows the save: load an older save and the characters remember only what happened before it.

The part that is truly the game's own is small: 350 to 450 lines in all three runs.

The Mod Workshop: let an AI do it ​

yumina-mod workshop opens a window that lists the Steam games on the PC, says which ones it can make a mod for, and lets the player pick who does the work:

  • Yumina's AI: nothing to install. Each step goes through Yumina (POST /api/ai/v1/agent/completions) and is paid in the player's mushies at the Studio assistant's rate, with a spending limit the player sets.
  • Their own Claude Code: started headless with only the tools below, no mushies.
  • Any other AI with MCP (Codex, Cursor, Claude Desktop): the window shows the server to add and the first message to send.

Whoever does the work gets the same tools, yumina-mod mcp --game "<game folder>": prepare (record, back up, decompile, install the loader, start the project), read and search the code, write the mod, build, launch, the test bridge, screenshots, finish. The AI writes only inside the mod project; a workshop mod's own code is checked when it builds (no network, other programs, registry, writing files, loading other code, native or unsafe code). Workshop mods share one client (yumina-workshop), send their manifest with each turn and sign in through the PC's browser, so the player registers nothing. Every call lands in the work folder's activity.jsonl, which the window shows; finish builds the mod for play, puts the saves back as they were before testing, and leaves the mod installed. The window's "Remove" takes it out again.

The tool: yumina-mod ​

The SDK's tools/YuminaMod does the steps that are the same for every game. Build it once with dotnet build tools/YuminaMod -c Release.

StepCommand
What engine, which save folder, Steam id, anti-cheatyumina-mod detect "<game folder>"
Record the game folder before touching ityumina-mod snapshot "<game>" --out <work>\before.json
Back up saves and settings (Unity: LocalLow + PlayerPrefs)yumina-mod backup-saves "<game>" --work <work>
The game's code, to readyumina-mod decompile "<game>" --out <work>\code
Install the mod loader (Unity Mono: BepInEx 5, pinned and checksummed)yumina-mod install-loader "<game>" --work <work>
A mod project from the templateyumina-mod new "<game>" --out <work>\mod --name "<Mod name>" --client ym_… --base <Yumina address>
Build, copy into the game, test bridge onyumina-mod build <work>\mod --dev (--restart closes the game first and starts it again)
Start / close the gameyumina-mod launch "<game>" --windowed (--direct if Steam shows a launch options dialog) · yumina-mod stop "<game>"
Drive the running mod without the window in focusyumina-mod dev "help", dev "people", dev "talk 0", dev "say …" --wait (returns the reply), dev "transcript", dev "recall <character id>", dev "log", dev "shot C:\…\a.png"
Put everything backstop → uninstall-loader --work --forget-signin → restore-saves --work → verify "<game>" --snapshot <work>\before.json

Unity Mono (64-bit) is supported end to end today. For other engines detect says what it found; the sections below say how the three runs did it.

The order that works ​

  1. detect, snapshot, backup-saves. Nothing else before these.
  2. Register the game on Yumina (Developer → Register a game or mod; one account can have 10, delete an old one first if it's full). new writes a yumina-manifest.json to start from; it is built into the mod and sent with each turn while the game is in development, so you can change it without saving it on Yumina each time. Write the manifest: the inputs the game will send each turn and two or three actions the game can really do. Keep actions few and concrete. Use conditions (when) for the game's rules where you can, blocked with a reason for rules only the game knows.
  3. decompile and read. You are looking for: who is on screen now (a battle's enemies, a shop's keeper, an NPC in dialogue), where their name, description and lines are (often a localization table: read it in the game's current language), the player's money / items / health and the functions the game itself uses to change them, the save and load functions, and the input handlers (to keep the game's hotkeys quiet while the player types).
  4. install-loader, new, fill in GameAdapter.cs, build --dev, launch.
  5. Sign in once: dev "signin" gives the URL a phone would open; open it signed in to Yumina and allow.
  6. Test every point through the bridge, with screenshots: a reply in the game, each action applied (check the number changed in the game's own UI), each refusal (a rule, a used-up limit), memory after save, quit and load. Mark every shortcut you take for testing (setting an enemy's health, skipping a fight) as a shortcut.
  7. Put everything back and verify. Delete dev-bridge.on before anyone else gets the mod.

What the three runs learned ​

Starting the game. Running the exe of a Steam game directly often makes Steam restart it, and the second copy says another is already running: launch through Steam (launch). Some games show a Steam launch options dialog (DirectX 11/12) that automation can't click: close it and use --direct, which runs the exe with SteamAppId set.

Input. Keys and clicks posted into a game window don't reach most engines (SDL, Unreal input) unless the window has focus, and taking focus disturbs the person using the PC. Drive the mod through its own test bridge instead (the template has one, off unless dev-bridge.on exists), and call the game's own functions for test shortcuts.

Unity: the mod must survive the first scene change. Many games destroy BepInEx's manager object, and the plugin's Update with it: the template puts everything on its own object (DontDestroyOnLoad, HideFlags.HideAndDontSave).

Characters' ids must survive a load. Use the game's content id (a card tag, an enemy key), never an object's instance id: those change every load and the character forgets everything.

Where the reply goes. Best: the game's own speech bubble or dialog box (enlarge it for long lines). A game with no dialogue at all (a card game) still has some popup with a text field (a naming dialog worked). The template's IMGUI window works everywhere as a fallback.

Memory and saves. Keep the memory head per save slot in a small file next to the mod (MemorySidecar in the template): commit it when the game writes a save, restore it when the game loads one. Games often have several slots and "Continue" may load a different one than you expect (This Turn vs GameSave): hook the engine's save and load calls, not a menu button.

Unreal (UE4SS, Lua). Pick the UE4SS build for the game's UE version (detect shows it; 5.4 needed an experimental build). UE4SS Lua can't make HTTPS calls: run Yumina Link next to the game and use its file drop-box (<id>.yumina-request.json → <id>.yumina-response.json, polled each tick). Hook the game's save functions (GameplayStatics:SaveGameToSlot / LoadGameFromSlot). Refresh the game's own widgets after changing a value (an attribute change alone didn't redraw the gold counter).

Lua games with official mods (Klei). The mod folder the game's own comment names may be wrong: look for the folder the engine really reads (steam-<id>\mods). The game's HTTP may give up after a few seconds while a turn takes 5–10: use Link's file drop-box.

Steam Cloud. While you test, Steam may upload the session's saves. After restoring the local files, tell the player: if Steam reports a cloud conflict next time, choose the local files.

The manifest, from experience ​

A condition (when) is { "input": "<an input id>", "reason": "…" } plus one of "min", "max" (number inputs), "is" (equals) or "in" (one of a list); all of an action's conditions must hold for it to be on offer. onlyWhenAsked: true keeps a character from doing it unasked.

  • Two or three actions the game can do in one call each. Money with a range (min/max), items as an enum the game narrows each turn (allow with Only), relationship one step at a time with a per-period limit.
  • Conditions the game sends as inputs (hp_below_half, relationship) so Yumina checks them every turn and the character declines in its own words.
  • An action that is allowed may be done unasked (a wall "mended the town" twice without being asked): describe each action as something the character does when the player asks or earns it.
  • Limits count per character: a new character id starts a fresh count.

Checking it really works ​

  • Refusals rarely show as rejected. An action a condition or a limit rules out isn't offered at all, so the character declines in its own words and proposes nothing. Check the developer console's turn log: each turn lists the actions not offered and why, and what the game sent as blocked.
  • Memory: ask neutral questions ("Have we met?", not "You remember my red die, right?"): a model plays along with a leading question even when it remembers nothing. Check with dev "recall <character id>", which shows what Yumina keeps for that character in the current save.
  • Roguelikes: a save made mid-fight may carry the random state, so after loading you may never meet the same character again. Save where the game itself saves (leaving a map node), or check memory with recall.
  • Unity hotkeys: the keys to silence while the player types are usually read with Input.GetKeyDown in several different Update methods: search the decompiled code for it and patch each one (return !GameAdapter.Typing).
  • The game's own speech bubble is sized for its short lines: measure the text (TMP_Text.GetPreferredValues), grow the background, text box and tail together, and keep it up longer for longer lines.