Skip to content

Repository files navigation

Castle Market Towns

A Mount & Blade II: Bannerlord mod that turns castles into small market towns while they stay castles.

Download: Castle Market Towns on Nexus Mods

Why this mod exists

Throughout history, castles were never only military outposts. They were the seats of lords, built to protect the surrounding fiefs, villages and lands, and markets, craftsmen and trade grew up around their walls.

In Mount & Blade II: Bannerlord, castles have been largely neglected. Almost every economic and social feature, from markets and taverns to workshops, merchants and caravans, belongs to the towns (cities), while a castle is little more than a garrison with walls.

Castle Market Towns overhauls castles to give them the life they deserve. They gain trade, people and income, scaled to sit between a village and a town, and they remain proper castles.

Town vs. castle vs. Castle Market Towns castle

Feature Town (vanilla) Castle (vanilla) Castle with this mod
Settlement menu Town menu Castle menu Castle menu, with extra options. The dungeon, donate/manage garrison, stash and lord's hall move under Go to the castle, as towns keep them under Go to the keep. Talk to the garrison commander (lord troop-delivery quests) stays on the main castle menu, as it does on the main town menu
Entering Walk in unless at war or wanted. The keep may ask for a bribe. At war / wanted: disguise or face charges, meet someone, leave Ask the guards. Visitors from outside the kingdom with clan tier below 3 pay a bribe at the gate. At war: no town-style sneak Town-like at the market gate when welcome; your own covered castle walks in like a town you own (no FaceCharges from faction crime). Early on, low relation or clan tier can still refuse you (same idea as vanilla). At war or with enough crime elsewhere: disguise / face charges like a town (castle wording for sneak). Go to the castle keeps the keep bribe. An active Deliver a Herd to that castle (coverage not required) or Artisan Can't Sell to a covered castle adds Deliver Herd to Guards / Deliver Items to Guards on refuse / sneak / charges menus (half reward). A lord's Needs Garrison Troops quest shows Talk to the garrison commander on the main castle menu (as in towns), not only at Approach the gates
Market and trade Yes No Yes, smaller. Starts with 25% of the nearest reachable same-culture town's goods, falling back to the nearest reachable town. Prices follow the castle's own supply and demand, and the Trickle Down trade perk works there, as in towns. AI lords sell loot there and travel there to buy food, as they do in towns. With AutoTrader and AutoTrader support on, Automatically trade wares sits next to Trade and uses this castle market
Own production From its villages None 20% of its villages' output, on top of what they send to their town
Tavern Yes No Yes, using the town tavern scene
Companions to hire In the tavern None In the castle tavern. A small one-time seed uses the active companion system's creation rules; afterward free companions move between towns and nearby castles over time
Merchants and artisans Yes None 2 merchants and 2 artisans
Workshops 4 slots None 2 slots. Bought from castle notables and managed from the clan screen like a town workshop, with its own warehouse
Workshops you can own Clan tier + 1, across all towns None, castles have no workshops Clan tier + 1 across all castles, a limit separate from towns that mods changing the town limit do not affect. Town and castle limits each have their own optional extra, and the castle limit can be set to a fixed number or removed
Caravans Formed by town merchants None Formed by castle merchants (default two active caravans per covered castle; optional unlimited). Caravans also trade at castles, with anti-loop / congestion scoring. Optional size percent when Caravan Party Limit Increased Fixed is installed
Volunteers from notables Yes None Yes, at 65% of a town's speed, 50% chance of noble troops
Noble recruits from villages No Yes Yes, unchanged
Prosperity About 1,700 to 5,600 About 420 to 1,100 Raised to at least 1,000, grows with trade
Prosperity tax Full Low 80% of a town at the same prosperity
Marketplace project Yes No Yes, at 60% of the town cost
Rebellion Yes Never Yes, can be switched off
Town healing perks Yes No Yes
Smithy Yes, with smithing orders No Yes, without smithing orders
Siege food from the market Yes No Yes
Merchant, artisan and village quests Yes None A selection that fits a castle: village Deliver a Herd and Family Feud via castle villages, Artisan Can't Sell to a town or covered castle, and the other castle quest toggles. Guard delivery options appear while that quest is active and the market gate is blocked (herd ignores coverage loss until soft-cancel; artisan needs coverage). If the castle loses CMT coverage, those quests and open issues cancel softly with a journal note (no fail penalties; herd animals are kept; failed cancels retry without mixing castles). Turning off only a quest MCM toggle does not cancel ongoing quests
Training for you and your companions No No Skills and attributes, for gold and influence, with a cooldown
Arena and tournaments Yes No No
Walking the streets in third person Yes No No
Brothel (Captivity Events) Yes No No

