1 items

File information

Last updated

Original upload

Created by

MFive

Uploaded by

MFiveM5

Virus scan

Safe to use

About this mod

Dynamic Clan System is a mod for Mount & Blade II: Bannerlord that brings a new level of depth and dynamism to the game's clan and kingdom mechanics.

Share
Requirements
Permissions and credits
Donations
Support me, crypto, TRX: TAXZH7JskFoU35axMdeNsEJgBbp1LfhXV8


Dynamic Clan System:

Dynamic Clan System is a mod for Mount & Blade II: Bannerlord that brings a new level of depth and dynamism to the game's clan and kingdom mechanics. Designed to enhance the sandbox experience, this mod introduces dynamic clan spawning, growth, sieges, and kingdom creation, making the world of Calradia feel more alive and unpredictable. Whether you're a warlord building an empire or a lone adventurer, this mod ensures that the political landscape is constantly evolving.

Features:

  • Dynamic Clan Spawning: New clans emerge in Calradia at customizable intervals, each with unique names and leaders. Control the frequency and maximum number of clans to shape the world’s chaos or stability.
  • Clan Growth and Progression: Clans evolve over time, gaining renown, increasing their tier, and recruiting new parties. Fine-tune growth intervals and renown gains to balance their power.
  • Customizable Faction Choices: New clans can join existing factions, remain independent, or pledge loyalty to the player’s kingdom, with adjustable probabilities for each outcome.
  • Siege Coordination: Clans can initiate sieges against settlements, with configurable requirements for clan strength and daily siege chances. Watch as clans strategically challenge the map’s power balance.
  • Kingdom Creation: Ambitious clans can form their own kingdoms, adding new factions to the game world. Control the likelihood of kingdom creation to create a dynamic political landscape.
  • Extensive Customization: Through the Mod Configuration Menu (MCM), tweak every aspect of the mod, from clan spawn rates to siege requirements and debug settings for detailed feedback.
  • Debug Mode: Enable detailed logging to monitor clan activities, sieges, and growth in real-time, perfect for modders and players who want to dive into the mechanics.
Why Choose Dynamic Clan System?
This mod is perfect for players who want a more immersive and unpredictable Bannerlord experience. By introducing new clans and enabling them to grow, fight, and form kingdoms, Dynamic Clan System ensures that no two playthroughs are the same. Whether you’re forging alliances, crushing rivals, or watching the world descend into chaos, this mod adds a layer of strategic depth that keeps Calradia vibrant and engaging.

Installation:

  • Requirements:
    • Mount & Blade II: Bannerlord (version 1.2.0 or higher recommended).
    • Mod Configuration Menu (MCM) v5 (required for settings).
  • Steps:
    • Download the mod from [Nexus Mods].
    • Extract the DynamicClanSystem folder to your Modules directory (e.g., SteamLibrary\steamapps\common\Mount & Blade II Bannerlord\Modules).
    • Ensure MCM is installed and enabled.
    • Activate Dynamic Clan System in the game’s mod launcher.
    • Configure settings via the in-game MCM menu under “Dynamic Clan System.”
Configuration:

Access the mod’s settings through the MCM menu to customize:

  • Clan Creation: Set spawn intervals, maximum clan counts, and tier ranges.
  • Clan Growth: Adjust renown gains, party limits, and growth tiers.
  • Sieges: Enable/disable sieges, set strength requirements, and tweak daily siege chances.
  • Kingdoms: Allow clans to create kingdoms and control the probability.
  • System Settings: Enable debug modes for detailed logs and choose whether all clans or only mod-created clans follow the mod’s logic.
Known Issues:
 
  • Ensure the game language is set to a supported language (English or Russian) for proper localization. If localization fails, check the mod’s XML files and clear the game cache (C:\ProgramData\Mount and Blade II Bannerlord).
  • Debug logs may spam the in-game chat if debug mode is enabled. Disable it for a cleaner experience.
  • When using the modification, use the new campaign to avoid unnecessary problems. I have not yet figured out the reasons for crashes when connecting to existing saves.
  • So, for those who have a crashed modification, when loading the game, open the mod settings and go to ButterLib. Look for the SubSystem Distance Matrix section, there are two flags, turn on the first "Consider Villiage", turn off the second "Enable".
    Dynamic Clan Settings uses path calculation, and for some reason there is a conflict with ButterLib.
Credits:
 
  • Developer: [MFive] – For creating and maintaining the mod.
  • MCM Team: For the Mod Configuration Menu framework.
  • Bannerlord Modding Community: For tools, documentation, and support.

DETAILED INFORMATION ON HOW THE MOD WORKS (DEV):

