Using the broforce‐tools Script - Gorzontrok/Bro-Maker GitHub Wiki

The Broforce-Templates repo provides the broforce-tools (bt) command line tool for creating new projects, managing Thunderstore metadata, and packaging releases.

Installation

Windows / Linux:

pipx install path/to/Broforce-Templates/Scripts

NixOS:

If you're using the Broforce-Templates flake, enable it in your NixOS config:

programs.broforce-tools.enable = true;

Configuration

Run bt config init for an interactive setup that walks you through the main settings. The config file is written to:

  • Windows: %APPDATA%\broforce-tools\config.json
  • Linux: ~/.config/broforce-tools/config.json

You can also edit the file by hand. A minimal config looks like this:

{
  "repos": ["BroforceMods"],
  "defaults": {
    "namespace": "YourName",
    "website_url": "https://github.com/yourname/repo"
  }
}

Creating a New Bro Project

You can run bt create interactively and it'll walk you through the options, or you can provide them on the command line:

bt create -t bro -n "Your Bro's Name" -a "Your Name"

If you want the project created in a different repository than the one you're currently in, use -o:

bt create -t bro -n "Your Bro's Name" -a "Your Name" -o "BroforceMods"

This will:

  1. Copy the bro template files into your repo
  2. Rename all files and references to your bro's name
  3. Create a Changelog.md in the release folder
  4. Copy the BroforceModBuild.targets file to your repo if needed
  5. Optionally set up Thunderstore metadata

Build System

When bt create sets up your project it includes BroforceModBuild.targets, which compiles your bro, copies the .dll into your bro's content folder, and installs the result into your Broforce BroMaker_Storage folder every time you build. You don't need to copy files over by hand.

LocalBroforcePath.props

This is the one file you set up yourself. bt create doesn't generate it because the Broforce install path is machine-specific. Copy the example from Broforce-Templates/Scripts/LocalBroforcePath.example.props into your repo root as LocalBroforcePath.props and edit BroforcePath to match your install:

<Project>
  <PropertyGroup>

    <!-- REQUIRED: Path to your r2modman Broforce profile UMM folder -->
    <BroforcePath>C:\Users\YourName\AppData\Roaming\r2modmanPlus-local\Broforce\profiles\Default\UMM</BroforcePath>

    <!-- Path to reference DLLs (default points to BroforceMods/libs) -->
    <!-- <LibPath>path/to/libs</LibPath> -->

    <!-- Paths to BroMakerLib and RocketLib -->
    <!-- These default to looking in the game's Mods folder (Thunderstore structure) -->
    <BroMakerLibPath>$(BroforcePath)\Mods\BroMaker-BroMaker\BroMakerLib\BroMakerLib.dll</BroMakerLibPath>
    <RocketLibPath>$(BroforcePath)\Mods\RocketLib-RocketLib\RocketLib\RocketLib.dll</RocketLibPath>
    <!-- If building from source repos instead: -->
    <!-- <BroMakerLibPath>path/to/Bro-Maker/BroMakerLib/_ModContent/BroMakerLib.dll</BroMakerLibPath> -->
    <!-- <RocketLibPath>path/to/RocketLib/RocketLib/_ModContent/RocketLib.dll</RocketLibPath> -->

    <!-- Build Options -->
    <!-- <CloseBroforceOnBuild>true</CloseBroforceOnBuild> -->
    <!-- <LaunchBroforceOnBuild>false</LaunchBroforceOnBuild> -->
    <!-- <UseHardLinksForInstall>false</UseHardLinksForInstall> -->
    <!-- <VerboseBuildOutput>false</VerboseBuildOutput> -->

  </PropertyGroup>
</Project>

See Finding the Mods Folder for where this folder is located.

If you have multiple repos, you can also set up a BroforceGlobal.props file in the parent directory of all your repos to share settings across them. Each repo's LocalBroforcePath.props will automatically import it if it exists, and can override any settings from it.

Optional: Makefile Wrapper

If you're using Visual Studio, you don't need this. Building the solution invokes the MSBuild targets directly, so Build > Build Solution already compiles and installs your bro.

If you're working from VS Code or another editor without a .sln-based build UI, the Broforce-Templates repo includes a shared Makefile.common that wraps the MSBuild targets with make build, make clean, and make rebuild commands. You'll need a small Makefile in your repo root that imports it; the Bro-Maker Makefile is a working example.

Loading your Bro In-Game

After building your project, your bro's files will be installed directly to the game's BroMaker_Storage folder by the build system, so you should be able to start up Broforce and see your bro in the BroMaker menu.

Thunderstore

Setting Up Thunderstore Metadata

If you skipped the Thunderstore setup during project creation, you can set it up later:

bt init-thunderstore "Your Bro's Name"

This creates a manifest.json, README.md, and placeholder icon.png in your release folder. It auto-detects dependencies from your .csproj references.

Packaging a Release

When you're ready to publish your bro on Thunderstore:

bt package "Your Bro's Name"

This syncs the version from your Changelog.md into the manifest.json, validates your files and dependencies, and creates a Thunderstore-ready .zip file.

Version Management

Versions are managed through your Changelog.md. Add entries under the (unreleased) section as you work, and bt package will use that version when creating the package. You can edit the file directly, or use the bt changelog add command as a shortcut:

bt changelog add "Your Bro's Name" "Fixed fire rate being too fast"

You can also see which projects have unreleased changes:

bt unreleased

Other Project Types

The bt create command can also create regular mods and wardrobe projects:

bt create -t mod -n "My Mod" -a "Your Name"
bt create -t wardrobe -n "My Wardrobe" -a "Your Name"
⚠️ **GitHub.com Fallback** ⚠️