Aragas/Bannerlord.MBOptionScreen

View on GitHub
README.md

Summary

Maintainability
Test Coverage
<p align="center">
  <img src="https://staticdelivery.nexusmods.com/mods/3174/images/headers/612_1592411190.jpg" nexusmods_src="https://cdn.discordapp.com/attachments/702514796532072558/722856417056391178/MCM-Descrip-Transparent.png" width="800">
  <br>
  <a converter_ignore href="https://github.com/Aragas/Bannerlord.MBOptionScreen" alt="Lines Of Code"><img src="https://aschey.tech/tokei/github/Aragas/Bannerlord.MBOptionScreen?category=code" /></a>
  <a converter_ignore href="https://www.codefactor.io/repository/github/aragas/bannerlord.mboptionscreen"><img src="https://www.codefactor.io/repository/github/aragas/bannerlord.mboptionscreen/badge" alt="CodeFactor" /></a>
  <a converter_ignore href="https://codeclimate.com/github/Aragas/Bannerlord.MBOptionScreen/maintainability"><img alt="Code Climate maintainability" src="https://img.shields.io/codeclimate/maintainability-percentage/Aragas/Bannerlord.MBOptionScreen"></a>
  <a converter_ignore href="https://mcm.bannerlord.aragas.org/"><img src="https://img.shields.io/badge/Documentation-%F0%9F%94%8D-blue?style=flat" /></a>
  <a title="Crowdin" target="_blank" href="https://crowdin.com/project/mod-configuration-menu"><img src="https://badges.crowdin.net/mod-configuration-menu/localized.svg"></a>
  <br>
  <a converter_ignore href="https://github.com/Aragas/Bannerlord.MBOptionScreen/actions/workflows/test-and-publish.yml?query=branch%3Adev+event%3Apush"><img alt="GitHub Workflow Status (event)" src="https://img.shields.io/github/actions/workflow/status/Aragas/Bannerlord.MBOptionScreen/test-and-publish.yml?branch=dev&event=push&label=Latest%20Commit"></a>
  <a converter_ignore href="https://github.com/Aragas/Bannerlord.MBOptionScreen/actions/workflows/test-and-publish.yml?query=branch%3Adev+event%3Arepository_dispatch"><img alt="GitHub Workflow Status (event)" src="https://img.shields.io/github/actions/workflow/status/Aragas/Bannerlord.MBOptionScreen/test-and-publish.yml?branch=dev&event=repository_dispatch&label=Latest%20Game%20Release"></a>
  <a converter_ignore href="https://codecov.io/gh/Aragas/Bannerlord.MBOptionScreen"><img src="https://codecov.io/gh/Aragas/Bannerlord.MBOptionScreen/branch/dev/graph/badge.svg" /></a>
  <br converter_ignore>
  <a href="https://www.nuget.org/packages/Bannerlord.MCM" alt="NuGet Bannerlord.MCM"><img src="https://img.shields.io/nuget/v/Bannerlord.MCM.svg?label=NuGet%20Bannerlord.MCM&colorB=blue" /></a>
  <br>
  <a converter_ignore href="https://www.nexusmods.com/mountandblade2bannerlord/mods/612" alt="NexusMods Mod Configuration Menu"><img src="https://img.shields.io/badge/NexusMods-Mod%20Configuration%20Menu-yellow.svg" /></a>
  <a converter_ignore href="https://www.nexusmods.com/mountandblade2bannerlord/mods/612" alt="NexusMods Mod Configuration Menu"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnexusmods-version-pzk4e0ejol6j.runkit.sh%3FgameId%3Dmountandblade2bannerlord%26modId%3D612" /></a>
  <a converter_ignore href="https://www.nexusmods.com/mountandblade2bannerlord/mods/612" alt="NexusMods Mod Configuration Menu"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnexusmods-downloads-ayuqql60xfxb.runkit.sh%2F%3Ftype%3Dunique%26gameId%3D3174%26modId%3D612" /></a>
  <a converter_ignore href="https://www.nexusmods.com/mountandblade2bannerlord/mods/612" alt="NexusMods Mod Configuration Menu"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnexusmods-downloads-ayuqql60xfxb.runkit.sh%2F%3Ftype%3Dtotal%26gameId%3D3174%26modId%3D612" /></a>
  <a converter_ignore href="https://www.nexusmods.com/mountandblade2bannerlord/mods/612" alt="NexusMods Mod Configuration Menu"><img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fnexusmods-downloads-ayuqql60xfxb.runkit.sh%2F%3Ftype%3Dviews%26gameId%3D3174%26modId%3D612" /></a>
  <br converter_ignore>
  <a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859238197"><img alt="Steam Mod Configuration Menu" src="https://img.shields.io/badge/Steam-Mod%20Configuration%20Menu-blue.svg" /></a>
  <a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859238197"><img alt="Steam Downloads" src="https://img.shields.io/steam/downloads/2859238197?label=Downloads&color=blue"></a>
  <a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859238197"><img alt="Steam Views" src="https://img.shields.io/steam/views/2859238197?label=Views&color=blue"></a>
  <a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859238197"><img alt="Steam Subscriptions" src="https://img.shields.io/steam/subscriptions/2859238197?label=Subscriptions&color=blue"></a>
  <a href="https://steamcommunity.com/sharedfiles/filedetails/?id=2859238197"><img alt="Steam Favorites" src="https://img.shields.io/steam/favorites/2859238197?label=Favorites&color=blue"></a>