All numbers are the defaults and can be changed in the mod's options.

How features were chosen

Every town feature was weighed against a few rules. A feature was included only if it passed all of them.

  1. A castle stays a castle. The game never treats a castle as a town. Castles keep the castle menu, walls, garrison, sieges and noble recruits from their villages. Walls, garrisons and siege rules are unchanged, so castles do not become harder for AI lords to take and campaigns do not drag on.
  2. Between a village and a town. Every value sits between the two. A castle has 4 notables, between a village's 3 and a town's 5, and its tax, production, recruits and prosperity are scaled the same way. A new castle starts modest and grows through trade. Only a castle with a long run of good trade, next to a town in trouble, can come close to a town.
  3. Towns remain the economic centres. A castle's villages still deliver all their goods to their town. The castle gains its own share of production on top, and sells any surplus to its town, as villagers do. Towns never lose stock, prosperity or stability because of this mod.
  4. Only what a castle can actually host. Castles have no arena and no town streets in the game. Arenas, tournaments, town streets to walk in third person, and the quests that depend on them were left out on purpose, rather than added in a broken state. The base game's Take a walk around the castle stays. A castle tavern uses the town tavern scene, so it is included.
  5. A lord's seat, not a pleasure district. Brothels from other mods are kept out of castles.
  6. Optional and reversible. Most features have their own switch. Town-style castle entry and the Go to the castle menu have none; they follow Enable castle markets and the two Apply to switches. Turning coverage off returns the castles to vanilla and removes only what the mod added; active castle quests and open issues for that castle cancel softly first. One-time seeded companions remain as ordinary game companions and move out of castles once they are free to move; they are not deleted. Keep brothels out is the other deliberate exception: it is independent of the master switch and removes any castle location named brothel until its own switch is turned off. Skills and attributes gained from castle training are not taken back either; they are your heroes' own progress.

Castle training

In castles the mod covers, Go to the castle has Visit the castle trainers. You, and the adult companions and family members of your clan who travel in your party, can train there; heroes elsewhere, prisoners and visiting lords cannot.

  • Train martial skills (One Handed, Two Handed, Polearm, Bow, Crossbow, Throwing, Riding, Athletics, Scouting, Smithing) and Study administrative skills (Leadership, Tactics, Steward, Trade, Engineering, Charm, Roguery, Medicine) cost 1,000 gold and 10 influence per session, however many heroes train. Each hero gains 2 to 10 levels in up to 3 random skills of the group that are below 150, and no skill goes above 150. Levels are added directly: learning limits and focus points do not reduce them, and they give no character experience, so heroes do not level up from training.
  • Train an attribute raises one attribute of one hero by 1, never above the game's maximum, for 5,000 gold and 25 influence.
  • After training, a hero waits 7 days before training skills again, and separately 7 days before training another attribute, at any castle. The trainers' menu shows when each hero is ready.
  • The cost is checked before anything is paid, the result lists what each hero gained, and the trainers are closed during a siege.

The Castle training group in MCM switches the whole feature on or off (on by default) and sets the costs, skills per session, the gain range, the skill cap, both cooldowns (skills 2 to 15 days, attributes 5 to 20) and whether you and your companions may train. Training changes are permanent character progression and remain in the save if the mod is disabled or removed.

Mod options (MCM)

All values and features can be changed in the game through Mod Configuration Menu (MCM), under Options > Mod Options > Castle Market Towns, without restarting. You can switch features on or off, choose which castles are covered (your clan, your kingdom, or everyone), and adjust:

  • the number of merchants, artisans, and workshop slots in castles and in towns;
  • separate extra limits on how many workshops you can own in towns and in castles, or a fixed or unlimited castle limit;
  • the prosperity floor, starting market stock, production and consumption;
  • the tax and trade prosperity;
  • recruit speed and noble recruit chance;
  • caravan preferences;
  • companions in castle taverns, with their arrival chance, departure chance and minimum stay;
  • the Marketplace cost;
  • each castle quest;
  • castle training: costs, skill gains, the skill cap, cooldowns and who may train;
  • Improved Garrisons support, if that mod is installed;
  • AutoTrader support, if that mod is installed.

Food and reserves: Castle reserve days protects market items from automatic surplus export and AI-lord purchases. It is separate from the castle's Food Stocks meter and does not guarantee protection from starvation; the castle can still consume the reserved food.

Requirements and versions

Dependency Tested version Expected to work with
Mount & Blade II: Bannerlord 1.4.8 1.4.x and 1.5.x
War Sails (NavalDLC), optional 1.2.8 1.2.x
Bannerlord Software Extender (BLSE), optional 1.7.5 1.x
Harmony 2.4.2 2.x
ButterLib 2.12.0 2.x
UIExtenderEx 3.0.3 3.x, as required by MCM 5.13
Mod Configuration Menu v5 (MCM) 5.13.1 5.x

