-
Notifications
You must be signed in to change notification settings - Fork 0
Manual Setup
I created a Bro Template which I use when starting a new bro, as well as a script that copies the Bro Template and renames all the files to the name of my new bro. You can find this script in my Scripts folder of my repo. If you want to use this script, you'll need to have BROPATH, and REPOS set in your environment variables. REPOS should point to the folder that contains your copy of the BroforceMods repo. BROPATH should point to the BroMaker_Storage directory, which will be in your Broforce folder, which will likely be here:
C:\Program Files (x86)\Steam\steamapps\common\Broforce\BroMaker_Storage
The JSON files for this Bro Template can be found here, as well as some placeholder Rambro sprites.
If you don't want to worry about all of that, I would just create a new Visual Studio project, and be sure to choose the Class Library (.Net Framework) option. Then you'll want to add references to the .dll files for BroMakerLib, as well as all the dlls in this folder.
The minimum code you need to actually create a bro is simply this
namespace Bro_Template
{
[HeroPreset("Bro Template", HeroType.Rambro)]
public class Bro : CustomHero
{
}
}
The namespace, and class name can be set to whatever you'd like. HeroPreset can be set to anything as well, but you'll want to make sure it matches the characterPreset variable in your bro's JSON file, which is explained below. The HeroType.Rambro variable will control which bro BroMaker loads all the default values for your character from, but these values can all be changed, so it doesn't really matter what you pick. I use Rambro for almost all my bros.
You should add that code to your Visual Studio Project, compile it, and then create a small JSON file such as this:
{
"name": "Bro Template",
"characterPreset": "Bro Template",
"parameters": {
"BetterAnimation": true,
"SpecialIcons": "special.png",
"Avatar": "avatar.png",
},
"cutscene": {
"heading": "Bro Template",
"subtitle1": "Joins the Battle!",
"headingScale": 0.14,
"spriteRect":
{
"x": 0,
"y": 256,
"width": 256,
"height": 256
},
"spritePath": "cutscene.png",
"anim": "Intro_Bro_Rambro",
"playCutsceneOnFirstSpawn": true
},
"beforeAwake": {
"speed": 130,
"fireRate": 0.1,
"canChimneyFlip": true,
"originalSpecialAmmo": 1
},
"afterAwake": {},
"beforeStart": {
"sprite": "sprite.png",
"gunSprite": "gunSprite.png"
},
"afterStart": {
}
}
Note that you'll need all the .png files that are specified above. If you haven't drawn these yet, then you could use these placeholders, or you can just delete the lines that are setting them.
You also need a mod file to load your assembly, which should look like this:
{
"Version": "1.0.0",
"BroMakerVersion": "2.6.0",
"Name": "Bro Template",
"Author": "yourname",
"CustomBros":[
"Bro Template.json"
],
"Assemblies": [
"Bro Template.dll"
]
}
Make sure this file has the .mod.json file extension.
Then place all those files in a folder in your BroMaker_Storage folder, and you should be able to load your bro in-game. With only this code, your bro will basically behave exactly the same as Rambro.
If you have questions or need help with creating custom bros, you can join the Free Lives Discord Server and post your questions in the bf-mods channel.