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

Burst/Automatic Weapons Fire Macro

In the Traveler system (at least for MGT2e), your target number is 8+ to hit on 2d6. A SAW (squad automatic weapon) gets 3 bursts per round doing 3d6+5 damage each, but also adds 1 pt for each pip of the die above 8. So, let's say a soldier fires an SAW and gets 10, 12, and 13 (you also get a DEX and skill level bonus to hit). The first hit would be 3d6+5+2 for 2 die pips above 8 for the first hit, 3d6+5+4 for the second, and 3d6+5+5 for the third. Is there a way for a macro to be built so that it would automatically add the damage from the to-hit roll to the damage roll for the same burst?
1550250207

Edited 1550250393
Bast L.
API Scripter
Edit: Actually, the first one is no good, because you lose the indicator of cs with the roll hidden. This is the best I could come up with, but it hides the rolls unfortunately: [[[[({((2d6 + @{Dex} + @{Skill})-8), 1d0}kh1)cs>8]] +[[3d6]]]] (assumes attributes of Dex and Skill, change to appropriate). Alternatively, you could drop the outer brackets, and view the rolls, but have to add: [[({((2d6 + @{Dex} + @{Skill})-8), 1d0}kh1)cs>8]] +[[3d6]] Yeah, I'm not really sure how to accomplish this.
Thanks for trying to help. I can basically work around the difficulty with the following at this point, &{template:default} {{"Charlie" fires his SAW}} {{attack= [[2d6+2]]}} {{damage= [[3d6+5]]} {{attack= [[2d6+2]]}} {{damage= [[3d6+5]]} {{attack= [[2d6+2]]}} {{damage= [[3d6+5]]}
Oh, didn't notice you're pro. This script probably isn't worth it, but maybe. //TravelerGun //macro to use is of form: !TravelerSAW <charName> <dexBonus> <skillBonus> //So, if John wants to shoot, has a 1 dex bonus to hit, and a 2 skill bonus, !TravelerSAW John 1 2 on ( "ready" , function () { on ( "chat:message" , function ( msg ) { if ( msg . type === "api" && msg . content . split ( ' ' )[ 0 ] === "!TravelerSAW" ) { SAW ( msg ); } }); }); function SAW ( msg ) { let parts = msg . content . split ( ' ' ); if (! parts [ 1 ] || ! parts [ 2 ] || ! parts [ 3 ]) { return ;} let dexBonus = parseInt ( parts [ 2 ]); let skillBonus = parseInt ( parts [ 3 ]); let aHitRolls = [ 0 , 0 , 0 ]; let aAttStrings = [ "" , "" , "" ]; for ( let i = 0 ; i < aHitRolls . length ; i ++) { aHitRolls [ i ] = randomInteger ( 6 ) + randomInteger ( 6 ) + dexBonus + skillBonus ; if ( aHitRolls [ i ] < 8 ) { aAttStrings [ i ] = " {{Attack " + i + "=Miss: " + String ( aHitRolls [ i ]) + "}}" ; } else { aAttStrings [ i ] = " {{Attack " + i + "=Hit: " + String ( aHitRolls [ i ]) + ", Damage: " + String ( randomInteger ( 6 ) + randomInteger ( 6 ) + randomInteger ( 6 ) + 5 + ( aHitRolls [ i ] - 8 )) + "}}" ; } } let resultString = "&{template:default} {{" + parts [ 1 ] + " fires his SAW}}" ; for ( let i = 0 ; i < aAttStrings . length ; i ++) { resultString += aAttStrings [ i ]; } sendChat ( msg . who , resultString ); }
Copied. I'll see what it can do. I'm not very good with macros so I apologize if this seems like basic stuff to anyone.
Just to be clear, this is a script to be added to the game (by the GM, who must be a pro subscriber) in the api area under settings (before launching into the game). The macro itself would be of the form seen in the comments at the top of the script, something like: !TravelerSAW Greg 1 2 Where Greg is the character name, 1 is the character's dex bonus to shoot, and 2 is the character's skill bonus to shoot.
Ah, it goes in the API section. I see.