Main components of the mod:

The mod consists of several key behaviors (behaviors) that are integrated into the Bannerlord game system through a system of events and ticks (game cycles). Here are the core components:

        1. ClanSpawner (Clan Creation Mechanism)
This component is responsible for generating new clans in the game. When the game starts or loads, ClanSpawner initializes and checks if new clans should be created. It creates clans with unique identifiers (prefixed with dcs_) that are different from vanilla clans. When created, a clan is given basic characteristics:

  • Clan Leader (generated as a new hero).
  • Clan culture (based on available cultures in the game).
ClanSpawner can also load clan data from external files (JSON) so that developers can customize clans in advance, including their names.

       2. ClanGrowthManager (Clan Growth Manager)
This is the core of the mod that manages the growth and development of clans. ClanGrowthManager works based on periodic ticks (game cycles) that occur every few game days. Here's how it functions:

  • Clan list update:
The manager maintains a cache of clans that are covered by the mod. This can be all clans in the game (if the appropriate setting is enabled) or only clans created by the mod with the prefix (dcs_). The cache is updated when the game loads or when the clans change (for example, if a clan leaves the kingdom).

  • Clan Growth:
The manager checks the level (tier) of each clan. If a clan is below the maximum threshold (e.g. tier 5), it is added renown at a set rate.

  • Creating reinforcements:
If a clan has fewer units than the maximum number of units allowed (e.g. 3), the manager randomly decides whether to create a new unit. The probability of creation depends on the mod settings.
A new troop is created in one of the clan's fortifications (city or castle). If the clan has no fortifications, a random settlement corresponding to the clan's culture is chosen.
The leader of the new squad is generated as a new hero with characteristics that depend on the clan culture.

  • Creation of kingdoms:
If a clan is not part of a kingdom and owns a fortification (city or castle), the manager can initiate the creation of a new kingdom.
The probability of creating a kingdom is determined by a random roll based on the mod settings.
When a kingdom is created, a new kingdom object with a unique identifier (e.g. dcs_kingdom_) is generated. The kingdom is given:
Name and description (loaded from an external file, , KingdomNames.json).
Culture inherited from the clan.
Banner (created randomly using the game's banner system).
The clan becomes part of the new kingdom, and its relations with other factions are transferred to the created kingdom. That is, if a clan has declared war on Vlandia and captured their settlement, the creation of the kingdom will automatically establish war between Vlandia and the new kingdom. Also, all wars that this clan has will be transferred to the new kingdom.


       3. SiegeCoordinationBehavior (Siege CoordinationBehavior)
This component manages sieges that are initiated by clans that fall under the mod. It works as follows:

  • Checking the conditions for a siege:
Every game day, the manager checks clans from the cache.

  • Conditions for starting a siege:
The clan is not in a kingdom.
The clan is not participating in another siege.
The clan has enough units (e.g. minimum 3 units).
The total strength of the clan's units exceeds a given threshold (e.g. 300 soldiers).
The clan level is high enough (from tier 4 or higher, as kingdoms can create clans from tier 4. I did it under vanilla).

  • Target Selection:
If the conditions are met, a random fortification (city or castle) that is not owned by a clan and is not under siege is chosen.
The target becomes the faction that owns the fortification (it can be a kingdom or another clan).

  • Siege Initiation:
The manager uses Bannerlord's built-in siege system to initiate a siege. The main clan unit (clan leader) heads to the chosen fortification, and all clan members start following the leader. The leader, having arrived at the chosen settlement for the siege, waits there for 3 game days and then starts the siege. The clan members who managed to come to the leader start the siege together with him. Those who did not make it in time, can join if they have time before the end of the siege.

  • Siege CoordinationBehavior siege state management:
SiegeCoordinationBehavior keeps track of the state of the siege. If the siege ends (win, lose or cancel), all clan units are released for new actions.
When the game loads, all active siege plans created by the mod are canceled to avoid conflicts with the base game.

       4. SubModule (Mod Entry Point)
SubModule is the main class that integrates the mod into the game. It performs the following functions:

  • Initialization:
When the mod is loaded, SubModule registers all behaviors (ClanSpawner, ClanGrowthManager, SiegeCoordinationBehavior) in the game system.
Outputs a message to the log that the mod was successfully loaded.

  • Event Handling:
SubModule subscribes to game events, such as starting a session, loading a game, or starting a tick, and passes them to the appropriate behaviors.

  • Logging:
The SubModule provides a common logging system that is used by all components of the mod. Messages are output to the game console with different colors depending on the level of logging (e.g. green for info, red for error).