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

Nesting attributes and Roll Query with paragraph

1550777684

Edited 1550786689
Hello everyone ! I'm testing new features in my game and I'm want to automate some stuff. I have 2 questions and I hope you can help : 1. Is there a possibility in a Roll Query to have a result with paragraph ? 2 . My players have different states (normal, injured, critical condition) and many rolls change depending of this state. So each player has attributes for each states of all 15 skills -> Attack1, Attack2, Attack3, Defend1, Defend2, Defend3, ... Now, players chose with a Roll Queries in wich state he want to roll dices, by clicking on the player button of the skill at the top. But if it's possible, I want to set a "state" attribut for them to be able to put a "1","2" or "3" so they could have the possibility to change "states" automaticaly for all roll. Something like this : Exemple : Attribut : state = 1 (that I can change quickly, for all skills, with 2 or 3) Attack1=5 Attack2=4 Attack3=3 Defend1=4 Defend2=3 Defend3=2 Ability : Your attack do /roll 1d4+@{Attack@{state}} damage ! Your defend yourself from /roll 1d2+@{Attack@{state}} damage ! But, unfortunatly, that didn't work at all. I thought about that too, but I don't like this alternative. Exemple : Attribut : Attack = Att1 (but I can't quickly change 15 skills, especially if 2 or 3 of my players change theirs state at the same time during a combat) Defend = Def1 Att1=5 Att2=4 Att3=3 Def1=4 Def2=3 Ded3=2 Ability : Your attack do /roll 1d4+@{Attack} damage ! Your defend yourself from /roll 1d2+@{Defend} damage ! Have you any ideas on how I could achieve this propely ? Thanks a lot !
1550826107
Ziechael
Forum Champion
Sheet Author
API Scripter
You may be overthinking it a bit (I know I often do with macros like this!). Could you explain the difference in the rolls for the different states a bit more? Do they infer a negative on the result or have other effects? Also, do you need to see all of the values or just the ability output?
1550844541

Edited 1550845104
In my rules, my players choose to roll a pre-defined number of D10s for each skill. In normal state : - If they did not increase this skill to the character's creation, they roll two D10 dice and take the worst result. - If they had increased their skill, it's either two dice or three D10s, depending on what they chose at the character's creation, and they take the best result. When they are injured : - If the skill had been increased, they are forced to throw only one D10. - If the skill had not been increased, nothing changes. They keep their two D10 and take the worst result. When they are in critical condition , everyone launches tree D10s and take the worst result. That's why there are abilities specific to each skill. It will be more simple if I put a example of my real code : Ability : /w gm &{template:default} {{name=**Fight*** }} {{**D100**=?{State |     Normal,@{Fight1}|     Injured,@{Fight2}|     Critical,@{Critical}|     } }} Attributs : Fight1 : [[1d10]]|[[1d10]] *(Take the best)* Fight2 : [[1d10]] Critical : [[1d10]]|[[1d10]]|[[1d10]] *(Take the worst)* In this example, "Critical" never change, but "Fight 1" and "Fight 2" change for each skill. Any ideas to change that automatically ?
1550845383
Ziechael
Forum Champion
Sheet Author
API Scripter
Ok great, thanks... I'm pretty sure we can help you realise your dream. Final question before I grease the old brain wheels: How are you storing the skill level and whether it was increased or not, an existing character sheet/custom sheet or attributes with no sheet?
It's a physical character sheet :) There are many skills, because it's in Cthulhu, but I automated just combat and healing skills for doing that more quickly.
1550849133
Ziechael
Forum Champion
Sheet Author
API Scripter
Oh... well based on that I do have one last question lol: Which CoC sheet are you using? There are LOADS... most sheets using checkboxes have a 0/1 toggle but the CoC one I looked at first had a 0/on toggle which is frustrating for a potential solution :/
1550849819

Edited 1550850175
Because I use homemade rules, I don't use any character sheet. I don't know how I can use Coc sheet's ressources like I want...
1550850111
Ziechael
Forum Champion
Sheet Author
API Scripter
Oh I see, sorry... I'm so ingrained with using a VTT that I took 'physical sheet' to mean the same as 'digital sheet' lol!!! My bad. Ok, I reckon I can come up with something. Using a VTT sheet could have made the number of queries required slightly less but certainly not a barrier to anything. Will post when I have something solid for you :)
Thanks a lot !
1550851773
Ziechael
Forum Champion
Sheet Author
API Scripter
Here is something you could likely change to suit your needs. The suggested mechanics are there as outlined but because you are deep in nested query territory please let me know if you need anything explaining more (I took some liberties with the language proficiency and trained account for skills selected on creation): &{template:default} {{name=Skill Check}} {{check=[[?{Proficiency|Trained,?{State|Normal,{?{D10s|2|3}d10}kh1|Injured,1d10|Critical,{3d10}kl1}|Untrained,?{State|Normal,{2d10}kl1|Injured,{2d10}kl1|Critical,{3d10}kl1}}]]}} Here is an expanded version for readability (doesn't work in this form but easier to follow... remove the line breaks to get it working): &{template:default} {{name=Skill Check}} {{check=[[?{Proficiency| Trained, ?{State| Normal,{?{D10s|2|3}d10}kh1| Injured,1d10| Critical,{3d10}kl1}| Untrained, ?{State| Normal,{2d10}kl1| Injured,{2d10}kl1| Critical,{3d10}kl1} } ]] }}
1550860898

Edited 1550861118
I don't understand what you change in the code. Perhaps I don't see it, but it seems that I have already a code a little bit like this. What I want now is a code where I can just change a attribut for automatically roll the good state and so don't choose in a Roll Query. How can I do in Roll20 to automatically convert all roll in a state ? I think about something but macro seems don't work in a Roll Query. Roll20 start all the macro :/
1550861501
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you want to run macros by choosing from a list, you will have far, far fewer headaches by using  Chat Menus .
I made this, but that didn't work : For exemple for normal state skills Ability : %Skill-Test @State Attribut : @State #Normal Macro : #Normal ?{Wich skills ? |     Initiative,#InitiativeN |     Dodge,#DodgeN |     Attack,#AttackN |     Fire,#FireN |     First Aid,# First AidN |     Medecin,#MedecinN |     Psychologie,#PsychologieN |     Psychiatrie,#PsychiatrieN } Macro : &{template:default} {{name=Dodge of @{selected|Name}}} {{Result=[[1d10]]|[[1d10]] *(Take the best)*}} Si I can juste change the Attribut "@State" for choose which state I load, but the macro "#Normal" don't work. :/
keithcurtis said: If you want to run macros by choosing from a list, you will have far, far fewer headaches by using  Chat Menus . The problem is that two of my player have a lot of lag with tchat button, but not with Roll Queries. I don't know how I can solve my problem.