Skip to content

API Hero create_companions

SolWayward edited this page Feb 18, 2026 · 2 revisions

Hero create_companions

Endpoint: gm.hero.create_companions

Syntax

gm.hero.create_companions <count> <heroLeader> [cultures] [gender] [randomFactor] [level] [age]

Parameters

Parameter Type Required Description
count integer Yes Number of companions to create (1-20)
heroLeader string Yes Hero identifier (StringId or partial name match). Must be a party leader. Use 'player' for your party. Alias: hero
cultures string No Comma-separated culture list or culture group. Defaults to main_cultures. Alias: culture
gender string No Gender filter: both/b (default), female/f, or male/m
randomFactor float No Random variation factor (0.0-1.0). Defaults to 0.5. Alias: random
level integer No Target level for each companion (1-62). If not specified, a random level between 1-14 is assigned per companion
age integer No Age for each companion (minimum 18). If not specified, a random age between 18-30 is assigned per companion

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

Examples:

# Using named arguments to skip positional parameters
gm.hero.create_companions count:5 hero:player gender:female level:10 age:22

# Specify cultures using named notation
gm.hero.create_companions count:3 hero:player cultures:battania,sturgia gender:female

# Mix positional and named arguments
gm.hero.create_companions 5 player vlandia level:12 age:25

Description

Creates companions and adds them directly to the specified hero's party. Companions are generated with random names, portraits, and stats based on available templates. Will not exceed companion limit.

Each created companion receives:

  • Random Template: Selected from available companion templates matching culture and gender filters
  • Level: 1-14 (randomly selected per companion), or a specific level if provided
  • Age: 18-30 (randomly selected per companion), or a specific age if provided
  • Names: Culture-appropriate random names
  • Equipment: Basic equipment matching their culture
  • Randomized Appearance: Face, hair, and body features randomized within template constraints

Examples

Basic Creation

Create 5 companions for the player:

gm.hero.create_companions 5 player

Output:

Created and added 5 companion(s) to {Hero Name}'s party:
[List of created companions with details]

Create with Culture and Gender

Create 3 Vlandian companions:

gm.hero.create_companions 3 player vlandia both

Create female companions from multiple cultures:

gm.hero.create_companions 2 player vlandia,battania female

Create with Level and Age

# Create companions at level 10
gm.hero.create_companions 3 player level:10

# Create companions at age 25
gm.hero.create_companions 3 player age:25

# Create companions at both specific level and age
gm.hero.create_companions 5 player vlandia female level:12 age:24

# Positional usage with level and age at the end
gm.hero.create_companions 2 'Lord Name' battania,sturgia female 0.8 12 24

Create for NPC Party Leader

# Add companions to an NPC lord's party
gm.hero.create_companions 3 lord_1_1 empire male

# Using a lord's name
gm.hero.create_companions 2 'Derthert' vlandia level:8

Named Arguments - Full Control

# Specify everything using named arguments
gm.hero.create_companions count:2 hero:'Derthert' cultures:battania,sturgia gender:female random:0.8 level:8 age:25

# Specify only what you need
gm.hero.create_companions count:5 hero:player level:10 age:22

Usage Tips

Level and Age Control:

# Set specific level for all companions (1-62)
gm.hero.create_companions 5 player level:10

# Set specific age for all companions (18+)
gm.hero.create_companions 5 player age:30

# Set both level and age
gm.hero.create_companions 5 player level:12 age:25

# Default values when not specified:
# Level: Random between 1-14 per companion
# Age: Random between 18-30 per companion

Culture Selection:

# Use predefined groups
gm.hero.create_companions 5 player main_cultures
gm.hero.create_companions 3 player all_cultures

# Specify individual culture
gm.hero.create_companions 5 player vlandia

# Multiple cultures (no spaces around commas)
gm.hero.create_companions 5 player vlandia,battania,empire

Gender Filtering:

# Both genders (default)
gm.hero.create_companions 5 player vlandia both

# Male only
gm.hero.create_companions 5 player vlandia male

# Female only
gm.hero.create_companions 5 player vlandia female

Notes

  • Companions are immediately added to the party
  • Generated with random appearance and names based on culture
  • Party leader must have an active party
  • Will not exceed the game's companion limit; use create_lord instead to bypass
  • When specifying level, valid values are 1-62. If not specified, a random level between 1-14 is assigned per companion
  • When specifying age, the minimum is 18. If not specified, a random age between 18-30 is assigned per companion

Related Commands

Last Updated: 2026-02-16

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