-
Notifications
You must be signed in to change notification settings - Fork 0
API Item Overview
Category: Item Management Commands: 21 commands API Version: 1.3.11.2 Status: STABLE
Item management commands provide comprehensive control over inventory and equipment systems in Mount & Blade II: Bannerlord. These commands enable you to add/remove items from party inventories, manage hero equipment (both battle and civilian), save and load complete equipment sets, and manipulate item quantities and quality modifiers.
Items are the physical objects in Bannerlord including weapons, armor, mounts, trade goods, and consumables. The item management system spans inventory operations (party-level storage), equipment operations (hero-equipped items), and equipment persistence (save/load functionality). This powerful command set allows you to rapidly outfit heroes, test equipment combinations, manage trade goods, and create reusable equipment templates.
All item commands require campaign mode to be active. Heroes must belong to parties to hold items in inventory. The system supports quality modifiers (Fine, Masterwork, Legendary) and provides separate management for battle and civilian equipment sets.
| Command | Description | Category | Status |
|---|---|---|---|
| gm.item.add | Add items to party inventory | Inventory | STABLE |
| gm.item.remove | Remove items from party | Inventory | STABLE |
| gm.item.remove_all | Clear all party inventory | Inventory | STABLE |
| gm.item.transfer | Transfer items between parties | Inventory | STABLE |
| gm.item.list_inventory | View party inventory | Inventory | STABLE |
| gm.item.equip | Auto-equip item to hero | Equipment | STABLE |
| gm.item.unequip | Remove specific equipped item | Equipment | STABLE |
| gm.item.equip_slot | Equip to specific slot | Equipment | STABLE |
| gm.item.unequip_slot | Unequip specific slot | Equipment | STABLE |
| gm.item.unequip_all | Unequip all items | Equipment | STABLE |
| gm.item.remove_equipped | Delete all equipped items | Equipment | STABLE |
| gm.item.list_equipped | View equipped items | Equipment | STABLE |
| gm.item.save_equipment | Save battle equipment to file | Equipment Sets | STABLE |
| gm.item.save_equipment_civilian | Save civilian equipment | Equipment Sets | STABLE |
| gm.item.save_equipment_both | Save both equipment sets | Equipment Sets | STABLE |
| gm.item.load_equipment | Load battle equipment | Equipment Sets | STABLE |
| gm.item.load_equipment_civilian | Load civilian equipment | Equipment Sets | STABLE |
| gm.item.load_equipment_both | Load both equipment sets | Equipment Sets | STABLE |
| gm.item.set_equipped_modifier | Set quality modifier on equipped item | Advanced | STABLE |
| gm.item.set_inventory_modifier | Set quality modifier on inventory item | Advanced | STABLE |
| gm.item.remove_equipped_modifier | Remove quality modifier from equipped item | Advanced | STABLE |
Commands for managing party-level item storage.
Basic Inventory Commands:
- gm.item.add - Adds items to a hero's party inventory. Supports quantities from 1-10,000 per command.
- gm.item.remove - Removes specific items from party inventory. Requires sufficient quantity available.
- gm.item.remove_all - Clears all items from party inventory. Permanent deletion, use with caution.
- gm.item.transfer - Transfers items between two hero parties. Both heroes must have parties.
- gm.item.list_inventory - Displays organized inventory listing by category (weapons, armor, mounts, other).
Commands for managing hero-equipped items (worn/wielded gear).
Equipment Commands:
- gm.item.equip - Automatically equips an item to the appropriate slot. System detects correct slot based on item type.
- gm.item.unequip - Removes a specific equipped item. Searches both battle and civilian equipment.
- gm.item.equip_slot - Equips item to a specific equipment slot (Weapon0-3, Head, Body, Leg, Gloves, Cape, Horse, HorseHarness).
- gm.item.unequip_slot - Unequips item from specific slot. Returns error if slot is empty.
- gm.item.unequip_all - Removes all equipped items and moves them to party inventory. Preserves items.
- gm.item.remove_equipped - Permanently deletes all equipped items. Does not move to inventory.
- gm.item.list_equipped - Displays all equipped items organized by battle/civilian sets.
Commands for persisting equipment configurations to files for reuse and backup.
Equipment Persistence:
- gm.item.save_equipment - Saves hero's battle equipment to JSON file in Documents folder.
- gm.item.save_equipment_civilian - Saves civilian equipment to separate JSON file.
- gm.item.save_equipment_both - Saves both battle and civilian equipment with single command.
- gm.item.load_equipment - Loads previously saved battle equipment from file.
- gm.item.load_equipment_civilian - Loads civilian equipment from file.
- gm.item.load_equipment_both - Loads both equipment sets from files.
All save/load operations preserve item quality modifiers and handle missing items gracefully.
Commands for specialized item manipulation.
Advanced Commands:
- gm.item.add_with_modifier - Adds items with specific quality modifiers (Fine, Masterwork, Legendary, etc.).
- gm.item.set_quantity - Sets the quantity of a specific item stack in party inventory.
Most commands accept flexible item identification:
-
StringId - Exact game identifier (e.g.,
imperial_sword,western_mail_coif) -
Partial Name - Substring match in item name (e.g.,
sword,armor,horse)
Commands involving heroes accept:
-
StringId - Exact hero identifier (e.g.,
lord_1_1,wanderer_empire_1) - Partial Name - Substring match in hero name
-
Special Keywords -
playerfor the player character
Valid equipment slot names:
- Weapons: Weapon0, Weapon1, Weapon2, Weapon3
- Armor: Head, Body, Leg, Gloves, Cape
- Mounts: Horse, HorseHarness
- Battle - Default equipment set for combat
- Civilian - Equipment for town/non-combat situations
- Use
civiliankeyword to specify civilian equipment
- Range: 1 to 10,000 items per command
- Type: Integer
Quickly equip multiple heroes with battle gear:
gm.item.add imperial_sword 5 player
gm.item.add steel_shield 5 player
gm.item.add chainmail 5 player
gm.item.equip imperial_sword player
gm.item.equip chainmail player
Result: Party has weapons and armor inventory, player equipped with combat gear.
Create reusable equipment templates:
gm.item.save_equipment_both elite_warrior elite_template
gm.item.load_equipment_both new_companion elite_template
Result: New companion receives exact same equipment as the elite warrior.
Equip a hero with full equipment set:
gm.item.equip_slot imperial_sword player Weapon0
gm.item.equip_slot steel_shield player Weapon1
gm.item.equip_slot helmet player Head
gm.item.equip_slot chainmail player Body
gm.item.equip_slot boots player Leg
gm.item.equip_slot destrier player Horse
Result: Hero has complete battle equipment in specific slots.
Manage separate equipment sets:
gm.item.equip armor player
gm.item.equip robe player civilian
gm.item.list_equipped player
Result: Hero has armor for battle, robe for civilian situations.
Transfer and organize items between parties:
gm.item.list_inventory player
gm.item.transfer imperial_sword 3 player companion
gm.item.remove food 50 player
Result: Items transferred and unwanted items removed.
Always save equipment before testing new configurations:
gm.item.save_equipment_both player backup_before_test
This allows quick restoration if experiments go wrong.
Find exact item identifiers before adding:
gm.query.item imperial
gm.query.item armor tier5
Ensures correct item selection and reveals available items.
Understand the difference:
- gm.item.unequip_all - Moves items to inventory (preserves items)
- gm.item.remove_equipped - Permanently deletes items
Use unequip_all unless you specifically want to delete items.
Follow conventional slot usage:
- Weapon0 - Primary weapon (sword, polearm, bow)
- Weapon1 - Shield or secondary weapon
- Weapon2-3 - Backup weapons or additional ammunition
Use quality modifiers for better equipment:
gm.item.add_with_modifier player imperial_sword masterwork 1
Quality levels: crude, chipped, rusty, bent, fine, masterwork, legendary
Critical difference in item destruction:
- gm.item.remove_equipped - PERMANENTLY DELETES equipped items
- gm.item.unequip_all - Moves items to inventory (safe)
Always use unequip_all unless deletion is intended.
Saving equipment with existing filename overwrites without warning:
- No confirmation prompt
- Previous equipment data is lost
- Use unique filenames or backup files
Heroes must belong to parties for inventory operations:
- Wanderers without parties cannot hold inventory items
- Imprisoned heroes may lack parties
- Equipment operations work regardless of party status
Equipment files are stored in:
-
Battle:
Documents\Mount and Blade II Bannerlord\Configs\GameMaster\HeroSets\{filename}.json -
Civilian:
Documents\Mount and Blade II Bannerlord\Configs\GameMaster\HeroSets\civilian\{filename}.json
Files are in JSON format, editable with text editors.
When loading equipment:
- Missing items (from removed mods) are skipped with notification
- Available items still equip normally
- Partial loads succeed gracefully
Inventory items stack by type:
- Consumables (food) stack in large quantities
- Equipment items typically stack individually
- Use set_quantity to adjust stack sizes
- Hero Management Commands - Manage heroes who own equipment
- Query Commands - Search for items and modifiers
For finding items before adding:
-
gm.query.item- Search items by name, type, tier -
gm.query.item_categories- View all item categories -
gm.query.modifiers- List quality modifiers and effects
- Item Types Reference - Complete item type catalog
- Item Modifiers Reference - Quality modifiers and stats
- Equipment Slots Reference - Slot system details
- Quick Start Guide - Getting started with GameMaster commands
- Best Practices - Recommended usage patterns
- Troubleshooting - Common issues and solutions
Last Updated: 2025-12-16 API Version: 1.3.11.2
🏠 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_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