This mod needs Harmony and MCM directly. MCM in turn needs ButterLib and UIExtenderEx.

Built and tested on Bannerlord 1.4.8. The expected game versions are 1.4.x and 1.5.x. Players have reported it working on 1.5.x betas (including 1.5.5); that is community confirmation, not a full retest of every feature on 1.5.

BLSE is optional. As Harmony's page notes, it is not required on Steam, GOG or Epic, and none of the mods above require it there. This mod does not use it either. BLSE improves mod load-order sorting and crash reporting, and the Xbox / PC Game Pass version of the game needs it.

The mod only uses the stable public parts of Harmony and MCM, so newer releases with the same major version (Harmony 2.x, MCM 5.x) should work without changes. A new major version, such as MCM 6, may need an update of this mod.

Bannerlord updates can change the game code this mod adjusts. If that happens, the affected feature stays inactive and a message naming it is written to the game log, instead of the game crashing.

With War Sails, castles only link to towns they can actually reach. Caravans use the base game's land or mixed sea-and-land navigation to visit castle markets, including the castle on the northern island. Castles remain portless, and ship services remain exclusive to real ports.

Compatibility

  • Compatible with Hot Butter and Captivity Events.
  • AutoTrader (tested with 1.4.6) is supported without being required, and its files are never changed or listed as a dependency. With AutoTrader support on in MCM (the default), covered castle menus get Automatically trade wares (ATTrade) next to Trade, calling AutoTrader's own action so its Alt+A settings still apply. AutoTrader trades against the castle market (CMT prices and Trickle Down still apply when you finish); its average-price search still uses towns and villages only. Town, village, caravan and War Sails port AutoTrader paths are untouched. Support is fail-closed: if AutoTrader is missing, its API no longer matches, or a runtime call fails, the castle option stays off (one log message) and classification falls back to vanilla IsTown.
  • Improved Garrisons (tested with 4.3.0.3) is supported without being required, and its files are never changed. Its garrisons recruit from castle merchants and artisans as they do from town notables, and its management screen shows the castle Marketplace, the castle's daily defaults, castle workshops and castle tax. With Improved Garrisons support on in MCM (the default), in castles this mod covers its button moves into Go to the castle, as it sits in Go to the keep in towns; its project tooltips show the castle Marketplace tariff and the Castellan's Office tax; and its recruiter, patrol and mobile garrison parties treat those castles like towns, recruiting from castle notables, selling loot and buying horses in the castle market. Its Gold change figure leaves out tariff income, for towns and castles alike. If an Improved Garrisons update changes the parts this mod adjusts, that support stays inactive and the game log names it.
  • CompanionsCraft (tested with 1.1.0) is supported without being required, and its files are never changed. When you leave a castle, its companions buy hardwood, charcoal, iron ore and iron from the castle market at the castle's prices, as they do in towns. In 1.2.0 and earlier, leaving a castle whose market stocked any of these crashed the game. Refining stays in towns, as in CompanionsCraft itself. If a CompanionsCraft update changes the part this mod adjusts, that support stays inactive and the game log names it.
  • They Married (tested with 1.1.5) is supported without being required, and its files are never changed. Children born to married wandering companions stay with their caretakers instead of being sent to castle taverns. When you send a companion to a clan whose home is a castle this mod covers, and Recruit troops in castles is on, the new lord's starting troops include recruits from the castle's merchants and artisans, as they already do from town and village notables. If a They Married update changes its starting troops, that support stays inactive and the game log names it.
  • Not compatible with other mods that turn castles into towns or overhaul castle menus, markets, notables or buildings. Both mods would change the same castle objects. To switch to another castle overhaul, remove this mod first (see below).
  • Castle Redux (checked with 1.3.3) is one of those overhauls and is not supported, even with most of its options turned off. Its extra notables feature adds village headmen to castles, and the base game can give them village quests such as Bandit Base Near a village, which expect a village and fail or throw errors in a castle. While its castle recruitment is on, it also stops every castle notable from offering quests, including the castle quests of this mod. The headmen it creates stay in a save after it is switched off or removed. Its castle markets, recruitment, smithy, training, menus and caravan trade overlap this mod as well.
  • Companions: unhired companions can appear in castle taverns. On the first eligible day, the active companion system creates a small one-time group in different castles; afterwards, companions move between towns and nearby castles over time. This works with the base game and with companion overhaul mods that keep the base game's way of creating companions; if none is found, castle taverns fill only as companions move from towns. Only adults without a clan are sent to castles, and arrivals stop once castles hold a third of the free companions. The Castle companions group in MCM sets how often they arrive, leave and stay. War Sails is supported without being required. If a companion mod causes problems in castles, turn off Companions in castle taverns: companions go back to towns once they are free to move, and the rest of the mod is unaffected. Seeded companions stay in the world as normal companions.

