The Dynamic Troop Equipment System mod revolutionizes the game's troop upgrade and equipment system by replacing it with a dynamic army armory and equipment distribution system.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
File credits
- UmarKot for Russian localization - pandory for German localization
The existing drop rate settings are now correctly applied to looting after battles.
Addressed an issue to ensure defeating enemy units with armories now properly includes trade items, food, animals, and banners in the loot.
Added a mod option to exclude civilian equipment from all random equipment acquisition processes.
A `blacklist.json` file is now created in the mod folder upon initial mod launch, allowing for the exclusion of specific items from gameplay. This blacklist supports both regular expressions and exact matching for item filtering, based on `stringId` and localized names, preventing blacklisted items from appearing in-game or being lootable.
Introduced a mod option to enable or disable the assignment of additional equipment, such as surplus arrows, shields, throwing weapons, and two-handed/polearms.
Added a debug menu option for the selective removal of player-crafted items from the armory. This functionality requires enabling debug settings in the mod options.
Added two debug menu options to import/export player armory. This functionality requires enabling debug settings in the mod options.
Players might experience brief lag upon game start and entering the grand map. This lag, lasting a few seconds to about ten seconds, is identified as a normal occurrence.
Version v1.1.9
Introduced an experimental mod option that randomizes the equipment of recruited soldiers, with their level and culture depending on the individual soldier and their equipment's level and culture in the vanilla game.
Reduced the quality of randomized equipment.
Fixed a bug where old data would appear in a new campaign without exiting the game first.
Significantly decreased the likelihood of bugs where non-arsenal troops, such as bandits, have access to arsenals.
Version v1.1.8
Added an option to enable the vanilla loot system for those who prefer the original game mechanics.
Optimized the mechanism for random equipment received by AI parties, ensuring a more balanced and realistic distribution.
Implemented notifications for looting and recovering equipment, enhancing player awareness and interaction with loot dynamics.
Version v1.1.7
Fix a crash on sell extra equipments
Reduce the amount of equipments AI party received on recruiting
Version v1.1.6
AI troop will no longer be naked in battle.
Fix a crash on trading equipments for throwing weapons.
Players can now access the defeated enemy's armory post-battle, provided that the enemy troops had an armory system. If the enemy troops lack an armory system, the vanilla looting system will be used.
Added the 'Randomize Non-Hero-Led AI Parties Armor' option in the mod settings. This feature ensures that soldiers in AI parties that do not have an armory system will be equipped with randomized armor for battles, determined by their tier and cultural origins.
Version v1.1.5
Fixed an issue where mercenaries hired from taverns did not add their starting equipment to the armory.
Added two debug menu options in the armory menu to assist with resolving crashes when opening the armory. These menu options are visible only when debug mode is enabled in the mod settings.
Version v1.1.4
A new setting in the mod options allows players to adjust the quantity and quality of daily equipment received by AI troops.
Introduced a slider in mod options to set the probability of equipment being allocated to the armory when enemies are killed or knocked out. This slider ranges from 0% to 100%.
Resolved an issue with horse and camel saddles being incorrectly assigned. Saddles are now correctly matched with appropriate mounts, preventing model stretching and display errors.
Implemented an option to trade excess equipment for throwing weapons in one click, while retaining a reserve of spare gear.
Version v1.1.3
Now applies to AI parties led by heroes.
Version v1.0.15
Mounted archers will no longer obtain weapons that cannot be reloaded on horseback.
The criteria for prioritizing appropriate weapon types have been made more stringent.
Cavalry upgrades no longer require horses.
Soldiers can no longer use weapons that exceed their skill level.
Version v1.0.14
Now allowing the acquisition of multiple consumable weapons (arrows, crossbow bolts, and throwing weapons) when recruiting new troops.
Corrected an issue where player-led armies and garrisons of player settlements were also using the armory.
Version v1.0.13
When recruiting soldiers with multiple sets of equipment, only one set of armor will be obtained, while all weapons will be acquired. Identical weapon types will be consolidated to avoid duplicates.
Used arrows, crossbow bolts, and throwing weapons will no longer be recoverable after battle. Full quantities can be recovered only if they haven't been completely used up.
Implemented a new feature to prevent the looting of armor from the fatal injury location on soldiers.
Version v1.0.12
Fix equipment may not recovered when battle not resolved
Fix melee weapon assigned to throwing weapon slot
Version v1.0.11
Implemented a log system which can be enabled through the debug mode option in settings.
Resolved the problem where troops were not receiving the best available equipment.
Addressed the issue of losing horses during siege battles.
Enhanced the logic for determining weapon categories.
Version v1.0.10
Resolved an issue where equipping items with properties like Rusty or Fine in the stash resulted in the duplication of weapons after battle. The count of such specially attributed equipment remains unchanged now, and any equipped items will return to the stash without duplicating their properties.
Fixed a bug that prevented the recovery of troop equipment under certain circumstances.
Made an attempt to fix the bug causing crashes when enemies flee.
Version v1.0.9
Fix equipment didn't recovered if battle didn't resolved
Fix soldiers not in battle lost their equipment
Version v1.0.8
Fix assigned extra equipment may get duplicated after battle
Fix horse not recoverable after battle
Version v1.0.7
1. Optimized Weapon Slot Allocation:
- Surplus arrows and bolts are now allocated to ranged troops with available slots.
- Extra shields are distributed to shieldless soldiers who have one-handed weapons.
- Surplus throwing weapons are allocated to soldiers lacking such weapons.
- Excess two-handed and polearm weapons are distributed to soldiers without these weapon types.
2. Removal of Unrecoverable Items:
- Broken shields and used arrows/bolts will no longer be collected from the battlefield.
3. Bug Fix Attempt:
- Addressed a bug causing game crashes when enemies flee.
Version v1.0.6
Enhanced Equipment Distribution Logic
1. Priority for High-Tier Troops: Advanced soldiers will now have priority access to high-tier equipment.
2. Cavalry Weapon Optimization: Weapons capable of lance charges are now preferentially allocated to cavalry units.
3. Infantry Weapon Adjustments: Reduced the likelihood of infantry receiving lances. Increased the allocation of weapons that are bracable, offer bonus damage against shields, can dismount enemies, or have the capability to knock down opponents.
Version 1.0.1
See description
In versions 1.1.10 and later, when launching the game and entering the grand map, you may experience brief lagging lasting from a few seconds to about ten seconds. This is considered normal. Please be patient and wait a few seconds to ten seconds, and the lag will resolve itself automatically.
Armory System
Soldiers no longer magically receive new equipment upon leveling up.
Parties now have dynamic armory. Equipment from defeated non-hero enemy units is added to this armory.
Each soldier's equipment is no longer fixed; instead, they select the most suitable gear from the army's armory when entering the battlefield, and return it to the armory upon leaving the battlefield or falling in battle.
Newly recruited soldiers contribute their initial gear to the armory.
The armory can be accessed and managed from the town menus.
Equipment Distribution Logic
Before battle, the armory evaluates each soldier's equipment slots. It then equips them with the highest quality weapon available that matches their original equipment from the vanilla game.
Weapon matching and distribution occur in four distinct rounds:
1st Round: Requires an exact match in weapon type and function. For example, a one-handed sword only for slashing can only be matched with another one-handed sword of the same type. A one-handed sword that can both stab and slash, or a one-handed sword that is slash-only but can also be wielded with two hands, does not qualify for a match. In this round, when allocating polearms to cavalry, only lances specifically for mounted combat are considered, and infantry will not be assigned such lances.
2nd Round: Subtype matching. For instance, a weapon that can be used as a one-handed polearm can be matched with another that functions as a one-handed polearm, even if the latter can also be used as a two-handed polearm, or if one is for slashing and the other for stabbing. Throwing weapons and melee weapons are not regarded as the same category.
3rd Round: Broad type matching (e.g., both are “one-handed weapons”). For example, a one-handed sword can be matched with a one-handed axe. In this round, when allocating polearms to cavalry, only lances specifically for mounted combat are considered, and infantry will not be assigned such lances.
4th Round: Broad type matching (e.g., both are “one-handed weapons”).
Each round only fills slots left empty from the previous round.
Soldiers without weapons are allocated a random melee weapon.
Higher-tier soldiers are prioritized.
Surplus arrows, shields, throwing weapons, and two-handed/polearms are allocated based on existing equipment.
Mounted units, including archers, won't receive weapons unsuitable for use on horseback.
Functionality for AI Parties
AI parties led by heroes will have access to an armory mechanism.
Upon creation, AI parties receive original equipment consistent with the soldiers in their party, similar to when the player recruits new troops.
AI parties can loot enemy armories through battle.
Daily, AI parties receive random equipment, as detailed below:
They obtain equipment that their soldiers would normally have in the vanilla game, with the quantity depending on the total number of troops in the party.
They randomly receive equipment matching their clan's culture. The quantity is influenced by the clan tier, which also serves as the upper limit for the level of equipment received.
Equipment is received based on their fiefs, with each town, castle, or village providing one piece of equipment daily, aligned with the culture of the settlement. The tier of equipment provided is capped by the settlement's prosperity level.
Additional Mechanics
Consumable weapons (arrows, bolts, throwing weapons) are only recoverable if not completely used up.
Cavalry upgrades do not require horses.
Soldiers are limited to using weapons within their skill level.
Broken shields and used ammunition are not collected.
Armor receiving fatal or critical hits may not be salvageable.
After defeating an enemy army with an armory, the standard loot system is replaced with the remaining contents of the enemy's armory.
Upon the initial launch of this mod, a blacklist.json file will be generated in the mod folder. You can edit the item blacklist within this file. When editing, you can use either regular expressions or exact matching to filter items, based on their stringId and localized name. Items that meet these matching criteria will not appear randomly in the game or be lootable.
Compatibility and Requirements
Should be compatible with mods not introducing new equipment types.
Tested and confirmed compatibility with RBM, OSA, DRM, and BannerKings.
Note that there may be bugs related to equipment crafting.
Recommended to use the BLSE launcher for optimal performance.
Requires Harmony, UIExtenderEx, ButterLib and MCM.
FAQ
Q: Why is my army naked?
A: If you load a save that wasn't previously using this mod, your armory will be empty. You need to manually purchase weapons and put them in the armory for your soldiers. Ensure your soldiers have enough equipment; otherwise, they will appear naked or unarmed.
Q: My equipment is missing!
A: Armor that protects a fatally or critically hit area can be damaged when soldiers are killed or knocked out. If multiple armors protect the same area, one is randomly chosen to be damaged based on their protection value. Used arrows, bolts, throwing weapons, and damaged shields are also not recoverable. If you use mods that cause weapons to drop (like RBM) or other mods leading to soldiers discarding their weapons, dropped weapons won't be collected unless picked up again by soldiers. When equipment is assigned from or returned to the armory, its modifier (prefix) is removed. Consequently, your equipment with prefixes may no longer exist as distinct items after a battle; instead, they merge with the unmodified versions of that same equipment. Additionally, two known bugs can lead to equipment loss: first, allowing cavalry to participate in hideout battles may result in the loss of their mounts and horse harnesses, so avoid using cavalry in hideout battles; second, soldiers carrying banners may lose weapons replaced by banners. If your case doesn't fit any of these scenarios, please let me know.
Q: I've encountered a bug!
A: Head to the bug report section here. When reporting, please follow these guidelines:
Description of the Bug: Briefly describe the issue you're experiencing.
Context and Conditions: Explain where and under what conditions the bug occurs. Include information on the bug's frequency (always, often, sometimes, or rarely).
Expected vs. Actual Behavior: Describe what you expected to happen and how it differed from what actually occurred.
Crash Reports: If the bug results in a crash, please attach the complete crash report.
Steps to Reproduce: If the bug can be reliably reproduced, enable 'Debug Mode' in the mod's settings menu before the bug occurs. After the bug happens, send me the log.txt file located in Mount & Blade II Bannerlord\Modules\Bannerlord.DynamicTroop\bin\Win64_Shipping_Client.
Other Mods: List any other mods you are using, as this can help identify potential conflicts.