Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

question about adding a "random" option to the dungeon world roll types on moves

My goal is to add a selection to the "roll type" drop down you can set on a move in the basic dungeon world by roll20 character sheet. I want to add a "random" selection, which would pick randomly from the 6 attributes and use its mod (say, charisma +2 or intelligence -1), and preferable, report on which attr mod it used in the resulting roll on hover. my campaign is (because of setting) accumulating a lot of moves that reflect "wild magic" and it is tedious for me to have to pick a random stat every time the characters or NPCs roll one of these moves when what i want is for it to simply be a random attribute and if we need to, dig in and see what the attribute selected was.  i see the input: attr_statmod_query:      <input type="hidden" name="attr_statmod_query"            value="?{Stat|STR,@{strength_mod}[strength]|DEX, @{dexterity_mod}[dexterity]|CON, @{constitution_mod}[constitution]|INT, @{intelligence_mod}[intelligence]|WIS, @{wisdom_mod}[wisdom]|CHA, @{charisma_mod}[charisma]}"> and I think adding something like attr_statmod_query_random and an associated option here:                                      <option value="@{intelligence_mod}[intelligence]">INT</option>                                     <option value="@{wisdom_mod}[wisdom]">WIS</option>                                     <option value="@{charisma_mod}[charisma]">CHA</option>                                     <option value="@{statmod_query}">ASK</option>                                     <option value="@{statmod_query_random}">RANDOM</option>                                     <option value="@{bond_query}">BOND</option> would do the trick, but i confess I have no idea what to put in the attr_statmod_query_random to make this work. on the other hand, it isn't really a "query" since i don't need to ask the user for something, just get a random one of six values... thoughts?
1598650816
Finderski
Plus
Sheet Author
Compendium Curator
I'm assuming this is a custom sheet...There are a couple ways you could do this... 1. Use a Roll Template - This could be complex and would require you rolling a d6 with every roll, and then having the template set up with a several Roll Total helper functions to  determine which it is. The problem is the modifier would need to be applied after the fact. 2. Use a sheetworker to set the value - This would like likely need an action button to trigger a change each time, otherwise, it could be random on sheet open, but after that, the value becomes static unless the sheet worker is called again.
it is a custom sheet that i've hacked up quite a bit. the roll template sounds like the right approach - i think the "ASK" selection is already using a roll template that queries the user for one of the six abilities already? I just want it to roll a d6 and pick one of the 6 from, yeah, i guess a table. hmm... i need to read the help in more detail. i've gotten this far hacking around in what's already there but i'm starting to run into the limitations of that approach now that just removing bits and moving things around is running up against the limitations of my understanding of how the "little languages" work. 
1598658386
Finderski
Plus
Sheet Author
Compendium Curator
If you get stuck, feel free to post code here along with a detailed description of what you're hoping the code would/could.  Many here are happy to help. :)