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 .
×
Advertisement Create a free account

[Request][Script] Traveller RPG - Dice Pairing

In Traveller if you have an automatic weapon with an Auto rating of 2 or higher you get to roll that many dice and each pair counts as an attack which you can allocate however you want. If my Auto rating is 6; I roll 6d6; count matches as successes; each success == an attack. Example : I roll 6d6sd. The result is 665541. This amounts to 2 attacks (66, 55). The 4 and 1 are not counted. This is my work around for now since I can't seem to find any other way of doing it: !power {{ --tokenid|@{selected|token_id} --emote|@{selected|character_name} checks number of attacks from auto fire --format|autopair --name|Auto Pairs --Roll:|~C[[ [NH] [XPND] ?{Auto Rating:| 2,2d6sd | 3,3d6sd | 4,4d6sd | 5,5d6sd | 6,6d6sd} ]]~C~~~ --|Each pair is an attack. ^^^^Auto-fire attacks can be allocated to as many different targets as you have attacks provided all the targets are within six metres of each other. ^^^^Auto-fire attacks cannot benefit from a skill any higher than level 1. Weapon skills of 2 or higher only count as 1 when making auto-fire attacks. ^^^^Auto-fire uses a number of rounds equal to 3 X the Auto rating. }} Chat output: Goal : In the above case, instead of "(5+4+4+2+2+1)=18", I'd like to just display "2 Attacks available. "
1478631560
The Aaron
Forum Champion
API Scripter
Are there other rolls for Traveller that could be rolled into the same script?
The Aaron said: Are there other rolls for Traveller that could be rolled into the same script? Just thought of one. Degree of success or failure . You have to get >= 8 on a 2d6 + modifiers roll to succeed on something. Anything above 8 is subtracted from 8 and becomes the degree of success. Opposite true for degree of failure. So a roll + mods result of 12 is 4 degrees of success.  The main one for the dice pairing is for automatic weapons. I'd love to be able to incorporate it into my weapons script. If the successes = 2 it'd be nice to auto roll two Attacks w/damage automagically. Maybe set a variable for autoRating such that if autoRating >= 2; do the dice pairing thing; for every pair: do the $Atk + Damage roll per attack? Automatic Weapons Script !power {{ --tokenid|@{selected|token_id}  --emote|@{selected|character_name} uses burst fire! --format|attack --name|Burst --leftsub|Action --rightsub|Gun Combat --Attack:|[[ [$Atk] [NH] 2d6 + @{selected|skilllevel-GunCombat} +  ?{Attack Modifier|-6|-5|-4|-3|-2|-1|0|1|2|3|4|5|6} ]] vs Target --[[ {?{Recoil|-3|-2|-1|0|1|2|3} + 1 - @{selected|mod-Strength}, 0}kh1 &{tracker:-} ]] --**Damage**:[[ ?{Damage Roll | 1d6, [[1d6]] | 2d6, [[2d6]] | 3d6, [[3d6]] | 4d6, [[4d6]] | 5d6, [[5d6]] | 6d6, [[6d6]] } +?{Auto Rating|0|1|2|3|4|5} ]] -- ?? $Atk.total >= 8 ?? Success:| **$$#30ff33|Affirmative$$** -- ?? $Atk.total <= 7 ?? Success:| **$$#900|Negatory$$** }}