Translations

The mod ships in English. All of its text, including every MCM setting and hint, is in ModuleData/Languages/EN/cmt_strings_en.xml, and castle menu lines taken from the base game appear in the game's own translation. Anyone may publish a translation as a separate mod that requires Castle Market Towns, without changing its files. TRANSLATORS.md explains how.

Installation

  1. Install Harmony, ButterLib, UIExtenderEx and MCM. BLSE is optional on Steam, GOG and Epic.
  2. Download Castle Market Towns from Nexus Mods. Install it with Vortex (Mod Manager Download), or extract the CastleMarketTowns folder into Mount & Blade II Bannerlord\Modules.
  3. Start the game launcher, or the BLSE launcher if you use it. Enable Castle Market Towns and place it after Harmony and MCM.

The mod can be added to an existing campaign.

Removing the mod from a campaign

The mod adds no save types of its own, so a save still loads without it. To return castles to vanilla before removing it:

  1. Load the campaign. In MCM, turn off Enable castle markets.
  2. Let three or more in-game days pass. Each castle cleans up on its daily update:
    • active castle quests and open issues tied to that castle are cancelled softly (journal note, no fail penalties; herd animals are kept) before notables leave;
    • workshops you own in the castle are sold to one of its notables at the base game's price, or to a notable of the nearest town if none is left. Their warehouse goods go to your party if you are in the castle, to the castle stash if your clan owns it, and are otherwise sold at the castle's price;
    • the tavern, mod workshops and castle Marketplace are removed;
    • the goods and prosperity the mod added are taken back;
    • merchants and artisans created by the mod move to the nearest reachable town of the castle's culture, or the nearest reachable town if none exists;
    • tracked unhired companions, including the one-time seeded companions, move by the same rule and remain normal companions in the world. A companion who is giving a quest, imprisoned or in a party moves only once that ends, so check castle taverns are empty before uninstalling, and leave the castle you are in so its companion can move;
    • daily defaults return to vanilla.
    • skills and attributes gained from castle training stay, as they are permanent character progression.
    • Keep brothels out continues to block castle brothels independently; turn that switch off too if you want another mod's brothel restored before uninstalling.
  3. Save to a new slot and exit.
  4. Disable or uninstall the mod.

Building from source

The repository contains only source code. The TaleWorlds, Harmony and MCM DLLs are not included; the build references them from your game installation.

Requirements:

  • Windows with .NET Framework 4.7.2 or later.
  • Visual Studio 2019 or later, or the Visual Studio Build Tools. The .NET Framework's own MSBuild also works.
  • Bannerlord with Harmony and MCM installed.

The code is limited to C# 5 so it builds with the .NET Framework compiler too.

Point the build at your game

Use one of the following:

  • Copy CastleMarketTowns.user.props.example to CastleMarketTowns.user.props and set BannerlordDir. Git ignores this file.
  • Set the BANNERLORD_DIR environment variable.
  • Pass /p:BannerlordDir="..." to MSBuild.

If none is set, the default Steam folder C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord is used.

Build

build.cmd

The DLL is written to bin\Win64_Shipping_Client\CastleMarketTowns.dll, so the repository folder has the same layout as the installed module.

To also copy SubModule.xml, ModuleData and the DLL into the game's Modules\CastleMarketTowns folder after each build, set DeployToGame to true in your CastleMarketTowns.user.props, or run:

build.cmd /p:DeployToGame=true

Close the game first, otherwise the DLL is locked.

Repository layout

CastleMarketTowns.csproj               Project file
CastleMarketTowns.user.props.example   Template for local build settings
build.cmd                              Finds MSBuild and builds the project
SubModule.xml                          Module definition loaded by the game
ModuleData/Languages/EN/               English text, the template for translations
src/                                   C# source
TRANSLATORS.md                         How to make a translation mod

License and credit

Copyright (C) 2026 AtanuDebbarma.

Castle Market Towns is free software under the GNU General Public License v3.0, with an additional attribution term described in NOTICE:

  • Using or modifying this code: if you publish a mod or other work that uses or is based on this code, you must credit Castle Market Towns by AtanuDebbarma with a link to this repository, in your source code and in your mod's documentation. Your work must also be released under the GPL v3.
  • Using it as inspiration: if this project inspired your work without you copying its code, a credit and link are kindly requested.

Mount & Blade II: Bannerlord is a trademark of TaleWorlds Entertainment. This project is not affiliated with or endorsed by TaleWorlds.