Closed rayners closed 4 months ago
It should have been possible already, but there were a couple of missing links. I addressed this in https://github.com/pafvel/dragonbane/commit/bde7d4db3e8feda96ef49a4b01410af65d1845f4
It is now possible to do like this:
let options = {};
options.boons = [{source: "Manual", value: true}];
for (const token of canvas.tokens.controlled) {
game.dragonbane.rollAttribute(token.actor, "con", options);
}
The source parameter should be the localized text that will be shown in the dice result (and in the roll dialog if options.defaultBanesBoons = false).
@pafvel Even better! No idea why that approach didn't occur to me in the first place. 🤦♂️
Add an option to manually specify additional banes/boons to a test roll (via
manualBanes
andmanualBoons
).The specific use case I have in mind is making a self-rally roll, which calls for a WIL roll with a bane, but I couldn't spot a way to do that without the player having to manually add the bane to the roll. And manually adding the bane isn't straightforward either because the
rollAttribute
method exposed ongame.dragonbane
skips the dialog entirely.This would allow me to use this code inside the Argon HUD module:
From my local testing (console and chat message for the result):
The tooltip output isn't as good as I was aiming for, but it's late and I didn't manage to work out a way to compress
['Manual', 'Manual']
to['Manual (x2)']
without a bunch more changes to parts of the code I'm less familiar with.Happy to make any changes you feel are appropriate.