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

Table macro

Hello! I'm new to roll20 and I am struggling to make the following rolls: 1 - the player tells a test column -7 20 2 - each column pssui one Intervalor 1 to 20 d20 is rolled and the result obtained there 3 - each possible outcome in the d20 equivalent to a color that is informed by the macro how could I do this?
Hello, Thiago R. , welcome to Roll20! I highly recommend reading the introductory post in our New to Roll20 thread, if you have not already. Have you checked out the  Rollable Tables section on the Roll20 Wiki? Traduz google: Você verificou para fora a seção Tabelas Rollable na Roll20 Wiki? Thiago R. said: the player tells a test column -7 20 I do not understand what this means. Could you please explain? What is "a test column"? What is "-7 20"? Traduz google: Eu não entendo o que isso significa. Poderia explicar? Thiago R. said: each column pssui one Intervalor 1 to 20 d20 is rolled If I'm understanding correctly; 1d20 is rolled in addition to the making a Rollable Table roll? Traduz google: Se eu estou entendendo corretamente; 1d20 é rolada para além da tomada de um rolo Tabela Rollable ?
1461206419

Edited 1461206437
ThiagoR
Sheet Author
Sorry about the lack of clarity. I need to roll 1d20 and compare the result: 1 to 5: macro returns failure 6 to 10: the macro returns marginal success 11 to 15: the macro returns complete success 16 to 20: the macro returns higher success I know you can do this using the table, but then I can not rely on the data of ferramanta 3D would like to use
Ah, thank you. If I'm understanding correctly; the issue with Rollable Tables is that you need to know the exact number rolled? Would a Rollable Table like this work for you?
yes, if I use the table it works, but then I and the players do not have the data 3d rolling on the screen, I wonder if you can: 1 - roll the dice 3D 2 - compare the results in the table 3 - return in chat the kind of success
1461213727

Edited 1461214528
Oh, I see; you wish to also see the 3D Dice roll! Okay, I will offer you two solutions. 1. The first solution requires you to create four Rollable Tables just like this: Then, you would use a macro like this to make the test: /em makes a test! [[ 1t[Test-[[ ceil(1d20 / 5) ]]]] ]] (Of course, you can change "Test" in the Rollable Table names to whatever you would like.) 2. This second solution will not show 3D dice yet, unfortunately (the API cannot yet roll 3D dice). However, it will do the calculation very nicely! This solution requires that the Creator of your game has a Pro subscription in order to make use of the API Script called PowerCards . With PowerCards installed, you could use a macro like this to make the test: !power {{ --I rolled|[[ [$R] 1d20 ]] -- ?? $R <= 5 ?? |Failure. -- ?? $R >= 6 AND $R <= 10 ?? |Partial success. -- ?? $R >= 11 AND $R <= 15 ?? |Complete success! -- ?? $R >= 16 ?? |Higher success! }}
1461216768

Edited 1461217230
ThiagoR
Sheet Author
Hello Silvye! Actually your example with the table helped me to understand things, but what I really need is the following: in this table we have a range of -7 and 20 refers to the character's skill level, for example: A character has Acrobatics 3, this means that it will make the climbing test using the column 3. This character must roll 1d20 and the value of the scroll is compared with the value of the column to know the final result: Green: critical failure White: Failure Yellow: routine success Orange: Success exeperiente Red: Top success Blue: extraordinary success Gray: Critical Success I know I can fill in for each column the range with different weights, for example: column -7 Green - weight 0 White - weight 15 Yellow - weight 2 Orange - Weight 1 Red - weight 1 Blue - Weight 1 gray - Weight 1 What I can not do is the d20 roll and choose one of these columns (from -7 to 20), the d20 value
Ah, I see... That's a bit more complicated! Unfortunately, I don't think "solution #1" could be realistically adapted to fit this table. An API Script ("solution #2") or a PowerCards macro could automatically check the table. However, as I mentioned earlier, 3D dice cannot yet be used with API Scripts. The only other way I can realistically see this working (without 3D dice) is creating a lot of Rollable Tables... :(
1461251551
The Aaron
Pro
API Scripter
Silvyre said: However, as I mentioned earlier, 3D dice cannot yet be used with API Scripts. There actually is some support for this, but it has some... eccentricities...
1461257597

Edited 1461257735
I see. The API could react to something like "/r [Table] 1d20" sent to the text chat (with 3D dice enabled) and then output the corresponding degree of success, though, right?
1461259586
The Aaron
Pro
API Scripter
There's several ways to handle it.  You could pass a roll in to an API command: !lookup [[1d20]] @{selected|adjustment} or you could react to a command as you mentioned, /r 1d20 [table] or you could handle it entirely in a script: !lookup @{selected|adjustment} with dice rolls from the code: /*...*/ sendChat('API','[[1d20]]',function(msg){ /*...*/}, { use3d: true }); /*...*/ (though the above might not work exactly right...)
Hello friends! I managed to make the macro, but I had to create 560 rollable tables to simulate the color table properly! My question now is this, I need to make a macro where the attacker has a weapon that has a different bonus for each type of defense, for example +3 against light armor, medium armor against +0 and -2 against heavy armor. The defender has his defense expressed by a letter and a number, where the letter represents the type of defense (L for light, M for medium and H for heavy) and the number represents the amount to be deducted from attack bonus I need the macro check the defender's armor type and: 1 - if the type is L do: light armor against attack - defense value 2 - if the type is M do: attack against medium armor - defense value 3 - if the type is H do: attack against heavy armor - defense value
1461639392

Edited 1461639466
The Aaron
Pro
API Scripter
Simply not possible with a macro.  This is squarely in the realm of the API.  =/ You can fake some amazing things with just math and a summation of terms, but you can't compare against strings in a macro.  You need the API for that.
1461652306

Edited 1461653031
You could make a Token for each weapon and use its Bars for the type of defense. For example, bar3 could hold a weapon's "attack bonus against heavy armor". (See setup image below.) Continuing, you could use the bar1 of the defender's Token to hold a defender's "defense value". You could also use bar1|max as a way to reference the corresponding "attack bonus". For example, since the attacker's bar3 holds their weapon's "attack bonus against heavy armor", you could write @{selected|bar3} in the defender's bar1|max. Using a Selected Token with a Macro To put all of the above to use, an attacker would select their weapon Token when using an attack macro. The attack macro would target the defender's Token. Using a Targeted Token with a Macro An example of an attack macro, using the setup below: /em attacks the @{target|token_name} using their @{selected|token_name}! Defense value: @{target|bar1} Attack bonus: @{target|bar1|max}
Hello friends, I decided to make the macro attack in a more simple way, it should inform the type and defense value, the player informs the attack bonus, it makes the attack bonus account - defense, then mounts the formula for search the table for that column should be XY, where X and Y are the subtraction value in the drawn d20. But I am not able to do, is use the following syntax: {{Result = [[? 1t [Column {Defending the target is @ {target | Defense type} @ {target | Defense Value} enter your attack value in this column} - [[(1d20)]]]]]] }} I got the result as it should [[1t [X-Y Column]]] If I include the defense value to be subtracted from the macro passes to ignore the scroll 1d20 and only runs until the subtraction: {{Result = [[1t [Column {Defending the target is @ {target | Defense type} @ {target | Defense Value} enter your attack value in this column} - @ {target | Defense Value} - [[( 1d20)]]]]]]}}
1461861621

Edited 1461861678
Sorry, I'm not quite understanding the issue you're having. Could you explain what you mean by "only runs until the subtraction"? It might help if you take a screenshot (captura de tela).