diff --git a/.gitignore b/.gitignore
index aa689bd..5a39c7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -94,5 +94,6 @@ ipch/
AssetPackages/
Shaders/
-#DADG
-/config/nlog.config
+
+#Project
+/SubModule.xml
\ No newline at end of file
diff --git a/Bannerlord.ExpandedTemplate.API/Bannerlord.ExpandedTemplate.API.csproj b/Bannerlord.ExpandedTemplate.API/Bannerlord.ExpandedTemplate.API.csproj
index 4947a66..640dc6c 100755
--- a/Bannerlord.ExpandedTemplate.API/Bannerlord.ExpandedTemplate.API.csproj
+++ b/Bannerlord.ExpandedTemplate.API/Bannerlord.ExpandedTemplate.API.csproj
@@ -12,7 +12,7 @@
-
+
diff --git a/Bannerlord.ExpandedTemplate.API/BannerlordExpandedTemplateApi.cs b/Bannerlord.ExpandedTemplate.API/BannerlordExpandedTemplateApi.cs
index 42a7393..9260640 100755
--- a/Bannerlord.ExpandedTemplate.API/BannerlordExpandedTemplateApi.cs
+++ b/Bannerlord.ExpandedTemplate.API/BannerlordExpandedTemplateApi.cs
@@ -5,11 +5,11 @@ namespace Bannerlord.ExpandedTemplate.API;
public class BannerlordExpandedTemplateApi
{
- private ExpandedTemplateSubModule _subModule = new ();
+ private SubModule _subModule = new();
public BannerlordExpandedTemplateApi UseLoggerFactory(ILoggerFactory loggerFactory)
{
- _subModule = new ExpandedTemplateSubModule(new LoggerFactoryAdapter(loggerFactory));
+ _subModule = new SubModule(new LoggerFactoryAdapter(loggerFactory));
return this;
}
diff --git a/Bannerlord.ExpandedTemplate.Infrastructure/Bannerlord.ExpandedTemplate.Infrastructure.csproj b/Bannerlord.ExpandedTemplate.Infrastructure/Bannerlord.ExpandedTemplate.Infrastructure.csproj
index 6b146bd..dcf61bd 100755
--- a/Bannerlord.ExpandedTemplate.Infrastructure/Bannerlord.ExpandedTemplate.Infrastructure.csproj
+++ b/Bannerlord.ExpandedTemplate.Infrastructure/Bannerlord.ExpandedTemplate.Infrastructure.csproj
@@ -13,9 +13,7 @@
- 2.3.0
1.0.3
- 5.3.4
1.0.0
@@ -27,10 +25,7 @@
-
-
-
diff --git a/Bannerlord.ExpandedTemplate.Integration/Bannerlord.ExpandedTemplate.Integration.csproj b/Bannerlord.ExpandedTemplate.Integration/Bannerlord.ExpandedTemplate.Integration.csproj
index 8f94faa..c28d205 100755
--- a/Bannerlord.ExpandedTemplate.Integration/Bannerlord.ExpandedTemplate.Integration.csproj
+++ b/Bannerlord.ExpandedTemplate.Integration/Bannerlord.ExpandedTemplate.Integration.csproj
@@ -12,17 +12,23 @@
- 2.3.0
0.10.4
+
+ Bannerlord.ExpandedTemplate
+ Bannerlord.ExpandedTemplate
+ v$(GameVersion)
+
+
-
+
-
+
-
-
+
+
+
diff --git a/Bannerlord.ExpandedTemplate.Integration/Properties/launchSettings.json b/Bannerlord.ExpandedTemplate.Integration/Properties/launchSettings.json
new file mode 100644
index 0000000..cca5889
--- /dev/null
+++ b/Bannerlord.ExpandedTemplate.Integration/Properties/launchSettings.json
@@ -0,0 +1,14 @@
+{
+ "profiles": {
+ "Launcher": {
+ "commandName": "Executable",
+ "executablePath": "$(GameFolder)\\bin\\Win64_Shipping_Client\\TaleWorlds.MountAndBlade.Launcher.exe",
+ "workingDirectory": "$(GameFolder)\\bin\\Win64_Shipping_Client"
+ },
+ "Launcher.BLSE": {
+ "commandName": "Executable",
+ "executablePath": "$(GameFolder)\\bin\\Win64_Shipping_Client\\Bannerlord.BLSE.Launcher.exe",
+ "workingDirectory": "$(GameFolder)\\bin\\Win64_Shipping_Client"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Bannerlord.ExpandedTemplate.Integration/ExpandedTemplateSubModule.cs b/Bannerlord.ExpandedTemplate.Integration/SubModule.cs
old mode 100755
new mode 100644
similarity index 88%
rename from Bannerlord.ExpandedTemplate.Integration/ExpandedTemplateSubModule.cs
rename to Bannerlord.ExpandedTemplate.Integration/SubModule.cs
index dfc138a..a0e10bf
--- a/Bannerlord.ExpandedTemplate.Integration/ExpandedTemplateSubModule.cs
+++ b/Bannerlord.ExpandedTemplate.Integration/SubModule.cs
@@ -22,7 +22,7 @@
namespace Bannerlord.ExpandedTemplate.Integration
{
- public class ExpandedTemplateSubModule : MBSubModuleBase
+ public class SubModule : MBSubModuleBase
{
private readonly ILoggerFactory _loggerFactory;
private readonly ICacheProvider _cacheProvider;
@@ -30,10 +30,15 @@ public class ExpandedTemplateSubModule : MBSubModuleBase
private ForceCivilianEquipmentSetter _forceCivilianEquipmentSetter;
private MissionSpawnEquipmentPoolSetter _missionSpawnEquipmentPoolSetter;
- public ExpandedTemplateSubModule(ILoggerFactory? loggerFactory = null)
+ public SubModule()
{
- _loggerFactory = loggerFactory ?? new ConsoleLoggerFactory();
_cacheProvider = new CacheCampaignBehaviour();
+ _loggerFactory = new ConsoleLoggerFactory();
+ }
+
+ public SubModule(ILoggerFactory loggerFactory)
+ {
+ _loggerFactory = loggerFactory;
}
public override void OnBeforeMissionBehaviorInitialize(Mission mission)
@@ -62,10 +67,10 @@ private void HandleEquipmentSpawnDependencies()
var npcCharacterRepository = new NpcCharacterRepository(xmlProcessor, _cacheProvider, _loggerFactory);
var equipmentPoolRoster = new EquipmentSetMapper();
var equipmentRosterRepository = new EquipmentRosterRepository(xmlProcessor, _cacheProvider, _loggerFactory);
- var equipmentPoolMapper =
+ var npcCharacterMapper =
new NpcCharacterMapper(equipmentRosterRepository, equipmentPoolRoster, _loggerFactory);
var characterEquipmentPoolRepository =
- new NpcCharacterEquipmentPoolsProvider(npcCharacterRepository, equipmentPoolMapper);
+ new NpcCharacterEquipmentPoolsProvider(npcCharacterRepository, npcCharacterMapper);
var civilianEquipmentRepository =
new CivilianEquipmentPoolProvider(_loggerFactory, _cacheProvider, characterEquipmentPoolRepository);
var siegeEquipmentRepository =
@@ -85,14 +90,18 @@ private void HandleEquipmentSpawnDependencies()
var random = new Random();
var equipmentPicker = new EquipmentPoolPoolPicker(random);
- var equipmentMapper =
- new EquipmentPoolsMapper(MBObjectManager.Instance, _loggerFactory);
+ var equipmentMapper = new EquipmentMapper(MBObjectManager.Instance, _loggerFactory);
+ var equipmentPoolMapper =
+ new EquipmentPoolsMapper(equipmentMapper, _loggerFactory);
var getEquipmentPool = new GetEquipmentPool(encounterTypeProvider, troopBattleEquipmentProvider,
troopSiegeEquipmentProvider, troopCivilianEquipmentProvider, equipmentPicker, _loggerFactory);
+ var getEquipment = new GetEquipment(random);
_forceCivilianEquipmentSetter = new ForceCivilianEquipmentSetter();
_missionSpawnEquipmentPoolSetter =
- new MissionSpawnEquipmentPoolSetter(getEquipmentPool, equipmentMapper, _loggerFactory);
+ new MissionSpawnEquipmentPoolSetter(getEquipmentPool, getEquipment, equipmentPoolMapper,
+ equipmentMapper,
+ _loggerFactory);
}
private void AddEquipmentSpawnMissionBehaviour(Mission mission)
diff --git a/Bannerlord.ExpandedTemplate.Integration/_Module/SubModule.xml b/Bannerlord.ExpandedTemplate.Integration/_Module/SubModule.xml
new file mode 100644
index 0000000..4937b36
--- /dev/null
+++ b/Bannerlord.ExpandedTemplate.Integration/_Module/SubModule.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.md b/README.md
index 8556deb..b4d8fd7 100755
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ This method leverages Bannerlord's ability to load multiple `SubModules` from a
-
+
```
diff --git a/build/common.props b/build/common.props
index 31893f1..093736a 100644
--- a/build/common.props
+++ b/build/common.props
@@ -1,6 +1,28 @@
- 1.0.0
- 1.2.11
+ 1.1.0
+ 1.2.11
+
+
+
+
+
+ $(BANNERLORD_GAME_DIR)
+
+
+
+
+
+
+ $(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 261550@InstallLocation)
+
+ C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord
+
+ ~/.steam/root/steamapps/common/Mount & Blade II Bannerlord