Skip to content

API Hero list_traits

SolWayward edited this page Mar 4, 2026 · 1 revision

gm.hero.list_traits

Endpoint: gm.hero.list_traits

Syntax

gm.hero.list_traits

Parameters

This command takes no parameters.

Description

Lists all saved trait files in the BLGM traits directory. Trait files are JSON files created by gm.hero.save_traits and can be loaded onto any hero using gm.hero.load_traits.

Trait files capture all of a hero's traits including personality traits (Mercy, Valor, Honor, Generosity, Calculating), persona traits, political traits, and role/skill traits. Use this command to see which trait presets are available before loading them onto a hero.

Examples

List All Trait Files

gm.hero.list_traits

Output (files found):

Saved Trait Files:
  Found 3 file(s):

  1. derthert_personality.json
  2. king_traits.json
  3. honorable_warrior.json

Output (no files):

Saved Trait Files:
  (No saved trait files found)
  Directory: C:\...\BLGM\Traits\

Usage Tips

Workflow - Save then List:

# Save a hero's traits first
gm.hero.save_traits derthert derthert_personality

# Verify it was saved
gm.hero.list_traits

# Load it onto another hero
gm.hero.load_traits 'Ira of the Aserai' derthert_personality

File Location: Trait files are stored in the BLGM data directory under a Traits subfolder. The exact path is shown when no files are found.

Related Commands

Notes

No Arguments Required: This command requires no arguments and displays the directory listing immediately.

File Format: Saved trait files use the .json extension and store all trait identifiers and their associated level values.

Mod Compatibility: Traits added by other mods are also captured and saved. When loading, any trait IDs not found in the current game session (e.g., from a removed mod) are skipped gracefully.

Campaign Required: A campaign must be active before this command can be used.

Last Updated: 3/3/2026

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