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

Random Attack Generator

Game:  Mutants & Masterminds 2ed Character Sheet: Default for M&M 2ed The intention is to have one roll that will output a melee attack based on a d4 roll.  I am having 3 problems (that I know of) and would like some help. Problem 1: The full output only shows if a 1 is rolled.  If a 2-4 are rolled the only output is the 'name' and the 'unreliable' roll Problem 2: The output always defaults to the info from the lightning roll Problem 3: Leftsub seems to show a roll output instead of the intended attack type. !power {{   --emote|@{Character-name}'s fists start to glow with power!  --Unreliable Roll|You roll [[ [$atk] 1d4 ]]   --?? $atk.base == 1 ?? skipto*1|Thunder  --?? $atk.base == 2 ?? skipto*2|Psychic  --?? $atk.base == 3 ?? skipto*3|Fire  --?? $atk.base == 4 ?? skipto*4|Lightning     --:Thunder|  --name|BattleSuit  --leftsub|@{atk1-type}  --rightsub|@{atk1-name}  --Attack:|[[ @{atk1-type} +?{Attack Modifier +|0}[Atk]] ]  --Damage Base:|@{atk1-damage}  --Damace DC:|[[ 15 + @{atk1-damage} +?{Damage Modifier +|0}[Mod] ]]  --Save DC:|[[ 10 + @{atk1-effect}]]  --Attack Details:|@{atk1-details}  --Attack Save:|@{atk1-save}  --skipto*5|EndofCard  --:Psychic|  --name|BattleSuit  --leftsub|@{atk2-type}  --rightsub|@{atk2-name}  --Attack:|[[ @{atk2-type} +?{Attack Modifier +|0}[Atk]] ]  --Damage Base:|@{atk2-damage}  --Damace DC:|[[ 15 + @{atk2-damage} +?{Damage Modifier +|0}[Mod]] ]  --Save DC:|[[ 10 + @{atk2-effect}]]  --Attack Details:|@{atk2-details}  --Attack Save:|@{atk2-save}  --skipto*6|EndofCard  --:Fire|  --name|BattleSuit  --leftsub|@{atk3-type}  --rightsub|@{atk3-name}  --Attack:|[[ @{atk3-type} +?{Attack Modifier +|0}[Atk]] ]  --Damage Base:|@{atk3-damage}  --Damace DC:|[[ 15 + @{atk3-damage} +?{Damage Modifier +|0}[Mod]] ]  --Save DC:|[[ 10 + @{atk3-effect}]]  --Attack Details:|@{atk3-details}  --Attack Save:|@{atk3-save}  --skipto*7|EndofCard  --:Lightning|  --name|BattleSuit  --leftsub|@{atk4-type}  --rightsub|@{atk4-name}  --Attack:|[[@{atk4-type} +?{Attack Modifier +|0}[Atk]]]  --Damage Base:|@{atk4-damage}  --Damace DC:|[[ 15 + @{atk4-damage} +?{Damage Modifier +|0}[Mod]] ]  --Save DC:|[[ 10 + @{atk4-effect}]]  --Attack Details:|@{atk4-details}  --Attack Save:|@{atk4-save}  --:EndofCard| }}
Sheet Author
API Scripter
If you havent done it, I suggest posting your request in the dedicated powercards thread. You'll find perople familiar with the syntax and the script designer there.