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

Need help with fixing my psionic macros

1420559794

Edited 1420559893
I made this macro for my psion, but for some reason it never displays anything when I use it. I get all the prompts up to and including "Empower cost", but then the chat is silent and no rolls appear... Here's the macro: /me snaps his fingers and a shrill whistle pierces the air, as three empowered energy barrages fly, using ?{Whose focus?|his crystal's focus} for [[floor((5d6+floor((?{Augmentation points? (increments of 4)|0}+@{Charlie|ShardMod})/4)d6)*?{Damage multiplier?|1.5})]] points of ?{Energy Type?|Fire} damage for [[11d1+?{Augmentation points? (Increments of 4)|0}[Augmentation]+?{Empower cost?|2}]] Power Points, DC [[1d1+9[Base 10]+@{Charlie|IntMod}[Int bonus]+6[Power level]+floor((?{Augmentation points? (increments of 4)|0}+@{Charlie|ShardMod})/4)[Augmentation DC]]] Ref save for half damage. And the non-empowered version has a problem as well, which might be related, in that when I use it, it seems that the macro adds ShardMod and Augmentation points together and divides them by 4 as normal, but after the floor function reduces that number to a single integer, it never runs the "d6" part afterward which should've rolled that many d6's... Anyone got any idea why? EDIT: I realise that the energy barrage power uses 3 exactly identical damage rolls, so I will edit away 2 of those to make the code more readable
1420568055
Finderski
Plus
Sheet Author
Compendium Curator
Well, your notes should be enclosed in square brackets for one. For example, instead of (increments of 4), you should use [increments of 4]. I'm not at home so can't try out the rest of the stuff, but that would be the first place I'd start. Hope that helps. :)
I think that doesn't matter when it's inside a roll query text, but I changed it anyway. No luck however :S.
1420585778

Edited 1420586303
DXWarlock
Sheet Author
API Scripter
I believe it has something to do with this part floor is confused by 2 '((' in front of it?: [[floor((5d6+floor((?{Augmentation points? (increments of 4)|0}+@{Charlie|ShardMod})/4)d6)*?{Damage multiplier?|1.5})]] Doing that alone gives no chat reply. Take out the ( and it works..maybe not right output but it gives a chat response, like: [[floor(5d6+floor(?{Augmentation points? (increments of 4)|0}+ @{Charlie|ShardMod} )/4)d6)*?{Damage multiplier?|1.5})]]
Whenever you have trouble with a macro; break it down into pieces and space it out. /me snaps his fingers and a shrill whistle pierces the air, as three empowered energy barrages fly, using ...... This is fine ?{Whose focus?|his crystal's focus} for ....You haven't started a roll (either /roll or [[ ]]) so the Roll Query probably won't get processed correctly [[ floor ( ( 5d6 + floor( (?{Augmentation points? (increments of 4)|0} + @{Charlie|ShardMod})/4 )d6 ) * ?{Damage multiplier?|1.5} ) ]] ... your floor functions look off. Assuming you want to round down on the entire roll, and separately round down your shardmod, Try : [[ floor( ( 5d6 + ( ?{Augmentation points? (increments of 4)|0} + floor( @{Charlie|ShardMod})/4 ) )d6 * ?{Damage multiplier?|1.5} ) ]] points of ?{Energy Type?|Fire} damage for ....You haven't started a roll (either /roll or [[ ]]) so the Roll Query probably won't get processed correctly [[ 11d1 + ?{Augmentation points? (Increments of 4)|0} [Augmentation] + ?{Empower cost?|2} ]] ....This is fine, though you might want to use "0d0 + 11" instead of "11d1" for display purposes. Power Points, DC ... plain text is fine [[ 1d1 + 9[Base 10] + @{Charlie|IntMod}[Int bonus] +6 [Power level] + floor( (?{Augmentation points? (increments of 4)|0} + @{Charlie|ShardMod})/4) [Augmentation DC] ]] .... This should also be fine Ref save for half damage. ... plain text is fine
Well, the roll queries outside a roll seem to work fine for the other macros I use, it just lets me change the text for the focus a bit (Sometimes I use my own, my crystals or both foci). About the floor functions, what I wanted out of it is to add shardmod and the roll query for Augmentation Points, then divide that by 4 rounded down. That number of d6's are rolled and added to the 5d6, which is then multiplied and rounded down once more. It's complicated, 'cause the power "Energy Barrage" only adds 1d6 for every 4 points.
Then yeah, the suggestion above should be fine then. PseudoCode In pieces: Rounded Down: [[ 5d6 + AugPoints + ( ShardMod * Multiplier ) ]] AugPoints = ?{Augmentation points? (increments of 4)|0} ShardMod/4 = ( floor( @{Charlie|ShardMod})/4 ) )d6 Multiplier = ?{Damage multiplier?|1.5} Put together... Being a little heavy-handed with Parens [[ floor( 5d6 + ( ( ?{Augmentation points? (increments of 4)|0} + ( floor( @{Charlie|ShardMod})/4 ) )d6 * ?{Damage multiplier?|1.5} ) ) ]]
1420658886

Edited 1420659188
but it's the augmentation points + shardmod, THEN divide by 4 and round down. as in, (AugPoints+ShardMod)/4. And the multiplier is supposed to multiply the entire thing, including the 5d6 :S. I did some more testing, and it seems the non-empower version (The only difference is that it lacks the multiplier part of the code and one of the floor functions), works mostly, but when I look at the roll outcome it seems as if it's ignoring the d6 at the end of this: 5d6 +floor((?{Augmentation points? (increments of 4)|0}+@{Charlie|ShardMod})/4)d6 instead it just adds the number (So if it was supposed to roll 1 extra d6, it instead just adds 1 to the total...)