Skip to content

API Settlement set_security

SolWayward edited this page Dec 22, 2025 · 2 revisions

gm.settlement.set_security

Endpoint: gm.settlement.set_security

Syntax

gm.settlement.set_security <settlement> <value>

Parameters

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

Description

Sets the security level for a city or castle. Security represents law enforcement effectiveness and stability. High security reduces crime rates, decreases bandit spawn rates near the settlement, and improves prosperity growth. Low security increases criminal activity and settlement instability.

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

Example

gm.settlement.set_security pen 100

Output:

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

Security Impact

  • 0-25 - Dangerous: High crime, frequent bandit activity, prosperity decline
  • 25-50 - Unsafe: Elevated crime, moderate bandit spawns
  • 50-75 - Moderate: Normal crime levels, controlled bandit activity
  • 75-100 - Secure: Low crime, minimal bandits, enhanced prosperity growth

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