-
Notifications
You must be signed in to change notification settings - Fork 0
API Hero import_character
Endpoint: gm.hero.import_character
gm.hero.import_character <filename> <clan> [type] [settlement] [withParty]
| Parameter | Type | Required | Position | Description |
|---|---|---|---|---|
filename |
string | Yes | 0 | Character set filename without .json extension |
clan |
string | Yes | 1 | Target clan name, StringId, or partial match |
type |
string | No | 2 | Override hero type: lord, wanderer, or companion. Defaults to the type saved in the file |
settlement |
string | No | 3 | Placement settlement name or ID. Defaults to auto-resolved from clan |
withParty / party
|
bool | No | 4 | For lords: whether to create a party (true/false). Defaults to true
|
Creates a brand new hero by importing a previously exported character set file. The saved appearance, development (skills, attributes, perks), traits, and equipment are all applied to the newly generated hero.
The new hero receives a fresh identity — a new name (from the saved file or auto-generated), a new StringId, and a new MBGUID — while inheriting all the visual and gameplay data from the exported character.
Use gm.hero.list_characters to see available files, and gm.hero.export_character to create them.
gm.hero.import_character my_king 'dey meroc'gm.hero.import_character king_export meroc lordgm.hero.import_character ira_backup meroc companiongm.hero.import_character filename:ira_backup clan:meroc type:companiongm.hero.import_character ira_backup 'dey meroc' wanderer Porosgm.hero.import_character ira_backup meroc lord 'Vladiv Castle' falseOutput:
[gm.hero.import_character] filename: ira_backup | clan: Dey Meroc | type: lord | settlement: Vladiv Castle | withParty: False
SUCCESS: Imported character from 'ira_backup'. Created hero '{Name}' (ID: {StringId}).
Standard Import Workflow:
# 1. Check available character files
gm.hero.list_characters
# 2. Import the character into a clan
gm.hero.import_character my_king 'dey meroc' lordSharing Characters Between Saves:
# Export from one save
gm.hero.export_character derthert custom_lord
# Import into another save session
gm.hero.import_character custom_lord vlandia lordImport as Wanderer (No Clan Party):
gm.hero.import_character ira_backup meroc wandererFile Not Found:
Error: Character set file '{filename}' not found.
Directory: C:\...\BLGM\CharacterSets\
Solution: Use gm.hero.list_characters to see available files.
Clan Not Found:
Error: No clan found matching '{query}'.
Solution: Use gm.query.clan to verify the clan name or StringId.
Invalid Type:
Error: Invalid hero type '{type}'. Valid types: lord, wanderer, companion
Solution: Use one of the three valid type values.
Settlement Not Found:
Error: No settlement found matching '{query}'.
Solution: Use gm.query.settlement to verify the settlement name or StringId.
Hero Creation Limit:
Error: Hero creation limit reached.
Solution: Reduce the number of custom heroes in the game or adjust BLGM configuration.
Filename or Clan Empty:
Error: Filename argument cannot be empty.
Error: Clan argument cannot be empty.
Solution: Ensure both required arguments are provided.
- gm.hero.export_character - Export a hero's full character data to a file
- gm.hero.load_character - Load a character set onto an existing hero
- gm.hero.list_characters - List all saved character set files
- gm.hero.create_lord - Create a new lord without a character set file
- gm.hero.create_companions - Create companions without a character set file
- API-Hero-Overview - All hero commands
New Identity: Imported heroes receive a new name (from the character set or auto-generated), a new StringId, and a new MBGUID. They are treated as entirely new game entities even though their visual and gameplay data comes from the exported hero.
Type Override: If the type argument is provided, it overrides the hero type stored in the character set file. If omitted, the type from the file is used. Valid types are lord, wanderer, and companion.
Settlement Auto-Resolution: If no settlement is specified, the system automatically determines an appropriate spawn location based on the target clan's holdings.
Party Creation: The withParty parameter only applies when the hero type is lord. Wanderers and companions do not have mobile parties. Defaults to true.
Single Quotes Required: The TaleWorlds console requires SINGLE QUOTES (not double quotes) for multi-word arguments. This applies to multi-word clan names like 'dey meroc' and settlement names like 'Vladiv Castle'.
Named and Positional Arguments: Both named (filename:value) and positional arguments are supported. Named arguments use the format argName:value with no spaces around the colon.
Last Updated: 3/3/2026
🏠 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