Skip to content

API Hero divorce

SolWayward edited this page Feb 13, 2026 · 1 revision

gm.hero.divorce

Endpoint: gm.hero.divorce

Syntax

gm.hero.divorce <hero>

Parameters

Parameter Type Required Position Description
hero string Yes 0 The hero to divorce (name, StringId, or player). The spouse is automatically divorced as well

Description

Divorces the specified hero from their current spouse. Both the hero and their spouse have their marriage status cleared. Only one hero needs to be specified -- the spouse is automatically identified and divorced as well.

The command validates that the specified hero is currently married (has a spouse). If the hero is not married, an error is returned.

This command delegates to HeroManager.Divorce() for the actual divorce logic.

Examples

Divorce Player Character

gm.hero.divorce player

Output:

Successfully divorced {Player Name} from {Spouse Name}.

Divorce by Name

gm.hero.divorce Derthert

Output:

Successfully divorced Derthert from {Derthert's Spouse}.

Divorce by StringId

gm.hero.divorce lord_4_1

Output:

Successfully divorced Derthert from {Derthert's Spouse}.

Using Named Argument

gm.hero.divorce hero:Rhagaea

Output:

Successfully divorced Rhagaea from {Rhagaea's Spouse}.

Multi-Word Name with Single Quotes

gm.hero.divorce 'Liena the Fierce'

Output:

Successfully divorced Liena the Fierce from {Spouse Name}.

Usage Tips

Finding Married Heroes: Use query commands to check if a hero is married:

# Check hero details including spouse information
gm.query.hero_info lord_4_1
gm.query.hero_info Rhagaea

# Then divorce
gm.hero.divorce lord_4_1

Divorce Before Remarriage: If you want to marry a hero who is already married, divorce them first:

# Divorce existing marriage
gm.hero.divorce Derthert

# Now marry to a new hero
gm.hero.marry Derthert Rhagaea

Either Spouse Works: You only need to specify one of the two married heroes. The command automatically handles both:

# These produce the same result for the same married couple
gm.hero.divorce Derthert
# OR
gm.hero.divorce '{Derthert spouse name}'

Divorcing the Player:

gm.hero.divorce player

Error Handling

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

Not Married: If the specified hero is not married:

Error: Hero is not married.

Solution: Verify the hero's marriage status with gm.query.hero_info first.

Related Commands

Notes

Both Spouses Divorced: Specifying either spouse is sufficient. The command clears the marriage for both heroes simultaneously.

No Clan Transfer: Divorcing does not reverse any clan transfers that occurred during marriage. If a hero joined their spouse's clan during marriage, they will remain in that clan after the divorce.

Relationship Unchanged: The divorce command does not modify the relationship value between the two heroes. Use gm.hero.set_relation separately if you want to adjust their relationship.

Children Unaffected: Any children born during the marriage remain unaffected by the divorce. Their parentage and clan membership are unchanged.

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