-
Notifications
You must be signed in to change notification settings - Fork 0
API Bandit Overview
Category: Bandit Management Commands: 4 commands API Version: 1.3.13.2 Status: STABLE
Bandit management commands provide comprehensive control over bandit parties and hideouts in Mount & Blade II: Bannerlord. These commands allow you to monitor bandit populations, selectively remove bandit parties by type, clear hideouts, and completely eliminate all bandit presence from the game world.
Bandits are hostile non-faction mobile parties that roam Calradia, attacking villagers, caravans, and weak military forces. Hideouts serve as bandit bases where they respawn and gather strength. The bandit management command set enables you to control bandit populations for gameplay balance, test scenarios without bandit interference, or create custom difficulty environments.
All bandit management commands require campaign mode to be active. Bandit removal is permanent until natural game mechanics respawn them. It's recommended to understand the gameplay impact before eliminating large numbers of bandits, as they play a role in the game's economic and military ecosystem.
Note destroying all bandit parties will also clear all hideouts as the game considers a hideout cleared if it has no associated bandit parties.
| Command | Description | Category | Status |
|---|---|---|---|
| gm.bandit.count | Display counts of all bandit parties and hideouts | Information | STABLE |
| gm.bandit.destroy_bandit_parties | Destroy bandit parties by type | Party Management | STABLE |
| gm.bandit.clear_hideouts | Clear bandit hideouts by type | Hideout Management | STABLE |
| gm.bandit.remove_all | Remove all bandit parties and hideouts | Mass Removal | STABLE |
Commands for monitoring bandit populations and statistics.
gm.bandit.count - Displays comprehensive statistics for all bandit parties and hideouts. Shows total counts and breakdown by bandit type (Looters, Deserters, Forest Bandits, Mountain Bandits, Sea Raiders, Steppe Bandits, and Corsairs if Warsails DLC is loaded). Essential for understanding current bandit populations before executing removal operations.
Commands for removing bandit mobile parties from the game world.
gm.bandit.destroy_bandit_parties - Destroys bandit parties of specified types. Supports selective removal by bandit culture, allowing targeted control of specific bandit types. Can remove all bandits of a type or specify an exact count. Useful for reducing bandit pressure in specific regions or eliminating particularly troublesome bandit types.
Commands for clearing bandit hideouts and bases.
gm.bandit.clear_hideouts - Clears bandit hideouts of specified types. Hideouts are permanent locations where bandits gather and respawn. Removing hideouts reduces long-term bandit presence in regions. Supports selective removal by bandit culture and optional count limits.
Commands for complete bandit elimination.
gm.bandit.remove_all - Removes ALL bandit parties AND ALL bandit hideouts from the entire game world. This is a destructive operation requiring confirmation. Completely eliminates bandit presence, useful for testing scenarios, peaceful gameplay, or creating custom difficulty environments. Cannot be undone except through natural game respawn mechanics.
Most commands accept flexible bandit type identification:
- Keyword 'all' - All bandit types
-
Single Type - Specific bandit culture (e.g.,
looters,forest,mountain) -
Multiple Types - Comma-separated list with no spaces (e.g.,
looters,forest,steppe) -
Aliases - Shortened names (e.g.,
desertfor deserters,seafor sea raiders)
- looters - Basic bandits, lowest tier
- deserters / desert / desert_bandits - Deserter bandits
- forest / forest_bandits - Forest bandits
- mountain / mountain_bandits - Mountain bandits
- sea_raiders / sea - Sea raiders
- steppe / steppe_bandits - Steppe bandits
- corsairs / southern_pirates / pirates - Corsairs (Warsails DLC only)
Optional parameter for limiting removal operations:
- Omitted - Removes ALL matching bandits/hideouts
- Specified Number - Removes up to that number of matching bandits/hideouts
Check current bandit statistics before making changes:
gm.bandit.count
Result: Displays total parties, total hideouts, and breakdown by each bandit type.
Remove all looter parties to reduce early-game harassment:
gm.bandit.destroy_bandit_parties looters
Result: All looter parties are destroyed, leaving other bandit types intact.
Reduce forest bandit parties by a specific amount:
gm.bandit.destroy_bandit_parties forest 10
Result: Up to 10 forest bandit parties are destroyed, preserving some for gameplay.
Remove multiple bandit types at once:
gm.bandit.destroy_bandit_parties looters,deserters,steppe
Result: All looter, deserter, and steppe bandit parties are eliminated.
Clear mountain bandit hideouts in mountainous regions:
gm.bandit.clear_hideouts mountain
Result: All mountain bandit hideouts are cleared, reducing long-term bandit respawn in mountains.
Clear a specific number of hideouts:
gm.bandit.clear_hideouts sea_raiders 2
Result: Up to 2 sea raider hideouts are cleared, maintaining some bandit presence.
Remove all bandits for peaceful gameplay:
gm.bandit.remove_all confirm
Result: ALL bandit parties and hideouts are removed from the game world.
Monitor, selectively remove, then verify:
gm.bandit.count
gm.bandit.destroy_bandit_parties looters,deserters
gm.bandit.clear_hideouts looters 3
gm.bandit.count
Result: View initial populations, remove low-tier bandits, clear some hideouts, verify final state.
Always use gm.bandit.count before removal operations to understand current populations:
gm.bandit.count
This prevents accidentally removing more bandits than intended and helps gauge the impact of removal operations.
Use count parameters for gradual bandit reduction rather than complete elimination:
gm.bandit.destroy_bandit_parties forest 15
This maintains some gameplay challenge while reducing overwhelming bandit pressure.
Focus removal on bandit types causing specific problems:
- Remove looters to reduce early-game harassment
- Remove forest bandits to secure forest trade routes
- Remove sea raiders to protect coastal settlements
- Remove mountain bandits to secure mountain passes
Clear hideouts before parties for long-term impact:
gm.bandit.clear_hideouts forest
Parties respawn quickly, but clearing hideouts reduces long-term bandit presence in regions.
Always verify results with gm.bandit.count after removal operations:
gm.bandit.destroy_bandit_parties all
gm.bandit.count
This confirms the operation succeeded and shows remaining bandit populations.
Bandits affect game economy and NPC behavior:
- Reduced bandits increase caravan success rates
- Fewer bandits reduce village harassment
- Complete removal may make the game too easy
- Consider partial removal for balanced gameplay
Bandit removal is permanent until natural game mechanics respawn them:
- Parties may respawn from remaining hideouts
- Hideouts respawn slowly over time
- Complete removal via
remove_allhas the most lasting impact
The remove_all command requires explicit confirmation:
gm.bandit.remove_all confirm
This prevents accidental complete bandit elimination. Any other value will be rejected.
Complete bandit elimination affects gameplay balance:
- Reduces income opportunities from bandit hunting
- Eliminates source of prisoners for player armies
- Makes trade routes extremely safe
- May reduce game difficulty significantly
Consider partial removal or targeted elimination instead.
Game mechanics will naturally respawn bandits over time:
- Hideouts spawn new parties periodically
- Certain game events create bandit parties
- Clearing hideouts slows respawn rates
- Complete elimination is temporary
Corsair bandits only appear with Warsails DLC:
- Commands handle corsairs automatically if DLC is loaded
- Without DLC, corsair-specific commands have no effect
-
countcommand displays corsairs only if present
Multiple aliases work for bandit types:
-
desert,deserters,desert_banditsall work -
sea,sea_raidersboth work -
forest,forest_banditsboth work - Use whichever is most convenient
- Query Commands - No specific bandit query commands yet
- Settlement Management Commands - Manage settlements affected by bandits
- Quick Start Guide - Getting started with GameMaster commands
- Best Practices - Recommended usage patterns
- Troubleshooting - Common issues and solutions
Last Updated: 2026-01-06 API Version: 1.3.13.2
🏠 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_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