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 that allows me to add a cumulative negative modifier to my attack roll

1553360899

Edited 1553372453
Hello all. I hope you are well. I have a character in my 5e game (Gunslinger) who has been given a magic item, essentially a musket ball which can be richocheted to hit multiple targets. However which each hit it gains a -2 to hit and that is cumulative. At present we have been playing around with the global attack modifiers on the sheet but we feel this could get messy: So I was wondering if there is a Macro (as I am an only a Plus user) where I could essentially have a drop down list allowing me to pick the correct modifier (-2 for 1st, -4 for second, -6 for third etc) all the way to maybe say 10 hits? I was thinking of some sort of Nested Macro like this: &{template:default} {{note= ?{Which Condition?| Blinded, **Blinded:** * A blinded creature can't see and automatically fails and ability check that requires sight. * Attack rolls against the creature have advantage and the creature's attack rolls have disadvantage.| Charmed, **Charmed:** * A charmed creature can't attack the charmer or target the charmer with harmful abilities or magical effects. * The charmer has advantage on any ability check to interact socially with the creature.|Deafened, **Deafened:** A deafened creature can't hear and automatically fails and ability check that requires hearing.|Exhaustion, **Exhaustion and levels:** 1)Disadvantage on ability checks 2)Speed Halved 3)Disadvantage on attack rolls and saving throws 4)Hit point maximum halved 5)Speed reduced to 0 6)Death If you already are exhausted then increase the step by effect's amount. A creature suffering from an exhaustion level then 2 will suffer from all prior forms aswell. Finishing a long rest reduces a creature's exhaustion level by 1 provided the creature has also ingested some food and drink.|Frightened, **Frightened:** * A frightened creature has disadvantage on ability checks and attack rolls while the source of its fear is within line of sight. * The creature can't willingly move closer to the source of its fear.| Grappled, **Grappled:** * A grappled creature's speed becomes 0 and it can't benefit from any bonus to its speed. * The condition ends if the grappler is incapacitated(See the condition) * The condition also ends if an effect removes the grappled creature from the reach of the grappler or grappling effect. Such as when a creature is hurled away by a thunderwave spell.| Incapacitated, **Incapacitated:** * An incapacitated creature can't take actions or reactions.| Invisible, **Invisible:** * An invisible creature is impossible to see without the aid of magic or a special sense. For the purpose of hiding - the creature is heavily obscured. The creature's location can be detected by any noise it makes or any tracks it leaves. * Attack rolls against the creature have disadvantage and the creature's attack rolls have advantage.| Paralyzed, **Paralyzed:** * A paralyzed creature is incapacitated (See the condition) and can't move or speak. * The creature automatically fails strength and dexterity saving throws. * Attack rolls against hte creature have advantage. * Any attack that hits the creature is a critical hit if the attacker is within 5ft of the creature.|Petrified, **Petrified:** * A petrified creature is transformed- along with any nonmagical object it is wearing or carrying - into a solid inanimate substance(usually stone). Its weight increases by a factor of ten and it ceases aging. * The creature is incapacitated (See the condition) - can't move or speak - and is unaware of its surroundings. * Attack rolls against the creature have advantage. * The creature automatically fails strength and dexterity saving throws. * The creature has resistance to all damage. * The creature is immune to poison and disease - although a poison or disease already in its system is suspended and not neutralized. |Poisoned, **Poisoned:** * A poisoned creature has disadvantage on attack rolls and ability checks.|Prone, **Prone:** * A prone creature's only movement option is to crawl unless it stands up and thereby ends the condition. * The creature has disadvantage on attack rolls. * An attack roll against hte creature has advantage if the attacker is within 5ft of the creature and otherwise the attack roll has disadvantage.|Restrained, **Restrained:** * A restrained creature's speed becomes 0 and it can't benefit from any bonus to its speed. * Attack rolls against hte creature have advantage and the creature's attack rolls have disadvantage. * The creature has disdavantage on dexterity saving throws. |Stunned, **Stunned:** * A stunned creature is incapacitated (see the condition) - can't move - and can speak only falteringly. * The creature automatically fails strength and dexterity saving throws. * Attack rolls against the creature have advantage. |Unconscious, **Unconscious:** * An unaware creature is incapacitated (see the condition) - can't move or speak - and is unaware of its surroundings. * The creature drops whatever its holding and falls prone. * The creature automatically fails strength and dexterity saving throws. * Attack rolls against the creature have advantage. * Any attack that hits the creature is a critical hit if the attacker is within 5ft of the creature.|} }}
1553695521

Edited 1553695752
Ziechael
Forum Champion
Sheet Author
API Scripter
Unable to test at present but could you input the following as a single global mod: ?{Number of Ricochets|0,0|1,-2|2,-4|3,-6|4,-8} [Ricochet] You could obviously expand that as far as you need. I also wonder if the following might make it easier to expand/work with: (?{Number of Ricochets|0|1|2|3|4}*-2) [Ricochet] or for a freeform version: (?{Number of Ricochets}*-2) [Ricochet]
Hey I tried the first two and they worked beautifully. The third one only came up with the input number *-2 i.e. 20*-2
1553715613
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try this: [[(?{Number of Ricochets}*(-2))]] [Ricochet]