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

Roll Syntax & Fieldset: Dynamic Attribute using Select? Feasible?

1417698504

Edited 1417698542
Hi everybody, In COPS system, you have main attributes and skills. A skill roll is based on a "main attribute" value. Like in every D20 systems. Example: " Fight Skill " is based on " Strength ". You roll a number of D10 equals to your Strength, and each value superior to the "Fight Skill" value is a success. Difficulty of the action is the number of success required. Ex: Strength 3 Fight 6+ => /Roll 3d10>6! Problem: in COPS you are able to create skills if required, based on the "main attribute" you want. I am trying simulating this using fieldset (code below), but I am not sure it will work, and if it is feasible. My method: option values are name of input filled out elsewhere on the sheet. Roll syntax: @{{basecompetence}}d10>@{Competence}! I want {{basecompetence}} to be replaced by {Coordination} if it is the one I selected. And then {Coordination} will use the value of the Roll20 attribute. Full code of FieldSet: <fieldset> <TD><button type='roll' value='/roll @{{basecompetence}}d10>@{Competence}!' name='roll_Competence' title="jet compétence"></button></TD> <TD><input type="text" placeholder = "Nom Competence" name="attr_descrcompetence"></TD> <TD><input type="number" name="attr_competence" value="10" ></TD> <TD><select name="attr_basecompetence" placeholder="Compétence Base"> <option value="Coordination">Coo</option> <option value="Carrure">Car</option> <option value="Charme">Cha</option> <option value="Reflexes">Ref</option> <option value="Education">Edu</option> <option value="Perception">Per</option> <option value="Sang-Froid">SgF</option> </select></TD> </fieldset> Maybe you could help me with this?
1417711390

Edited 1417711405
Lithl
Pro
Sheet Author
API Scripter
Set the values of your <option>s to "@{Coordination}", "@{Carrure}", etc. @{basecompetence} will then give you the value you want. Note: You can't stick a <fieldset> in the middle of a table like that (wrapping <td>s or <tr>s).