Skip to content

API Settlement set_owner

SolWayward edited this page Mar 15, 2026 · 1 revision

gm.settlement.set_owner

Endpoint: gm.settlement.set_owner

Syntax

gm.settlement.set_owner <settlement> <hero>

Parameters

Parameter Type Required Description
settlement string Yes Settlement identifier (StringId or partial name match)
hero string Yes Hero identifier (StringId or partial name match)

Description

Changes the owner of a settlement to a specific hero. When ownership is transferred, the settlement's owner clan is updated to the hero's clan and the map faction is updated to the hero's faction (if any). This effectively transfers the settlement to whichever clan and kingdom the hero belongs to.

NOTE: This command only works for cities and castles (settlements with a Town component). Villages and hideouts are not supported.

Examples

Transfer by hero StringId:

gm.settlement.set_owner Poros lord_4_1

Transfer using partial name matching with single quotes:

gm.settlement.set_owner 'Vladiv Castle' derthert

Using named arguments:

gm.settlement.set_owner settlement:pen hero:derthert

Output:

Settlement 'Pendraic' (ID: town_EN1) ownership changed:
Owner: Lucon -> Derthert
Owner Clan: senate -> dey Meroc
Map Faction: Northern Empire -> Kingdom of Vlandia

Ownership Transfer Effects

When a settlement owner is changed via this command:

  • Owner is set to the specified hero
  • Owner Clan is updated to the hero's clan
  • Map Faction is updated to the hero's faction/kingdom
  • Settlement garrison and militia remain unchanged
  • Existing buildings and resources are preserved

Usage Scenarios

Reward a vassal:

gm.settlement.set_owner Poros derthert

Transfer a castle to a specific lord:

gm.settlement.set_owner 'Vladiv Castle' lord_4_1

Consolidate territory under one hero:

gm.settlement.set_owner pen derthert
gm.settlement.set_owner pravend derthert

Related Commands

Last Updated: 2026-03-15

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