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

Is there a way to put repeating sections data into a select ?

Hi everyone, I'm still wondering about the limits of the character sheet and the script worker and I'm not sure of the understandability of my question so let's take an example. There is a repeating section with weapons that goes with data like "Weapon_name", "Weapon_dmg", "Weapon_type"... In another tab of  the character sheet, there is a choice of how the attack is done like  A field about piercing attack A field about contondant attack A field about cutting attack Is it possible to make a select option to choose wich weapon is used for that attack ?   If it's still not clear, I can make a sketch. Thanks !
Well, I guess that means there is no way to do something like that 
1607401671
vÍnce
Pro
Sheet Author
Hi Eggøer, If I understand your question correctly; you want to choose the type of attack then pick a repeating weapon?  Sheet <selects> cannot be dynamically generated or nested on roll20. ;-(  That would be a very handy feature though. Is this a sheet you are working on or an existing one?  How does the sheet currently handle making an attack?  Seems that it would be easier to include the type of attack within the repeating weapons which would roll the chosen attack for that weapon.
Hi Vince, It's like whenever I got a question you're the one who answer it, it's a sheet I'm working on for a friend. As you say we cannot dinamically generate the selects options it seems like I must search for something else for that character sheet. I did not code how to handle making an attack yet as I wasn't sure about this feature. Do you know if there is a place to propose ideas for new features on roll20 ?
1607433700
Andreas J.
Forum Champion
Sheet Author
Translator
Eggøer said: Do you know if there is a place to propose ideas for new features on roll20 ? The Suggestions & Ideas forum. And while selects cant be dynamicly generated, I think in theory it should be possible to fake something similar with advanced use of sheetworkers, css & hiding/showing many html elements. But this is way beyond my skill level, and would likely be a lot of work, but I've seen impressive hacks being created before, and don't think creating something similar is impossible, if you're clever about it. Like some combo of radio buttons paired with inputs, that would only show if some hidden values updated by a sheetworker based on how many entires are in a repeated section. Then some sheetworkers would update the value of a new/empty radio+input combo each time a new repeating section thing is added, and make the radio+input visible/selectable. Doing something like this would mean you need to hardcode a number of these radio+input entires to exist, and they would be filled out/emptied based on repeating sections being created/removed.
1607479036
Oosh
Sheet Author
API Scripter
You could prompt the user with a Query drop-down when they click attack. Would that work? A sheetworker can dynamically assemble a Query and store it in an Attribute, and it's referenced in the roll button for that row. It's probably not simple (you might need extra hidden Attributes for Query-friendly pieces of code), but the 5e sheet uses this method to construct the skill roll buttons according to sheet settings and character abilities. The correct assembly of Query/modified math is then sent to chat when the roll button is clicked.
I don't know if this could work, I'm a beginner with the text/worker script actually.