Skip to content

Commit

Permalink
Keep compatible with Bannerlord e1.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
LiZhenhuan1019 committed Feb 8, 2021
1 parent 1f7ab55 commit 523d0e3
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 82 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [e2.0.18] - 2021-02-08
### Fixed
- Keep compatible with Bannerlord e1.5.7.

## [e2.0.17] - 2021-01-09
### Fixed
- Keep compatible with Bannerlord e1.5.5 and e1.5.6.
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,13 @@ This mod has a dependency on [Bannerlord.Harmony](https://www.nexusmods.com/moun
- If the game crashed when loading a siege battle or clicking "Begin assault", try to change the scene level. Some scenes lacks data for some scene level, so this may help.

## Source code
The source code is available at [GitLab](https://gitlab.com/lzh_mb_mod/enhancedbattletest).
The source code is available at [GitHub](https://github.com/lzh-mb-mod/EnhancedBattleTest).

## Contributor
The contributors to this project are:
* [LiZhenhuan1019](https://github.com/LiZhenhuan1019)

* [jffifa](https://github.com/jffifa)

## Contact with me
* Please mail to: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
- 尝试减少士兵数量或降低画质。

## 源代码
源代码可从[GitLab](https://gitlab.com/lzh_mb_mod/enhancedbattletest)获得。
源代码可从[GitHub](https://github.com/lzh-mb-mod/EnhancedBattleTest)获得。


## 联系我
Expand Down
132 changes: 66 additions & 66 deletions source/EnhancedBattleTest.csproj
Original file line number Diff line number Diff line change
@@ -1,140 +1,140 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<ProcessorArchitecture>amd64</ProcessorArchitecture>
<BinPath>D:\Program Files\Steam\SteamApps\common\Mount &amp; Blade II Bannerlord</BinPath>
<LangVersion>8</LangVersion>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\..\Modules\EnhancedBattleTest\bin\Win64_Shipping_Client\&quot; /y&#xD;&#xA;xcopy &quot;$(SolutionDir)..\Modules&quot; &quot;$(BinPath)\Modules&quot; /E /C /I /Y" />
</Target>
<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="2.0.4" />
</ItemGroup>
<ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<ProcessorArchitecture>amd64</ProcessorArchitecture>
<LangVersion>8</LangVersion>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)\..\Modules\EnhancedBattleTest\bin\Win64_Shipping_Client\&quot; /y&#xD;&#xA;xcopy &quot;$(SolutionDir)..\Modules&quot; &quot;$(GamePath)\Modules&quot; /E /C /I /Y" />
</Target>
<Import Project="$(MSBuildProjectDirectory)\*.props" />
<ItemGroup>
<PackageReference Include="Lib.Harmony" Version="2.0.4" />
</ItemGroup>
<ItemGroup>
<Reference Include="SandBox">
<HintPath>$(BinPath)\Modules\SandBox\bin\Win64_Shipping_Client\SandBox.dll</HintPath>
<HintPath>$(GamePath)\Modules\SandBox\bin\Win64_Shipping_Client\SandBox.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="SandBox.GauntletUI">
<HintPath>$(BinPath)\Modules\SandBox\bin\Win64_Shipping_Client\SandBox.GauntletUI.dll</HintPath>
<HintPath>$(GamePath)\Modules\SandBox\bin\Win64_Shipping_Client\SandBox.GauntletUI.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="SandBox.View">
<HintPath>$(BinPath)\Modules\SandBox\bin\Win64_Shipping_Client\SandBox.View.dll</HintPath>
<HintPath>$(GamePath)\Modules\SandBox\bin\Win64_Shipping_Client\SandBox.View.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.CampaignSystem">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.CampaignSystem.ViewModelCollection">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.ViewModelCollection.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.CampaignSystem.ViewModelCollection.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.Core">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.Core.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.Core.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.Core.ViewModelCollection">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.Core.ViewModelCollection.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.Core.ViewModelCollection.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.DotNet">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.DotNet.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.DotNet.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.Engine">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.Engine.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.Engine.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.Engine.GauntletUI">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.Engine.GauntletUI.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.Engine.GauntletUI.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.GauntletUI.Data">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.GauntletUI.Data.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.GauntletUI.Data.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.InputSystem">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.InputSystem.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.InputSystem.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.Library">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.Library.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.Library.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.Localization">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.Localization.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.Localization.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.MountAndBlade">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.MountAndBlade.CustomBattle">
<HintPath>$(BinPath)\Modules\CustomBattle\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.CustomBattle.dll</HintPath>
<HintPath>$(GamePath)\Modules\CustomBattle\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.CustomBattle.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.MountAndBlade.View">
<HintPath>$(BinPath)\Modules\Native\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.View.dll</HintPath>
<HintPath>$(GamePath)\Modules\Native\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.View.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.MountAndBlade.ViewModelCollection">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.ViewModelCollection.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.ViewModelCollection.dll</HintPath>
<Private>false</Private>
</Reference>
</Reference>
<Reference Include="TaleWorlds.ObjectSystem">
<HintPath>$(BinPath)\bin\Win64_Shipping_Client\TaleWorlds.ObjectSystem.dll</HintPath>
<HintPath>$(GamePath)\bin\Win64_Shipping_Client\TaleWorlds.ObjectSystem.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
</Reference>
</ItemGroup>
<ItemGroup>
<Reference Update="System">
<Private>false</Private>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Reference Update="System.Core">
<Private>false</Private>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Reference Update="System.Data">
<Private>false</Private>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Reference Update="System.Drawing">
<Private>false</Private>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Reference Update="System.IO.Compression.FileSystem">
<Private>false</Private>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Reference Update="System.Numerics">
<Private>false</Private>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Reference Update="System.Runtime.Serialization">
<Private>false</Private>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Reference Update="System.Xml">
<Private>false</Private>
</Reference>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Reference Update="System.Xml.Linq">
<Private>false</Private>
</Reference>
</ItemGroup>
</Project>
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions source/GamePath.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<GamePath>C:\Program Files (x86)\Steam\steamapps\common\Mount &amp; Blade II Bannerlord\</GamePath>
</PropertyGroup>
</Project>
9 changes: 0 additions & 9 deletions source/Properties/launchSettings.json

This file was deleted.

8 changes: 5 additions & 3 deletions source/src/Data/EnhancedBattleTestMoraleModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ public override float GetDefeatMoraleChange(PartyBase party)
return 0;
}

public override float GetEffectivePartyMorale(MobileParty party, StatExplainer explanation = null)
public override ExplainedNumber GetEffectivePartyMorale(
MobileParty mobileParty,
bool includeDescription = false)
{
ExplainedNumber explainedNumber = new ExplainedNumber(100f, explanation, (TextObject)null);
return explainedNumber.ResultNumber;
ExplainedNumber explainedNumber = new ExplainedNumber(100f, includeDescription);
return explainedNumber;
}

public override int NumberOfDesertersDueToPaymentRatio(MobileParty mobileParty)
Expand Down
4 changes: 2 additions & 2 deletions source/src/Data/EnhancedBattleTestPartyController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class EnhancedBattleTestPartyController
public static void Initialize()
{
PlayerParty = MBObjectManager.Instance.CreateObject<MobileParty>("enhanced_battle_test_player_party");
PlayerParty.Name = new TextObject("{=sSJSTe5p}Player Party");
PlayerParty.SetCustomName(new TextObject("{=sSJSTe5p}Player Party"));
EnemyParty = MBObjectManager.Instance.CreateObject<MobileParty>("enhanced_battle_test_enemy_party");
EnemyParty.Name = new TextObject("{=0xC75dN6}Enemy Party");
EnemyParty.SetCustomName(new TextObject("{=0xC75dN6}Enemy Party"));
}

public static void OnGameEnd()
Expand Down

0 comments on commit 523d0e3

Please sign in to comment.