ironmonk88 / monks-combat-details

GNU General Public License v3.0
11 stars 7 forks source link

Combat Display Bars from macro? #78

Open ksignorini opened 5 months ago

ksignorini commented 5 months ago

I tried to set the Combat Display Bars from a macro:

const updates = [];
for(const actor of game.actors) if (actor.type === "npc") updates.push({
  _id: actor.id,
  "prototypeToken.displayName": CONST.TOKEN_DISPLAY_MODES.HOVER,
  "prototypeToken.displayBars": CONST.TOKEN_DISPLAY_MODES.OWNER_HOVER,
  "prototypeToken.flags.monks-combat-details.displayBarsCombat":40
});
await Actor.updateDocuments(updates);

and it doesn't show it as any different on the prototype token. However, inspecting the object shows 40 as the value.

When I drag the prototype onto a scene and check the token, the token does have the value set.

Am I doing this wrong? Is it a bug in the module?

image