Skip to content

API Settlement fill_garrison

SolWayward edited this page Dec 22, 2025 · 3 revisions

gm.settlement.fill_garrison

Endpoint: gm.settlement.fill_garrison

Syntax

gm.settlement.fill_garrison <settlement>

Parameters

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

Description

Automatically fills the garrison to maximum party size capacity using a proportional mix of existing troop types. This command analyzes the current garrison composition and adds more troops of the same types while maintaining their relative ratios until reaching the party size limit.

The garrison must contain at least one troop type to use as a template. If the garrison is empty, you must manually add some troops first before using this command.

NOTE: Only works for cities and castles that have garrison capabilities.

Example

gm.settlement.fill_garrison pen

Output:

Filled garrison for {Settlement Name}.
Added {added_count} troops based on existing composition.
Previous garrison size: {old_size}, New size: {new_size}

How It Works

Proportional Composition:

  1. Analyzes existing garrison troop types and counts
  2. Calculates ratio for each troop type
  3. Adds troops proportionally until party size limit reached
  4. Maintains original troop composition balance

Example Scenario:

Initial Garrison:
- 10 Imperial Recruits
- 5 Imperial Infantry
- 3 Imperial Cavalry

After fill_garrison (assuming 200 capacity):
- 110 Imperial Recruits (maintained 10:5:3 ratio)
- 55 Imperial Infantry
- 33 Imperial Cavalry

Requirements

Must Have:

  • At least one troop in garrison (used as template)
  • Settlement must be city or castle
  • Party size limit determined by settlement/faction

Cannot Use If:

  • Garrison is completely empty
  • Settlement is not a city/castle
  • Settlement has no garrison capability

Usage Scenarios

Prepare for Defense:

gm.settlement.fill_garrison threatened_city
gm.settlement.add_militia threatened_city 200
gm.settlement.give_food threatened_city 3000

Quick Military Setup:

# First add diverse troops manually
gm.troop.give_hero_troops player imperial_recruit 20
gm.troop.give_hero_troops player imperial_infantry 10
# Transfer to garrison...
gm.settlement.fill_garrison test_city

Multiple Settlement Defense:

gm.settlement.fill_garrison border_fort_1
gm.settlement.fill_garrison border_fort_2
gm.settlement.fill_garrison border_fort_3

Best Practices

TIP: Ensure Troop Diversity Before Filling

Add diverse troop types before using fill_garrison:

# Add different troop tiers to garrison first
# Then fill to maintain balanced composition
gm.settlement.fill_garrison my_castle

TIP: Combine with Other Commands

Full defensive preparation:

gm.settlement.fill_garrison fortress
gm.settlement.add_militia fortress 300
gm.settlement.give_food fortress 5000
gm.settlement.give_gold fortress 50000
gm.settlement.set_loyalty fortress 100

TIP: Check Party Size Limits

Garrison capacity varies by:

  • Settlement type (city vs castle)
  • Faction perks and policies
  • Building upgrades
  • Leader skills

Some settlements naturally have higher limits.

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