-
Notifications
You must be signed in to change notification settings - Fork 0
API Kingdom Overview
Category: Kingdom Management Commands: 17 commands API Version: 1.3.14.4 Status: STABLE
Kingdom management commands provide comprehensive control over the political entities and diplomatic landscape in Mount & Blade II: Bannerlord. These commands enable you to manipulate kingdom-clan relationships, manage diplomatic relations (war and peace), transfer territorial holdings (fiefs), change political leadership, and eliminate kingdoms from the game world.
Kingdoms are the highest-level political organizations in Bannerlord, encompassing multiple clans, controlling settlements (towns, castles, villages), and engaging in diplomacy and warfare. Each kingdom has a ruling clan, cultural identity, and complex diplomatic relationships with other kingdoms. The kingdom management system allows you to reshape the political map, create custom geopolitical scenarios, and test diplomatic mechanics.
All kingdom commands require campaign mode to be active. Many operations have far-reaching consequences affecting multiple clans, settlements, and diplomatic relationships simultaneously. Save file backups are strongly recommended before executing major political restructuring operations.
| Command | Description | Category | Status |
|---|---|---|---|
| gm.kingdom.create_kingdom | Create new kingdom with specified settlement | Generation | STABLE |
| gm.kingdom.generate_kingdoms | Generate multiple kingdoms at once | Generation | STABLE |
| gm.kingdom.add_clan | Add clan to kingdom | Clan Management | STABLE |
| gm.kingdom.remove_clan | Remove clan from kingdom | Clan Management | STABLE |
| gm.kingdom.declare_war | Declare war between kingdoms | Diplomacy | STABLE |
| gm.kingdom.make_peace | Make peace between kingdoms | Diplomacy | STABLE |
| gm.kingdom.declare_alliance | Form alliance between kingdoms | Diplomacy | STABLE |
| gm.kingdom.call_ally_to_war | Call allied kingdom to join war | Diplomacy | STABLE |
| gm.kingdom.trade_agreement | Establish trade agreement | Diplomacy | STABLE |
| gm.kingdom.pay_tribute | Establish tribute payment | Diplomacy | STABLE |
| gm.kingdom.get_tribute_info | Query tribute arrangements | Diplomacy | STABLE |
| gm.kingdom.rename | Rename a kingdom | Structure | STABLE |
| gm.kingdom.set_ruler | Change kingdom ruler | Structure | STABLE |
| gm.kingdom.equip_heroes | Equip all heroes in kingdom | Equipment | STABLE |
| gm.kingdom.edit_banner | Open banner editor for kingdom's ruling clan | Banner | STABLE |
| gm.kingdom.sync_vassal_banners | Sync vassal clan banner colors to kingdom | Banner | STABLE |
| gm.kingdom.destroy | Destroy/eliminate kingdom | Structure | STABLE |
Note: Settlement ownership is now managed through Settlement Commands. Use gm.settlement.set_owner, gm.settlement.set_owner_clan, or gm.settlement.set_owner_kingdom instead of the deprecated give_fief commands.
Commands for creating new kingdoms and generating multiple kingdoms at once.
gm.kingdom.create_kingdom - Creates a new kingdom with a specified settlement as the capital. A ruling clan is automatically generated, and vassal clans are created to populate the kingdom. The settlement ownership is transferred to the new ruling clan. This is ideal for creating custom kingdoms with specific names and locations.
gm.kingdom.generate_kingdoms - Generates multiple kingdoms at once by intelligently taking settlements from existing kingdoms. Alternates between kingdoms evenly, ensuring not to take any kingdom's last settlement. Perfect for fragmenting the political map or creating test scenarios with many kingdoms. All kingdom and clan names are randomly generated.
Commands for managing kingdom membership and clan affiliations.
gm.kingdom.add_clan - Adds a clan to a kingdom, making them a vassal. If the clan is already part of another kingdom, they automatically leave that kingdom first. This is the primary method for building custom kingdom compositions and reshaping political alliances.
gm.kingdom.remove_clan - Removes a clan from their current kingdom, making them an independent faction. The clan becomes politically autonomous but loses kingdom protection and benefits. Cannot remove the ruling clan (change ruler first).
Commands for managing diplomatic relations between kingdoms, including war, peace, alliances, trade, and tribute arrangements.
gm.kingdom.declare_war - Declares war between two kingdoms, setting them as hostile factions. This affects all clans and heroes within both kingdoms, enabling military actions, raids, and sieges. War has far-reaching effects on trade, party behavior, and AI decision-making.
gm.kingdom.make_peace - Establishes peace between two kingdoms that are currently at war, ending hostilities. Peace enables trade, diplomatic interactions, and removes combat restrictions. Kingdoms must be at war for this command to work.
gm.kingdom.declare_alliance - Forms an alliance between two kingdoms, establishing them as allied factions. Allied kingdoms support each other in wars and cannot declare war on each other while the alliance is active. Alliances affect diplomatic relations and enable military cooperation.
gm.kingdom.call_ally_to_war - Calls an allied kingdom to join a war against a target kingdom. The calling kingdom must already be at war with the target and have an active alliance with the ally kingdom being called. This causes the ally to declare war on the target.
gm.kingdom.trade_agreement - Establishes a trade agreement between two kingdoms, improving economic relations and enabling enhanced trade benefits. Trade agreements can improve relations and provide economic bonuses for both kingdoms.
gm.kingdom.pay_tribute - Establishes a tribute payment arrangement where one kingdom pays a specified daily gold amount to another kingdom. This represents diplomatic arrangements often used after wars or to maintain peace between kingdoms of unequal power.
gm.kingdom.get_tribute_info - Queries and displays all active tribute arrangements for a specified kingdom, including both tributes being paid and tributes being received. Shows amounts and involved parties for complete financial overview.
Commands for modifying kingdom political structure.
gm.kingdom.rename - Renames a kingdom to a new name. Use single quotes for multi-word names. The name change is immediate and affects all references to the kingdom.
gm.kingdom.set_ruler - Changes the ruler of a kingdom by setting a new ruling clan. The specified hero becomes both the clan leader (if not already) and the kingdom ruler. This affects kingdom decision-making, diplomacy, and political influence.
gm.kingdom.destroy - Permanently destroys and eliminates a kingdom from the game. All settlements are transferred to other kingdoms, member clans become independent, and all diplomatic relations are ended. This action is irreversible.
Commands for managing equipment for all heroes across a kingdom.
gm.kingdom.equip_heroes - Equips all heroes across all clans in a kingdom with level-appropriate equipment based on their combat skills. By default only equips BLGM-created heroes to preserve native character appearances. Can optionally equip all heroes including native game characters. Equipment is culturally appropriate and weapon loadouts are derived from individual hero skills. Useful for quickly outfitting entire kingdoms after generating new lords.
Commands for managing kingdom and clan banner colors.
gm.kingdom.edit_banner - Opens the native banner editor for the kingdom's ruling clan. This is a shortcut so you don't need to look up the ruling clan ID first. Changes made to the ruling clan's banner will propagate to the kingdom and all vassal clans.
gm.kingdom.sync_vassal_banners - Manually syncs all vassal clan banner colors back to match the kingdom's ruling clan banner colors. Useful if vassal clan banners were individually edited and you want to restore uniformity across the kingdom. WARNING: This will overwrite any custom clan banner colors for all member clans of the kingdom.
Most commands accept flexible kingdom identification:
-
StringId - Exact game identifier (e.g.,
empire,vlandia,battania) -
Partial Name - Substring match in kingdom name (e.g.,
emp,vland)
Commands involving clans accept:
-
StringId - Exact clan identifier (e.g.,
clan_empire_south_1) - Partial Name - Substring match in clan name
Settlement commands require:
-
StringId - Exact settlement identifier (e.g.,
town_empire_1,castle_battania_2) - Settlement names are case-sensitive
- Only towns and castles can be transferred
Ruler commands accept:
-
StringId - Exact hero identifier (e.g.,
lord_1_1) - Partial Name - Substring match in hero name
-
Special Keywords -
playerfor the player character
Create a new kingdom with a specific settlement and configuration:
gm.kingdom.create_kingdom pen 'Northern Alliance' 'House Stark' 5 vlandia,battania
Result: New kingdom created with Pen Cannoc as capital, 5 vassal clans, and custom names.
Generate multiple kingdoms to create a more complex political landscape:
gm.kingdom.generate_kingdoms 5 3
Result: Five new kingdoms created with 3 vassals each, distributed evenly across existing kingdoms' settlements.
Transfer clans between kingdoms to create custom alliances:
gm.kingdom.add_clan clan_battania_1 empire
gm.kingdom.add_clan clan_vlandia_2 empire
gm.kingdom.remove_clan clan_empire_south_4
Result: Two clans join Empire, one becomes independent, reshaping political landscape.
Control wars and peace between kingdoms:
gm.kingdom.declare_war empire battania
gm.kingdom.declare_war vlandia aserai
gm.kingdom.make_peace empire vlandia
Result: New wars started, existing conflict resolved, creating complex diplomatic scenario.
Change kingdom ruler to create succession scenarios:
gm.kingdom.set_ruler empire lord_1_2
gm.kingdom.set_ruler vlandia player
Result: New rulers take control of kingdoms, affecting policy and diplomacy.
Systematically eliminate a kingdom from the game:
gm.query.kingdom_info battania
gm.kingdom.destroy battania
Result: Kingdom permanently eliminated, territories distributed, clans become independent.
Always query kingdom information before major operations:
gm.query.kingdom empire
gm.query.kingdom_info empire
This confirms kingdom identity, shows member clans, and reveals diplomatic relationships.
When moving clans between kingdoms:
- Check if clan is the ruling clan (cannot be removed)
- Consider diplomatic implications (war status)
- Consider existing settlement ownership
For transferring settlements between kingdoms, use the Settlement Management Commands:
-
gm.settlement.set_owner_kingdom- Transfer to kingdom's ruling clan -
gm.settlement.set_owner_clan- Transfer to specific clan -
gm.settlement.set_owner- Transfer to specific hero's clan - Check settlement identifier with query commands first
Diplomatic changes have immediate effects:
- Declaring war enables immediate hostilities
- Making peace stops all combat
- Consider ongoing sieges and battles
- Review military positions before peace
When setting a new ruler:
- Hero must be a member of the target kingdom
- Hero's clan automatically becomes ruling clan
- Previous ruling clan becomes normal vassal
- Cannot remove new ruling clan after promotion
The gm.kingdom.destroy command has irreversible consequences:
- Kingdom is permanently eliminated
- All settlements are transferred to other kingdoms
- Member clans become independent factions
- All diplomatic relations are ended
- Player kingdom cannot be destroyed (safety restriction)
Always backup save files before kingdom destruction.
War and peace declarations can trigger unexpected consequences:
- AI may immediately react with new wars
- Trade routes are disrupted during war
- Allied kingdoms may join conflicts
- Peace may trigger AI diplomatic recalculations
Ruling clans have special protections:
- Cannot be removed from their kingdom
- Must change ruler first before removal
- Attempting removal generates error
When settlements change ownership:
- Garrison troops remain with settlement
- Bound villages transfer with parent settlement
- Notables remain in settlement
- Previous owner clan loses income
- New owner gains full control and income
Kingdoms at war experience:
- Active raiding of each other's territories
- Siege attempts on enemy settlements
- Interrupted trade caravans
- Modified AI behavior (aggressive stance)
- Relationship penalties between kingdom members
When clans are removed from kingdoms:
- They become minor factions
- Can still control settlements
- May be recruited by other kingdoms
- Lose kingdom protection and benefits
- AI may treat them differently
- Clan Management Commands - Manage clans within kingdoms
- Hero Management Commands - Manage kingdom rulers and members
- Query Commands - Search and find kingdoms
- Factions Reference - Political factions and kingdoms
- Cultures Reference - Cultural identities of kingdoms
- Quick Start Guide - Getting started with GameMaster commands
- Best Practices - Recommended usage patterns
- Troubleshooting - Common issues and solutions
Last Updated: 2/13/2026 API Version: 1.3.14.4
🏠 Home | Quick Reference | Syntax Guide
Hero Commands
- gm.hero.abort_pregnancy
- gm.hero.add_gold
- gm.hero.add_hero_to_party
- gm.hero.create_companions
- gm.hero.create_lord
- gm.hero.create_party
- gm.hero.divorce
- gm.hero.edit_appearance
- gm.hero.edit_party
- gm.hero.equip_hero
- gm.hero.export_character
- gm.hero.generate_lords
- gm.hero.give_birth
- gm.hero.heal
- gm.hero.import_character
- gm.hero.impregnate
- gm.hero.imprison
- gm.hero.kill
- gm.hero.list_appearances
- gm.hero.list_characters
- gm.hero.list_developments
- gm.hero.list_traits
- gm.hero.load_appearance
- gm.hero.load_character
- gm.hero.load_development
- gm.hero.load_traits
- gm.hero.marry
- gm.hero.open_inventory
- gm.hero.release
- gm.hero.remove_clan
- gm.hero.rename
- gm.hero.save_appearance
- gm.hero.save_development
- gm.hero.save_traits
- gm.hero.set_age
- gm.hero.set_clan
- gm.hero.set_culture
- gm.hero.set_gold
- gm.hero.set_relation
- gm.hero.start_convrsation
Clan Commands
- gm.clan.add_gold
- gm.clan.add_gold_leader
- gm.clan.add_hero
- gm.clan.add_renown
- gm.clan.create_clan
- gm.clan.create_minor_clan
- gm.clan.destroy
- gm.clan.edit_banner
- gm.clan.equip_heroes
- gm.clan.generate_clans
- gm.clan.give_gold
- gm.clan.rename
- gm.clan.set_culture
- gm.clan.set_gold
- gm.clan.set_leader
- gm.clan.set_renown
- gm.clan.set_tier
- gm.clan.sync_kingdom_colors
Kingdom Commands
- gm.kingdom.add_clan
- gm.kingdom.call_ally_to_war
- gm.kingdom.create_kingdom
- gm.kingdom.declare_alliance
- gm.kingdom.declare_war
- gm.kingdom.destroy
- gm.kingdom.edit_banner
- gm.kingdom.equip_heroes
- gm.kingdom.generate_kingdoms
- gm.kingdom.get_tribute_info
- gm.kingdom.make_peace
- gm.kingdom.pay_tribute
- gm.kingdom.remove_clan
- gm.kingdom.rename
- gm.kingdom.set_ruler
- gm.kingdom.sync_vassal_banners
- gm.kingdom.trade_agreement
Settlement Commands
- gm.settlement.add_militia
- gm.settlement.fill_garrison
- gm.settlement.give_food
- gm.settlement.give_gold
- gm.settlement.rename
- gm.settlement.reset_names
- gm.settlement.set_culture
- gm.settlement.set_hearths
- gm.settlement.set_loyalty
- gm.settlement.set_owner
- gm.settlement.set_owner_clan
- gm.settlement.set_prosperity
- gm.settlement.set_security
- gm.settlement.set_village_bound_settlement
- gm.settlement.set_village_trade_bound_settlement
- gm.settlement.spawn_wanderer
- gm.settlement.upgrade_buildings
Item Commands
- gm.item.add
- gm.item.equip
- gm.item.equip_slot
- gm.item.list_equipped
- gm.item.list_inventory
- gm.item.load_equipment
- gm.item.load_equipment_both
- gm.item.load_equipment_civilian
- gm.item.remove
- gm.item.remove_all
- gm.item.remove_equipped
- gm.item.remove_equipped_modifier
- gm.item.save_equipment
- gm.item.save_equipment_both
- gm.item.save_equipment_civilian
- gm.item.set_equipped_modifier
- gm.item.set_inventory_modifier
- gm.item.transfer
- gm.item.unequip
- gm.item.unequip_all
- gm.item.unequip_slot
Query Commands
- gm.query.character_objects
- gm.query.character_objects_any
- gm.query.character_objects_info
- gm.query.clan
- gm.query.clan_any
- gm.query.clan_info
- gm.query.culture
- gm.query.culture_info
- gm.query.hero
- gm.query.hero_any
- gm.query.hero_info
- gm.query.item
- gm.query.item_any
- gm.query.item_info
- gm.query.kingdom
- gm.query.kingdom_any
- gm.query.kingdom_info
- gm.query.modifier_info
- gm.query.modifiers
- gm.query.settlement
- gm.query.settlement_any
- gm.query.settlement_info
- gm.query.troop
- gm.query.troop_any
- gm.query.troop_info