-
Notifications
You must be signed in to change notification settings - Fork 0
API Hero marry
Endpoint: gm.hero.marry
gm.hero.marry <hero> <otherHero> [forceMarriage:false] [joinClan:true]
| 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 |
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.
gm.hero.marry player RhagaeaOutput:
Successfully married {Player Name} and Rhagaea. Rhagaea joined {Player's Clan}.
gm.hero.marry lord_4_1 lord_1_3Output:
Successfully married Derthert and Ira. Ira joined {Derthert's Clan}.
gm.hero.marry hero:Derthert otherHero:RhagaeaOutput:
Successfully married Derthert and Rhagaea. Rhagaea joined {Derthert's Clan}.
gm.hero.marry player 'Liena the Fierce'Output:
Successfully married {Player Name} and Liena the Fierce. Liena the Fierce joined {Player's Clan}.
gm.hero.marry Derthert Rhagaea forceMarriage:trueOutput:
Successfully married Derthert and Rhagaea. Rhagaea joined {Derthert's Clan}.
gm.hero.marry Derthert Rhagaea joinClan:falseOutput:
Successfully married Derthert and Rhagaea. Both heroes remain in their original clans.
gm.hero.marry lord_4_1 lord_1_3 true falseOutput:
Successfully married Derthert and Ira. Both heroes remain in their original clans.
gm.hero.marry hero:'Liena the Fierce' otherHero:Derthert force:true joinClan:falseOutput:
Successfully married Liena the Fierce and Derthert. Both heroes remain in their original clans.
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 RhagaeaClan 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 DerthertKeeping Clans Separate: Use joinClan:false when you want heroes married but keeping their political affiliations:
gm.hero.marry Derthert Rhagaea joinClan:falseForce 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:trueMarrying 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 playerHero 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.
- API-Hero-Overview - All hero commands
- API-Hero-divorce - Divorce hero from spouse
- API-Hero-impregnate - Make female hero pregnant
- API-Hero-set_relation - Set relationship between heroes
- API-Hero-set_age - Set hero age (affects marriage eligibility)
- API-Hero-set_clan - Transfer hero to different clan
- gm.query.hero - Find heroes by name
- gm.query.hero_info - Get detailed hero information
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
joinClanis 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
🏠 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