Skip to content

API Hero marry

SolWayward edited this page Feb 13, 2026 · 1 revision

gm.hero.marry

Endpoint: gm.hero.marry

Syntax

gm.hero.marry <hero> <otherHero> [forceMarriage:false] [joinClan:true]

Parameters

Parameter Type Required Position Description
hero / hero1 string Yes 0 First hero to marry (name, StringId, or player). The other hero joins this hero's clan by default
otherHero / hero2 string Yes 1 Second hero to marry (name, StringId, or player)
forceMarriage / force bool No 2 Bypass native validation checks. Default: false
joinClan bool No 3 When true (default), otherHero joins hero's clan. Set to false to keep both heroes in their original clans

Description

Marries two heroes together. By default, the second hero (otherHero) will leave their current clan and join the first hero's (hero) clan. This behavior can be controlled with the joinClan parameter.

Without forceMarriage, the command enforces Bannerlord's native marriage validation rules:

  • Heroes must be opposite gender
  • Heroes must not be related
  • Both heroes must be unmarried
  • Both heroes must be alive
  • Both heroes must be age 18+
  • Neither hero can be the other's clan leader (unless overridden)
  • Both heroes must have valid clans
  • Neither hero can be in an active army or battle

Setting forceMarriage:true bypasses all native validation checks, allowing marriages that would normally be blocked by the game.

A hero cannot be married to themselves.

This command delegates to HeroManager.Marry() for the actual marriage logic.

Examples

Basic Marriage - Player and a Lord

gm.hero.marry player Rhagaea

Output:

Successfully married {Player Name} and Rhagaea. Rhagaea joined {Player's Clan}.

Marriage by StringId

gm.hero.marry lord_4_1 lord_1_3

Output:

Successfully married Derthert and Ira. Ira joined {Derthert's Clan}.

Using Named Arguments

gm.hero.marry hero:Derthert otherHero:Rhagaea

Output:

Successfully married Derthert and Rhagaea. Rhagaea joined {Derthert's Clan}.

Multi-Word Name with Single Quotes

gm.hero.marry player 'Liena the Fierce'

Output:

Successfully married {Player Name} and Liena the Fierce. Liena the Fierce joined {Player's Clan}.

Force Marriage (Bypass Validation)

gm.hero.marry Derthert Rhagaea forceMarriage:true

Output:

Successfully married Derthert and Rhagaea. Rhagaea joined {Derthert's Clan}.

Keep Both Heroes in Original Clans

gm.hero.marry Derthert Rhagaea joinClan:false

Output:

Successfully married Derthert and Rhagaea. Both heroes remain in their original clans.

Force Marriage with No Clan Join (Positional)

gm.hero.marry lord_4_1 lord_1_3 true false

Output:

Successfully married Derthert and Ira. Both heroes remain in their original clans.

Named Arguments Combined

gm.hero.marry hero:'Liena the Fierce' otherHero:Derthert force:true joinClan:false

Output:

Successfully married Liena the Fierce and Derthert. Both heroes remain in their original clans.

Usage Tips

Finding Heroes to Marry: Use query commands to verify hero details:

# Find heroes by partial name
gm.query.hero Rhagaea
gm.query.hero_info lord_4_1

# Then marry using the ID or name
gm.hero.marry lord_4_1 Rhagaea

Clan Join Direction: The otherHero (second parameter) joins the hero (first parameter) clan by default. Choose the order carefully:

# Rhagaea joins Derthert's clan
gm.hero.marry Derthert Rhagaea

# Derthert joins Rhagaea's clan
gm.hero.marry Rhagaea Derthert

Keeping Clans Separate: Use joinClan:false when you want heroes married but keeping their political affiliations:

gm.hero.marry Derthert Rhagaea joinClan:false

Force Marriage for Unconventional Pairings: Use forceMarriage:true to bypass native restrictions:

# Bypass age, gender, or relation restrictions
gm.hero.marry lord_4_1 lord_1_3 forceMarriage:true

Marrying the Player Character:

# Player marries a lord - the lord joins player's clan
gm.hero.marry player Rhagaea

# Player joins another lord's clan
gm.hero.marry Derthert player

Error Handling

Hero Not Found: If a hero 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.

Same Hero: If both parameters resolve to the same hero:

Error: Cannot marry a hero to themselves.

Solution: Specify two different heroes.

Already Married: If either hero is already married (without force):

Error: Hero is already married.

Solution: Use gm.hero.divorce first, or use forceMarriage:true.

Gender Restriction: If both heroes are the same gender (without force):

Error: Heroes must be opposite gender for marriage.

Solution: Use forceMarriage:true to bypass this restriction.

Age Restriction: If either hero is under 18 (without force):

Error: Both heroes must be at least 18 years old.

Solution: Use gm.hero.set_age to adjust age, or use forceMarriage:true.

Related Heroes: If heroes are related (without force):

Error: Cannot marry related heroes.

Solution: Use forceMarriage:true to bypass this restriction.

Related Commands

Notes

Clan Transfer: By default, the second hero (otherHero) transfers to the first hero's (hero) clan. This mimics the native game behavior where one spouse joins the other's clan. Use joinClan:false to override this.

Force Marriage Bypasses: When forceMarriage:true is set, the following native checks are skipped:

  • Opposite gender requirement
  • Not related requirement
  • Both unmarried requirement
  • Both alive requirement
  • Age 18+ requirement
  • Not both clan leaders requirement
  • Valid clans requirement
  • Not in army/battle requirement

Marriage Effects: Marriage in Bannerlord affects:

  • Clan membership (if joinClan is true)
  • Relationship values between the married heroes
  • Pregnancy eligibility (married couples can have children)
  • Inheritance and succession
  • Diplomatic relations between clans/kingdoms

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 (hero: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