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

Buff Application?

Is there any kind of macro one can use to apply or consider buffs? Like, let's say my Fighter attacks at a +5 (arbitrary number) and I make a macro that's like "/roll 1d20+5", and that's pretty sweet. Then let's say someone casts Bull's Strength or Ray of Enfeeblement on said Fighter. Is there any way to apply that without going in and manually changing his stats or the macro?
1401094335
Lithl
Pro
Sheet Author
API Scripter
You can use roll queries: /roll 1d20+5+?{Modifier|0} That example will give you a popup dialog with the text "Modifier" and a text box pre-filled with the value 0. You can either hit enter (you're not being buffed), or type the value of the buff first, and benefit from it. (You could also enter a negative number if you're being de-buffed.) The world of API scripting can do fancier things than that, but roll queries are sufficient for most people.
Oh, that's neat. Thanks. There's a whole forum here on API Scripting, what's that stuff about? Is it super complicated?
1401118378
GiGs
Pro
Sheet Author
API Scripter
If you use the chat box to run macros you can enter a modifier Say you have a macro called "fourd6" and its content is "/r 4d6" you can launch that in chat by typing "%fourd6" (as soon as you type the % a tiny droplist of abilities will popup and as you type the letters in the name, it will narrow to the one you want.) So, you can also type this %fourd6 +1d6 and the macro will roll the %fourd6 macro, and add that 5th die to it or type %fourd6 +4 and it will add that set modifier It's not as convenient as just pressing a macro button, but it's useful from time to time.
1401126062
Lithl
Pro
Sheet Author
API Scripter
Mondo said: There's a whole forum here on API Scripting, what's that stuff about? Is it super complicated? If the campaign owner has a Mentor subscription, he or she can add JavaScript to the campaign to achieve a wide variety of things. (He or she doesn't necessarily have to be the one to write it; you can simply copy scripts others have written and posted in the API forum.) Perhaps the most common type of script is to add "API commands," where you type "!commandname parameter..." and the script does various things based on that. The API can also trigger based on objects changing or being created/deleted, or regular chat messages being posted. Some scripts even start up when people join the campaign and simply do something continuously. A script can range from very simple to very complex. While there are some things the API can't do, it's a short list.
Awesome. Thanks a ton. I might have to check that out!
1401206490
GiGs
Pro
Sheet Author
API Scripter
Mondo said: Is there any kind of macro one can use to apply or consider buffs? Like, let's say my Fighter attacks at a +5 (arbitrary number) and I make a macro that's like "/roll 1d20+5", and that's pretty sweet. Then let's say someone casts Bull's Strength or Ray of Enfeeblement on said Fighter. Is there any way to apply that without going in and manually changing his stats or the macro? There is a complicated way to achieve this without using the API. You write the macro with all possible buffs included, and create a set of attributes as flags for whether a buff applies or not. This is pretty ugly and clunky, but with the new character sheet upgrade coming, it might be easier. For instance, let's say you are playing a fighter who has a Flaming sword which may or may not be activated, and he also has multi-classed as a Rogue, so might have Sneak Attack damage based on his rogue level. So for this complex set up, you would need: FighterLvl RogueLvl FlagFlaming FlagSneak StrengthBonus WeaponDamage Then you create an ability that looks like this /me attacks with sword /r 1d20 + [[floor(@{RogueLevel} * 3/4) + @{FighterLevel} ]] [BAB] + @{StrBonus} [STR] + @{WeaponBonus} [Weapon] My damage is: /r @{Weapon Damage} + @{StrBonus} + (@{FlagFlaming} * 1d6) [Flaming] + (@{FlagSneak} * (@{RogueLevel}/2)d6) [Sneak] If you want to hide the working and have a prettier output, use something like: /me attacks with sword /r 1d20 + [[floor(@{RogueLevel} * 3/4) + @{FighterLevel} + @{StrBonus} + @{WeaponBonus} ]] My damage is: /r @{Weapon Damage} + [[@{StrBonus} + (@{FlagFlaming} * 1d6) + (@{FlagSneak} * (@{RogueLevel}/2)d6) ]] Now, you just need to change the flag stats to 1, when they are active, and to 0 when inactive. You can add extra flags (like an extra half str bonus when using a 2h weapon), etc. It's very clunky, but without the API it's the best way at present. For the specific example of Bull's Strength, the easiest way is to have an ability for strength, or a strength bonus, and just adjust the number when the spell is applied.
I do this same thing but with modifier requests. Instead of (@{FlagSneak} * (@{RogueLevel}/2)d6) I do ((?{Sneak Attack?|0}) * (@{RogueLevel}/2)d6) and each attack it will ask if it's a sneak attack defaulting to no ( or zero). Pros: No going into the character sheet. Cons, I have to press enter a number of times equal to the number of questions I'm asking the system for each attack. For my to hit roll I have ((?{Number of attacks this round?|1}) * (-5)) so when I put in which number attack it is it applies my penalty for a full attack correctly to each one. Some of my attacks of 3-4 questions attached that ensure I never miss a modifier or feat bonus I should be accounting for (or add it when I shouldn't)
1401479770
GiGs
Pro
Sheet Author
API Scripter
Yeah, I avoid that approach because of all the prompts you have to deal with every time you attack. I prefer changing a flag once, that persists for several rolls, for those conditional situations. But both methods work, it's good to have options.