</p>


AKA MBOptionScreen Standalone.  
Previously, a fork of [ModLib](https://github.com/mipen/ModLib) that was de-forked.  
Sources available at [GitHub](https://github.com/Aragas/Bannerlord.MBOptionScreen)!  
Credits to [Drogean](https://www.nexusmods.com/users/79933) for the MCM Logos!  

MCM is a Mod Options screen library designed to let modders use its API for defining the options.  

MCM supports three setting types - Global, PerCampaign and PerSave. Global are shared across characters and saves, PerCampaign are persistent within a single campaign, PerSave are stored within the save file!

It provides 5 types of options:
* Bool
* Int Slider / Textbox
* Float Slider / Textbox 
* Textbox
* Dropdown  
* Button  
  
The settings can be defined at compile time by using the Attribute API and at runtime by using the Fluent Builder.  

MCM uses the following 3 framework level libraries:
* **Harmony** is used to have a single 0Harmony.dll across the game.
* **ButterLib** is a general modding library that eases mod development.
* **UIExtenderEx**  is an general UI manipulation library.

See the [Docs](https://mcm.bannerlord.aragas.org/articles/index.html) for more details!

<img converter_ignore src="https://github.com/Aragas/Bannerlord.MBOptionScreen/blob/dev/resources/main.png?raw=true" width="800">

## Installation
### Players
Requires `Bannerlord.Harmony`, `Bannerlord.UIExtenderEx`, `Bannerlord.ButterLib`.
### Developers
Add this to your `.csproj`. Please not that `IncludeAssets="compile"` is very important!
```xml
  <ItemGroup>
    <PackageReference Include="Bannerlord.MCM" Version="4.3.16" IncludeAssets="compile" />
  </ItemGroup>
```

## FAQ
### How do I install it?
1. Find the Modules folder in your Bannerlord installation location. For Steam users, this is usually here: `C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\Modules`
2. Download the latest version of this mod and drop the folder inside Modules from the archive into your game's `Modules` folder.
3. Start the Mount & Blade II: Bannerlord launcher and select all Mod Configuration Menu mods to be loaded.
<p>
  <details>
    <summary>Your Modules folder structure should look something like this:</summary>
    <img src="https://cdn.discordapp.com/attachments/753640646253740073/858635739528429568/unknown.png">
  </details>
  <details>
    <summary>Your mod order in the launcher should look something like this:</summary>
    <img src="https://cdn.discordapp.com/attachments/753640646253740073/858636433450729492/unknown.png">
  </details>
</p>

### Unblocking DLL's
You may need to right click on every *.dll files, click Properties, and click Unblock if you extracted the zip file with Windows Explorer or other programs that try to secure extracted files.
### Harmony installation issues:
Check Harmony's Troubleshooting for more info on how to fix it.
### Crashes on v1.0.0-v1.0.3 with Vortex used
Check [this comment](https://forum.nexusmods.com/index.php?showtopic=8605808/#entry118785353)