Skip to content

01 ‐ Setup development environment

Distractic edited this page Jan 20, 2024 · 2 revisions

Wiki

First of all, follow lethal.wiki to have a working development environment.

Dotnet version

Note

.NET 7 SDK is recommended to build the project.

If you need to set the dotnet version, you can use the following command:

  • Command to list the installed SDKs:
dotnet --list-sdks
  • Command to set the dotnet version:
dotnet new globaljson --sdk-version <version>

# Example
dotnet new globaljson --sdk-version 7.0.405

A new global.json file is created to set the SDK version to use.

Tools

You need to install the following tools to use the project:

Configuration

The build configuration properties are findable in the PropertyGroup section of the files.

Common

The common build configuration is defined in the Common.props file. It's applied to Template and Test projects.

Property Description
GameDir The directory where the game is installed
PluginGameDir The directory where the plugins are installed
AssemblyGameDir The directory where the assemblies are installed
GameExe The name of the game executable

Plugin

Note

The configuration inherits from the common configuration.

The plugin build configuration is defined in the Template.csproj file. It's applied only to Template projects.

Property Description
NumberOfClients The number of clients to launch when the project is built
DelayBetweenClientsInSeconds The delay between the start of each client. This is recommended to be between 5 and 10 seconds to avoid problem with BepInEx terminal and auto-start mods
StartGame If true, the clients will be started when the project is built
BuildThunderstorePackage If true, the Thunderstore package is built when the project is built

Simplify in-game test

To start the game automatically when a client is launched, you can install an auto-start mod like AutoStart.

Clone this wiki locally