Skip to content

API Hero save_development

SolWayward edited this page Mar 4, 2026 · 1 revision

gm.hero.save_development

Endpoint: gm.hero.save_development

Syntax

gm.hero.save_development <hero> <filename>

Parameters

Parameter Type Required Position Description
hero string Yes 0 Hero name, StringId, or player
filename string Yes 1 Name for the save file (without .json extension)

Description

Saves a hero's full development state to a JSON file. The saved data includes all skills and their levels, attributes and their points, selected perks, focus point allocations, total XP, level, and unspent attribute and focus points.

The saved file can later be loaded onto any hero using gm.hero.load_development. Use gm.hero.list_developments to view all saved files.

Examples

Save by Partial Name

gm.hero.save_development derthert derthert_build

Output:

[gm.hero.save_development] hero: Derthert | filename: derthert_build.json
SUCCESS: Saved Derthert's development to: derthert_build.json
Level: 26 | Total XP: 2541023
Skills: 18 | Perks Selected: 42
Unspent Attribute Points: 0
Unspent Focus Points: 0

Save Multi-Word Hero Name

gm.hero.save_development 'Ira of the Aserai' ira_skills

Output:

[gm.hero.save_development] hero: Ira of the Aserai | filename: ira_skills.json
SUCCESS: Saved Ira of the Aserai's development to: ira_skills.json
Level: 14 | Total XP: 487234
Skills: 18 | Perks Selected: 18
Unspent Attribute Points: 2
Unspent Focus Points: 5

Using Named Arguments

gm.hero.save_development hero:derthert filename:king_build

Save Player Development

gm.hero.save_development player my_build

Usage Tips

Creating Build Templates:

# Build a hero exactly how you want them
# Then save as a template
gm.hero.save_development derthert elite_cavalry_build

# Apply the same build to another hero
gm.hero.load_development 'Ira of the Aserai' elite_cavalry_build

Backing Up Before Changes:

# Backup before making changes
gm.hero.save_development derthert derthert_backup

# Make changes...

# Restore if needed
gm.hero.load_development derthert derthert_backup

List available files:

gm.hero.list_developments

Error Handling

Hero Not Found:

Error: No hero found matching '{query}'.

Solution: Use gm.query.hero to verify the hero name or StringId.

Multiple Matches:

Error: Multiple heroes found matching '{query}'. Please be more specific.

Solution: Use a more specific name or the exact StringId.

Filename Empty:

Error: Filename cannot be empty.

Solution: Provide a valid filename as the second argument.

Related Commands

Notes

Complete State Saved: The development file captures the entire progression state including all 18 skills, all attribute allocations, every selected perk, all focus assignments, total XP accumulated, current level, and any unspent points. This allows for a perfect recreation of a hero's build.

Perk Coverage: All perks from PerkObject.All are iterated, which includes vanilla game perks and any perks added by other loaded mods.

File Overwrite: If a file with the same name already exists, it will be overwritten without warning. Use gm.hero.list_developments to check existing files first.

Single Quotes Required: The TaleWorlds console requires SINGLE QUOTES (not double quotes) for multi-word arguments.

Named and Positional Arguments: Both named (hero:value) and positional arguments are supported. Named arguments use the format argName:value with no spaces around the colon.

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