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

Chaos Bolt Macro

I found a chaos bolt macro that will do the dice rolls, but where in there can I put the type of damage the first die roll does, and have it named so that when the results fly out it reads. Fire 12 Damage
1610018444
Ziechael
Forum Champion
Sheet Author
API Scripter
Hi Darren, we'll need to know the sheet being used in order to be able to advise, at the very least please share the macro you found so we could highlight potential areas that could address your desired functionality :)
1610023348
David M.
Pro
API Scripter
I second Ziechael's comments, but the likely solution is going to involve creating a rollable table with the 8 damage types as equally weighted entries, and adding two separate rolls of the table to the macro output via [[ 1t[TableName] ]] [[ 1t[TableName] ]] syntax for the player to choose from.  Without API script access, it's going to be a little tricky, because part of the damage roll is also supposed to determine the damage type. You could either ignore that, rolling the 2d8 + 1d6 damage separately from the damage type roll, or output each damage die independently and add them up in your head. If the latter, you would need to have each entry in the rollable table include the damage roll. So instead of just "acid", "cold", etc. the table entries would be "1 acid damage", "2 cold damage", etc. If it were me, I'd just roll the total damage dice, then separately roll for damage type to give it a cleaner look, but if you want to be true to the spell as-written, you'll probably have to go with the 2nd option. 
After doing some hunting last night I ended up realizing I needed a table, that the roll could refer to.  Once that was created I just needed to learn some coding in order to accomplish that. And here it is: &{template:default} {{name=Chaos Bolt}} }{{Damage=[[1t[Chaos-Bolt]]][[2d8]]+ [[?{Spell level?}d6]]}} The table being named Chaos Bolt, and each item being one of the various damage types as listed in the PHB.
1610060489
David M.
Pro
API Scripter
Note that the description of the spell states that the caster can choose between two damage types rolled, and if both are the same it leaps to a new target for another attack/damage roll. I might recommend the following: &{template:default} {{name=Chaos Bolt (Select damage type)}} }{{Damage=[[2d8]]+ [[?{Spell level?|1}d6]]}} {{Damage Type 1 = [[1t[Chaos-Bolt]]]}} {{Damage Type 2 = [[1t[Chaos-Bolt]]]}} Adds both damage type options to choose from and makes it easy to see if it procs the secondary attack. Also added a default value for the spell level for fewer keystrokes the majority of the time. Optionally, you could also return the total damage as a single number if you don't care about what the individual d8 damage rolls were, by wrapping the two damage rolls into another inline roll, like this: &{template:default} {{name=Chaos Bolt (Select damage type)}} }{{Damage=[[[[2d8]]+ [[?{Spell level?|1}d6]]]]}} {{Damage Type 1 = [[1t[Chaos-Bolt]]]}} {{Damage Type 2 = [[1t[Chaos-Bolt]]]}}
Hi Darren This probably isn't the most elegant solution and uses lots of API scripts (Powercards, Roll20AM, CustomFX) but is what I use for Chaos Bolt !power {{ --titlefontshadow|none --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|Uuric --leftsub|Magic Attack --rightsub|Chaos Bolt --Range:| 120' --Casting Time:| 1 action --Components:| V, S -- vfx_opt|@{selected|token_id} @{target|token_id} beam-magic -- soundfx|_audio,play,nomenu|Eldritchblast --Attack Roll|You roll [[ [$atk] 1d20 + @{selected|charisma_mod} + @{selected|pb} ]] vs AC @{target|npc_ac} --?? $atk.base >= 20 ?? skipto*1|Critical --?? $atk.base == 1 ?? skipto*2|Fumble --?? @{target|npc_ac} >= 0 ?? skipto*99|NonNPCTarget --?? $atk.total >= @{target|npc_ac} ?? skipto*3|Hit --?? $atk.total < @{target|npc_ac} ?? skipto*39|Miss --:NonNPCTarget| It's a non npc target --!Friendly Fire!|$$#C00|**Firing at a non NPC target!**$$ --?? $atk.total >= @{target|ac} ?? skipto*3|Hit --:Miss| Since we didn't skip to anywhere else, assume a miss --Miss|Your attack missed. --skipto*4|EndOfCard --:Fumble| --Fumble|You miss horribly! --skipto*5|EndOfCard --:Hit| --Hit|Your chaotic energy strikes the target doing [[ [$dmg1] 1d8 ]] + [[ [$dmg2] 1d8]] + [[ 1d6]] damage --?? $dmg1 == $dmg2 ?? skipto*6|Leap --skipto*7|DamageType --:Critical| --Critical Hit!|Your chaotic energy intensifies and critically strikes the target doing [[ [$dmg3] 1d8 ]] + [[ [$dmg4] 1d8]] + [[ 2d8 + 2d6]] damage --?? $dmg3 == $dmg4 ?? skipto*8|LeapCrit --skipto*9|DamageTypeCrit --:DamageType| --?? $dmg1 == 1 ?? Damage Type: *1|$$#090|**Acid**$$ or --?? $dmg1 == 2 ?? Damage Type: *2|$$#49C|**Cold**$$ or --?? $dmg1 == 3 ?? Damage Type: *3|$$#C00|**Fire**$$ or --?? $dmg1 == 4 ?? Damage Type: *4|$$#55C|**Force**$$ or --?? $dmg1 == 5 ?? Damage Type: *5|$$#FF0|**Lightning**$$ or --?? $dmg1 == 6 ?? Damage Type: *6|$$#3F6|**Poison**$$ or --?? $dmg1 == 7 ?? Damage Type: *7|$$#90C|**Psychic**$$ or --?? $dmg1 == 8 ?? Damage Type: *8|$$#666|**Thunder**$$ or --?? $dmg2 == 1 ?? Damage Type: *9|$$#090|**Acid**$$ --?? $dmg2 == 2 ?? Damage Type: *10|$$#49C|**Cold**$$ --?? $dmg2 == 3 ?? Damage Type: *11|$$#C00|**Fire**$$ --?? $dmg2 == 4 ?? Damage Type: *12|$$#55C|**Force**$$ --?? $dmg2 == 5 ?? Damage Type: *13|$$#FF0|**Lightning**$$ --?? $dmg2 == 6 ?? Damage Type: *14|$$#3F6|**Poison**$$ --?? $dmg2 == 7 ?? Damage Type: *15|$$#90C|**Psychic**$$ --?? $dmg2 == 8 ?? Damage Type: *16|$$#666|**Thunder**$$ --skipto*10|EndOfCard --:DamageTypeCrit| --?? $dmg3 == 1 ?? Damage Type: *21|$$#090|**Acid**$$ or --?? $dmg3 == 2 ?? Damage Type: *22|$$#49C|**Cold**$$ or --?? $dmg3 == 3 ?? Damage Type: *23|$$#C00|**Fire**$$ or --?? $dmg3 == 4 ?? Damage Type: *24|$$#55C|**Force**$$ or --?? $dmg3 == 5 ?? Damage Type: *25|$$#FF0|**Lightning**$$ or --?? $dmg3 == 6 ?? Damage Type: *26|$$#3F6|**Poison**$$ or --?? $dmg3 == 7 ?? Damage Type: *27|$$#90C|**Psychic**$$ or --?? $dmg3 == 8 ?? Damage Type: *28|$$#666|**Thunder**$$ or --?? $dmg4 == 1 ?? Damage Type: *29|$$#090|**Acid**$$ --?? $dmg4 == 2 ?? Damage Type: *30|$$#49C|**Cold**$$ --?? $dmg4 == 3 ?? Damage Type: *31|$$#C00|**Fire**$$ --?? $dmg4 == 4 ?? Damage Type: *32|$$#55C|**Force**$$ --?? $dmg4 == 5 ?? Damage Type: *33|$$#FF0|**Lightning**$$ --?? $dmg4 == 6 ?? Damage Type: *34|$$#3F6|**Poison**$$ --?? $dmg4 == 7 ?? Damage Type: *35|$$#90C|**Psychic**$$ --?? $dmg4 == 8 ?? Damage Type: *36|$$#666|**Thunder**$$ --skipto*11|EndOfCard --:Leap| --?? $dmg1 == 1 ?? Damage Type: *41|$$#090|**Acid**$$ --?? $dmg1 == 2 ?? Damage Type: *42|$$#49C|**Cold**$$ --?? $dmg1 == 3 ?? Damage Type: *43|$$#C00|**Fire**$$ --?? $dmg1 == 4 ?? Damage Type: *44|$$#55C|**Force**$$ --?? $dmg1 == 5 ?? Damage Type: *45|$$#FF0|**Lightning**$$ --?? $dmg1 == 6 ?? Damage Type: *46|$$#3F6|**Poison**$$ --?? $dmg1 == 7 ?? Damage Type: *47|$$#90C|**Psychic**$$ --?? $dmg1 == 8 ?? Damage Type: *48|$$#666|**Thunder**$$ -- Chaos!| The chaotic energy leaps from the target to a different creature of your choice within 30 feet! --skipto*12|EndOfCard --:LeapCrit| --?? $dmg3 == 1 ?? Damage Type: *51|$$#090|**Acid**$$ --?? $dmg3 == 2 ?? Damage Type: *52|$$#49C|**Cold**$$ --?? $dmg3 == 3 ?? Damage Type: *53|$$#C00|**Fire**$$ --?? $dmg3 == 4 ?? Damage Type: *54|$$#55C|**Force**$$ --?? $dmg3 == 5 ?? Damage Type: *55|$$#FF0|**Lightning**$$ --?? $dmg3 == 6 ?? Damage Type: *56|$$#3F6|**Poison**$$ --?? $dmg3 == 7 ?? Damage Type: *57|$$#90C|**Psychic**$$ --?? $dmg3 == 8 ?? Damage Type: *58|$$#666|**Thunder**$$ -- Chaos!| The chaotic energy leaps from the target to a different creature of your choice within 30 feet! --:EndOfCard| }}
1610107038

