Build a Valheim city-building mod with Claude
The author used Claude to write C# code and remote command files to control the game, transforming Valheim into a city-building simulator. The mod features Viking residents, taxes, NPC needs, boss fights, and performance optimizations, and is available for free on Nexus and Thunderstore.
Reddit r/ClaudeAI/u/Any-Explanation3814
ClaudeBepInExHarmonyNexusThunderstore
Added 2026-10-31 · originally published 2026-10-26
Steps
- 1Design the core gameplay of the mod, such as Viking residents, tax collection, dietary needs, and boss fight mechanics.
- 2Use Claude to write C# code, integrating with the BepInEx framework and Harmony patches to hook into the game systems for resident AI, economic systems, and automated building construction.
- 3Have the AI control the game via remote command files to automatically build towns, take screenshots, inspect visuals, and fix issues independently.
- 4Handle bug fixing by feeding tester feedback—such as boss pursuit issues and NPCs getting stuck—to Claude to diagnose and fix all at once.
- 5Perform performance optimization by writing in-game benchmarks to measure frame rates under varying building counts, using techniques like mesh merging to boost FPS.
Copy-ready prompt
Please help me write a C# script that integrates with the [BepInEx framework] and [Harmony patches] to implement the following game mod features: [describe the AI, economic, or building systems you want to add to the game]. Also, write a remote control mechanism that allows the program to control the game for testing, taking screenshots, and fixing code issues.
#Claude#AI Programming#Game Mod#C#
Related use cases
Summarized by AI from the original source - refer to the original post for details. Copyright belongs to the original author.