Decided to try and create a project template for Visual Studio to make it a bit faster and less painful to create new mods for Bannerlord. This is the first time I've made a template so there may be some issues I haven't encountered yet. But hopefully it'll work out of the box for you!
Features
This is an extension for Visual Studio, that means it's a nicely bundled package which easily installs straight into VS. Once installed you can use this template when you create a new project - the template will then configure your new project so it's set-up for Bannerlord immediately. This includes configurations such as;
• Include a Readme.txt file containing some useful information and links.
• Automatically adds references to some of the Bannerlord assemblies. (Some that I deemed irrelevant are omitted, if you want them included let me know! This includes assemblies for Native, SandBox and StoryMode modules)
• Create a basic SubModule.cs class, inheriting from MBSubModuleBase class.
• Create a basic SubModule.xml file with the basic settings pre-configured for you.
• Automatically configures the Output Directory for building your mod.
• Automatically configures the Working Directory for debugging your mod.
• Automatically configures VS to use Bannerlord.exe for debugging your mod.
• Automatically configures the command-line arguments for Bannerlord.exe to include your mod.
• Can also fetch the mods last used by the game launcher and slap those into the above arguments in case your new mod needs to be tested with other mods.
• Automatically installs Harmony 2.0.0.9 so you can get to patching immediately.
More automatic processes such as these can be added with relative ease, such as including code examples such as patching a method. An example of adding a new behavior and/or model.
Installing
Installation is very simple, you simply execute the BannerlordModTemplateWizard.vsix file and Visual Studio will guide you through the rest. You can of course also download the source code and build it yourself if you prefer.
Uninstalling
Open Visual Studio -> Extensions (top toolbar) -> Manage Extensions -> Installed -> Choose the Bannerlord Mod Template and click Uninstall
Planned Features
• I dunno, suggest stuff?
Downloads
Source Code (GitHub) | Extension Installer 2.0.0 (.vsix) | Visual Studio Marketplace
If you encounter any bugs or have some suggestions feel free to either post them here or as new issues on GitHub!
Features
This is an extension for Visual Studio, that means it's a nicely bundled package which easily installs straight into VS. Once installed you can use this template when you create a new project - the template will then configure your new project so it's set-up for Bannerlord immediately. This includes configurations such as;
• Include a Readme.txt file containing some useful information and links.
• Automatically adds references to some of the Bannerlord assemblies. (Some that I deemed irrelevant are omitted, if you want them included let me know! This includes assemblies for Native, SandBox and StoryMode modules)
• Create a basic SubModule.cs class, inheriting from MBSubModuleBase class.
• Create a basic SubModule.xml file with the basic settings pre-configured for you.
• Automatically configures the Output Directory for building your mod.
• Automatically configures the Working Directory for debugging your mod.
• Automatically configures VS to use Bannerlord.exe for debugging your mod.
• Automatically configures the command-line arguments for Bannerlord.exe to include your mod.
• Can also fetch the mods last used by the game launcher and slap those into the above arguments in case your new mod needs to be tested with other mods.
• Automatically installs Harmony 2.0.0.9 so you can get to patching immediately.
More automatic processes such as these can be added with relative ease, such as including code examples such as patching a method. An example of adding a new behavior and/or model.
Installing
Installation is very simple, you simply execute the BannerlordModTemplateWizard.vsix file and Visual Studio will guide you through the rest. You can of course also download the source code and build it yourself if you prefer.
Uninstalling
Open Visual Studio -> Extensions (top toolbar) -> Manage Extensions -> Installed -> Choose the Bannerlord Mod Template and click Uninstall
Planned Features
• I dunno, suggest stuff?
Downloads
Source Code (GitHub) | Extension Installer 2.0.0 (.vsix) | Visual Studio Marketplace
If you encounter any bugs or have some suggestions feel free to either post them here or as new issues on GitHub!
Last edited: