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

Option for Gloves of Admixture

As you'll see below, scripting is not my forte and, as a result, probably made a proper mess of things. The goal is to create a macro that will do two things with one selection. The first option, "None" would make no changes. Any other option adds 2d6 damage while advising as to the elemental type. (i.e. selecting "Fire" would add 2d6 damage, but type everything as fire damage.) Hot mess below: [[?{Admixture|None,0|Yes, 2d6]] + ( [[ (@{weapon2critmult}-1) ]]*5)d6 + [[ (@{weapon2critmult}-1) ]] *( @{weapon2damagestat}[Weapon Dmg Ability] +@{weapon2enh}[Weapon Enh] +@{weapon2specialize}[Weapon Spec] As you can tell from the code, I'm having difficulty adding even the 2d6 damage. 
1500816853

Edited 1500816969
Ziechael
Forum Champion
Sheet Author
API Scripter
How about: (you can add or remove the various elemental types as needed using the same format and hover over the result to see the type used) [[ ((@{weapon2critmult}-1)*5)d6 + [[ (@{weapon2critmult}-1) *( @{weapon2damagestat}[Weapon Dmg Ability] +@{weapon2enh}[Weapon Enh] +@{weapon2specialize}[Weapon Spec]) ]] + ?{Admixture|None,0|Fire, 2d6 [Fire]|Cold,2d6 [Cold]|Acid,2d6 [Acid]|Electric,2d6 [Electric]|Force,2d6 [Force]|Sonic,2d6[Sonic]} ]]
Thank you for following up Ziechael!  Took some tinkering (mostly because I realized that I was tossing this into crit rolls and not normal damage rolls) but is working beautifully!  Other than the aforementioned gaff, was there an obvious issue with the macro I had written?
You didn't put [[ ]] around the whole thing to make it one calculation. 
1500882392
Ziechael
Forum Champion
Sheet Author
API Scripter
As it was straight from the sheet it was pretty much there, I just separated things out a bit more to make sure no extra multiplication of damage was being done when a crit was scored. Most importantly there was no closing ) at the end Out of interest, what is the purpose of the *5 for the crit multiplier? Other than seriously boosting damage of course ;)
1500882449
Ziechael
Forum Champion
Sheet Author
API Scripter
Ed S. said: You didn't put [[ ]] around the whole thing to make it one calculation.  This is in the crit damage field for the 3.5e sheet which is used in a template output so the inline encapsulation isn't 100% needed but still good practice anyway ;)
Ziechael said: As it was straight from the sheet it was pretty much there, I just separated things out a bit more to make sure no extra multiplication of damage was being done when a crit was scored. Most importantly there was no closing ) at the end Out of interest, what is the purpose of the *5 for the crit multiplier? Other than seriously boosting damage of course ;) Gotcha! ... well kinda. Clearly the syntax is still a bit beyond me :/  Will need to keep at it! For item number 2, I had noticed that crit damage was only adding 1d6 vs the 5d6 of eldritch blast. (Again, this may be due to tinkering with the damage macro; possibly forgetting another closing parentheses.)
1500909278
Ziechael
Forum Champion
Sheet Author
API Scripter
Ah I see, have you set Eldritch blast up as a weapon or making a bespoke macro for it? Would be great to see your current set up (screen shot if as a weapon or full macro if bespoke), we might be able to give some further tips for streamlining or dynamic use (damage scaling per level etc)? The community here is always willing to help, we've all had to climb the macro learning curve at some point ;)
1500910638

