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

Macro Help

1527572630

Edited 1527573277
Hi, I am using the Pathfinder community character sheet and I am trying to put together a macro that would allow me to use a drop down box for when casting defensively or not. I have tried something like: ?{Casting Defensively?|No,[[%{selected|repeating_weapon_-LDeG1En25pZZwmGR5m8_attack-roll}]]|Yes, [[%{selected|repeating_weapon_-LDeG1En25pZZwmGR5m8_attack-roll} %{selected|repeating_spells_-LDXCcTeS0Zmv7R6sozE_roll}]]}. But it is malfunctioning in that when it asks me the yes or no action it contains the coded text and will not allow a selection. At the moment what I am trying to do is have the macro ask me for the condition of casting defensively. If I am then I need it to roll 2 macros, if not I need it to roll only the one. I did want to add before closing in an ideal world what I would want from the macro system is to combine the two of rolling the attack roll & damage roll in the same macro as the one that tells the Save, Caster Level Check, Concentration Check, & Cast Defensively DC & roll, but I will settle for what I got at the moment. If it is already this way, please point the way & I will make all haste to find/use it.
1527580135
vÍnce
Pro
Sheet Author
I don't think the drop down query will work for this due to necessary substitutions and the order of operations.&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_</a>... &nbsp; How about adding an&nbsp; API button (this is not really using API, so Pro is not required) to "Cast Defensively" from within the notes of the attack? for example, add this to your attack notes. [Cast Defensively](!&amp;#13;&amp;#37;{selected|repeating_spells_-LDXCcTeS0Zmv7R6sozE_roll}) Then you can click the Cast Defensively button from chat if needed to cast the associated spell which will also show all your normal spell checks. note: this could also be reversed in that you could add a button to your spell's notes to roll the attack.
Thanks! Works great! I appreciate you doing this in this way for me. Incidentally my wife is the one who has the Pro account, since I am mainly a player in her games I usually didn't feel the need to go higher than the free status.
1527586387
vÍnce
Pro
Sheet Author
NP.&nbsp; I only mentioned Pro in relation to using the API button option.&nbsp; Since "API scripting" is only available at Pro, the API button trick "seems" like it would only be available to Pro level.&nbsp; Glad it's working for you. Cheers
1527598346

Edited 1527607167
Unfortunately, I need further assistance with another macro of mine that is not adding the +1 attack +1 damage that I am supposed to get from Point-Blank Shot. This is my macro code:&nbsp;?{Point-Blank Shot?|No, [[0]]|Yes, [[1]]} for attack & ?{Point-Blank Shot Damage?|No, [[0]]|Yes, [[1]]} for damage. What am I missing to correct this issue? I realize this is simple, but it is something that I do not fully understand to fix myself. Thank you again for all your previous help before! Edit: Perhaps I should try to put this in a better frame of mind for the question. Currently, I am working on an acid splash macro with the usage of the point-blank shot feat. I have managed to get it to give me the +1 to attack to work in the Ranged Attack Insert Macro field, but not the Ranged Damage Insert Macro field. I am left to wonder if this is specific to the spell itself in the possible error or something larger, perhaps? Edit 2: Further testing for a dummy macro has revealed that the code&nbsp;?{Point-Blank Shot Damage?|No, [[0]]|Yes, [[1]]} is working correctly, but is not working for when used with acid splash. I am curious as to why, would anyone have any suggestions? Edit 3: When I attempt to use the&nbsp;macro code from within the Damage Insert Macro Field of the Spell Attack itself, it will prompt me for what is expected, but will not attempt to roll the attack & damage at all.
1527607080

