Skip to content

API Settlement set_loyalty

SolWayward edited this page Dec 22, 2025 · 2 revisions

gm.settlement.set_loyalty

Endpoint: gm.settlement.set_loyalty

Syntax

gm.settlement.set_loyalty <settlement> <value>

Parameters

Parameter Type Required Description
settlement string Yes Settlement identifier (StringId or partial name match)
value integer Yes Loyalty value (range: 0-100)

Description

Sets the loyalty level for a city or castle. Loyalty represents the population's allegiance to the current owner. Low loyalty increases rebellion risk and can trigger ownership changes. High loyalty improves tax efficiency, garrison morale, and settlement stability.

NOTE: This command only works for cities and castles. Villages do not have loyalty mechanics.

Example

gm.settlement.set_loyalty pen 100

Output:

Set loyalty for {Settlement Name} to 100.
Previous loyalty: {old_value}

Loyalty Impact

  • 0-25 - Critical: High rebellion risk, severe tax penalties
  • 25-50 - Low: Moderate rebellion risk, reduced tax efficiency
  • 50-75 - Moderate: Stable, normal tax collection
  • 75-100 - High: Very stable, optimal tax efficiency, strong morale

Warning

Loyalty below 25 significantly increases rebellion events. Rebellions can cause the settlement to change ownership to rebels or opposing factions. Monitor loyalty carefully after reducing it, especially in strategic settlements.

Related Commands

Last Updated: 2025-12-17

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