Skip to content

API Bandit Overview

SolWayward edited this page Jan 7, 2026 · 2 revisions

[BANDIT] Bandit Management Commands

Category: Bandit Management Commands: 4 commands API Version: 1.3.13.2 Status: STABLE


Overview

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 Reference

Quick Reference Table

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

Command Categories

Information Commands

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.

Party Management Commands

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.

Hideout Management Commands

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.

Mass Removal Commands

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.


Common Parameters

Bandit Type Parameter

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., desert for deserters, sea for sea raiders)

Valid Bandit Types

  • 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)

Count Parameter

Optional parameter for limiting removal operations:

  • Omitted - Removes ALL matching bandits/hideouts
  • Specified Number - Removes up to that number of matching bandits/hideouts

Usage Examples

Example 1: Monitoring Bandit Populations

Check current bandit statistics before making changes:

gm.bandit.count

Result: Displays total parties, total hideouts, and breakdown by each bandit type.

Example 2: Selective Bandit Party Removal

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.

Example 3: Limited Bandit Reduction

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.

Example 4: Multi-Type Bandit Removal

Remove multiple bandit types at once:

gm.bandit.destroy_bandit_parties looters,deserters,steppe

Result: All looter, deserter, and steppe bandit parties are eliminated.

Example 5: Regional Hideout Clearing

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.

Example 6: Limited Hideout Clearing

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.

Example 7: Complete Bandit Elimination

Remove all bandits for peaceful gameplay:

gm.bandit.remove_all confirm

Result: ALL bandit parties and hideouts are removed from the game world.

Example 8: Balanced Bandit Management Workflow

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.


Best Practices

TIP: Check Counts First

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.

TIP: Gradual Reduction

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.

TIP: Target Problematic Types

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

TIP: Hideout Priority

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.

TIP: Verify After Removal

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.

TIP: Consider Economic Impact

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

Notes & Warnings

WARNING: Permanent Removal

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_all has the most lasting impact

WARNING: Confirmation Required

The remove_all command requires explicit confirmation:

gm.bandit.remove_all confirm

This prevents accidental complete bandit elimination. Any other value will be rejected.

WARNING: Gameplay Balance

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.

NOTE: Bandit Respawn Mechanics

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

NOTE: DLC Content

Corsair bandits only appear with Warsails DLC:

  • Commands handle corsairs automatically if DLC is loaded
  • Without DLC, corsair-specific commands have no effect
  • count command displays corsairs only if present

NOTE: Type Aliases

Multiple aliases work for bandit types:

  • desert, deserters, desert_bandits all work
  • sea, sea_raiders both work
  • forest, forest_bandits both work
  • Use whichever is most convenient

Related Documentation

Command Groups

User Guides


Last Updated: 2026-01-06 API Version: 1.3.13.2

Return to API Reference | Home

Quick Links

🏠 Home | Quick Reference | Syntax Guide


Hero Commands
Clan Commands
Kingdom Commands
Settlement Commands
Item Commands
Troop Commands
Caravan Commands
Bandit Commands
Query Commands

Clone this wiki locally