Edited 1527607709
vÍnce
Pro
Sheet Author
Edit 3: When I attempt to use the macro code from within the Damage Insert Macro Field of the Spell Attack itself, it will prompt me for what is expected, but will not attempt to roll the attack & damage at all. If you have a spell the requires an attack roll, I suggest making an attack for it.&nbsp; You can use the "Create Attack" button to create the attack from the Spell's attack & dmg sub-section, but you'll need to modify the attack itself as needed from Attacks tab. There are numerous examples of how to add additional bonuses for various feats and class features for the PF Community sheet on the wiki.&nbsp; Here's one specifically for PBS&nbsp; <a href="https://wiki.roll20.net/Pathfinder_Character_Sheet" rel="nofollow">https://wiki.roll20.net/Pathfinder_Character_Sheet</a>... You normally will use the extra attack/damage fields on the sheet.&nbsp; Make sure to enable any hidden macro fields from settings|sheet configuration|advanced.&nbsp; I normally enable them all.&nbsp; There's some info about it at the top of the macro section linked above.( <a href="https://wiki.roll20.net/Pathfinder_Character_Sheet" rel="nofollow">https://wiki.roll20.net/Pathfinder_Character_Sheet</a>... ) Post back if you are still having problems and we'll definitely get it solved. Good luck. .
Vince, I appreciate your help with this, but at the moment I am to the point of just giving myself a +1 in the calculation instead of using a drop-down box & annotating it in weapon notes section. So the DM will understand why I have a min damage of 3 and a max damage of 5 for acid splash, instead of the normal 3 maximum.
1527608767

Edited 1527608829
vÍnce
Pro
Sheet Author
I get it.&nbsp; I often go through my player's sheets to help add queries for various bonuses and such.&nbsp; You can always include inline rolls and explanatory text within the notes/description field of spells, attacks, abilities, etc.&nbsp; ie&nbsp; "Additional Damage for PBS: [[ 1 ]]" Just know that there are areas included on the sheet to add extra global attack/damage modifier fields for attacks as well as per-attack modifiers.&nbsp; But only the attacks section uses them.
1527611120

Edited 1527611970
After much thought about it the macro works normally, but doesn't work in this case because from what I can tell is when you create the spell attack macro from the spells list that then creates it in the attack macro section. It puts the damage & type in the Extra Non-Crit Damage under the Extra damage field, instead of filling in the information in the damage dice field where a normal weapon would be used.&nbsp; Edit: The main fault I see with the community sheet is that when I try to apply the spell damage as if it were a weapon, the damage total is incorrect due to the Dmg Ability field. If it is left as none it will incorrectly do the math for the spell, but I believe this is on purpose because this whole field is likely designed for weapons instead of spells. Whereas&nbsp;the entry area for spells & spell damage does not read the information from where the Point-Blank Shot Damage macro because it has nothing telling it to do so. Hence with a great sigh, it may just come down to at the moment of adding a +1 to the [[1d3+1]] already in place to make it [[1d3+2]]. What I would have liked to do was to make it fancy & have it read the Point-Blank Damage macro code and add that in when I needed it to for any spell that I would cast within 30 feet for damage. As it stands I currently have to manually every time I cast something tell the DM x is +1 damage or not, instead of me doing it all through the drop down box selections, which is what I wanted to avoid.
1527612371

Edited 1527612784
vÍnce
Pro
Sheet Author
Kirvosh said: After much thought about it the macro works normally, but doesn't work in this case because from what I can tell is when you create the spell attack macro from the spells list that then creates it in the attack macro section. It puts the damage & type in the Extra Non-Crit Damage under the Extra damage field, instead of filling in the information in the damage dice field where a normal weapon would be used. Or perhaps I filled in wrong? Not sure, but I believe I did it correctly from the start. So the "Create Attack" button found in Spells and Abilities really just creates a basic attack.&nbsp; You will need to go to the actual attack it creates on the Attacks tab and make adjustments.&nbsp; You may need to fill in attack modifiers, damage dice, additional damage modifiers, etc.&nbsp; Spells are unique in that that they will normally deal a type of damage, but if you have a spell that can deal crit damage, I believe any spell that requires an attack roll(PF community help me out here...) to hit, a crit would need to include any additional crit damage.&nbsp; example(I had to add a Ranged vs touch and I included the extra crit dmg in case I roll a 20) Notice that I added a PBS query? "+?{PBS?|yes,1|no,0}"
1527613728

Edited 1527614168
Yes, I see it. I am unsure about the rest I am seeing. I think I get what your trying to show me here, thanks I am sorry I didn't see/understand it right away.
1527614251

Edited 1527615554
vÍnce
Pro
Sheet Author
Kirvosh said: Yes, I see it. I am unsure about the rest I am seeing. Don't worry about the additional damage for fireball.&nbsp; I know it looks crazy.&nbsp; lol Your damage if any will look different. A more simplified example might be Acid Splash Extra Non-crit Dmg: [[ 1d3 +?{PBS?|yes,1|no,0} ]] Type: ACID Extra Crit Dmg:&nbsp; [[ 1d3 +?{PBS?|yes,1|no,0} ]] Type: ACID btw: you could add your PBS query as a global attack and damage modifier instead of adding per-attack.&nbsp; You will be asked on each Ranged attack if you want to apply the bonus. EDIT: I forgot to mention, if you setup a global query like this, in order to receive the additional damage for the ranged attack, you'll need to change the Dmg Ability to something other than "none" and just set the max at "0". &nbsp;&nbsp; Attacks were originally created for non-spell attacks, so yo have to do this additional step for the additional global ranged damage to be included in your spell's attack.&nbsp; Fools the sheet's attack logic into thinking this is a "weapon-based attack". .
1527615072

Edited 1527615448
Vince said: Kirvosh said: Yes, I see it. I am unsure about the rest I am seeing. Don't worry about the additional damage for fireball.&nbsp; I know it looks crazy.&nbsp; lol Your damage if any will look different. A more simplified example might be Acid Splash Extra Non-crit Dmg: [[ 1d3 +?{PBS?|yes,1|no,0} ]] Type: ACID Extra Crit Dmg:&nbsp; [[ 1d3 +?{PBS?|yes,1|no,0} ]] Type: ACID btw: you could add your PBS query as a global attack modifier instead of adding per-attack.&nbsp; You will be asked on each Ranged attack if you want to apply the bonus. . Yes, that is what I started with initially&nbsp;after watching a video on how to do this very thing. The only thing the video didn't&nbsp;include was how to do spells. What I tried to do from the start was put the PBS macro in the Add to Ranged Dmg macro field and somehow thought it would do the calculations for that from the spell, of which I was wrong on. That field only applies to damage when using an actual ranged weapon, like a bow or something. Edit: Though looking closer at your Fireball macro it looks really shiny. Makes me want to create one myself. Would you happen to have an appropriate guide for spells? Something similar to what you have written out there for fireball?
1527615909

Edited 1527616087
vÍnce
Pro
Sheet Author
Kirvosh said: Yes, that is what I started with initially&nbsp;after watching a video on how to do this very thing. The only thing the video didn't&nbsp;include was how to do spells. What I tried to do from the start was put the PBS macro in the Add to Ranged Dmg macro field and somehow thought it would do the calculations for that from the spell, of which I was wrong on. That field only applies to damage when using an actual ranged weapon, like a bow or something. Edit: Though looking closer at your Fireball macro it looks really shiny. Makes me want to create one myself. Would you happen to have an appropriate guide for spells? Something similar to what you have written out there for fireball? Check my Edit/Update&nbsp; in my post above on how to get around damage not being included when added globally on spell-based attacks. I don't have a "guide".&nbsp; The PF Community Sheet Guide on the wiki, (link in the footer of sheet) has some great macro examples. I often approach spells and special abilities like they are weapon attacks and just "adjust" them until they work as expected.&nbsp; ;-P The extra damage and attack fields should allow you to do just about anything that's needed.&nbsp; If you find a formula for something you can't figure out, just post and there is usually lot's of people to suggest a macro to make it work.
Vince said: Kirvosh said: Yes, I see it. I am unsure about the rest I am seeing. Don't worry about the additional damage for fireball.&nbsp; I know it looks crazy.&nbsp; lol Your damage if any will look different. A more simplified example might be Acid Splash Extra Non-crit Dmg: [[ 1d3 +?{PBS?|yes,1|no,0} ]] Type: ACID Extra Crit Dmg:&nbsp; [[ 1d3 +?{PBS?|yes,1|no,0} ]] Type: ACID btw: you could add your PBS query as a global attack and damage modifier instead of adding per-attack.&nbsp; You will be asked on each Ranged attack if you want to apply the bonus. EDIT: I forgot to mention, if you setup a global query like this, in order to receive the additional damage for the ranged attack, you'll need to change the Dmg Ability to something other than "none" and just set the max at "0". &nbsp;&nbsp; Attacks were originally created for non-spell attacks, so yo have to do this additional step for the additional global ranged damage to be included in your spell's attack.&nbsp; Fools the sheet's attack logic into thinking this is a "weapon-based attack". . This here in bold is what I originally set out to do from the beginning, but couldn't&nbsp;figure out how to do it on my own. Thanks! Would you also be willing to take that fireball macro and paste it in text format here so I could use it for reference&nbsp;later to manipulate? I realize that this is the same thing as what is in the picture you provided, but there are certain characters used that I am unsure how to obtain, namely the one that looks like a letter k, not sure if it is one.
1527621460
vÍnce
Pro
Sheet Author
It looks like a "k", because it is.&nbsp; ;-)&nbsp; It's used to "keep" one of the compared values. grouping Rolls( <a href="https://wiki.roll20.net/Dice_Reference#Grouping_Ro" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Grouping_Ro</a>... )&nbsp; In this case, it is used to keep the low value. It is comparing the caster level with "10" (the max # of d6 that can be rolled for a fireball) and keeping the lower of the two. And that's the number of d6 damage to roll. [[ [[ {@{spellclass-0-level},10}kl1 ]]d6]]
Ok thanks Vince, You have been a great help!