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

HELP DICE MACRO (VAMP)

Hi guys, i need some help with a dice macro. I basically need to roll an amount of d10 with a changeable target number. If each dice meets or exceeds the target number it counts as 1 success. A roll of a 1 takes 1 success away from the total, a roll of a 10 explodes and lets you roll again, and add it to the total. However, a roll of a 1 should not stop a 10 from exploding. So all the 10s explode, then all the 1s deduct from the total.  When the macro is pressed i need it to ask how many d10s they are rolling, and then ask again what the difficulty is. example:  6d6 at target number 7.    1,5,7,9,10,4,2 - 2 total successes. 6 dice, 3 natural, -1 due to 1, 10 exploded but wasnt successful.  But I could work with a macro for 1dice, 2dice, 3dice, and so on, and simply ask what the target number is.
1653501466
David M.
Pro
API Scripter
Here is a Scriptcard that I think does what you are looking for. Queries numDice and targetNum. Loops thru the rolls, recursively rolling on 10's and subtracting success on 1's. !script {{ --#title|Nd10 exploding mechanic --=numDice|?{How many d10's?|3} --=targetNum|?{Target number?|7} --#leftsub|[$numDice]d10 --#rightsub|Target num: [$targetNum] --=sucesses|0 --=critFails|0 --=total|0 --=i|0 --:Loop| --=i|[$i]+1 -->RollDice| --?[$i] -lt [$numDice]|Loop --+Rolls:|[&rollStr] --+Rolled Successes:|[b][$successes.Raw][/b] --+Rolled 1's:|[b][$critFails.Raw][/b] --+Total Successes|[$total] --X| End macro --:FUNCTIONS| pass targetNum into this function --:RollDice| --=roll|1d10 --&rollStr|+[$roll] --?[$roll] -eq 1|>CritFail --?[$roll] -ge [$targetNum]|>Success --?[$roll] -eq 10|>RollDice --<| --:Success| --=successes|[$successes] + 1 --=total|[$total] + 1 --<| --:CritFail| --=total|[$total] - 1 --=critFails|[$critFails] + 1 --<| }}
Firstly a basic roll.  It asks for a number of dice and a difficulty, rolls that number of dice, if a 10 is rolled it rolls it again, then counts up the number of successes and the number of 1 rolled and subtracts the number of 1 from the number of successes giving a final success total.  You will need a token selected to use the macro. @{selected|token_name} gets [[?{dice pool}d10>?{difficulty}f1!]] successes Next I have a more complex macro this was created for Vampire the Masquerade V20 (not by me, but by some other more clever person on this forum, but I'm happy to share), I'm not sure if that is the edition you are using, but from the system you mention i think it might be if not you might be able to adapt the macro to work for other versions of the game.  This macro asks for the Attribute (Stat) being used and the Ability (Skill) as well as an option to put in extra dice you might have as a modifier, it then asks for the difficulty. the read out in chat will give you the number of successes you rolled, as well as the number of dice rolled, if you mouse over number of dice rolled it will tell you what the dice came from for example 2[Strength]+3[Athletics].  Again you need a token selected, and that token needs to be attached to a character sheet. @{selected|token_name} rolls [[ [[ ?{Attribute| Strength, @{selected|strength} [Strength]| Dexterity, @{selected|dexterity} [Dexterity]| Stamina, @{selected|Stamina} [Stamina]| Charisma, @{selected|Charisma} [Charisma]| Manipulation, @{selected|Manipulation} [Manipulation]| Appearance, @{selected|Appearance} [Appearance]| Perception, @{selected|Perception} [Perception]| Intelligence, @{selected|Intelligence} [Intelligence]| Wits,@{selected|Wits} [Wits]} + ?{ability| Alertness, @{selected|Alertness} [Alertness]| Athletics, @{selected|athletics} [Athletics]| Awareness, @{selected|Awareness} [Awareness]| Brawl, @{selected|Brawl} [Brawl]| Empathy, @{selected|Empathy} [Empathy]| Expression, @{selected|Expression} [Expression]| Intimidation, @{selected|Intimidation} [Intimidation]| Leadership, @{selected|Leadership} [Leadership]| Streetwise, @{selected|Streetwise} [Streetwise]| Subterfuge, @{selected|Subterfuge} [Subterfuge]| Animal Ken, @{selected|AnimalKen} [Animal Ken]| Craft, @{selected|Crafts} [Crafts]| Drive, @{selected|Drive} [Drive]| Etiquette, @{selected|Etiquette} [Etiquette]| Firearms, @{selected|Firearms} [Firearms]| Larceny, @{selected|Larceny} [Larceny]| Melee, @{selected|Melee} [Melee]| Performance, @{selected|Performance} [Performance]| Stealth, @{selected|Stealth} [Stealth]| Survival, @{selected|Survival} [Survival]| Academics, @{selected|Academics} [Academics]| Computer, @{selected|Computer} [Computer]| Finance, @{selected|Finance} [Finance]| Investigation, @{selected|Investigation} [Investigation]| Law, @{selected|Law} [Law]| Medicine, @{selected|Medicine} [Medicine]| Occult, @{selected|Occult} [Occult]| Politics, @{selected|Politics} [Politics]| Science, @{selected|Science} [Science]| Technology, @{selected|Technology} [Technology]|} + ?{any additional dice|0} [other modifiers]+@{selected|bar1} [health] ]]d10>?{difficulty|6}f1! ]] success(es) from $[[0]] dice
1653554619
GiGs
Pro
Sheet Author
API Scripter
As Oosh says, you can do this with a standard dice roll. Here the rolls have default values in the queries. You could change them to dropdowns to limit the values players can enter. /roll ?{How ManyDice?|1}d10>?{Target Number|7}f1! [[?{How ManyDice?|1}d10>?{Target Number|7}f1!]]
1653563832
David M.
Pro
API Scripter
Well sure I guess, but why would you want to do it in one line when a 37 line scriptcard does the same thing?  ;)
1653565520
GiGs
Pro
Sheet Author
API Scripter
David M. said: Well sure I guess, but why would you want to do it in one line when a 37 line scriptcard does the same thing?  ;) Hehe. I appreciate seeing all your ScriptCard macros. I havent been gaming heavily, but when I start again, I plan to use that script and seeing all your examples f how to use it is helpful.
David M. said: Here is a Scriptcard that I think does what you are looking for. Queries numDice and targetNum. Loops thru the rolls, recursively rolling on 10's and subtracting success on 1's. !script {{ --#title|Nd10 exploding mechanic --=numDice|?{How many d10's?|3} --=targetNum|?{Target number?|7} --#leftsub|[$numDice]d10 --#rightsub|Target num: [$targetNum] --=sucesses|0 --=critFails|0 --=total|0 --=i|0 --:Loop| --=i|[$i]+1 -->RollDice| --?[$i] -lt [$numDice]|Loop --+Rolls:|[&rollStr] --+Rolled Successes:|[b][$successes.Raw][/b] --+Rolled 1's:|[b][$critFails.Raw][/b] --+Total Successes|[$total] --X| End macro --:FUNCTIONS| pass targetNum into this function --:RollDice| --=roll|1d10 --&rollStr|+[$roll] --?[$roll] -eq 1|>CritFail --?[$roll] -ge [$targetNum]|>Success --?[$roll] -eq 10|>RollDice --<| --:Success| --=successes|[$successes] + 1 --=total|[$total] + 1 --<| --:CritFail| --=total|[$total] - 1 --=critFails|[$critFails] + 1 --<| }} This looks amazing, but when i input it nothing happens, do i just put this into adice macro? or am i doing something wrong?
1654081306
David M.
Pro
API Scripter
It requires the installation of the Scriptcards api script (available for 1-click install ). Then it can be entered into a standard macro or ability.
David M. said: It requires the installation of the Scriptcards api script (available for 1-click install ). Then it can be entered into a standard macro or ability. Mate your a legend, thanks so much!