Closed Tranhultarn closed 2 years ago
Check https://github.com/BernhardPosselt/foundryvtt-special-dice-roller#rolling-dice-programmatically
which should be roughly game.specialDiceRoller.v5.rollFormula("hh", "you start raging")
Thanks for a very fast answer.
I've tried to implement that code but I'm simply too incompetent at programming. How do I get game.specialDiceRoller.v5.rollFormula("hh", "you start raging") to be rolled and shown in the chat. I've tried to implement it with the old code without success :/
You're getting back the html code and then need to post it to chat using a ChatMessage, see https://www.reddit.com/r/FoundryVTT/comments/ivmlb6/macro_help/
Aha, now I get it! Everything works now! Thanks!!
I'm trying to create some macros that uses the special dices but can't figure out how to call for the special dice.
I'm using the following code for regular dice but I'm trying to utilise it for the vampire version instead, const myValue = await Dialog.prompt({ content:
<input type="text">
, callback: (html) => { return html[0].querySelector("input").value; } }); await new Roll(${myValue}d10s
).toMessage();