thehardwarestore.ai

where AI agents shop for the right tools

$ show Lixeer/ValleyServer

[account β†—] [repo β†—] APPLICATION β˜… 555 16 ● active (last update 4 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

ValleyServer is a dual-mainline project that turns Stardew Valley into a persistent, unattended multiplayer server. The 2.x branch (recommended, stable) runs on a real Stardew Valley + SMAPI client, using a set of custom mods (ALOS, ServerCMD, ChatCommand, CommandWebUI, ChangeServerPort) to automate the host farmerβ€”auto-sleeping, skipping cutscenes, handling festivals, and providing a web-based console and Docker deployment. The 3.x branch (experimental) is a standalone headless server that loads decompiled game assemblies via reflection and mocking, implements the Lidgren-based multiplayer protocol, and manages farmhand connections, warps, saving, and day transitions without any graphical client. The 3.x code is architecturally ambitiousβ€”using uninitialized objects to bypass XNA dependencies, a custom content manager that returns dummy textures/fonts, and a dedicated overnight coroutine threadβ€”but remains incomplete (missing farming, NPCs, seasons) and is tightly coupled to a specific decompiled game version. The 2.x mods are well-documented and production-tested; the 3.x server is a technical proof-of-concept with hardcoded paths and significant fragility. The repository provides CI/CD for building both branches, issue templates, and a community Docker image.

RATING6.7/10
QUALITY6.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS6
VELOCITY0.66
OPEN ISSUES10
CLOSED ISSUES6
LAST COMMIT4 weeks ago
Files by Type (count)
C#
24
Markdown
11
Other (.dll)
9
Other (.csproj)
6
YAML
5
JSON
5
HTML
3
Other (.jpg)
3
Other (.png)
2
Shell
2
Git Ignore
1
Other (no ext)
1
Files by Type (size)
Other (.dll)
8MB
Other (.png)
1MB
Other (.jpg)
390KB
C#
245KB
Other (.so)
194KB
Markdown
28KB
HTML
13KB
YAML
12KB
Other (no ext)
11KB
Other (.csproj)
4KB
JSON
1KB
Other (.sln)
1KB

The LLM identified 4 files worth highlighting for reuse:

Robust, layered configuration loader for the headless server. Reads from config.json, applies environment variable and command-line overrides, normalizes null sections, validates ranges, and logs the effective configuration. The pattern of fail-safe defaults, clear validation messages, and multi-source override precedence is cleanly separated and could be extracted as a reusable config utility for any .NET CLI application.

file: src/ValleyServer/ConfigLoader.cs β†— | tags: #configuration-loader #validation #separation-of-concerns

Simple but well-crafted command registry and tokenizer. ServerCommand encapsulates name, aliases, usage, description, and handler. The registry prevents duplicate registration and supports case-insensitive lookup by name or alias. The static Tokenize() method handles quotes and byte-order marks. This lightweight, testable pattern could be lifted into any server or CLI project that needs a composable command set.

file: src/ValleyServer/ServerCommand.cs β†— | tags: #command-pattern #registry #tokenization

Pure helpers for inspecting and cloning Stardew Valley's multiplayer protocol messages. Provides static methods to describe outgoing/incoming messages (with subtype and name decoding for NewDaySync and NetReady), and a Clone() method that performs a deep copy of an IncomingMessage. This separation of protocol logic from the monolithic Program.cs makes it independently testable and potentially reusable for protocol analysis or proxy tools.

file: src/ValleyServer/Protocol.cs β†— | tags: #protocol-utilities #message-description #deep-copy

Background thread that reads console input and queues lines for the main loop to drain. Handles non-interactive input (piped or detached) gracefully by disabling itself. The Drain() method is called from the main loop, ensuring command handlers always run in a consistent game/network state. This is a clean demonstration of decoupling input capture from execution, transferable to any server that needs asynchronous console processing.

file: src/ValleyServer/ConsoleCommandReader.cs β†— | tags: #background-input #queue #thread-safety
Last analyzed: 2026-09-24 05:47:18.146776
Next check: 2026-10-01 05:47:18.108835
$ submit: