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

Insanely complicated die rolls for Fallout?

FLUFFY BACKGROUND So, I am a fan of Fallout. From Vault 13 to New Vegas, from the Navarro Oil Rig to the Capital Wastes. Consequently, so are a number of my friends. With my pathfinder campaign nearing completion, we've wanted something to fill the gap. Something like, say, Fallout. No, this isn't a recruiting add (I'll put one of those up in looking for group.) ACTUAL QUESTION The problem is damage rolls. Automatic weapon fire at an armored target could result in needing to roll ten six sided dice, plus four to each dice, but each result is reduced by five, then multiplied by .67. Out side of individually rolling each result (Not TOO onerous, but a bit of a pain. Can't set up a macro either, not a simple one at least, since each target would have a different reduction and multiplier.), is there any way to handle a group roll where math is done to each die, and negative numbers are treated as zeros? (Bolded, since it's the real issue at hand.)
1388959909
Gauss
Forum Champion
This level of automation would require an API script (a Mentor level feature).
1388980780

Edited 1388980801
DXWarlock
Sheet Author
API Scripter
If API is too much to try it with, could you use the prompts in the dice? so they are asked input the reduction, and multiplier while rolling on the macro? It wouldnt be fully automated, but might streamline it a bit.
1388984840
Gauss
Forum Champion
William makes a good point. If you fully diagram your macro we could help with how to set up queries to set up the reduction and multipliers.
1389000840
Alex L.
Pro
Sheet Author
The real problem would be we currently don't have a function that will round up to 0, Although if you always add 4 to each dice and then reduce it by 5 (why on earth you wouldnt just subtract 1 every time is beyond me) then the number should never be less than 0. Again as Gauss has already said if you give us a full breakdown of what needs to be done we could try to prototype a macro for you.
1389028909

Edited 1389029053
he's saying that different targets have a different + and - value. The +4 and -5 are examples. I think. Here's your macro. This assumes that all dice in the roll have the same die size, adder, and subtraction. It does up to ten dice. When questioned, 1=die is being rolled, 0= die is not being rolled. By the way, on a group roll you apparently can't mix Sum rolls and math rolls, so I had to do 1d1-1 to always get a result of 0. The group roll then keeps the highest 1 between the actual die roll and the 0. Die 1 is automaticallly rolled. [[?{Multiplier} * ({(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1 + (?{Die 2 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1) + (?{Die 3 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1) + (?{Die 4 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1) + (?{Die 5 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1) + (?{Die 6 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1) + (?{Die 7 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1) + (?{Die 8 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1) + (?{Die 9 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1) + (?{Die 10 active?|0}*{(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}),(1d1-1)}kh1))]]
1389049170
Gauss
Forum Champion
Holy wall of macro text Batman! That hurts even my eyes :)
Insanely complicated die roll requires insanely complicated macro. But it works! (Thank god for rugged reroll, or else you'd have to put in the adder and subtractor every time)
1389068599

Edited 1389072248
GiGs
Pro
Sheet Author
API Scripter
Reading through Brandon's macro, it looks like you will get 10 prompts for die size on every roll. I present below a way to reduce it so you only get one prompt for that, So the prompts you'll get are: Number of Dice, Die Size, Die Adder, Die Subtracter, Multiplier. (More than I would ever use, but it works.) Also, Brandon's macro was great for pointing me in the direction of getting the one below working, but it has another flaw: it doesn't limit each die to a roll of zero which the OP wanted. This macro does. Note: I've edited this post a couple of times, and replaced a later post since the answer to my question was in the OP. [[({1d1,{1d1-1,?{Number of Dice|1}d1}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 + {1d1,{1d1-1,?{Number of Dice|1}d1-1}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 +{1d1,{1d1-1,?{Number of Dice|1}d1-2}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 + {1d1,{1d1-1,?{Number of Dice|1}d1-3}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 + {1d1,{1d1-1,?{Number of Dice|1}d1-4}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 + {1d1,{1d1-1,?{Number of Dice|1}d1-5}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 + {1d1,{1d1-1,?{Number of Dice|1}d1-6}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 + {1d1,{1d1-1,?{Number of Dice|1}d1-7}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 + {1d1,{1d1-1,?{Number of Dice|1}d1-8}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 + {1d1,{1d1-1,?{Number of Dice|1}d1-9}kh1}kl1*{(1d?{Die size|6}+?{Die Adder|0}-{1*?{Die subtractor|0},-1*?{Die subtractor|0}}kh1),1d1-1}kh1 ) * ?{Multiplier|1}]] The original version of this macro used +?{Die Adder|0}+?{Die subtractor|0}) This meant that when you get prompts you had to remember to enter minus sign for the penalty. I guarantee players will make mistakes here. I've edited the post with a version that doesn't care if players enter 6, or -6 for the modifier - it always treats it as a penalty.
1389068848

Edited 1389072348
GiGs
Pro
Sheet Author
API Scripter
In case you're interested, this is the term that does the magic: {1d1,{1d1-1,?{Number of Dice|1}d1-X}kh1}kl1* This uses min and max functions to ensure that you always multiply by either 0, or 1. If it's the first die, replace X with 0; if it's the second die, replace X with 1, the third die replaces X with 2, etc. If you need to extend beyond 10 dice, just add this term for each extra die you need, replacing X as decsribed (for the 11th die, it is 10; for the 12th die it is 11, etc. {1d1,{1d1-1,?{Number of Dice|1}d1-X}kh1}kl1*(1d?{Die size|6}+?{Die Adder|0}+?{Die subtractor|0}) If you want to keep your players honest, add this to the start or end of the macro, on its own line: /w gm Number Dice: ?{Number of Dice|1}; Die Size: ?{Die size|6}; Die Bonus: ?{Die Adder|0}; Die Penalty: ?{Die subtractor|0}; Multiplier: ?{Multiplier|1} If you want it to be desplayed in public, just remove the /w GM from the start.
1389071657

Edited 1389072515
GiGs
Pro
Sheet Author
API Scripter
I'm sorry for spamming this thread, but I've just noticed another possible shortcut. In the original post, OP says "Can't set up a macro either, not a simple one at least, since each target would have a different reduction and multiplier.), " Since Rugged Reroll there IS a way to handle this. Using the Target operator, you can select a target, and get stats from that target. So, if you have character sheets set up for each enemy, with the stats: DamagePenalty, and DamageMultiple, the previous macros can be modified to use them and reduce the number of prompts. Replace each instance of "?{Die subtractor|0}" with " @{target|DamagePenalty}" (Don't do it manually - use Find and Replace in word or notepad) Replace the final "?{Multiplier|1}" prompt with " @{target|DamageMultiple}" Likewise, the damage Add, number of Dice and die size come from stats on the characters own sheet, you can remove ALL prompts by referring to those stats. Here's one nifty way to do it (the final step will make this very simple and manageable in play): On the character sheet, set up 3 new stats: DamageDice, DamageDieSize, DamageBonus Replace each instance of "?{Die Adder|0}" with " @{DamageBonus}" (or @{selected|DamageBonus} if using universal macro) Replace each instance of "?{Die size|6}" with " @{DamageDieSize}" (or @{selected|DamageDieSize} if using universal macro) Replace each instance of "?{Number of Dice|1}" with " @{DamageDice}" (or @{selected|DamageDice} if using universal macro) Add the above macro as an Ability on each players sheet. Or if use selected operator (replace above 3 with @(selected|DamageBonus} etc), add it to your macros and make it visible to all players as a token action. Give each player a second token, linked to their character sheet and use it for their gun. Link Bar1, Bar2, Bar3 to the NumberDice, DieSize, and Damagebonus stats. Then whenever the players change weapons, they enter the new values in the bars, and their character sheet is updated automatically. With this approach, players are never asked for a prompt. They click the AutoFire button (or whatever the attack is), the macro prompts them to click a target token, and rolls the damage. Very smooth.
Actually, in my macro it only prompted you once for die size. But any improvements are good. I had something that worked, and gave Gauss a headache, so it's all good for me. :P
1389102371
GiGs
Pro
Sheet Author
API Scripter
Brandon W. said: Actually, in my macro it only prompted you once for die size. But any improvements are good. I had something that worked, and gave Gauss a headache, so it's all good for me. :P If I understood it correctly, it prompted 10 times for number of dice - these modifiers, for instance: (?{Die 7 active?|0} My version does away with those, and replaces them with a single call of ?{Number of Dice|1};
1389103125

Edited 1389104666
The adding and subtracting needed to be done to each individual die to keep the each die has a zero minimum, and you did specifically say die size. I'm not arguing that I was asking about turning each die on or off. :P More power to you to figure out how to loop the requirement. That's impressive. --Edit We need more of these questions. These are fun!
1389105834
GiGs
Pro
Sheet Author
API Scripter
Sorry, when I said die size earlier I misspoke, and meant number dice.