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

Custom character sheet: checkbox and advantage/disadvantage

I'm making a character sheet for my homebrew rpg and I have some questions. 1) can a box affect two or more attributes when checked? I have a box in medium armor, which should reduce speed by 10 feet and add disadvantage on dexterity checks. 2) is it possible to create a single global attribute that applies advantage or disadvantage to rolls when activated? My system is 1d6 at beginner level, 2d6 at veteran level and 3d6 at champion level and there are levels of advantage and disadvantage. Example: At veteran level, one advantage would be 3d6kh2 and two advantages would be 4d6kh2. Regarding advantages and disadvantages, I tried using radio buttons, but it's not being very practical. Any suggestion? 
1721270060
GiGs
Pro
Sheet Author
API Scripter
Without specific code, it's hard to give specific answers. But speaking generally: 1) Yes, though you'd need to add that in when setting medium armour and creating the code for dexterity checks. 2) Probably not in the way you think. You can have a global attribute checkbox, but every place you have a roll will need to check that attribute's value and then add the necessary code for it. Demetrius said: Regarding advantages and disadvantages, I tried using radio buttons, but it's not being very practical. Any suggestion?  This is another thing where specific examples of code would be helpful. You can do this with radio buttons, but can also do it in other ways. We'd need to kow more about what you were doing.
What I have done 1) can a checkbox affect two or more attributes when checked? I have a checkbox in medium armor, which should reduce speed by 10 feet and add disadvantage on dexterity checks. <label> <input type="checkbox" name="attr_armadmedia" value="1"> Armadura Média |  <input type="checkbox" name="attr_armadpesasada" value="2"> Armadura Pesada |  <input type="checkbox" name="attr_escudopesado" value="1"> Escudo Pesado </label> <label> <button type="roll" value="/r @{profdefesaaparar}cs>@{dadoforteaparar}cf<@{dadofracoaparar}+@{força}+@{apararmod}"></button> Aparar (For ou Des): </label>  Mod. <input name="attr_apararmod" type="number" value="0"/>  + Mod. Prof. <input name="attr_apararprofmod" type="number" value="0"/>D6 |  DFF: <input type="checkbox" name="attr_dffmodaparar" value="1"/> <label> <input type="radio" name="attr_profdefesaaparar" value="[[2+@{profdef}+@{apararprofmod}+@{dffmodaparar}]]d6kl[[@{profdef}+@{apararprofmod}+@{dffmodaparar}]]"/> D2 <input type="radio" name="attr_profdefesaaparar" value="[[1+@{profdef}+@{apararprofmod}+@{dffmodaparar}]]d6kl[[@{profdef}+@{apararprofmod}+@{dffmodaparar}]]"/> D1 <input type="radio" name="attr_profdefesaaparar" value="[[@{profdef}+@{apararprofmod}+@{dffmodaparar}]]d6" checked/> N <input type="radio" name="attr_profdefesaaparar" value="[[1+@{profdef}+@{apararprofmod}+@{dffmodaparar}]]d6kh[[@{profdef}+@{apararprofmod}+@{dffmodaparar}]]"/> V1 <input type="radio" name="attr_profdefesaaparar" value="[[2+@{profdef}+@{apararprofmod}+@{dffmodaparar}]]d6kh[[@{profdef}+@{apararprofmod}+@{dffmodaparar}]]"/> V2 </label> Dado Forte <input name="attr_dadoforteaparar" type="number" value="6"/> |  Dado Fraco <input name="attr_dadofracoaparar" type="number" value="1"/> 2) is it possible to create a single global attribute that applies advantage or disadvantage to rolls when activated? My system is 1d6 at beginner level, 2d6 at veteran level and 3d6 at champion level and there are levels of advantage and disadvantage. Example: At veteran level, one advantage would be 3d6kh2 and two advantages would be 4d6kh2. <button type="roll" value="/r (@{profdef}+@{dado}cs6cf1+@{força}"><div class="nome-atributo">FOR</div></button><input type="number" name="attr_força" value="0"/> <button type="roll" value="/r (@{profdef}+@{dado}cs6cf1+@{destreza}"><div class="nome-atributo">DES</div></button><input type="number" name="attr_destreza" value="0"/> <button type="roll" value="/r (@{profdef}+@{dado}cs6cf1+@{constituição}"><div class="nome-atributo">CON</div></button><input type="number" name="attr_constituição" value="0"/> <button type="roll" value="/r (@{profdef}+@{dado}cs6cf1+@{inteligencia}"><div class="nome-atributo">INT</div></button><input type="number" name="attr_inteligencia" value="0"/> <button type="roll" value="/r (@{profdef}+@{dado}cs6cf1+@{sabedoria}"><div class="nome-atributo">SAB</div></button><input type="number" name="attr_sabedoria" value="0"/> <button type="roll" value="/r (@{profdef}+@{dado}cs6cf1+@{carisma}"><div class="nome-atributo">CAR</div></button><input type="number" name="attr_carisma" value="0"/> <label>.</label> <label> <button type="roll" value="/r (@{profdef}+@{dado}cs6cf<2"></button> Proficiência: <select name="attr_profdef"><option value="1">Iniciante (1d6)</option><option value="2">Veterano (2d6)</option><option value="3">Campeão (3d6)</option></select> - <input type="radio" name="attr_dado" value="2)d6kl@{profdef}"/> D2  <input type="radio" name="attr_dado" value="1)d6kl@{profdef}"/> D1  <input type="radio" name="attr_dado" value="0)d6" checked/> N  <input type="radio" name="attr_dado" value="1)d6kh@{profdef}"/> V1  <input type="radio" name="attr_dado" value="2)d6kh@{profdef}"/> V2 </label> I hope you can understand.
1721408477

