Skip to content

API Hero impregnate

SolWayward edited this page Feb 13, 2026 · 1 revision

gm.hero.impregnate

Endpoint: gm.hero.impregnate

Syntax

gm.hero.impregnate <mother> [father] [allowAnyCulture:false]

Parameters

Parameter Type Required Position Description
mother / hero string Yes 0 The female hero to impregnate (name, StringId, or player)
father string No 1 The male hero to be the father (name, StringId, or player). If not specified: uses mother's spouse, or a random nearby male hero
allowAnyCulture bool No 2 Set to true to allow non-main-culture parents. Default: false

Description

Makes a female hero pregnant. The command validates that the specified mother is female and not already pregnant, and that the father (if specified) is male. By default, the command enforces culture checks to ensure the parents belong to main cultures. Setting allowAnyCulture to true bypasses this restriction.

If no father is specified, the command will attempt to use the mother's spouse as the father. If the mother has no spouse, a random nearby male hero will be selected instead.

The pregnancy follows the game's native pregnancy system and will progress naturally over time, eventually resulting in the birth of a child.

This command delegates to HeroManager.Impregnate() for the actual pregnancy logic.

Examples

Basic Usage - Impregnate by Name

gm.hero.impregnate Ira

Output:

Ira is now pregnant. Father: {spouse or random nearby hero}

Specify Father by StringId

gm.hero.impregnate lord_1_3 lord_4_1

Output:

Ira is now pregnant. Father: Derthert

Using Named Arguments

gm.hero.impregnate mother:lord_1_3 father:lord_4_1

Output:

Ira is now pregnant. Father: Derthert

Multi-Word Name with Single Quotes

gm.hero.impregnate 'Ira of the Empire' Derthert

Output:

Ira is now pregnant. Father: Derthert

Allow Any Culture

gm.hero.impregnate mother:lord_1_3 father:lord_4_1 allowAnyCulture:true

Output:

Ira is now pregnant. Father: Derthert

Positional with Allow Any Culture

gm.hero.impregnate lord_1_3 lord_4_1 true

Output:

Ira is now pregnant. Father: Derthert

Auto-Select Father (Spouse)

gm.hero.impregnate Ira

Output:

Ira is now pregnant. Father: {Ira's spouse}

Usage Tips

Finding Female Heroes: Use query commands to find female heroes:

# Find female heroes by partial name
gm.query.hero Ira
gm.query.hero_info lord_1_3

# Then impregnate using the ID
gm.hero.impregnate lord_1_3

Specifying the Father: The father parameter is optional. If omitted, the system will:

  1. First try to use the mother's spouse as the father
  2. If no spouse, select a random nearby male hero
# Let the system choose the father
gm.hero.impregnate Ira

# Specify a particular father
gm.hero.impregnate Ira Derthert

Cross-Culture Pregnancies: By default, both parents must belong to main cultures. To bypass this:

gm.hero.impregnate lord_1_3 lord_4_1 allowAnyCulture:true

Using Player as Parent:

# If player is female
gm.hero.impregnate player Derthert

# If player is male, specify as father
gm.hero.impregnate Ira player

Error Handling

Hero Not Found: If the mother or father query matches no heroes:

Error: No hero found matching '{query}'.

Solution: Verify the hero exists using gm.query.hero first.

Multiple Matches: If the query matches multiple heroes:

Error: Multiple heroes found matching '{query}'. Please be more specific.

Solution: Use the exact hero StringId or a more specific name.

Mother is Male: If the specified mother is a male hero:

Error: Mother must be a female hero.

Solution: Ensure you are targeting a female hero as the mother.

Already Pregnant: If the mother is already pregnant:

Error: Hero is already pregnant.

Solution: Wait for the current pregnancy to complete before attempting again.

Father is Female: If the specified father is a female hero:

Error: Father must be a male hero.

Solution: Ensure the father parameter references a male hero.

Culture Restriction: If parents are not from main cultures and allowAnyCulture is false:

Error: Culture check failed. Use allowAnyCulture:true to bypass.

Solution: Add allowAnyCulture:true to bypass culture restrictions.

Related Commands

Notes

Pregnancy Progression: The pregnancy follows the game's native pregnancy system. After impregnation, the pregnancy will progress naturally over in-game time and eventually result in the birth of a child.

Father Selection Priority: When no father is specified:

  1. The mother's spouse is used if available
  2. Otherwise, a random nearby male hero is selected

Culture Restrictions: By default, the command enforces that both parents belong to main cultures. This prevents unintended pregnancies with bandit or minor faction characters. Use allowAnyCulture:true to override this behavior when needed.

Child Inheritance: The child born from the pregnancy will inherit traits and culture based on the game's native child generation system, which considers both parents.

Single Quotes Required: The TaleWorlds console system requires SINGLE QUOTES (not double quotes) for multi-word arguments. Double quotes will not work.

Named and Positional Arguments: Both named (mother:value) and positional arguments are supported. Named arguments use the format argName:value with no spaces around the colon.

Last Updated: 2/13/2026

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