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

"Equipping" weapons from a repeating Fieldset

Is there a way to do this?  Basically, by selecting a checkbox on one of the items of a Repeating fieldset to be the only one to be selected during a roll or passive calculation. Basically, if a "weapon" in a group of 4 items is selected, that item should be used to calculate attributes.  If a different one is selected, that previous checkbox should be unchecked and the new weapon selected for calculations. I'm not sure if I explained that correctly, but this would really help with what I'm doing without having the players constantly re-writing values every time they want to equip a different weapon. If this fieldset idea doesn't work, is it possible to "drag and drop" the item into a section for an "equipped weapon?"
1526629620

Edited 1526629637
GiGs
Pro
Sheet Author
API Scripter
I don't think a radio button will span multiple rows of a repeating fieldset. Failing that the best way is via sheetworker which would work something like this: Have a hidden set of inputs outside the fieldset, used for storing the weapon data you need Have a sheet event setup to detect clicks on those checkboxes. When you click a check box, it copies the weapon's data to those hidden inputs, and unchecks the checkboxes for the other weapons in the field set Your roll button uses the hidden input values, which are updated automatically when weapons change.
G G said: I don't think a radio button will span multiple rows of a repeating fieldset. Failing that the best way is via sheetworker which would work something like this: Have a hidden set of inputs outside the fieldset, used for storing the weapon data you need Have a sheet event setup to detect clicks on those checkboxes. When you click a check box, it copies the weapon's data to those hidden inputs, and unchecks the checkboxes for the other weapons in the field set Your roll button uses the hidden input values, which are updated automatically when weapons change. Hey, sorry for the late reply.  I've been super busy the past few days doing a bunch of BS. Either way, how would I set this up in terms of code?  I'm not the best programmer and usually just copy and modify other people's code.
1527245182
GiGs
Pro
Sheet Author
API Scripter
Can you post your fieldset code, to give me something to start from?