Skip to content

Creating Mods

Terria Katsura edited this page Dec 12, 2025 · 20 revisions

Project Setup

Prerequisites

  • FortRise
  • .NET 10.0

Setup

This section will helps you how you can setup your mod in both Visual Studio or in the CLI.

Visual Studio:

  • Open Visual Studio.
  • Create a new project.
  • Select the template Class Library.
  • Name your mod and select a path.

Dotnet CLI:

  • Create and/or open any folder.
  • Open your command prompt.
  • run dotnet new classlib to create a class library.

After you initialized your project.

  • Create a file called meta.json text file with the following content:
{
	"name": "<You>.<YourModName>",
        "displayName": "<Your Mod Display Name>"
	"version": "1.0.0",
	"author": "<You>",
	"description": "A very awesome mod created by you",
	"dll": "Path/To/Your.dll",
        "dependencies": [
             {
                   "name": "FortRise",
                   "version": "5.0.0"
             }
        ]
}

After creating the meta.json, you need to edit your project's csproj to add an additional package:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
  </PropertyGroup>

+ <ItemGroup>
+   <PackageReference Include="FortRise.Configuration" Version="1.5.6" />
+ </ItemGroup>

</Project>

The package will locate possible FortRise installation such as Steam's game path, should be close to your TowerFall's game installation. If it cannot find it, you could manually override the path location.

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net10.0</TargetFramework>
    <Nullable>enable</Nullable>
+   <ModLoaderPath>path/to/FortRise</ModLoaderPath>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="FortRise.Configuration" Version="1.5.6" />
  </ItemGroup>

</Project>

Your Mod

In FortRise, you will create a mod using the Mod class to begin with.

See most of the examples here.

using FortRise;
using TowerFall;
using Microsoft.Extensions.Logging;

namespace ExampleMod;


public class ExampleModModule : Mod
{
    public static ExampleModModule Instance = null!;

    public ExampleModModule(IModContent content, IModuleContext context, ILogger logger) : base(content, context, logger)
    {
        Instance = this;
       // This is where you register a lot of features such as custom arrows, variants, pickups, etc..
       // use context.Registry for adding new feature to the game.
       // This is also where you hook methods from the game.
       // use context.Harmony for hooks.
    }
}

When you're done, go to the Mods folder. It should be in the root of FortRise directory. If you can't see one, create one. Create a new directory that should be the name of your mods, then put the mod in that folder.

File Hierarchy Example:

Mods
L ExampleMod
  L ExampleMod.dll
    meta.json
L blacklist.txt

Launch the game, and the mod should appear in to the mod list!

Clone this wiki locally