Skip to content

API Kingdom rename

SolWayward edited this page Feb 13, 2026 · 1 revision

gm.kingdom.rename

Endpoint: gm.kingdom.rename

Syntax

gm.kingdom.rename <kingdom> <name>

Parameters

Parameter Type Required Position Description
kingdom string Yes 0 Kingdom to rename (StringId or partial name match)
name string Yes 1 The new name for the kingdom. Use SINGLE QUOTES for multi-word names

Description

Renames the specified kingdom to a new name. This command allows you to change the display name of any kingdom in the game. The name change is immediate and affects all references to the kingdom throughout the game, including diplomatic screens, kingdom lists, and map labels.

The command finds a kingdom matching the provided query (either by StringId or by name search) and updates its display name to the specified new name.

This command delegates to KingdomExtensions.SetStringName() for the actual rename operation.

Examples

Rename by StringId

gm.kingdom.rename sturgia 'Northern Empire'

Output:

Kingdom renamed from 'Sturgia' to 'Northern Empire'

Rename by Partial Name

gm.kingdom.rename Vlandia 'Western Realm'

Output:

Kingdom renamed from 'Kingdom of Vlandia' to 'Western Realm'

Using Named Arguments

gm.kingdom.rename kingdom:southern_empire name:'United Empire'

Output:

Kingdom renamed from 'Southern Empire' to 'United Empire'

Single-Word Name

gm.kingdom.rename battania Caledonia

Output:

Kingdom renamed from 'Battania' to 'Caledonia'

Rename by Kingdom StringId

gm.kingdom.rename northern_empire 'Empire of the North'

Output:

Kingdom renamed from 'Northern Empire' to 'Empire of the North'

Usage Tips

Finding Kingdoms: Use query commands to find kingdom StringIds:

# List all kingdoms
gm.query.kingdom

# Get detailed kingdom info
gm.query.kingdom_info sturgia

# Then rename using the ID
gm.kingdom.rename sturgia 'Frozen Kingdom'

Multi-Word Names: Always use SINGLE QUOTES for names with spaces:

# Correct - using single quotes
gm.kingdom.rename vlandia 'Kingdom of the West'
gm.kingdom.rename aserai 'Desert Sultanate'

# Incorrect - double quotes don't work in TaleWorlds console
gm.kingdom.rename vlandia "Kingdom of the West"  # This will fail

Single-Word Names: No quotes needed for single-word names:

gm.kingdom.rename sturgia Nordland
gm.kingdom.rename khuzait Mongoria

Valid Kingdom StringIds: Common vanilla kingdom StringIds include:

sturgia          # Kingdom of Sturgia
vlandia          # Kingdom of Vlandia
battania         # Kingdom of Battania
aserai           # Aserai
khuzait          # Khuzait Khanate
southern_empire  # Southern Empire
northern_empire  # Northern Empire
western_empire   # Western Empire

Renaming Custom Kingdoms: Works with kingdoms created via gm.kingdom.create_kingdom and gm.kingdom.generate_kingdoms:

# Create a kingdom
gm.kingdom.create_kingdom pen 'Temp Name' 'House Stark' 3 vlandia

# Rename it later
gm.kingdom.rename 'Temp Name' 'Kingdom of Winterfell'

Error Handling

No Matches: If no kingdom is found:

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

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

Multiple Matches: If the query matches multiple kingdoms:

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

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

Empty Name: If the new name is empty:

Error: New name cannot be empty.

Solution: Provide a valid name for the kingdom.

Related Commands

Notes

Name Persistence: The name change is saved with your game save and will persist through save/load cycles.

Immediate Effect: The rename is applied immediately to all game references. Diplomatic screens, kingdom lists, map labels, and all other UI elements will reflect the new name.

No Gameplay Effect: Renaming a kingdom does not change its culture, diplomatic relations, ruler, member clans, or any other properties -- only the display name.

Custom Scenarios: This command is useful for:

  • Creating themed playthroughs with specific kingdom names
  • Renaming kingdoms after conquest to reflect your empire
  • Fixing auto-generated names from kingdom generation commands
  • Building custom geopolitical scenarios with meaningful names

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