
... I am reposting this here from the ScriptCards discord asking for help... Hello folks, I am working on two projects and could use a bit of advice and guidance. I am working to create a very specific layout and code for a World of Darkness (20th Anniversary/Revised). Dice roller and output. I need the chat output to have sorted dice rolls from lowest to highest (left to right), have 1's and 10's on the dice and counted. As well as a roll query for a difficulty threshold (defaults to 6). I know an API dice roller exists, but when combined with roll queries the API badly and I would very much like the ability to have a chat output style of my own design. I am hoping, I could get some advice, my current code is quite compact, so I am hoping that it will be clear enough to be reviewed. !scriptcard {{ --/| === ScriptCard Layout for World of Darkness Rolls === |\-- --/| === System: World of Darkness / Storyteller === |\-- --/| === Version 1.0 === |\-- --/| === Date: 05/11/2025 === |\-- --/| Roll Queries / Lookup --|\ --=NumDice|?{How Many Dice?|1} --=Diff|?{Difficulty?|6} --/| ======== Sheet Workers Title/Subtitle Code ======== |\ --#nominmaxhighlight|1 --#title|Storyteller Roll --#titlecardbackground|#993333 --#leftsub|Left --#rightsub|Right --+Rolling|[$NumDice.Total]d10 --=CountOnes|0 --=CountTens|0 --=TotalRoll|0 --&DieResults| --%i|1;[$NumDice];1 --=ThisRoll|1d10 --=TotalRoll|[$TotalRoll] + [$ThisRoll] --?[$ThisRoll] -eq 1|[ --=CountOnes|[$CountOnes] + 1 --&DieResults|+ [roll:f][$ThisRoll.Raw][/roll] --]|[ --?[$ThisRoll] -eq 10|[ --=CountTens|[$CountTens] + 1 --&DieResults|+ [roll:c][$ThisRoll.Raw][/roll] --]|[ --&DieResults|+ [roll][$ThisRoll.Raw][/roll] --]| --%| --+[c] ● Results ●[/c]| --+[&DieResults]| --+Total|Total Dice [$TotalRoll] [b] Ones: [/b] [$CountOnes] [b] Tens: [/b] [$CountTens] [b] Total Success: [/b] [$CountSuccess] }} Thank you in advance for any help that it might be possible to give on this or related. Feel free to reach out to me here on r20 or Discord.