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

select - options - value question

Hi all, so far I was scanning the forum entries for some hint to a solution formy problem. Unfortunately to no complete success. (I think I found a solution with CSS, but that's quite through the back into the eye. :-)) So I'd like to have a simple drop-down list with options to select for a character. <select name="attr_mySkill"> <option value="1">Skill 1 </option> <option value="2">Skill 2</option> </select> I'd like to have a dice-roll-button next to the selection. What actually is rolled should be determined by the selected skill. So I was first trying: <select name="attr_mySkill"> <option value="/me is is trying to use Skill1 and .../roll [some dice]>[[@{attribute1}+@{attribute2} ]]">Skill 1 </option> <option value="<some other roll-macro>">Skill 2</option> </select> <button name="roll_Skill" type="roll" value="[[@{mySkill}]]"/> What prevents me from doing that is, that the value in an option is not only a value but in addition also used as the option-ID. The problem I have is, that the value, and thus the ID, is not necessarily unique, so when re-opening the character-sheet in a new game, the wrong Skill might be selected in the char-sheet. Ideally I would need somethig like: ... <option value="[ID]" rule="[dice roll macro]">[human readable ID]</option> ... and being able to reference the 'rule-attribute' of the option-node. (speaking of XML now) so --> someMacro="The rule is: @{mySkill|rule} and it is rolling [[@{mySkill|rule}]]." Is this possible in Roll20 and I am just doing it wrong? Is it not possible at all? Thanks, Lutz
1425388476

Edited 1425388489
Lithl
Pro
Sheet Author
API Scripter
The values must be unique in order to work as expected, you don't have any way around that. Why aren't they unique? Do you have several options that are meant to result in the same macro output? Maybe adding a space to the end of one of the duplicates would work for distinguishing them.
Don't know why I didn't try that. But it works :-). Thanks a lot for this simple solution.