-
Notifications
You must be signed in to change notification settings - Fork 0
API Hero create_companions
SolWayward edited this page Feb 18, 2026
·
2 revisions
Endpoint: gm.hero.create_companions
gm.hero.create_companions <count> <heroLeader> [cultures] [gender] [randomFactor] [level] [age]
| 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 |
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:25Creates 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
Create 5 companions for the player:
gm.hero.create_companions 5 playerOutput:
Created and added 5 companion(s) to {Hero Name}'s party:
[List of created companions with details]
Create 3 Vlandian companions:
gm.hero.create_companions 3 player vlandia bothCreate female companions from multiple cultures:
gm.hero.create_companions 2 player vlandia,battania female# 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# 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# 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:22Level 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 companionCulture 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,empireGender 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- 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_lordinstead 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
- API-Hero-create_lord - Create a single lord with custom name
- API-Hero-generate_lords - Generate multiple lords with equipment
- API-Hero-add_hero_to_party - Add existing hero to party
- API-Hero-Overview - Hero command overview
Last Updated: 2026-02-16
🏠 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