optimize_passives
Allocate passive points to maximize a specified metric, such as TotalDPS or balanced offense/defense, using greedy search. Supports weighted goals and required nodes.
Instructions
Greedily allocate passive points to maximize a goal on the active build.
Three goal modes:
single
metric(e.g. "TotalDPS", "Life", "TotalEHP") — maximizes that stat;metric="balanced"— raises offense AND defense (relative TotalDPS + TotalEHP);goals={"TotalDPS":0.5,"Life":0.3,"CritChance":0.2}— a WEIGHTED mix (relative gains, so stats on different scales combine). A goal whose base is ~0 (e.g. crit on a non-crit build) contributes nothing — fix the base first.
require=[node ids/names] allocates those nodes (+ shortest path) first, then optimizes the
rest — but only as far as the budget allows (it never over-allocates; skipped requires are
reported in requireSkipped). reset=True first deallocates the current tree (keeping
ascendancy) so you can RE-PLAN from scratch — e.g. reset=True, require=[jewel socket ids] to
rebuild the tree around jewel sockets instead of piling onto a full tree. points defaults to
0 = the FULL remaining passive budget (the usual intent — allocate the whole tree); pass a
positive number only to CAP allocation. Ascendancy is a SEPARATE 8-point pool, auto-allocated on
top regardless of points. Returns chosen nodes with per-step gains; pointsRemaining is the
build's TRUE unspent passive points. Bounded greedy search, not a global optimum.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | No | TotalDPS | |
| points | No | ||
| node_type | No | Notable | |
| candidates | No | ||
| goals | No | ||
| require | No | ||
| reset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||