Skip to main content

Simple Mod

The game automatically registers its install path. If your game isn't detected, make sure you've launched it at least once after installing.

Prerequisites

Make sure you have:

  • Delivery & Beyond installed
  • Visual Code or JetBrains Rider
  • At least .NET 8.0 SDK

Enabling console for mod development

Go inside BepInEx/config folder and edit the file BepInEx.cfg
Locate [Logging.Console] and set Enabled = false to Enabled = true

[Logging.Console]

## Enables showing a console for log output.
# Setting type: Boolean
# Default value: false
Enabled = true

Github Template

Use the following github template to start modding or follow the project setup

https://github.com/edunad/delivery-beyond-mod-template

Project Setup

1. Create a New Project

Create a new Class Library project targeting .NET Standard 2.1:

Note that 6000.3.3 can change in the future, as it's the unity version the game currently targets. These can be found on https://nuget.bepinex.dev/packages/UnityEngine.Modules

dotnet new install BepInEx.Templates --nuget-source https://nuget.bepinex.dev/v3/index.json
dotnet new bepinex5plugin -n MyFirstMod -T netstandard2.1 -U 6000.3.5

2. Add Game References

To access game APIs, add the game assemblies (and any others you require) to your .csproj:

<PropertyGroup>
<DeliveryBeyondDir>$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\Software\HyenaQuest\delivery-beyond', 'InstallPath', null, RegistryView.Registry32))\</DeliveryBeyondDir>
</PropertyGroup>

<ItemGroup>
<Reference Include="HyenaQuest.Core">
<HintPath>$(DeliveryBeyondDir)delivery-beyond_Data\Managed\HyenaQuest.Core.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="HyenaQuest.Gameplay">
<HintPath>$(DeliveryBeyondDir)delivery-beyond_Data\Managed\HyenaQuest.Gameplay.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="HyenaQuest.MainMenu">
<HintPath>$(DeliveryBeyondDir)delivery-beyond_Data\Managed\HyenaQuest.MainMenu.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Unity.Netcode.Runtime">
<HintPath>$(DeliveryBeyondDir)delivery-beyond_Data\Managed\Unity.Netcode.Runtime.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>

3. Configure Plugin Info

The template generates MyPluginInfo.cs with default values. Update it with your details:

namespace MyFirstMod;

public static class MyPluginInfo
{
public const string PLUGIN_GUID = "com.yourname.myfirstmod";
public const string PLUGIN_NAME = "My First Mod";
public const string PLUGIN_VERSION = "1.0.0";
}

The PLUGIN_GUID should be unique. Use the format com.yourname.modname to avoid conflicts with other mods.

4. Code Your Mod

Open Plugin.cs:

using BepInEx;
using BepInEx.Logging;

namespace MyFirstMod;

[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin
{
internal static new ManualLogSource Logger;

private void Awake()
{
Logger = base.Logger;
Logger.LogInfo($"Plugin {MyPluginInfo.PLUGIN_GUID} is loaded!");
}
}

Building Your Mod

Build your project to generate the .dll file:

dotnet build -c Release

Your compiled mod will be in bin/Release/netstandard2.1/.

Client vs Server Detection

Since Delivery & Beyond uses peer-to-peer networking, you'll often need to check whether code is running on the server or client:

if (NETController.Instance.IsServer)
{
// Server-only logic
}
else
{
// Client-only logic
}

The host runs both server and client simultaneously. IsClient will be true on the host, so always use IsServer to determine authoritative logic.

Next Steps

Example Mods