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 .
×

Can buttons be used to populate other fields on a sheet?

So I've been looking to run Paranoia 2017 at some point in the future, and I'm just trying to explore what I'd need to do to set it up in various mediums. This is its character sheet: <a href="https://i.imgur.com/LP49tww.jpg" rel="nofollow">https://i.imgur.com/LP49tww.jpg</a> The game uses a system where the player has to calculate their N.o.D.E.* Dice Number, then roll Xd6&gt;5 (or Xd6&gt;5f&lt;4 if the value of the relevant skill is negative. Absolute value of the negative skill is used when added to the N.o.D.E. Dice Number). Thing is, N.o.D.E. Dice Number can be calculated using any combination of Stat and Skill, plus other factors such as current wounds, amount of Moxie points spent, and miscellaneous bonuses from equipment and action cards. How I was thinking of handling this was to have a Handy Dandy (Mandatory) Roll! button underneath Skills, which would show the currently selected stat and skill, populated by clicking on the name of the stat or skill. There would also be another field to fill in miscellaneous bonuses, and have the penalty applied by looking at the current highest wounds on the damage track. Would this method be viable to cook up? Admittedly I haven't worked with HTML in years, but I do have some programming experience, and I'm not too worried about recreating the stylings of the sheet (it's pretty nice and clean). Also, how much logic can I put in the sheet? Does it support If-Else? *N.o.D.E.: Number of DicE
1513976458
Jakob
Sheet Author
API Scripter
I don't understand 100% what you want to do, but let me tell what you can do: 1. You can put roll buttons on the sheet. Now, they can read any data that's on the sheet, and they can use queries (pop up boxes) for someone to enter something or choose from a list; this is then sent to chat and displayed, including any rolls. With roll templates, you can do some nifty things there; what roll buttons absolutely cannot &nbsp;do (except with the help of API scripts) is to change any data on the sheet whatsoever. 2. You can use sheet workers to change some data on the sheet when some other data changes. You have access to full Javascript here in terms of logic for determining an attribute value from other values, though you can only interact with the user by retrieving or setting attribute values on the sheet. WIth some complicated CSS, you can even have a semblance of a user interface here, though it's important to note that you can not &nbsp;manipulate the DOM in any way using sheet workers, nor can sheet workers send chat messages. As for what you want to do: You can use the second method to simulate a button on the sheet that changes values on click: you can use CSS to style a checkbox to look like a button, and use sheet workers that trigger when the corresponding attribute is changed. That's about as close as you can get, it works pretty well in practice, though there's always a short delay until changes are applied.
So with that second method, could I have Stats/Skills be two radio fields, and when one is clicked, the user-inputted value associated with that Stat/Skill is retrieved and then set on a different attribute field? So, say I had a Violence of 1 and a Guns of 3. When I click Violence, it updates the Active Stat field beside the Roll! button with 1, then I click Guns and it updates the Active Skill field to 3, then I click Roll! and it rolls using those numbers. Would that be the sort of thing that could work? Otherwise, I might do the first method using Queries.
1514025746
Jakob
Sheet Author
API Scripter
That can be done, but a button next to Guns with a popup to choose to use Violence might be a better user experience.
1514026735
Finderski
Pro
Sheet Author
Compendium Curator
Jakob said: That can be done, but a button next to Guns with a popup to choose to use Violence might be a better user experience. But it would be just like the Computer to require clicking Violence and Guns rather than clicking Guns and Selecting Violence—because the Computer is our friend and wouldn't want us to get soft through ease-of-use. :)
Most of the World of Darkness use dice pools, using a stat/skill combo and additional modifiers.&nbsp; Usually they use drop down menus to select which stat and skill, but as far as I can tell, drop down menus are just stylized radio buttons. The Official New World of Darkness has a really sexy set of radio buttons that look like the attribute or skill names.&nbsp; It is super cool. Speaking of Styling, you can style a checkbox to look and act like a button on the sheet, and use sheet workers to take the input (or the change of the checkbox's status) from the checkbox to make changes on the character sheet.&nbsp;&nbsp; Taking the highest value of the damage track is either sheet workers or a clever use of rounding.
1514583436

Edited 1514583830
I completely forgot about the Computer Dice, so after some thought, I think likely what I'll do for rolling is two buttons: one for positive rolls and one for negative. For positive: "/roll ?{N.o.D.E.}d6&gt;5 + [[1t[cd+]]]". For negative: "/roll ?{N.o.D.E.}d6&gt;5f&lt;4 + [[1t[cd-]]]". The difference between the two dice tables is that each have Computer and +1, each with a weight of 1, while the cd+ has 0 with a weight of 4, and cd- has -1 with a weight of 4. I get the feeling this would be the least headache-inducing for me as a GM. (For reference: The Computer Dice is a single six-sided die where the 6 is replaced with an icon of The Computer. There is some debate over how this die should be treated, but for the purposes of how I plan to run things, a 5 is a success, a The Computer is always neutral for the purposes of successes and failures, and 4 and under is a -1 if you're rolling with a negative Skill) I'm curious though is that if there's a way to have the NoDE be an argument of the macro, rather than a prompt. Also, I'm wondering if I should include an abs() around the ?{}, just to be safe.