API and flags¶
API¶
isMinion and minionKillSchemaVersion are available on every client from the init hook. openBandsWindow is added at ready, for the GM only.
isMinion¶
Returns true for minions from Flee, Mortals! and for actors marked in Minion!. Use it to tell minions apart from other creatures, for example to keep them out of your regular kill count.
minionKillSchemaVersion¶
The version of the minionKill event.
openBandsWindow¶
Opens the Groups and bands window. GM only, and only while shared turns and bands is on.
Flags¶
Marking a minion¶
This flag's name won't change.
Who killed a minion¶
Every minion that Minion! drops, from a hit or from an overkill, gets this record:
const record = actor.getFlag("minion-bang", "killedBy");
// {
// attackerTokenUuid: "Scene.xxxx.Token.yyyy",
// attackerName: "Akra",
// combatId: "zzzz", // null outside combat
// round: 2, // null outside combat
// turn: 0 // null outside combat
// }
Each death also gets its own id, the same as the hook's eventId:
Bands¶
A band's data lives on its combatant group, in the minion-bang scope.
| Flag | On | Content |
|---|---|---|
color |
group | The band's color, #rrggbb |
captain |
group | The captain's token id |
mode |
group | captain, average, highest, lowest or median. Missing means the world setting. |
lockedInitiative |
group | The captain's roll, locked in |
alone |
combatant | true for a minion the Groups and bands window added alone |
ringOriginal |
token | { value }: the ring color the token had before it took a band color |