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 for Combat at Dungeonslayers

Hello everyone, I am playing Dungeonslayers as a GM and looking forward to use roll20 for my group. I tried the whole day to write a macro for the Dungeonslayers combat system which is a little bit special. (For more information you can check the free rule book at their site. Combat is explained at page 49 of the pdf.) When Player1 attacks Player2 there are four possibilities: A > Attack.Player1 AND D > Defense.Player2 THEN damage.Player2 = 0 A > Attack.Player1 AND D ≤ Defense.Player2 THEN damage.Player2 = 0 A ≤ Attack.Player1 AND D > Defense.Player2 THEN damage.Player2 = A A ≤ Attack.Player1 AND D ≤ Defense.Player2 THEN damage.Player2 = A-D With A, D are 1D20. I know that it is not possible to change value of attributes with macros. So it is okay when damage is shown as a result and not subtracted by the Healthpoint-attribute. I am wondering if it is possible to work with macro or if it is necessary to use API. Thanks!
Disclaimer: This is off the top of my head at work; I haven't tested so you might find a syntax error or two, but this is the general idea. If the player and monster tokens are linked to character sheets, they can have attributes (like AC or Defense, whatever you want to call it) that you can refer to in macros. You just can't update those values. You can also use the three Token Bars to hold these values and reference those via @{Selected|Bar1} or @{Target|Bar1} (where the three bars are Bar1, Bar2, and Bar3 respectively) Example with a plain macro and a character sheet(no linked token): [[ 1d20>@{CharacterSheetName|AttributeName} ]] Will result in a "1 Success" if the roll is equal to or higher than the character sheet's attribute , or a "0 successes" if it's not Example with a macro and a character sheet with a linked token that is currently selected): [[ 1d20>@{Selected|AttributeName} ]] Will result in a "1 Success" if the roll is equal to or higher than the character sheets attribute , or a "0 successes" if it's not Combined Example with a Token Action on a player's token linked to a character sheet, and an enemy target token that is also linked to a sheet. Assumes the target token is keeping it's defence in an attribute called "Defence" and its HP in Bar1 on the token. /me Swings at his enemy with [[ 1d20>@{Target|Defence} ]] /me sneers as @{Target|Token_Name} takes [[ 1d8 + 1 ]] damage from @{Target|Token_Name} 's previous @{Target|Bar1} health. Interaction: You click character "Ralph"'s token and an action will appear at the top of the screen. Clicking it will prompt you to click the target token that you're swinging at. Expected Output: Ralph Swings at his enemy with (1 - Successes!) Ralph sneers as Bob takes (4) damage from Bob 's previous (14) health. Edit: I forgot to mention that Roll20's macro system only uses < and > which are treated as <= and >= respectively.
Dear Mark, thank your for your reply! There are two problems with the formular you shown above: 1. Dungeonslayers doesn't work like D'n'd where two dices are used. one for the check of attack, one, if the first is succesfull, for the damage. Dungeonslayers uses the same dice for the check and the damage. So it is neccesary to use the result of the dice for two querys, which would be easy if it's possible to define the dices as a variable which is rolled once at the begin of the macro and then can be used two or more times. 2. You don't consider the check for defense thich can fail or, if its okay the value of the dice thrown is subtracted by the intital damage. Right now I am working with two macros. One for attack, one for defence, which are both not mathematically, but text heavy: /em attacks @{target|token_name} and does [[1d20]] damage if dice result equalto or less than [[@{selected|Attack}]]! /em defend himself and reduces damage by [[1d20]] if dice result equalto or less than [[@{selected|Defense}]]! The more I think about it, the more i believe i need API for that.
1394800364
Alex L.
Pro
Sheet Author
Sven M. R. said: Dear Mark, thank your for your reply! There are two problems with the formular you shown above: 1. Dungeonslayers doesn't work like D'n'd where two dices are used. one for the check of attack, one, if the first is succesfull, for the damage. Dungeonslayers uses the same dice for the check and the damage. So it is neccesary to use the result of the dice for two querys, which would be easy if it's possible to define the dices as a variable which is rolled once at the begin of the macro and then can be used two or more times. 2. You don't consider the check for defense thich can fail or, if its okay the value of the dice thrown is subtracted by the intital damage. Right now I am working with two macros. One for attack, one for defence, which are both not mathematically, but text heavy: /em attacks @{target|token_name} and does [[1d20]] damage if dice result equalto or less than [[@{selected|Attack}]]! /em defend himself and reduces damage by [[1d20]] if dice result equalto or less than [[@{selected|Defense}]]! The more I think about it, the more i believe i need API for that. If you want to do any more than what you have there then yes the API is needed.
yes, as soon as you mentioned re-using a dice roll, you're in API territory