This guide walks you through everything you need to get TerbinService built, configured, and running on your machine. By the end you will have a live named-pipe background service ready to accept connections from mod manager clients or from the bundled SimulateClient test harness.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/FarlandsModdingTeam/TerbinProyect/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure the following are installed and available on yourPATH:
- .NET 8 SDK or later — TerbinService targets
net8.0. Download from dot.net. - Windows — Named pipes (
System.IO.Pipes.NamedPipeServerStream) are the transport layer. Linux support via Proton is available for the game-launch helpers but the service itself is designed for Windows hosts. - Visual Studio 2022 (Community or higher) or the
dotnetCLI — either works for building and running the solution.
Building
Open the solution
Open
TerbinProyect.sln (or TerbinProyect.slnx if you are on a newer SDK preview) in Visual Studio 2022, or stay in the terminal for the next step.Configuration
TerbinService reads its settings from a single JSON file at startup.Location
Default content
Manager.Configuration writes default values automatically — it calls ManagerFarlands.GetRuteSteamFarlands() to auto-detect the Farlands install path via the Steam library registry/VDF, and derives the instance and plugin paths from Environment.SpecialFolder.MyDocuments.
Configuration keys
The constants that correspond to each JSON key are defined inTerbinLibrary.Configuration.TerbinConfiguration.
| JSON key | TerbinConfiguration constant | Type | Required | Description |
|---|---|---|---|---|
rute_farlands | RUTE_FARLANDS | string (path) | Recommended | Absolute path to the Farlands game installation directory (the folder that contains Farlands.exe). Auto-detected from Steam on first run if omitted. |
rute_instances | RUTE_INSTANCES | string (path) | Yes | Directory where Terbin creates and manages game instances. Defaults to <Documents>/TerbinInstances. |
rute_plugins | RUTE_STORAGE_PLUGINS | string (path) | Yes | Plugin storage directory (the central mod cache). Defaults to <Documents>/TerbinStorage. |
rute_steam | RUTE_STEAM | string (path) | Optional | Override for the Steam root installation path. Used by Proton and other Steam helpers when the auto-detection is insufficient. |
rute_proton | RUTE_PROTON | string (path) | Optional | Path to the Proton binary used to launch Windows executables under Linux Steam Play. |
rute_proton_tmp | RUTE_PROTON_TMP | string (path) | Optional | Temporary working directory for Proton operations. |
rute_steam, rute_proton, and rute_proton_tmp are optional on Windows. They are only needed when running instances through Steam Play (Proton) on Linux — see the Steam & Proton guide for details.Reading and writing config at runtime
Manager.Configuration exposes thread-safe helpers for use inside service handlers:
OnChangeConfig event fires asynchronously after every successful write, giving other subsystems a hook to react to path changes without polling.
Running the Service
Development mode (CLI)
Development mode (Visual Studio)
SetTerbinService as the startup project and press F5 (or Ctrl+F5 for without debugger).
As a Windows service
After publishing, register the executable with the Windows Service Control Manager:On startup,
Worker uses reflection to scan both TerbinLibrary and TerbinService for types and members decorated with the [TODO] attribute and prints them to the console. This diagnostic output lets developers see at a glance which features are still pending implementation. It is not an error — it is intentional.Named-Pipe Transport
TerbinService uses Windows named pipes as its IPC mechanism. The pipe name is defined inWorker and the TerbinCommunicator class:
true argument tells TerbinCommunicator to create the server side of the pipe. Clients pass false.
Multi-client model
When a client connects, theOnNewClientConnect callback immediately spawns a fresh pipe instance on a new Task, so that the next client can connect while the current one is being served:
Stopping the service
Send aCodeTerbinProtocol.Stop packet (e.g. via SimulateClient) to trigger a graceful shutdown:
Stop handler responds with a success packet, then schedules IHostApplicationLifetime.StopApplication() after a 100 ms delay so the response is flushed before the process exits.
Verifying the Service is Running
The fastest way to confirm the service is accepting connections is to run SimulateClient:[Client] ¡Error de Conexion! and exits.