Unlock Configuration - Gorzontrok/Bro-Maker GitHub Wiki

You can configure how players unlock your custom bro by adding an unlockConfig section to your bro's JSON file. If you don't include this section, your bro will be available immediately.

Unlock Methods

There are four unlock methods:

Method Description
AlwaysUnlocked Bro is immediately available. This is the default if no unlockConfig is specified.
RescueCount Bro is unlocked after rescuing a certain number of POWs in-game.
UnlockLevel Bro is unlocked by completing a specified custom campaign level.
RescueOrLevel Bro can be unlocked by either method.

Configuration

RescueCount

The bro will be locked until the player has rescued enough POWs. The required count does not take into account any POWs rescued prior to installing the bro.

"unlockConfig": {
  "method": "RescueCount",
  "RescueCountRequired": 5
}

If you have multiple custom bros installed with rescue-based unlocks, the BroMaker will stagger the targets so they don't all unlock at the same time. For example, if you have three bros that each require 5 rescues, the first will unlock at 5, the second at 10, and the third at 15. The order is determined by when BroMaker first sees each bro, after you've installed them.

UnlockLevel

The bro unlocks when the player completes a specific custom campaign. The campaign file needs to be a .bfc file placed in your bro's mod directory.

"unlockConfig": {
  "method": "UnlockLevel",
  "unlockLevelPath": "MyBro.bfc",
  "unlockLevelName": "The Great Escape"
}
  • unlockLevelPath - Path to the .bfc campaign file, relative to your bro's directory
  • unlockLevelName - Display name shown to the player in the menu

RescueOrLevel

This gives the player two paths to unlocking the bro. They can either rescue enough bros or complete the unlock level, whichever they do first.

"unlockConfig": {
  "method": "RescueOrLevel",
  "unlockLevelPath": "Captain Ameribro.bfc",
  "unlockLevelName": "Behind Enemy Lines",
  "RescueCountRequired": 5
}

All Configuration Variables

Variable Type Purpose Default
method String The unlock method to use. One of: AlwaysUnlocked, RescueCount, UnlockLevel, RescueOrLevel AlwaysUnlocked
RescueCountRequired int Number of bros that must be rescued to unlock. Used by RescueCount and RescueOrLevel. 10
unlockLevelPath String Path to the .bfc campaign file, relative to your bro's directory. Used by UnlockLevel and RescueOrLevel. Empty
unlockLevelName String Display name for the unlock level shown in the menu. Used by UnlockLevel and RescueOrLevel. Empty

Notes

  • Unlock progress is saved automatically and persists between game sessions.
  • When a bro is unlocked, BroMaker will queue its cutscene to play before the bro becomes selectable (if the bro has a cutscene configured with playCutsceneOnFirstSpawn).
  • If you're using RescueOrLevel and the player unlocks via the level, the rescue targets for other bros will be recalculated to account for the skipped rescues.