-
Notifications
You must be signed in to change notification settings - Fork 0
API Settlement fill_garrison
Endpoint: gm.settlement.fill_garrison
gm.settlement.fill_garrison <settlement>
| Parameter | Type | Required | Description |
|---|---|---|---|
settlement |
string | Yes | Settlement identifier (StringId or partial name match) |
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.
gm.settlement.fill_garrison penOutput:
Filled garrison for {Settlement Name}.
Added {added_count} troops based on existing composition.
Previous garrison size: {old_size}, New size: {new_size}
Proportional Composition:
- Analyzes existing garrison troop types and counts
- Calculates ratio for each troop type
- Adds troops proportionally until party size limit reached
- 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
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
Prepare for Defense:
gm.settlement.fill_garrison threatened_city
gm.settlement.add_militia threatened_city 200
gm.settlement.give_food threatened_city 3000Quick 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_cityMultiple Settlement Defense:
gm.settlement.fill_garrison border_fort_1
gm.settlement.fill_garrison border_fort_2
gm.settlement.fill_garrison border_fort_3TIP: 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_castleTIP: 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 100TIP: 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.
- API-Settlement-add_militia - Add militia for additional defense
- API-Settlement-give_food - Ensure food for garrison upkeep
- API-Settlement-give_gold - Provide funds for wages
- API-Troop-give_hero_troops - Add specific troops before filling
- API-Settlement-Overview - All settlement commands
Last Updated: 2025-12-17
🏠 Home | Quick Reference | Syntax Guide
Hero Commands
- gm.hero.abort_pregnancy
- gm.hero.add_gold
- gm.hero.add_hero_to_party
- gm.hero.create_companions
- gm.hero.create_lord
- gm.hero.create_party
- gm.hero.divorce
- gm.hero.edit_appearance
- gm.hero.edit_party
- gm.hero.equip_hero
- gm.hero.export_character
- gm.hero.generate_lords
- gm.hero.give_birth
- gm.hero.heal
- gm.hero.import_character
- gm.hero.impregnate
- gm.hero.imprison
- gm.hero.kill
- gm.hero.list_appearances
- gm.hero.list_characters
- gm.hero.list_developments
- gm.hero.list_traits
- gm.hero.load_appearance
- gm.hero.load_character
- gm.hero.load_development
- gm.hero.load_traits
- gm.hero.marry
- gm.hero.open_inventory
- gm.hero.release
- gm.hero.remove_clan
- gm.hero.rename
- gm.hero.save_appearance
- gm.hero.save_development
- gm.hero.save_traits
- gm.hero.set_age
- gm.hero.set_clan
- gm.hero.set_culture
- gm.hero.set_gold
- gm.hero.set_relation
- gm.hero.start_convrsation
Clan Commands
- gm.clan.add_gold
- gm.clan.add_gold_leader
- gm.clan.add_hero
- gm.clan.add_renown
- gm.clan.create_clan
- gm.clan.create_minor_clan
- gm.clan.destroy
- gm.clan.edit_banner
- gm.clan.equip_heroes
- gm.clan.generate_clans
- gm.clan.give_gold
- gm.clan.rename
- gm.clan.set_culture
- gm.clan.set_gold
- gm.clan.set_leader
- gm.clan.set_renown
- gm.clan.set_tier
- gm.clan.sync_kingdom_colors
Kingdom Commands
- gm.kingdom.add_clan
- gm.kingdom.call_ally_to_war
- gm.kingdom.create_kingdom
- gm.kingdom.declare_alliance
- gm.kingdom.declare_war
- gm.kingdom.destroy
- gm.kingdom.edit_banner
- gm.kingdom.equip_heroes
- gm.kingdom.generate_kingdoms
- gm.kingdom.get_tribute_info
- gm.kingdom.make_peace
- gm.kingdom.pay_tribute
- gm.kingdom.remove_clan
- gm.kingdom.rename
- gm.kingdom.set_ruler
- gm.kingdom.sync_vassal_banners
- gm.kingdom.trade_agreement
Settlement Commands
- gm.settlement.add_militia
- gm.settlement.fill_garrison
- gm.settlement.give_food
- gm.settlement.give_gold
- gm.settlement.rename
- gm.settlement.reset_names
- gm.settlement.set_culture
- gm.settlement.set_hearths
- gm.settlement.set_loyalty
- gm.settlement.set_owner
- gm.settlement.set_owner_clan
- gm.settlement.set_prosperity
- gm.settlement.set_security
- gm.settlement.set_village_bound_settlement
- gm.settlement.set_village_trade_bound_settlement
- gm.settlement.spawn_wanderer
- gm.settlement.upgrade_buildings
Item Commands
- gm.item.add
- gm.item.equip
- gm.item.equip_slot
- gm.item.list_equipped
- gm.item.list_inventory
- gm.item.load_equipment
- gm.item.load_equipment_both
- gm.item.load_equipment_civilian
- gm.item.remove
- gm.item.remove_all
- gm.item.remove_equipped
- gm.item.remove_equipped_modifier
- gm.item.save_equipment
- gm.item.save_equipment_both
- gm.item.save_equipment_civilian
- gm.item.set_equipped_modifier
- gm.item.set_inventory_modifier
- gm.item.transfer
- gm.item.unequip
- gm.item.unequip_all
- gm.item.unequip_slot
Query Commands
- gm.query.character_objects
- gm.query.character_objects_any
- gm.query.character_objects_info
- gm.query.clan
- gm.query.clan_any
- gm.query.clan_info
- gm.query.culture
- gm.query.culture_info
- gm.query.hero
- gm.query.hero_any
- gm.query.hero_info
- gm.query.item
- gm.query.item_any
- gm.query.item_info
- gm.query.kingdom
- gm.query.kingdom_any
- gm.query.kingdom_info
- gm.query.modifier_info
- gm.query.modifiers
- gm.query.settlement
- gm.query.settlement_any
- gm.query.settlement_info
- gm.query.troop
- gm.query.troop_any
- gm.query.troop_info