Edited 1721409400
GiGs
Pro
Sheet Author
API Scripter
There's a lot there. I will try to help solve your problem, but the language barrier is a problem. You say, " I have a checkbox in medium armor, which should reduce speed by 10 feet and add disadvantage on dexterity checks" but I can't tell how that applies to this code. Which is the armour, which attributes should be modified by disadvantage? One issue I notice with your radio buttons might not always be unique. Purely by chance you might end up with 2 radio buttons that have the same value, and then roll20 will have no way to distunguish them. That might not be a problem, depending on how you use them, but it it is something to think about. Also 2) is it possible to create a single global attribute that applies advantage or disadvantage to rolls when activated? My system is 1d6 at beginner level, 2d6 at veteran level and 3d6 at champion level and there are levels of advantage and disadvantage. Example: At veteran level, one advantage would be 3d6kh2 and two advantages would be 4d6kh2. There are two ways to do this. The first, using autocalc fileds: you'd have to go through every attribute that is affected by advantage or disadvantage, and include code there to check which is in use, and to use that if so. Every single attribute. The second way is to use a sheet worker to create the code in each place. You'd have a utton to set advantage, normal, disadvantage, and this would then go through every attribute that icludes a roll and modifies it. it would need to have some way of extracting the relevat attributes and stats to match each attriute. Neither approach is easy to set up, but can be done.
Thank you very much!  I've just started to get to know HTML and I'm struggling a little to understand the CSS and Java functions. I'm going to take a step back, start simple, enough for the sheet to be useful to players and then, over time, I'll automate it more.
1721409338
GiGs
Pro
Sheet Author
API Scripter
Make sure you have a look here: <a href="https://cybersphere.me/roll20/" rel="nofollow">https://cybersphere.me/roll20/</a>
1721409784

Edited 1721409953
GiGs
Pro
Sheet Author
API Scripter
Something In just thought of: when looking for advantage or disadvantgage; if you can break that out into a separate attribute and then use it in each of you rolls, that would be best. For example, lets say you choose advantage like this: Advantages:&lt;input type="number" name="attr_advantage" value="0"&gt; Then in your rolls, use the advantage attribute. Let's say you have a Something attribute and want too roll with advantage somethimes: &lt;button type="roll" name="roll_something" value="/r ({@{something}+@{advantage}}kh@{something}"&gt;Something&lt;/button&gt; That approach lets you enter the advantages in one place and they are automatically included anywhere you want to add +@{advantage}. You could also ignore that first advantage attribute and handle it as a query (a better option IMO, like &lt;button type="roll" name="roll_something" value="/r ({@{something}+?{Advantages|0}}kh@{something}"&gt;Something&lt;/button&gt;