Encode a build into a template code
encode_templateCompile a build (professions, attributes, 8 skills by exact English name) into an official in-game template code. The build is validated first; on rule violations the errors are returned instead of a code. Unknown skill names return closest-match suggestions. IMPORTANT: template codes MUST come from this tool — never write or guess a code by hand, hand-written codes are invalid in-game. If unsure, verify any code with decode_template.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| forPvp | No | Set true for a PvP character's bar. PvP versions of split skills are only valid when this is true, and a PvP bar is expected to use them. | |
| skills | Yes | Exactly 8 skill names in bar order. Use null for an empty slot. Names must be exact English skill names. | |
| forHero | No | Set true if this bar is for a hero (PvE-only skills are flagged) | |
| primary | Yes | Primary profession, e.g. "Dervish" | |
| secondary | No | Secondary profession, e.g. "Monk". Omit or "None" for none. | |
| attributes | Yes | Attribute point allocations (template format caps this at 15 entries) | |
| unlockedSkillIds | No | Optional: unlocked skill ids from a GWToolbox account export (/exportaccount). Skills outside this list are flagged as warnings. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Official in-game template code (present on success) | |
| valid | No | false when the build resolved but is illegal; absent on the other two shapes | |
| errors | No | Present (non-empty) when resolution failed or the build is invalid | |
| warnings | No | Advisories accompanying a successful code |