Skip to content

API Clan generate_clans

SolWayward edited this page Feb 11, 2026 · 3 revisions

gm.clan.generate_clans

Endpoint: gm.clan.generate_clans

Syntax

gm.clan.generate_clans <count> [cultures] [kingdom] [createParties] [companionCount]

Parameters

Parameter Type Required Description
count integer Yes Number of clans to generate (1-50)
cultures string No Culture filter(s). Use commas to separate multiple cultures (e.g., vlandia,battania). Can also use group keywords: main_cultures (default), bandit_cultures, all_cultures
kingdom string No Kingdom identifier for all clans to join. If not specified or 'null', clans are independent
createParties boolean No Whether to create parties for clan leaders (default: true)
companionCount integer No Number of companions per clan leader (0-10, default: 2)

Named Arguments

This command supports named argument notation, allowing you to specify optional parameters in any order using the format argName:value (with a colon and no spaces).

Benefits:

  • Specify optional parameters without providing all preceding parameters
  • Arguments can be in any order when using named notation
  • Mix positional and named arguments

Examples:

# Using named arguments
gm.clan.generate_clans count:10 cultures:vlandia,battania kingdom:vlandia

# Specify only what you need
gm.clan.generate_clans 5 kingdom:sturgia companions:5

# Mix positional and named arguments
gm.clan.generate_clans 10 vlandia,battania parties:true companions:3

Description

Generates multiple clans with random names from culture lists. This command is ideal for quickly populating kingdoms with new noble houses. Each generated clan receives:

  • Random Name: Culture-appropriate clan name
  • Auto-Generated Leader: New hero with good stats and equipment
  • Culture: Matches the selected culture pool
  • Tier: Starts at tier 3 with initial renown and gold
  • Party: Optional party for the leader with troops and companions
  • Status: Fully functional and ready for recruitment

Generated clans act like normal NPC clans and can be recruited by kingdoms (including the player's), expand their forces, and participate in wars.

Kingdom Assignment: If no kingdom is specified, clans are created as independent and can be recruited by any kingdom. If a kingdom is specified, all generated clans join that kingdom immediately.

Examples

Basic Clan Generation

# Generate 5 independent clans from main cultures
gm.clan.generate_clans 5

Output:

Generated 5 clan(s) as independent (with parties) and 2 companions each:
[Detailed clan information]

Generate Clans for Specific Kingdom

# Generate 10 Vlandian and Battanian clans for Vlandia kingdom
gm.clan.generate_clans 10 vlandia,battania vlandia

Output:

Generated 10 clan(s) and joined Vlandia (with parties) and 2 companions each

Culture-Specific Generation

# Generate 3 Imperial clans
gm.clan.generate_clans 3 empire

# Generate 5 clans from multiple cultures
gm.clan.generate_clans 5 vlandia,battania,sturgia

# Generate clans from all main cultures
gm.clan.generate_clans 10 main_cultures

Advanced Configuration

# Generate clans without parties (civilian/trading clans)
gm.clan.generate_clans 3 empire vlandia false 0

# Generate war-focused clans with many companions
gm.clan.generate_clans 5 vlandia vlandia true 8

# Using named arguments for clarity
gm.clan.generate_clans count:10 cultures:battania,sturgia kingdom:sturgia companions:5

Usage Tips

Culture Selection:

# Use predefined groups
gm.clan.generate_clans 10 main_cultures
gm.clan.generate_clans 5 bandit_cultures
gm.clan.generate_clans 20 all_cultures

# Specify individual cultures with commas (no spaces)
gm.clan.generate_clans 10 vlandia
gm.clan.generate_clans 15 empire,aserai
gm.clan.generate_clans 8 vlandia,battania,sturgia

Kingdom Assignment:

# Independent clans (can be recruited by any kingdom)
gm.clan.generate_clans 5
gm.clan.generate_clans 5 vlandia null

# Join specific kingdom
gm.clan.generate_clans 10 empire empire_s
gm.clan.generate_clans 5 vlandia,battania vlandia

Party and Companion Configuration:

# Default: parties with 2 companions
gm.clan.generate_clans 5

# No parties (trading/civilian clans)
gm.clan.generate_clans 3 empire null false 0

# War-focused clans with many companions
gm.clan.generate_clans 5 vlandia vlandia true 10

Populating Kingdoms:

# Add 10 new noble houses to Vlandia
gm.clan.generate_clans 10 vlandia vlandia

# Create diverse independent clans for recruitment
gm.clan.generate_clans 15 main_cultures

# Create specialized mercenary clans
gm.clan.generate_clans 5 main_cultures null true 8

Named Arguments for Complex Setups:

# Skip positional parameters
gm.clan.generate_clans count:10 kingdom:vlandia companions:5

# Specify only what matters
gm.clan.generate_clans 5 cultures:battania parties:false

Query Available Cultures:

gm.query.culture              # List all cultures
gm.query.culture main         # List main cultures only
gm.query.culture bandit       # List bandit cultures only

Comparison with create_clan

Use gm.clan.generate_clans when you need:

  • Multiple clans quickly
  • Random culture-appropriate names
  • Bulk population of kingdoms
  • Quick world expansion

Use gm.clan.create_clan when you want:

  • A single clan with custom name
  • Specific hero as leader
  • More control over individual clan properties

Related Commands

Notes

Random Generation: Clans are created with:

  • Random culture-appropriate names from their culture's name lists
  • Auto-generated leaders with good equipment and stats
  • Age-appropriate leaders (20-30 years old)
  • Culture-specific appearances and equipment
  • Initial tier 3 status with appropriate renown and gold

Generated Clan Behavior: These clans act like normal NPC clans. They can:

  • Be recruited by any kingdom (player or NPC)
  • Expand their forces and recruit lords
  • Participate in wars and diplomacy
  • Own fiefs and settlements
  • Build workshops and caravans

Party Creation: When parties are created, each clan leader gets:

  • 10 basic troops matching their culture
  • 20000 trade gold for party operations
  • The specified number of companions with good equipment

Companions: Companions are generated with:

  • Culture-appropriate templates
  • Good equipment and stats
  • Random appropriate names
  • Direct addition to the leader's party

Kingdom Recruitment: Independent clans can be recruited by kingdoms through normal diplomacy. This makes them valuable additions to the world that kingdoms will actively try to recruit.

Culture Matching: Clan names, leader names, and equipment all match the selected culture(s), ensuring appropriate cultural aesthetics.

Custom Names: For custom clan names, use gm.clan.create_clan instead, or use gm.clan.rename after generation.

Last Updated: 2026-02-10

BLGM Version: 1.3.14.3 Bannerlord Version: e1.3.1

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