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

Converting a Gamma World table to macro form

1663721451
Hi there. There is a to-hit table from first edition Gamma World that I'm endeavoring to turn into an inline roller for my players and my use. Confession, I am horrible at programing, and everytime I take a stab at it I crash hard into my lack of programing skill. So if anyone can help me figure it out, I'd be grateful. Essentially this is what I'd like to do. Gamma World divides weapon to-hits into classes (16 of them), that tell you the number you need to roll over to hit a given AC from 10 to 1. So I know that at a minimum I need 16 macros that reflect each weapon class, that consists of 1d20 roll weighted to which AC they hit with a given d20 roll. In addition to this basic function (choose a weapon class, and roll a d20 for that class), I'd like to be able to add in a modifier before the roll is made to the d20 roll to reflect exceptional STR or DEX (either good or bad) so that the final modified roll gives the AC that is hit. Is there a simple way of doing this, that can be explained to someone with no real macro building ability for Roll20? Thank you for making it this far. 
1663771020
Gauss
Forum Champion
There may be a way to do this, but we would need more specific information, like all of the information for the mechanic in question, as specific as you can get it.  Example: (fill in the "quotes") Weapon "name" 1: 1d20 + modifier vs "weighted to the AC mechanic" I don't understand what you mean by "weighted to which AC they hit". Definitely need more information on that. 
You'll need a macro of the form {1d20+?{Mod|0}}>X where X is the value from the table lookup. Transcribing tables can be arduous so it might be best to use roll queries. Here is a template you can fill in the actual values with /r {1d20+?{Mod|0}}>[[?{Weapon Class| One (1) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Two (2) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Three (3) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Four (4) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Five (5) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Six (6) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Seven (7) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Eight (8) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Nine (9) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Ten (10) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Eleven (11) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Twelve (12) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Thirteen (13), ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Fourteen (14), ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Fifteen (15) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } | Sixteen (16) , ?{AC| 10 , X10 | 9 , X9 | 8 , X8 | 7 , X7 | 6 , X6 | 5, X5 | 4 , X4 | 3 , X3 | 2 , X2 | 1 , X1 } }]] Wherever there is a X followed by a number that needs to be replaced by the actual value required to hit that AC with that line's Weapon class. So X10 for class 1 might be replaced by 16 for example
1663807585
Gauss said: There may be a way to do this, but we would need more specific information, like all of the information for the mechanic in question, as specific as you can get it.  Example: (fill in the "quotes") Weapon "name" 1: 1d20 + modifier vs "weighted to the AC mechanic" I don't understand what you mean by "weighted to which AC they hit". Definitely need more information on that.  Oh sorry. Here I'll give you an example, an excerpt from the table, Weapon Class 6 Roll AC 10 6 AC 9 7 AC 8 13 AC 7 13 AC 6 15 I meant weighted that there are some results that will have ranges associated to them. In this case for WC6, rolling a 13 hits AC:7  and higher. It's not shown on this chart but rolling a 15 will hit AC:5  and higher. That's what I meant by weighted, a given roll can hit a range of ACs. But looking over RainbowEncoder's solution that pretty much solves everything I think I needed. Thank you @Gauss and @RainbowEncoder for helping me with this!
1663817728
Gauss
Forum Champion
Guess RainbowEncoder beat me to it, but they are much better at Macros (like light years better) anyhow. :) Does RainbowEncoder's macro do what you need or do you need it to do more?
1663886835
Gauss said: Guess RainbowEncoder beat me to it, but they are much better at Macros (like light years better) anyhow. :) Does RainbowEncoder's macro do what you need or do you need it to do more? Well I entered all the values that were needed and I gave it a spin last night. AFAIK it's working perfectly. It will query for a modifier, weapon class and AC and then tell you if there is a hit or not. It's a good enough template that I think I understand how I can dummy up something similar for Mental Attacks and Radiation Exposures as well. Once I get that done, I can then work on the Artifact Examination macro as well. Thank you both for the kind help. It helps to explain a lot about macros and their formatting.
1663930938
David M.
Pro
API Scripter
Never played Gamma World but saw you mentioned radiation exposure and it reminded me of a script I saw a while ago called Geiger Counter . No idea if it is relevant, but figured I'd share it in case it looks interesting to you.
1663973321
David M. said: Never played Gamma World but saw you mentioned radiation exposure and it reminded me of a script I saw a while ago called Geiger Counter . No idea if it is relevant, but figured I'd share it in case it looks interesting to you. While not immediately useful, you better believe I'm filing that one away! Thank you very much for the heads-up and really useful script!