Skip to content

Commit

Permalink
Merge pull request #432 from Aragas/dev
Browse files Browse the repository at this point in the history
v5.9.2
  • Loading branch information
Aragas authored Dec 28, 2023
2 parents 8578942 + 0c86249 commit 59177f0
Show file tree
Hide file tree
Showing 16 changed files with 199 additions and 99 deletions.
131 changes: 62 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,40 @@
<p align="center">
<a 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 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 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 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 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 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 href="https://codecov.io/gh/Aragas/Bannerlord.MBOptionScreen">
<img src="https://codecov.io/gh/Aragas/Bannerlord.MBOptionScreen/branch/dev/graph/badge.svg" />
</a>
</br>
<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 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 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 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 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 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>
<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>
</br>
<img src="https://staticdelivery.nexusmods.com/mods/3174/images/headers/612_1592411190.jpg" width="800">
</br>
<img src="https://github.com/Aragas/Bannerlord.MBOptionScreen/blob/dev/resources/main.png?raw=true" width="800">
<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.
It can also display settings from other API's like ModLib, pre 1.3 and post 1.3, MBOv1/MCMv2, by using the compatibility layer modules.

MCM supports two setting types - Global and PerSave. Global are shared across characters and saves, PerSave are stored within the save file!

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
Expand All @@ -85,6 +46,15 @@ It provides 5 types of options:

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`.
Expand All @@ -95,3 +65,26 @@ Add this to your `.csproj`. Please not that `IncludeAssets="compile"` is very im
<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)
15 changes: 8 additions & 7 deletions build/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

<PropertyGroup>
<GameVersion>1.0.0</GameVersion>
<Version>5.9.1</Version>
<GameVersionWithPrefix>v$(GameVersion)</GameVersionWithPrefix>
<Version>5.9.2</Version>
<HarmonyVersion>2.2.2</HarmonyVersion>
<ButterLibVersion>2.8.11</ButterLibVersion>
<UIExtenderExVersion>2.8.0</UIExtenderExVersion>
<BuildResourcesVersion>1.1.0.102</BuildResourcesVersion>
<BUTRSharedVersion>3.0.0.137</BUTRSharedVersion>
<ButterLibVersion>2.8.15</ButterLibVersion>
<UIExtenderExVersion>2.8.1</UIExtenderExVersion>
<BuildResourcesVersion>1.1.0.104</BuildResourcesVersion>
<BUTRSharedVersion>3.0.0.138</BUTRSharedVersion>
<BUTRDependencyInjectionVersion>2.0.0.52</BUTRDependencyInjectionVersion>
<BUTRModuleManagerVersion>5.0.209</BUTRModuleManagerVersion>
<BUTRModuleManagerVersion>5.0.221</BUTRModuleManagerVersion>
<HarmonyExtensionsVersion>3.2.0.77</HarmonyExtensionsVersion>
<HarmonyAnalyzerVersion>1.0.1.50</HarmonyAnalyzerVersion>
<LightInjectVersion>6.6.4</LightInjectVersion>
Expand Down Expand Up @@ -58,7 +59,7 @@
</PropertyGroup>
<!--SorceLink-->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>
<!--CI Builds-->
<ItemGroup Condition="$(TargetFramework) == 'net472' AND $(OS) != 'Windows_NT'">
Expand Down
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
---------------------------------------------------------------------------------------------------
Version: 5.9.2
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.1.6,v1.2.7
* Switched to .NET 6 for Xbox
* Updated Chinese Simplified, Japanese, Spanish, German localization
* Fixed Settings Pack creation
---------------------------------------------------------------------------------------------------
Version: 5.9.1
Game Versions: v1.0.0,v1.0.1,v1.0.2,v1.0.3,v1.1.0,v1.1.1,v1.1.2,v1.1.3,v1.1.4,v1.1.5,v1.2.0,v1.2.1
* Scrolling regression fix
Expand Down
44 changes: 36 additions & 8 deletions src/MCM.Abstractions/SettingType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,49 @@

namespace MCM.Abstractions
{
#if !BANNERLORDMCM_PUBLIC
internal
#else
public
# endif
/// <summary>
/// Defines the different types of settings that can be used.
/// </summary>
#if !BANNERLORDMCM_PUBLIC
internal
#else
public
# endif
enum SettingType
{
[SuppressMessage("CodeQuality", "IDE0079:Remove unnecessary suppression", Justification = "For ReSharper")]
[SuppressMessage("ReSharper", "InconsistentNaming")]
/// <summary>
/// A default value indicating no setting type.
/// </summary>
NONE = -1,

/// <summary>
/// A boolean setting with true/false values.
/// </summary>
Bool,

/// <summary>
/// An integer number setting.
/// </summary>
Int,

/// <summary>
/// A floating point number setting.
/// </summary>
Float,

/// <summary>
/// A text string setting.
/// </summary>
String,

/// <summary>
/// A dropdown list setting.
/// </summary>
Dropdown,
Button

/// <summary>
/// A button that can trigger some action.
/// </summary>
Button,
}
}
4 changes: 2 additions & 2 deletions src/MCM.Publish/MCM.Publish.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net472;net6</TargetFrameworks>
<Authors>Aragas</Authors>
<ModuleId>Bannerlord.MBOptionScreen</ModuleId>
<ModuleName>Mod Configuration Menu v5</ModuleName>
Expand All @@ -16,7 +16,7 @@
<PropertyGroup Condition="$(TargetFramework) == 'net472'">
<BuildForWindows>true</BuildForWindows>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework) == 'netcoreapp3.1'">
<PropertyGroup Condition="$(TargetFramework) == 'net6'">
<BuildForWindowsStore>true</BuildForWindowsStore>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
Expand Down
14 changes: 14 additions & 0 deletions src/MCM.Publish/_Module/ModuleData/Languages/CNs/sta_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,19 @@
<string id="ButterLibSettings_Name_Logging" text="日志记录中"/>
<string id="ButterLibSettings_Name_LogLevel" text="日志等级"/>
<string id="ButterLibSettings_Name_LogLevelDesc" text="要写入的日志级别。"/>

<string id="ModOptionsVM_SaveAsPreset" text="保存预设"/>
<string id="ModOptionsVM_SaveAsPresetDesc" text="选择预设名字"/>
<string id="ModOptionsVM_OverridePreset" text="预设已经存在"/>
<string id="ModOptionsVM_OverridePresetDesc" text="预设已经存在!你要覆盖它吗?"/>
<string id="ModOptionsVM_ManagePresets" text="管理预设"/>
<string id="ModOptionsVM_ManagePresetsImport" text="导入预设"/>
<string id="ModOptionsVM_ManagePresetsExport" text="导出预设 “{PRESETNAME}”"/>
<string id="ModOptionsVM_ManagePresetsDelete" text="删除预设 “{PRESETNAME}”"/>
<string id="ModOptionsVM_SaveAsPresetError" text="无法保存预设 “{PRESETNAME}”!"/>
<string id="ModOptionsVM_Unavailable" text="设置可在游戏会话中使用!"/>
<string id="ModOptionsVM_ManagePacks" text="管理设置组"/>
<string id="ModOptionsVM_ManagePackImport" text="导入设置组"/>
<string id="ModOptionsVM_ManagePackExport" text="导出设置组"/>
</strings>
</base>
14 changes: 14 additions & 0 deletions src/MCM.Publish/_Module/ModuleData/Languages/DE/sta_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,19 @@
<string id="ButterLibSettings_Name_Logging" text="Protokollierung"/>
<string id="ButterLibSettings_Name_LogLevel" text="Protokoll Stufe"/>
<string id="ButterLibSettings_Name_LogLevelDesc" text="Umfang der zu schreibenden Protokolle."/>

<string id="ModOptionsVM_SaveAsPreset" text="Als Vorlage speichern"/>
<string id="ModOptionsVM_SaveAsPresetDesc" text="Wählen Sie den Namen der Vorlage"/>
<string id="ModOptionsVM_OverridePreset" text="Vorlage existiert bereits"/>
<string id="ModOptionsVM_OverridePresetDesc" text="Vorlage existiert bereits! Möchten Sie diese überschreiben?"/>
<string id="ModOptionsVM_ManagePresets" text="Vorlagen verwalten"/>
<string id="ModOptionsVM_ManagePresetsImport" text="Neue Vorlage importieren"/>
<string id="ModOptionsVM_ManagePresetsExport" text="Vorlage '{PRESETNAME}' exportieren"/>
<string id="ModOptionsVM_ManagePresetsDelete" text="Vorlage '{PRESETNAME}' löschen"/>
<string id="ModOptionsVM_SaveAsPresetError" text="Speichern der Vorlage '{PRESETNAME}' fehlgeschlagen!"/>
<string id="ModOptionsVM_Unavailable" text="Einstellungen sind innerhalb einer Spielsitzung verfügbar!"/>
<string id="ModOptionsVM_ManagePacks" text="Einstellungspakete verwalten"/>
<string id="ModOptionsVM_ManagePackImport" text="Einstellungspaket importieren"/>
<string id="ModOptionsVM_ManagePackExport" text="Einstellungspaket exportieren"/>
</strings>
</base>
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@
<string id="ModOptionsVM_ManagePacks" text="Manage Settings Packs"/>
<string id="ModOptionsVM_ManagePackImport" text="Import a Settings Pack"/>
<string id="ModOptionsVM_ManagePackExport" text="Export Settings Pack"/>

<string id="HOV8WIcBrb" text="Reset Mod Options Value to Default"/>
<string id="2d99VmOZZH" text="Resets a value in Mod Options menu to its default value when hovered."/>
</strings>
</base>
</base>
Loading

0 comments on commit 59177f0

Please sign in to comment.