template_edit

Writes a template (.utc creature, .uti item, .utp placeable…) under a new name with fields changed: a number, a text (a String or ResRef), or a string reference for a name. A field in a struct is named by its path, “Appearance Data/Appearance_Type”. resource shows a template’s fields.

Arguments

Name Type Required What
name string yes The game’s template, “ogre_default.utc”.
set object yes Each field’s path and its new value: {“Tag”: “red_ogre”, “Appearance Data/Appearance_Type”: 7701}.
save_as string yes The new template’s name, “red_ogre” (the extension is the original’s).
to string yes The folder to write into, a full path; made if missing. Never inside the game’s folder.

Call it as template_edit over MCP, or from a shell as ghilana.exe --call template_edit '<arguments as JSON>'.