FRUKT Mods: How to Install and Make Your Own

FRUKT mods run through MelonLoader. Installing them takes three steps: install MelonLoader into the game, launch FRUKT once so the loader can prepare itself, then drop mod .dll files into the Mods folder. Making your own mod uses the same loader plus Visual Studio and .NET 6.0, and the sections below take you from an empty project to a mod that prints a message in the console.

The short version:

  • To play with mods: install MelonLoader, start the game once and wait, then copy each mod and its dependencies into FRUKT\Mods.
  • If the game breaks: remove the mod you added last. If that fixes it, report the bug to whoever made the mod.
  • To make a mod: create a .NET 6.0 project in Visual Studio, point it at the MelonLoader files in your FRUKT folder, and write a class that inherits from MelonMod.

Where to find FRUKT mods

Mods are shared on the FRUKT Discord server. You can join it straight from the game’s pause menu.

Install MelonLoader

Download MelonLoader from its GitHub releases page, which is the only official place to get it: github.com/LavaGang/MelonLoader/releases. Take the latest release for your system.

Run the installer. FRUKT should appear in its list of games as “FRUKT Demo” (that is how it was listed at the time of writing). Select it. If it is missing, add the game by hand using the option at the bottom of the list. Either way, the installer tells you when it has finished.

First launch: let MelonLoader build its assemblies

Mods will not work yet. Start FRUKT once with MelonLoader installed and leave it alone. On this first start the loader goes through the whole game and generates the assembly references that mods need in order to run at all.

This takes a minute on a fast PC and several minutes on a slower one. Let it finish. If it fails here, see the troubleshooting section below.

Add mods to the Mods folder

After that first launch, the FRUKT install directory has a Mods folder. To open the directory, right-click FRUKT in your Steam library and choose Manage, then Browse local files. On a default Steam install the folder is C:\Program Files (x86)\Steam\steamapps\common\FRUKT\Mods. If you installed Steam games somewhere else, Browse local files takes you to the right place.

Every mod is a .dll file. Put it in FRUKT\Mods along with any dependencies the mod lists, then launch the game.

Mods not working: troubleshooting

There are two likely culprits.

MelonLoader itself. A lot can go wrong with a mod loader, and the common problems all have known fixes. The MelonLoader wiki at melonwiki.xyz covers missing requirements, missing permissions, antivirus interference and more, with steps for each. Check it before anything else.

A specific mod. Mods are made by players, and a mod that runs fine on its maker’s PC can still break on yours. If FRUKT refuses to start or starts behaving strangely, take out the mod you installed most recently and try again. If the problem goes away, that mod is the cause, so let its creator know.

Are FRUKT mods safe?

The developer of FRUKT is clear that mods are used at your own risk and that they cannot vouch for the safety of any mod. Before you install one, scan the file with VirusTotal or a similar service.

If you think a mod shared on the Discord contains malware or a virus, contact the FRUKT developer right away. If the report is confirmed, the mod’s creator is blocked.

What you need to make a FRUKT mod

ToolWhat it is for
MelonLoaderLoads your mod. Your project builds against its files
Visual Studio Community 2022Writing and building the mod. Only the .NET workload is needed. Installer: aka.ms/vs/17/release/vs_community.exe
.NET 6.0 runtimeThe framework the mod targets at the time of writing. Pick the .NET 6.0 runtime component when the installer offers it
dnSpy v6.1.8, 64-bit .NET build (optional)Viewing the game’s code when you want to explore what to change. Not needed to build a mod. Your project can use that code but does not show it to you. Get it from github.com/dnSpy/dnSpy/releases/tag/v6.1.8

Install MelonLoader into FRUKT and run the game once before you start. The project below references files that only exist after that first launch.

Create the project in Visual Studio

  1. Open Visual Studio and start a new project.
  2. Type class into the template search and pick the class library template, the one that gives you a Class1.cs file to start with.
  3. Set the framework to .NET 6.0.
  4. Once the project is open, delete Class1.cs. You will not need it.

Set up the project file

Open the project’s .csproj file and replace its contents with the following. It targets .NET 6.0, references MelonLoader, Harmony and the game assemblies MelonLoader generated, and copies your built mod into the Mods folder after each build. FRUKT is an Il2Cpp game, which is why the Il2Cpp interop libraries and the Il2CppAssemblies folder are in the list. The MelonLoader\net6 paths are MelonLoader’s folder layout at the time of writing.

Change the FruktDir line to wherever FRUKT is installed on your PC, without a backslash at the end. The value shown is the default Steam location. If yours differs, Browse local files in Steam shows the real folder.

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <!-- Your FRUKT install folder, no backslash at the end -->
    <FruktDir>C:\Program Files (x86)\Steam\steamapps\common\FRUKT</FruktDir>
    <MLDir>$(FruktDir)\MelonLoader\net6</MLDir>
    <TargetFramework>net6.0</TargetFramework>
    <Nullable>disable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
  </PropertyGroup>

  <!-- Reference the game and loader without copying them into your build -->
  <ItemDefinitionGroup>
    <Reference>
      <Private>false</Private>
    </Reference>
  </ItemDefinitionGroup>

  <ItemGroup>
    <Reference Include="$(MLDir)\MelonLoader.dll" />
    <Reference Include="$(MLDir)\0Harmony.dll" />
    <Reference Include="$(MLDir)\Il2CppInterop.Runtime.dll" />
    <Reference Include="$(MLDir)\Il2CppInterop.Common.dll" />
    <!-- The game assemblies MelonLoader generated on first launch -->
    <Reference Include="$(FruktDir)\MelonLoader\Il2CppAssemblies\*.dll" />
  </ItemGroup>

  <Target Name="CopyModToFrukt" AfterTargets="Build">
    <Copy SourceFiles="$(TargetPath)" DestinationFolder="$(FruktDir)\Mods" />
  </Target>
</Project>

Save with Ctrl + S. Your project now has access to the game’s code, which is what lets you write a mod against it.

Write Patches.cs

Add a new class to the project named Patches.cs. This file holds your mod’s main class, the one MelonLoader loads. Give it this content:

using MelonLoader;

[assembly: MelonGame("tripledose", "FRUKT")]
[assembly: MelonInfo(typeof(FirstFruktMod.Patches), "First FRUKT Mod", "1.0.0", "YourName")]

namespace FirstFruktMod
{
    public class Patches : MelonMod
    {
        public override void OnInitializeMelon()
        {
            LoggerInstance.Msg("First FRUKT Mod is loaded!");
        }
    }
}

The two assembly lines register the mod with MelonLoader. MelonInfo holds the mod’s name, version and author, so swap the name and YourName for your own. MelonGame names the developer and the game the mod is for. Copy those two values exactly as shown. The MelonLoader installer lists the game as “FRUKT Demo”, but at the time of writing the install folder and the game name the mod declares are both plain FRUKT.

Test your first mod

Build the project. The .dll is copied into FRUKT\Mods for you. Launch FRUKT and watch the MelonLoader console. If the line First FRUKT Mod is loaded! appears, the mod loaded and you have a working FRUKT mod to build on.