Edited 1500951222
Edited: 2242 EDT; prior content removed. Ed and Ziechael, thank you both for your assistance and guidance. With it I was able to rewrite the macro and insert Ziechael's addition with a fair bit of success! &{template:DnD35StdRoll} {{spellflag=true}} {{name=@{Arkcowl Dagda|character_name} }} {{subtags=aims an Eldritch Blast at @{target|token_name}.}} {{Rng=?{Shape|Blast,90'|Spear,375'}}} {{Attk: =[[1d20cs>20 +@{Arkcowl Dagda|bab}[BAB] +@{Arkcowl Dagda|epicattackbonus}[Epic AB] + @{Arkcowl Dagda|dex-mod}[Ability] +@{Arkcowl Dagda|size}[size]]] vs touch; [[[[floor(@{Arkcowl Dagda|casterlevel}/2)]]d6[Eldritch Blast] + 2d6[Greater Chasuble of Fell Power] + ?{Admixture|None,0|Fire, 2d6 [Fire]|Cold,2d6 [Cold]|Acid,2d6 [Acid]|Electric,2d6 [Electric]|Force,2d6 [Force]|Sonic,2d6[Sonic]}]] dmg}} {{Crit Conf: =[[1d20cs>20 +@{Arkcowl Dagda|bab}[BAB] +@{Arkcowl Dagda|epicattackbonus}[Epic AB] + @{Arkcowl Dagda|dex-mod}[Ability] +@{Arkcowl Dagda|size}[size]]] vs touch; [[[[floor(@{Arkcowl Dagda|casterlevel}/2)]]d6[Eldritch Blast] + 2d6[Greater Chasuble of Fell Power] + ?{Admixture|None,0|Fire, 2d6 [Fire]|Cold,2d6 [Cold]|Acid,2d6 [Acid]|Electric,2d6 [Electric]|Force,2d6 [Force]|Sonic,2d6[Sonic]}]] dmg}} {{Save: =None}} {{ CL: =[[1d20+@{Arkcowl Dagda|casterlevel}+@{Arkcowl Dagda|spellpen}]] vs SR}} Clearly still copy-pasting a fair bit, but better able to piece it together. Working on this did prompt a new hurdle: using a selection from one entry to modify another entry. For example, would it be possible to have the Shape query (in Rng) be applied to subtags, to change the flavor text AND the Rng output? Asking as every time I attempted to do so, putting the query in subtags and Rng, the Rng output would default to the first flavor text output from subtags.  Thank you both once again!
1500987066
Ziechael
Forum Champion
Sheet Author
API Scripter
How about: &{template:DnD35StdRoll} {{spellflag=true}} {{name=@{Arkcowl Dagda|character_name} }} {{subtags=aims an Eldritch ?{Shape|Blast,Blast with a range of 90'|Spear,Spear with a range of 375'} at @{target|token_name}.}} {{Attk: =[[1d20cs>20 +@{Arkcowl Dagda|bab}[BAB] +@{Arkcowl Dagda|epicattackbonus}[Epic AB] + @{Arkcowl Dagda|dex-mod}[Ability] +@{Arkcowl Dagda|size}[size]]] vs touch; [[[[floor(@{Arkcowl Dagda|casterlevel}/2)]]d6[Eldritch Blast] + 2d6[Greater Chasuble of Fell Power] + ?{Admixture|None,0|Fire, 2d6 [Fire]|Cold,2d6 [Cold]|Acid,2d6 [Acid]|Electric,2d6 [Electric]|Force,2d6 [Force]|Sonic,2d6[Sonic]}]] dmg}} {{Crit Conf: =[[1d20cs>20 +@{Arkcowl Dagda|bab}[BAB] +@{Arkcowl Dagda|epicattackbonus}[Epic AB] + @{Arkcowl Dagda|dex-mod}[Ability] +@{Arkcowl Dagda|size}[size]]] vs touch; [[[[floor(@{Arkcowl Dagda|casterlevel}/2)]]d6[Eldritch Blast] + 2d6[Greater Chasuble of Fell Power] + ?{Admixture|None,0|Fire, 2d6 [Fire]|Cold,2d6 [Cold]|Acid,2d6 [Acid]|Electric,2d6 [Electric]|Force,2d6 [Force]|Sonic,2d6[Sonic]}]] dmg}} {{Save: =None}} {{ CL: =[[1d20+@{Arkcowl Dagda|casterlevel}+@{Arkcowl Dagda|spellpen}]] vs SR}}
.......feeling rather silly with how simple a solution that was; putting range into the flavor text instead of it's own section. Thanks Ziechael.
1500993783
Ziechael
Forum Champion
Sheet Author
API Scripter
Don't feel silly, I've been writing these things for way too long and I'm still learning new ways to bend macros to my will ;)