levelup
Spends a creature’s level-up points as the game’s level-up screen does, by the engine’s own rules for what may be taken. id picks the creature (default: the creature you control). The tool spends the points and completes the level-up; with showMs above 0 it shows the level-up screen meanwhile, where the screen can open. Pass exactly one of:
offers: true: returns what the screen offers and spends nothing:points,attributes, and the class’stalents,spellsandskills, each a list of abilities withid,nameandstate(has,learnablenow, ornot yet); and thespecializations, each withid,nameandstate(has,learnable,lockedorno point to spend).- The points to spend:
specialization,abilitiesandattributes, in any combination. A specialization is taken first, so its abilities can be taken in the same call. Listabilitieswith the first of a chain before the next. The first one refused (had already, locked, not offered, or no point left) stops the tool, saying why; those taken before it are kept (taken). auto: true: the screen’s Auto Level Up, which spends every point as the game chooses for the class (all a follower needs), repeating while points are left.
The answer includes levelled, reason, before and after (level and points to spend), the attributes raised and by how much, the talents, spells and skills gained, and a cursor; screen says why the screen was not shown, where it was asked for and did not open. It refuses a creature with no points to spend (character shows canLevelUp). A level-up is permanent once the game is saved.
Arguments
| Name | Type | Required | What |
|---|---|---|---|
id | string | Who levels up, by creature id. Default: the creature you control. | |
auto | boolean | If true, spend every point as the screen’s Auto Level Up does. | |
offers | boolean | If true, return what the screen offers and spend nothing. | |
abilities | array | Ability ids to take, in order, from those offers lists as learnable. | |
attributes | object | Points to put in each attribute, e.g. {“strength”: 2, “cunning”: 1}. | |
specialization | any | A specialization to take, by name or ability id, as offers lists it. | |
showMs | integer (≥ 0, ≤ 10000) | How long to show the level-up screen before the points are spent and after, in milliseconds, so whoever watches sees it. Default 1000; 0 for no screen. |
Call it as levelup over MCP, or POST /api/tool/levelup with the arguments as JSON.