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

Question about a macro!

Hello friends, I need help! I changed my RPG campaign for Roll20 platform recently. I play A Song of Ice and Fire Roleplay ... I need a macro to remove the worst results of the scroll. example: Sor Arnaldo has Fight 5 (attribute) and Long Sword 2B (specialty) 5d6 + 2d6 he plays = 7D6, but eliminates the 2 worst results. What would be the macro for this function ?! Sorry for the clumsy English. Thank you in advance attention!
1418913870
Pat S.
Forum Champion
Sheet Author
you can do that two different ways to reach the same result. You can use the k for keep highest rolls or you can use the d for dropping the lowest rolls. <a href="https://wiki.roll20.net/Dice_Reference#Drop.2FKeep" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Drop.2FKeep</a> you macro would be for the above example be: /r 7d6k5 or /r 7d6d2 Either method will get you the result for that specific roll if you want to streamline the roll some what, use the inline roller like so [7d6k5] or [7d6d2] That will give you the result only unless you mouse over the result then the whole roll will be revealed.
I think you mean: [[7d6k5]] or [[7d6d2]]
If you're storing the stats in attributes as you mentioned... [[ ( @{CharacterName|Fight} + @{CharacterName|LongSword} )d6d2 ]] should add the values of Fight and Longsword , roll that many D6 ' and drop the lowest two rolls.
1418918000
Pat S.
Forum Champion
Sheet Author
Thanks gozer, I didn't notice that I missed the double brackets.
1418921102
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
Rafael, you'd use "/r 7d6d2" which means roll seven six-sided dice and drop the lowest two. However, if you wanted to get fancy you could make a macro that does something like this "/r ?{Number of Dice to Roll|1}d6d?{Number of Dice to Drop|0}". Save that formula as a macro and every time you click on the macro is will prompt you for how many dice you want to roll and drop, then do the roll for you.
thank you guys!
I made a roll for combat: /e [[{{{floor({{{?{Ability + Bônus|0}d6d?{Bônus|0}} - ?{Enemy Defense|0}}/5})+1}*?{Weapon Damage|0}}-?{Enemy Armor|0}}]]
I made on too: &{template:default} {{ name= @{selected|token_name}: Ability Test}} {{ Action Type:=?@{Major, Minor or Free?} }} {{Specialty:=Long Blades}} {{Prerequisite:=None}} {{Weapon Training:=[[0]]}} {{Target:=@{target|token_name} }} {{Roll:=[[ ( (0+?{+- Test Dice?}+?{+- Bonus Dice?}-@{wounds}+@{Fighting})d6d?{+- Bonus Dice?}sd-@{injuries} - @{target|combatDefense} )/5 ]] }} {{Basic Damage:=[[@{Atletics}+0]] }} {{Target AV:= @{target|AV} }} /emas @{name} attacks @{target|token_name} with your weapon. What do you think ?! Where it can improve? I would like to SAVE the result of a line for use in another. Thus demonstrate scrolling and calculating the degree of success. And what is this "floor" that you used?
1427131558

Edited 1427131667
Alicia
Sheet Author
Floor() rounds the values inside down to the nearest integer. ie, floor(1.5 ) = 1 Ceil() rounds up. ie, ceil(1.5) = 2 <a href="https://wiki.roll20.net/Dice_Reference#Rounding_Rolls_and_Math_Functions" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Rounding_Rolls_and_Math_Functions</a>
thank you! it can be useful!