Edited 1610107045
David M.
Pro
API Scripter
Nice, James! And that is both the beauty and horror of Powercards, haha! Darren, if your DM has a Pro subscription, James' solution is true to the exact wording of the spell, tying the actual damage rolls to the damage types. They would need to install the three scripts James mentioned. Or, you could get away with just the powercards script if you removed the following two lines: -- vfx_opt|@{selected|token_id} @{target|token_id} beam-magic -- soundfx|_audio,play,nomenu|Eldritchblast
Thanks David Here's the latest iteration which removes some of the hardcoded elements and adds the higher level damage feature of the spell.  Clearner formatting as well. !power {{ --replacespell|@{selected|character_id}|Chaos Bolt --titlefontshadow|none --tokenid|@{selected|token_id} --format|atwill --corners|10 --name|@{selected|character_name} --leftsub|Magic Attack --rightsub|~SP-NAME$ --Range:|~SP-RANGE$ --Casting Time:|~SP-CASTINGTIME$ --Duration:|~SP-DURATION$ --Components:| V, S --inlinereplace|SlotsAboveSpellLevel|?{Slots above spell level|0} --inlinereplace|SaplExtraDmgDice|~SlotsAboveSpellLevel$~SP-HLDIETYPE$;SaplExtraDmgDiceCrit|~SlotsAboveSpellLevel$~SP-HLDIETYPE$ + ~SlotsAboveSpellLevel$~SP-HLDIETYPE$ [Critical] -- vfx_opt|@{selected|token_id} @{target|token_id} beam-magic -- soundfx|_audio,play,nomenu|Eldritchblast --?? @{target|npc} == 0 ?? !Friendly Fire!|$$#C00|**Firing at a non NPC target!**$$ --?? @{target|npc} <> 0 ?? #NPC Fire!|Debug: Firing at an NPC target --Attack Roll|You roll [[ [$atk] 1d20 + @{selected|charisma_mod} [Charisma] + @{selected|pb} [Prof] ]] vs AC --?? $atk.base == 1 ?? skipto*1|Fumble --?+ @{target|npc} <> 0 AND $atk < @{target|npc_ac} +? skipto*2|Miss --?+ @{target|npc} == 0 AND $atk < @{target|ac} +? skipto*3|Miss --?+ $atk.base == 20 +? skipto*4|Critical --?+ @{target|npc} <> 0 AND $atk >= @{target|npc_ac} +? skipto*6|Hit --?+ @{target|npc} == 0 AND $atk >= @{target|ac} +? skipto*7|Hit --:InvalidTarget| Not a valid target --Invalid Target|It appears this attack had an invalid target (//npc// is not //0// or //1//) --skipto*8|EndOfCard --:Fumble| --Fumble|The chaos bolt fizzles out of existance as soon as you cast it --skipto*9|EndOfCard --:Miss| Since we didn't skip to anywhere else, assume a miss --Miss|The chaos bolt misses the target --skipto*10|EndOfCard --:Hit| --Hit|The chaos bolt hits the target; inflicting [[ [$dmg1] 1d8 ]] + [[ [$dmg2] 1d8 ]] + [[1d6]] damage --?? ~SlotsAboveSpellLevel$ > 0 ??Extra Damage *0|Due to being cast **~SlotsAboveSpellLevel$** level(s) higher; [#[ [$ssldmg|NH] ~SaplExtraDmgDice$ ]#] extra damage is inflicted --?? $dmg1 == $dmg2 ?? skipto*11|Leap --skipto*12|DamageType --:Critical| --Critical Hit!|The chaotic energy intensifies and critically strikes the target; inflicting [[ [$dmg1] 1d8 ]] + [[ [$dmg2] 1d8 ]] + [[ 1d6 ]] + [[ [NH] 1d8 + 1d8 + 1d6 [Critical Hit] ]] damage --?? ~SlotsAboveSpellLevel$ > 0 ??Extra Damage *1|Due to being cast **~SlotsAboveSpellLevel$** level(s) higher; [#[ [$ssldmg|NH] ~SaplExtraDmgDiceCrit$ ]#] extra damage is inflicted --?? $dmg1 == $dmg2 ?? skipto*13|Leap --skipto*14|DamageType --:DamageType| --?? $dmg1 == 1 ?? Damage Type Options: *1|~R$$#090|**Acid**$$ //or//~R --?? $dmg1 == 2 ?? Damage Type Options: *2|~R$$#49C|**Cold**$$ //or//~R --?? $dmg1 == 3 ?? Damage Type Options: *3|~R$$#C00|**Fire**$$ //or//~R --?? $dmg1 == 4 ?? Damage Type Options: *4|~R$$#55C|**Force**$$ //or//~R --?? $dmg1 == 5 ?? Damage Type Options: *5|~R$$#FF0|**Lightning**$$ //or//~R --?? $dmg1 == 6 ?? Damage Type Options: *6|~R$$#3F6|**Poison**$$ //or//~R --?? $dmg1 == 7 ?? Damage Type Options: *7|~R$$#90C|**Psychic**$$ //or//~R --?? $dmg1 == 8 ?? Damage Type Options: *8|~R$$#666|**Thunder**$$ //or//~R --?? $dmg2 == 1 ?? !Damage Type: *9|~R$$#090|**Acid**$$~R --?? $dmg2 == 2 ?? !Damage Type: *10|~R$$#49C|**Cold**$$~R --?? $dmg2 == 3 ?? !Damage Type: *11|~R$$#C00|**Fire**$$~R --?? $dmg2 == 4 ?? !Damage Type: *12|~R$$#55C|**Force**$$~R --?? $dmg2 == 5 ?? !Damage Type: *13|~R$$#FF0|**Lightning**$$~R --?? $dmg2 == 6 ?? !Damage Type: *14|~R$$#3F6|**Poison**$$~R --?? $dmg2 == 7 ?? !Damage Type: *15|~R$$#90C|**Psychic**$$~R --?? $dmg2 == 8 ?? !Damage Type: *16|~R$$#666|**Thunder**$$~R --skipto*15|EndOfCard --:Leap| --?? $dmg1 == 1 ?? Damage Type: *41|~R$$#090|**Acid**$$~R --?? $dmg1 == 2 ?? Damage Type: *42|~R$$#49C|**Cold**$$~R --?? $dmg1 == 3 ?? Damage Type: *43|~R$$#C00|**Fire**$$~R --?? $dmg1 == 4 ?? Damage Type: *44|~R$$#55C|**Force**$$~R --?? $dmg1 == 5 ?? Damage Type: *45|~R$$#FF0|**Lightning**$$~R --?? $dmg1 == 6 ?? Damage Type: *46|~R$$#3F6|**Poison**$$~R --?? $dmg1 == 7 ?? Damage Type: *47|~R$$#90C|**Psychic**$$~R --?? $dmg1 == 8 ?? Damage Type: *48|~R$$#666|**Thunder**$$~R -- Chaos!| The chaotic energy leaps from the target to a different creature of your choice within 30 feet! --skipto*16|EndOfCard --:EndOfCard| }}
I don't have pro yet, and I'm the DM in the case of who's paying for the account.  We all share DMing from time to time though. Thanks again for everyone's help you guys have been awesome.  I will bring up all the progress I've done so far to the group, but at the moment i'm the most experienced with roll 20 and they are still just getting used to dynamic lighting!