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

[Script] PowerCards 3 (Thread 6)

Mort said: Hi all, I've been trying to use power cards to create a multi-query description macro that depending on critical damage number, location and type gives the appropriate effect description of said damage. However I've found that after a certain number of conditionals - the later ones just don't work anymore? It will simply post the title without the description. This seems to be a size limit issue because if I delete a conditional, one more conditional will start working as if there's a limit I've hit and I have to remove some to continue getting it to work. I've got the full length of the code below.  Anything conditionals after the snippet below does not work correctly: --?? ?{Crit damage?} == 2 AND ?{Location} == Leg AND ?{Type?} == Impact ?? Full macro: !power {{ --?{Type?|Energy|Impact|Explosive|Rending} Crit damage|?{Crit damage?|0} --Location|?{Location|Head|Body|Arm|Leg} --?? ?{Crit damage?} == 1 AND ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|The attack grazes the target’s arm, causing it to spasm uncontrollably with pain. All tests involving that arm suffer a –30 penalty for 1d5 rounds. --?? ?{Crit damage?} == 2 AND ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|The attack smashes into the arm, sending currents of energy crackling down to the fingers and up to the shoulder. The target suffers 1 level of Fatigue, and that arm is Useless for 1d5 rounds. --?? ?{Crit damage?} == 3 AND ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|The arm suffers superficial burns inflicting no small amount of pain on the target. The target suffers 1d5 levels of Fatigue, and can take only a Half Action during his next turn. --?? ?{Crit damage?} == 4 AND?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|The shock of the attack causes the character to temporarily lose control of his autonomous functions. He is Stunned for 1 round and is knocked Prone. The arm is Useless for 1d10 rounds. --?? ?{Crit damage?} == 5 AND ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|The attack causes energy to course through the target’s arm. He is Stunned for 1 round, and the arm is Useless until the target receives medical treatment. --?? ?{Crit damage?} == 7 AND ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|The attack wreathes the arm in flame, scorching clothing and armour, and temporarily fusing together the target’s fingers. The target suffers 1d5 levels of Fatigue and 1d5 Weapon Skill and Ballistic Skill damage, and he must make a Challenging (+0) Toughness test or suffer the Lost Hand condition (see page 242). --?? ?{Crit damage?} == 7 ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|With a terrible snapping sound, the heat of the attack boils the marrow in the target’s arm, causing it to crack or even shatter. The target suffers 1d5 levels of Fatigue and is Stunned for 1 round. His arm is Useless until it is repaired. --?? ?{Crit damage?} == 8 ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|Energy ripples across the target’s arm, causing skin and muscle to slough disgustingly from the target’s limb, revealing a sticky red mess of sinew and bone. The target suffers 1d10 levels of Fatigue and must make a Challenging (+0) Toughness test or be. Stunned for 1d5 rounds. He now suffers from the Lost Arm condition (see page 242). --?? ?{Crit damage?} == 9 ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|Fire consumes the target’s arm, burning the flesh to a crisp right down to the bone. The target must make an immediate Challenging (+0) Toughness test or die from shock. If he survives, the target suffers 1d10 levels of Fatigue and is Stunned for 1 round. The target now suffers from the Lost Arm condition (see page 242) --?? ?{Crit damage?} >= 10 ?{Location} == Arm AND ?{Type?} == Energy ?? !Effect|The attack reduces the arm to a cloud of crimson ash and sends the target crumbling to the ground. He immediately dies from shock, clutching his smoking stump. --?? ?{Crit damage?} == 1 AND ?{Location} == Head AND ?{Type?} == Energy ?? !Effect|A grazing blow to the head disorientates the target. He suffers a –10 penalty to all tests (except Toughness tests) for 1 round. --?? ?{Crit damage?} == 2 AND ?{Location} == Head AND ?{Type?} == Energy ?? !Effect|The blast of energy dazzles the target. He is Blinded for 1 round. --?? ?{Crit damage?} == 3 AND ?{Location} == Head AND ?{Type?} == Energy ?? !Effect|The attack cooks off the target’s ear, leaving him with a partially burned stump of cartilage. He is Deafened for 1d5 hours (or until he receives medical attention). --?? ?{Crit damage?} == 4 AND?{Location} == Head AND ?{Type?} == Energy ?? !Effect|The energy attack burns away all of the hairs on the target’s head, as well as leaving him reeling from the injury. The target suffers 2 levels of Fatigue and the target is Blinded for 1d5 rounds. --?? ?{Crit damage?} == 5 AND ?{Location} == Head AND ?{Type?} == Energy ?? !Effect|A blast of energy envelops the target’s head, burning his face and hair, crisping his skin, and causing him to scream like a stuck grox. In addition to losing all hair on his scalp and face, he is Blinded for 1d10 rounds and Stunned for 1 round. Permanently reduce the target’s Fellowship characteristic by 1. --?? ?{Crit damage?} == 6 AND ?{Location} == Head AND ?{Type?} == Energy ?? !Effect|The attack cooks the target’s face, melting his features and damaging his eyes. The target suffers 1d5 levels of Fatigue and is Blinded for 1d10 hours. Permanently reduce his Fellowship and Perception characteristics by 1d5.Toughness test or suffer the Lost Hand condition (see page 242). --?? ?{Crit damage?} == 7 ?{Location} == Head AND ?{Type?} == Energy ?? !Effect|In a gruesome display, the flesh is burned from the target’s head, exposing charred bone and muscle underneath. The target suffers 1d10 levels of Fatigue. He is Blinded permanently. Roll 1d10; this is the target’s new Fellowship characteristic value. If his Fellowship value is already 10 or lower, this can be skipped as no one would notice any difference in his behaviour and demeanour. --?? ?{Crit damage?} == 8 ?{Location} == Head AND ?{Type?} == Energy ?? !Effect| The target’s head is destroyed in a conflagration of fiery death. He does not survive. --?? ?{Crit damage?} == 9 ?{Location} == Head AND ?{Type?} == Energy ?? !Effect| Superheated by the attack, the target’s brain explodes, tearing apart his skull and sending flaming chunks of meat flying at those nearby. The target is very, very dead. --?? ?{Crit damage?} >= 10 ?{Location} == Head AND ?{Type?} == Energy ?? !Effect|As above, except the target’s entire body catches fire and runs off headless 2d10 metres in a random direction (use the Scatter Diagram on page 230). Anything flammable it passes, including characters, must make a Challenging (+0) Agility test or catch fire (see page 243). --?? ?{Crit damage?} == 1 AND ?{Location} == Body AND ?{Type?} == Energy ?? !Effect|A blow to the target’s body steals the air from his lungs. The target can take only a Half Action on his next turn. --?? ?{Crit damage?} == 2 AND ?{Location} == Body AND ?{Type?} == Energy ?? !Effect|The blast punches the air from the target’s body. He must make a Challenging (+0) Toughness test or be knocked Prone. --?? ?{Crit damage?} == 3 AND ?{Location} == Body AND ?{Type?} == Energy ?? !Effect|The attack cooks the flesh on the chest and abdomen. He suffers 2 levels of Fatigue and 1d5 Toughness damage. --?? ?{Crit damage?} == 4 AND?{Location} == Body AND ?{Type?} == Energy ?? !Effect|The energy ripples all over the character, scorching his body with horrid third-degree burns. The target suffers 1d10 levels of Fatigue, and can only take a Half Action on his next turn. --?? ?{Crit damage?} == 5 AND ?{Location} == Body AND ?{Type?} == Energy ?? !Effect|The fury of the attack forces the target to the ground, helplessly covering his face and keening in agony. The target is knocked Prone and must make a Challenging (+0) Agility test or catch fire (see page 243). The target must also make a Challenging (+0) Toughness test or be Stunned for 1 round. --?? ?{Crit damage?} == 6 AND ?{Location} == Body AND ?{Type?} == Energy ?? !Effect|Struck by the full force of the attack, the target is sent reeling to the ground; smoke spiraling out from the wound. The target suffers 1d5 levels of Fatigue, is knocked Prone, and is Stunned for 1d10 rounds. In addition, he must make a Challenging (+0) Agility test or catch fire (see page 243). --?? ?{Crit damage?} == 7 ?{Location} == Body AND ?{Type?} == Energy ?? !Effect|The intense power of the energy attack cooks the target’s organs, burning his lungs and heart with intense heat. The target is Stunned for 2d10 rounds, and his Toughness characteristic is permanently reduced by 1d10. --?? ?{Crit damage?} == 8 ?{Location} == Body AND ?{Type?} == Energy ?? !Effect| As the attack washes over the target, his skin turns black and peels off, while melted fat seeps from his clothing and armour. The target is Stunned for 2d10 rounds. His Strength, Toughness, and Agility characteristics are reduced by half (rounding up) until he receives medical treatment. Permanently reduce the character’s Fellowship characteristic by 2d5. --?? ?{Crit damage?} == 9 ?{Location} == Body AND ?{Type?} == Energy ?? !Effect| The target is completely encased in fire, melting his skin and bursting his eyes like superheated eggs. He falls to the ground a lifeless corpse, blackened and charred with horrid burns --?? ?{Crit damage?} >= 10 ?{Location} == Body AND ?{Type?} == Energy ?? !Effect|As above, but if the target is carrying any ammunition, roll 1d10: on a result of 6 or higher, it explodes. Each target within 1d5 metres suffers a single hit for 1d10+5 Explosive damage to a randomly determined Hit Location. If the target carried any grenades or missiles, these detonate on the character’s corpse with their normal effects one round after his demise. --?? ?{Crit damage?} == 1 AND ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect|The blast of energy sears the flesh and bone of the target’s leg, leaving a nasty burn scar. The target cannot use the Run or Charge actions for 2 rounds. --?? ?{Crit damage?} == 2 AND ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect|The attack flash-fries the target’s leg, cooking chunks of flesh into char. The target must pass a Challenging (+0) Toughness test or suffer 1 level of Fatigue. --?? ?{Crit damage?} == 3 AND ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect|A solid blow to the leg sends currents of agony coursing through the target. The target suffers 1 level of Fatigue and is knocked Prone. Reduce his Movement by half (rounding up) for 1d10 rounds. --?? ?{Crit damage?} == 4 AND?{Location} == Leg AND ?{Type?} == Energy ?? !Effect|The blast causes a nasty compound fracture in the target’s leg. Until the target receives medical attention, reduce his Movement by half (rounding up), and he cannot use the Run or Charge actions. --?? ?{Crit damage?} == 5 AND ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect|The target’s leg endures horrific burn damage, fusing clothing and armour with flesh and bone. The target suffers 1 level of Fatigue and is knocked Prone. Reduce his Movement by half (rounding up) for 2d10 rounds. --?? ?{Crit damage?} == 6 AND ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect|The attack burns the target’s foot, charring the flesh and emitting a foul aroma. The target suffers 2 levels of Fatigue. He must also make a Challenging (+0) Toughness test. If he succeeds, reduce his Movement by half (rounding up) until he receives medical attention; if he fails, he suffers the Lost Foot condition (see page 243). --?? ?{Crit damage?} == 7 ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect|The energy attack fries the leg, leaving it a mess of blackened flesh. The leg is broken and until repaired, the target counts as having lost the leg. He suffers 1d5 levels of Fatigue. He must also make a Challenging (+0) Toughness test or be Stunned for 1 round. He now suffers the Lost Leg condition (see page 243). --?? ?{Crit damage?} == 8 ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect| Energy sears through the bone, causing the leg to be severed. The target suffers 1d10 levels of Fatigue and suffers Blood Loss. He must also make a Challenging (+0) Toughness test or be Stunned for 1 round. He now suffers the Lost Leg condition (see page 243). --?? ?{Crit damage?} == 9 ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect| The force of the attack reduces the leg to little more than a chunk of sizzling gristle. The target must make a Challenging (+0) Toughness test or die from shock. He now suffers the Lost Leg condition (see page 243). --?? ?{Crit damage?} >= 10 ?{Location} == Leg AND ?{Type?} == Energy ?? !Effect|In a terrifying display of power, the leg immolates and thick fire consumes the target completely. He dies in a matter of agonising seconds, his scorched corpse surrounded with smoke and flames. --?? ?{Crit damage?} == 1 AND ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|The attack strikes the target’s limb with a powerful blow. He drops anything he was holding in that hand. --?? ?{Crit damage?} == 2 AND ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|The strike leaves a deep bruise, possibly causing minor fractures in the arm. The target suffers 1 level of Fatigue. --?? ?{Crit damage?} == 3 AND ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|The impact smashes into the arm or whatever the target is holding, ripping it away and leaving the target reeling from the pain. He is Stunned for 1 round and drops anything he was holding in that hand. Roll 1d10; on a result of 1, anything the target was holding in that hand is badly damaged and unusable until repaired. --?? ?{Crit damage?} == 4 AND?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|The impact crushes flesh and bone. The target drops anything he was holding in that hand, and must make a Challenging (+0) Toughness test or suffer 1d10 Weapon Skill and 1d10 Ballistic Skill damage. --?? ?{Crit damage?} == 5 AND ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|Muscle and bone take a pounding as the attack rips into the arm. The limb is Useless until the target receives medical attention. --?? ?{Crit damage?} == 7 AND ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|The attack pulverises the target’s hand, crushing and breaking 1d5 fingers. The target suffers 1 level of Fatigue. He must make a Challenging (+0) Toughness test; if he fails, permanently reduce his Weapon Skill and Ballistic Skill characteristics by 2. --?? ?{Crit damage?} == 7 ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|With a loud snap, the arm bone is shattered and left hanging limply at the target’s side, dribbling blood onto the ground. The target suffers Blood Loss. The arm is Useless until the target receives medical attention. --?? ?{Crit damage?} == 8 ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|The force of the attack takes the arm off just below the shoulder, showering blood and gore across the ground. The target must immediately make a Challenging (+0) Toughness test or die from shock. If he survives, he suffers 1d5 levels of Fatigue, is Stunned for 1d10 rounds, and suffers Blood Loss. He also now suffers from the Lost Arm condition (see page 242). --?? ?{Crit damage?} == 9 ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|In a rain of blood, gore, and meat, the target’s arm is removed from his body. Screaming incoherently, he twists about in agony for a few seconds before collapsing to the ground and dying. --?? ?{Crit damage?} >= 10 ?{Location} == Arm AND ?{Type?} == Impact ?? !Effect|As per the effect directly above, except as the arm is removed by the force of the attack, bone, chunks of flesh, clothing, and armour fragments fly about like blood-soaked shrapnel. Each target within 2 metres suffers a single hit for 1d5–3 Impact damage to a randomly determined Hit Location. --?? ?{Crit damage?} == 1 AND ?{Location} == Head AND ?{Type?} == Impact ?? !Effect|The impact fills the target’s head with a terrible ringing noise. The target must make a Challenging (+0) Toughness test or suffer 1 level of Fatigue. --?? ?{Crit damage?} == 2 AND ?{Location} == Head AND ?{Type?} == Impact ?? !Effect|The hit causes the target’s sight to blur and his head to spin. The target suffers a –10 penalty to Perception and Intelligence tests for 1d5 rounds. --?? ?{Crit damage?} == 3 AND ?{Location} == Head AND ?{Type?} == Impact ?? !Effect|The attack cooks off the target’s ear, leaving him with a partially burned stump of cartilage. He is Deafened for 1d5 hours (or until he receives medical attention). --?? ?{Crit damage?} == 4 AND?{Location} == Head AND ?{Type?} == Impact ?? !Effect|The energy attack burns away all of the hairs on the target’s head, as well as leaving him reeling from the injury. The target suffers 2 levels of Fatigue and the target is Blinded for 1d5 rounds. --?? ?{Crit damage?} == 5 AND ?{Location} == Head AND ?{Type?} == Impact ?? !Effect|A blast of energy envelops the target’s head, burning his face and hair, crisping his skin, and causing him to scream like a stuck grox. In addition to losing all hair on his scalp and face, he is Blinded for 1d10 rounds and Stunned for 1 round. Permanently reduce the target’s Fellowship characteristic by 1. --?? ?{Crit damage?} == 6 AND ?{Location} == Head AND ?{Type?} == Impact ?? !Effect|The attack cooks the target’s face, melting his features and damaging his eyes. The target suffers 1d5 levels of Fatigue and is Blinded for 1d10 hours. Permanently reduce his Fellowship and Perception characteristics by 1d5.Toughness test or suffer the Lost Hand condition (see page 242). --?? ?{Crit damage?} == 7 ?{Location} == Head AND ?{Type?} == Impact ?? !Effect|In a gruesome display, the flesh is burned from the target’s head, exposing charred bone and muscle underneath. The target suffers 1d10 levels of Fatigue. He is Blinded permanently. Roll 1d10; this is the target’s new Fellowship characteristic value. If his Fellowship value is already 10 or lower, this can be skipped as no one would notice any difference in his behaviour and demeanour. --?? ?{Crit damage?} == 8 ?{Location} == Head AND ?{Type?} == Impact ?? !Effect| The target’s head is destroyed in a conflagration of fiery death. He does not survive. --?? ?{Crit damage?} == 9 ?{Location} == Head AND ?{Type?} == Impact ?? !Effect| Superheated by the attack, the target’s brain explodes, tearing apart his skull and sending flaming chunks of meat flying at those nearby. The target is very, very dead. --?? ?{Crit damage?} >= 10 ?{Location} == Head AND ?{Type?} == Impact ?? !Effect|As above, except the target’s entire body catches fire and runs off headless 2d10 metres in a random direction (use the Scatter Diagram on page 230). Anything flammable it passes, including characters, must make a Challenging (+0) Agility test or catch fire (see page 243). --?? ?{Crit damage?} == 1 AND ?{Location} == Body AND ?{Type?} == Impact ?? !Effect|A blow to the target’s body steals the air from his lungs. The target can take only a Half Action on his next turn. --?? ?{Crit damage?} == 2 AND ?{Location} == Body AND ?{Type?} == Impact ?? !Effect|The blast punches the air from the target’s body. He must make a Challenging (+0) Toughness test or be knocked Prone. --?? ?{Crit damage?} == 3 AND ?{Location} == Body AND ?{Type?} == Impact ?? !Effect|The attack cooks the flesh on the chest and abdomen. He suffers 2 levels of Fatigue and 1d5 Toughness damage. --?? ?{Crit damage?} == 4 AND?{Location} == Body AND ?{Type?} == Impact ?? !Effect|The energy ripples all over the character, scorching his body with horrid third-degree burns. The target suffers 1d10 levels of Fatigue, and can only take a Half Action on his next turn. --?? ?{Crit damage?} == 5 AND ?{Location} == Body AND ?{Type?} == Impact ?? !Effect|The fury of the attack forces the target to the ground, helplessly covering his face and keening in agony. The target is knocked Prone and must make a Challenging (+0) Agility test or catch fire (see page 243). The target must also make a Challenging (+0) Toughness test or be Stunned for 1 round. --?? ?{Crit damage?} == 6 AND ?{Location} == Body AND ?{Type?} == Impact ?? !Effect|Struck by the full force of the attack, the target is sent reeling to the ground; smoke spiraling out from the wound. The target suffers 1d5 levels of Fatigue, is knocked Prone, and is Stunned for 1d10 rounds. In addition, he must make a Challenging (+0) Agility test or catch fire (see page 243). --?? ?{Crit damage?} == 7 ?{Location} == Body AND ?{Type?} == Impact ?? !Effect|The intense power of the energy attack cooks the target’s organs, burning his lungs and heart with intense heat. The target is Stunned for 2d10 rounds, and his Toughness characteristic is permanently reduced by 1d10. --?? ?{Crit damage?} == 8 ?{Location} == Body AND ?{Type?} == Impact ?? !Effect| As the attack washes over the target, his skin turns black and peels off, while melted fat seeps from his clothing and armour. The target is Stunned for 2d10 rounds. His Strength, Toughness, and Agility characteristics are reduced by half (rounding up) until he receives medical treatment. Permanently reduce the character’s Fellowship characteristic by 2d5. --?? ?{Crit damage?} == 9 ?{Location} == Body ?? !Effect| The target is completely encased in fire, melting his skin and bursting his eyes like superheated eggs. He falls to the ground a lifeless corpse, blackened and charred with horrid burns --?? ?{Crit damage?} >= 10 ?{Location} == Body AND ?{Type?} == Impact ?? !Effect|As above, but if the target is carrying any ammunition, roll 1d10: on a result of 6 or higher, it explodes. Each target within 1d5 metres suffers a single hit for 1d10+5 Explosive damage to a randomly determined Hit Location. If the target carried any grenades or missiles, these detonate on the character’s corpse with their normal effects one round after his demise. --?? ?{Crit damage?} == 1 AND ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect|The blast of energy sears the flesh and bone of the target’s leg, leaving a nasty burn scar. The target cannot use the Run or Charge actions for 2 rounds. --?? ?{Crit damage?} == 2 AND ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect|The attack flash-fries the target’s leg, cooking chunks of flesh into char. The target must pass a Challenging (+0) Toughness test or suffer 1 level of Fatigue. --?? ?{Crit damage?} == 3 AND ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect|A solid blow to the leg sends currents of agony coursing through the target. The target suffers 1 level of Fatigue and is knocked Prone. Reduce his Movement by half (rounding up) for 1d10 rounds. --?? ?{Crit damage?} == 4 AND?{Location} == Leg AND ?{Type?} == Impact ?? !Effect|The blast causes a nasty compound fracture in the target’s leg. Until the target receives medical attention, reduce his Movement by half (rounding up), and he cannot use the Run or Charge actions. --?? ?{Crit damage?} == 5 AND ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect|The target’s leg endures horrific burn damage, fusing clothing and armour with flesh and bone. The target suffers 1 level of Fatigue and is knocked Prone. Reduce his Movement by half (rounding up) for 2d10 rounds. --?? ?{Crit damage?} == 6 AND ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect|The attack burns the target’s foot, charring the flesh and emitting a foul aroma. The target suffers 2 levels of Fatigue. He must also make a Challenging (+0) Toughness test. If he succeeds, reduce his Movement by half (rounding up) until he receives medical attention; if he fails, he suffers the Lost Foot condition (see page 243). --?? ?{Crit damage?} == 7 ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect|The energy attack fries the leg, leaving it a mess of blackened flesh. The leg is broken and until repaired, the target counts as having lost the leg. He suffers 1d5 levels of Fatigue. He must also make a Challenging (+0) Toughness test or be Stunned for 1 round. He now suffers the Lost Leg condition (see page 243). --?? ?{Crit damage?} == 8 ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect| Energy sears through the bone, causing the leg to be severed. The target suffers 1d10 levels of Fatigue and suffers Blood Loss. He must also make a Challenging (+0) Toughness test or be Stunned for 1 round. He now suffers the Lost Leg condition (see page 243). --?? ?{Crit damage?} == 9 ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect| The force of the attack reduces the leg to little more than a chunk of sizzling gristle. The target must make a Challenging (+0) Toughness test or die from shock. He now suffers the Lost Leg condition (see page 243). --?? ?{Crit damage?} >= 10 ?{Location} == Leg AND ?{Type?} == Impact ?? !Effect|In a terrifying display of power, the leg immolates and thick fire consumes the target completely. He dies in a matter of agonising seconds, his scorched corpse surrounded with smoke and flames. }} you could put the text on a table then make a call to the table using the values. I do this for my critical fumbles.  --?? $Atk.base == 1 ?? !|**Fumble:** [[ [TXT] 1t[CFM] ]]  The above command looks at the base roll compares it to 1 and if equal then print in chat Fumble then look at a table called CFM. You can break these down into different table Leg Body Head Arm etc. Note sure if it will help or not let me know. 
The first Macro States that there is a target in it  Khaali . said: Hello, I have a problem with Powercard + Alterbar It's a macro for an action on a a token that should not need a target: !power {{   --tokenid|@{selected|token_id}   --emote|@{selected|character-name} cast the spell (...... passing on details)   --alterbar|_target|@{selected|token_id} _bar|3 _amount|+1d1 _show|all }} when I use the macro, it works but it asks the player to select a target... but nowhere in the macro do I ask for a target (there is only effect on the selected token) Oddly, the following macro works fine (it doesn't ask for a target): !power {{   --tokenid|@{selected|token_id}   --emote|@{selected|character-name} cast the spell (...... passing on details, exactly the same as above) }} !alter --target|@{selected|token_id} --bar|3 --amount|+1d1 _show|all Does someone know why the first macro ask for a target? _target
Hi! total noob here! I am trying to make token-mod work with power cards3 I wanted to have a query inside the power card to choose between 4 options which will modify the selected token's aura into different colors. so far browsing these forums, I came up with this !power {{ --titlefontshadow|-1px -1px 0 #000000, 1px -1px 0 #000000, -1px 1px 0 #000000, 1px 1px 0 #000000 --bgcolor|#274e13 --txcolor|#ffffff --name|Stance --leftsub|Buff --rightsub|Self --tokenid|@{selected|token_id} --emote|@{selected|character_name} uses a STANCE --?? $stance == 0 ?? |~C//**Ferocious//**~C --?? $stance == 1 ?? |~C//**Controlled//**~C --?? $stance == 2 ?? |~C//**Defensive//**~C --?? $stance == 3 ?? |~C//**Reckless//**~C --?? $stance == 4 ?? |~C//**No Stance//**~C --hroll|[[ [$stance] ?{Type|Ferocious, 0|Controlled, 1|Defensive, 2|Reckless, 3|No Stance, 4} +0d0 ]] --?? $stance == 0 ?? Result:|@{character_name} gains [[2]] Lakas whenever  he/she uses a power. (Note: Each increase of Lakas can stack and can go beyond your maximum Lakas value. Your gained lakas lasts until the end of combat or until you switch to a different Stance). --api_token-mod*1|_ids @{selected|token_id} _set aura1_color|#674ea7 aura1_radius|.25   --?? $stance == 1 ?? Result:|@{character_name} draws [[4]] extra cards on your Attack Resolutions and you draw [[2]] extra cards whenever you perform a Trial of Fate. --api_token-mod*1|_ids @{selected|token_id} _set aura1_color|#00ff00 aura1_radius|.25  --?? $stance == 2 ?? Result:|@{character_name} gains [[2]] Deflection for each enemy within melee range that you’re currently engaged in combat with. Your melee and ranged attacks deal [[1]] damage less. --api_token-mod*2|_ids @{selected|token_id} _set aura1_color|#00ffff aura1_radius|.25  --?? $stance == 3 ?? Result:|@{character_name} Double your movement speed and each of your successful melee attacks deals [[3]] extra (weapon damage type) damage. Damage taken from all sources is increased by [[1]]. --api_token-mod*3|_ids @{selected|token_id} _set aura1_color|#ff0000 aura1_radius|.25  --?? $stance == 4 ?? Result:|@{character_name} is no longer in any stance --api_token-mod*4|_ids @{selected|token_id} _set aura1_color|#000000 aura1_radius|.25  }} The result I got is: the description is spot on what I want it after choosing an option, but the colors rotate from the first token mod and ends on the 5th. it never stays on a specific tokenmod color I intended. I also tried removing the *1 *2 etc tags which renders the token mod non functional. also I tried doing this: !power {{ --titlefontshadow|-1px -1px 0 #000000, 1px -1px 0 #000000, -1px 1px 0 #000000, 1px 1px 0 #000000 --bgcolor|#274e13 --txcolor|#ffffff --name|Stance --leftsub|Buff --rightsub|Self --tokenid|@{selected|token_id} --emote|@{selected|character_name} uses a STANCE --?? $stance == 0 ?? |~C//**Ferocious//**~C --?? $stance == 1 ?? |~C//**Controlled//**~C --?? $stance == 2 ?? |~C//**Defensive//**~C --?? $stance == 3 ?? |~C//**Reckless//**~C --?? $stance == 4 ?? |~C//**No Stance//**~C --hroll|[[ [$stance] ?{Type|Ferocious, 0|Controlled, 1|Defensive, 2|Reckless, 3|No Stance, 4} +0d0 ]] --?? $stance == 0 ?? Result:|@{character_name} gains [[2]] Lakas whenever  he/she uses a power. (Note: Each increase of Lakas can stack and can go beyond your maximum Lakas value. Your gained lakas lasts until the end of combat or until you switch to a different Stance).  --?? $stance == 1 ?? Result:|@{character_name} draws [[4]] extra cards on your Attack Resolutions and you draw [[2]] extra cards whenever you perform a Trial of Fate.  --?? $stance == 2 ?? Result:|@{character_name} gains [[2]] Deflection for each enemy within melee range that you’re currently engaged in combat with. Your melee and ranged attacks deal [[1]] damage less.  --?? $stance == 3 ?? Result:|@{character_name} Double your movement speed and each of your successful melee attacks deals [[3]] extra (weapon damage type) damage. Damage taken from all sources is increased by [[1]].  --?? $stance == 4 ?? Result:|@{character_name} is no longer in any stance  --?? $stance == 0 ?? --api_token-mod|_ids @{selected|token_id} _set aura1_color|#674ea7 aura1_radius|.25   --?? $stance == 1 ?? --api_token-mod*1|_ids @{selected|token_id} _set aura1_color|#00ff00 aura1_radius|.25  --?? $stance == 2 ?? --api_token-mod*2|_ids @{selected|token_id} _set aura1_color|#00ffff aura1_radius|.25  --?? $stance == 3 ?? --api_token-mod*3|_ids @{selected|token_id} _set aura1_color|#ff0000 aura1_radius|.25  --?? $stance == 4 ?? --api_token-mod*4|_ids @{selected|token_id} _set aura1_color|#000000 aura1_radius|.25  }} which also brings me to the same problem of rotating colors. Any leads or tips would be much appreciated.
Pretty sure you're not supposed to have --api_token-mod... but rather after the double question marks, the -- is implied, so should be: --?? $stance == 0 ?? api_token-mod|...
Cindurion said: Pretty sure you're not supposed to have --api_token-mod... but rather after the double question marks, the -- is implied, so should be: --?? $stance == 0 ?? api_token-mod|... Thank you! This saved me!
Good day! I have another dilemma with power cards. It pertains to Powercard Status List Handout The instruction indicates that we should type the tags on the empty space for text like this Sample|sample Flight|fluffy-wings Fear|broken-heart Dazed|half-haze But When I pull then in the power card macro like this to test !power {{ --[+Fear] }} It does not pull the icon I need. I felt dizzy searching the threads. I found snippets on how to make it work. I pasted a whole list from one of the forum but the first and last line won't pull the correct icon  Bless|angel-outfit Rage|screaming Blind|bleeding-eye Charmed|chained-heart Dead|dead Afraid|screaming Deaf|interdiction Grap|grab Invis|ninja-mask Paralyzed|aura Petrified|aura Poison|skull Prone|back-pain Restrained|fishing-net Stunned|sleepy Unconscious|sleepy And when I try to edit the list, all of them them seems to be disabled and Cannot pull the Icons. Thank you for any answer to this.
1588868482

Edited 1588868693
Russ said: Good day! I have another dilemma with power cards. It pertains to Powercard Status List Handout The instruction indicates that we should type the tags on the empty space for text like this Sample|sample Flight|fluffy-wings Fear|broken-heart Dazed|half-haze But When I pull then in the power card macro like this to test !power {{ --[+Fear] }} It does not pull the icon I need. I felt dizzy searching the threads. I found snippets on how to make it work. I pasted a whole list from one of the forum but the first and last line won't pull the correct icon  Bless|angel-outfit Rage|screaming Blind|bleeding-eye Charmed|chained-heart Dead|dead Afraid|screaming Deaf|interdiction Grap|grab Invis|ninja-mask Paralyzed|aura Petrified|aura Poison|skull Prone|back-pain Restrained|fishing-net Stunned|sleepy Unconscious|sleepy And when I try to edit the list, all of them them seems to be disabled and Cannot pull the Icons. Thank you for any answer to this. Here is my list  Make sure it is named "PowerCard Status List" with out quotes Bless|angel-outfit Rage|screaming Blind|bleeding-eye Charmed|chained-heart Dead|dead Afraid|screaming Deaf|interdiction Grap|grab Invis|ninja-mask Paralyzed|aura Petrified|aura Poison|skull Prone|back-pain Restrained|fishing-net Stunned|sleepy Unconscious|sleepy Then i use macro like this to set and explain the condition.  This macro is called ConditionStunnedSet . !token-mod {{ --set statusmarkers|sleepy }} !power {{ --corners|10 --format|Conditions --name|Condition --leftsub|@{Selected|character_name} --rightsub|You are Stunned --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. }} I use this macro to call a list of conditions so I can set then for the targeted token. !power {{ --titlefontshadow|none --whisper|GM --corners|10 --format|Conditions --name|Conditions --leftsub|Set Conditions --rightsub| Remove Condition --Show Symbols|~R [Show](! #GM:ConditionSymbols) ~R --Blind|~R [Set](! #ConditionBlindSet) [Remove](! #ConditionBlindRemove) ~R --Charmed|~R [Set](! #ConditionCharmedSet) [Remove](! #ConditionCharmedRemove) ~R --Deafened|~R [Set](! #ConditionDeafSet) [Remove](! #ConditionDeafRemove) ~R --Frightened|~R [Set](! #ConditionFrightenedSet) [Remove](! #ConditionFrightenedRemove) ~R --Grappled|~R [Set](! #ConditionGrappledSet) [Remove](! #ConditionGrappledRemove) ~R --Invisibility|~R [Set](! #ConditionInvisibilitySet) [Remove](! #ConditionInvisibilityRemove) ~R --Paralyzed|~R [Set](! #ConditionParalyzedSet) [Remove](! #ConditionParalyzedRemove) ~R --Petrified|~R [Set](! #ConditionPetrifiedSet) [Remove](! #ConditionPetrifiedRemove) ~R --Poisoned|~R [Set](! #ConditionPoisonedSet) [Remove](! #ConditionPoisonRemove) ~R --Prone|~R [Set](! #ConditionProneSet) [Remove](! #ConditionProneRemove) ~R --Restrained|~R [Set](! #ConditionRestrainedSet) [Remove](! #ConditionRestrainedRemove) ~R --Stunned|~R [Set](! #ConditionStunnedSet) [Remove](! #ConditionStunnedRemove) ~R --Unconscious|~R [Set](! #ConditionUnconsciousSet) [Remove](! #ConditionUnconsciousRemove) ~R --Darkvision|~R [Set](! #Darkvision) ~R --Blind Sight|~R [Set](! #BlindSight) ~R --Dying|~R [Set](! #ConditionDying) ~R --Stabilized|~R [Set](! #ConditionStabilized) ~R }} Screen Shots 
Looking to mod some of my macros. Try to get ( Prof, Stat and magic stored) in [$Bns] and this part works. then make [$ATK] = to 1d20 + [^Bns] but its not adding Bns to the atk roll. !power {{ --charid|@{selected|character_id} --tokenid|@{selected|token_id} --target_list|@{target|token_id} --emote|@{selected|token_name} ^^ attacks ^^ @{target|token_name} --format|atwill --name|GreatAxe (Silver) Vicious --leftsub|Melee Attack --rightsub|GreatAxe, Silver Plate, Vicious --Bonus|[[ [$Bns] 1d0 + [[@{selected|strength_mod}]] [STR] + [[@{selected|pb}]] [PROF] + 1 [magic] ]] --Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + [^Bns] | Advantage, 2d20KH1 + [^Bns] | Disadvantage, 2d20KL1 + [^Bns] } ]] vs **AC** [[@{target|ac}]] --?? $Atk < @{target|ac} ?? !Missed|**You missed!** --?? $Atk >= @{target|ac} AND $Atk.base <> 20 ?? Hit:|[[ [XPND] [$Dmg] 1d12 + [[@{selected|strength_mod}]] ]] slashing damage --?? $Atk >= @{target|ac} AND $Atk.base <> 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all --?? $Atk.base == 20 ?? Critical Hit:|[[ [XPND] [$CritDmg] 2d12+[[@{selected|strength_mod}]] + 2d6 [Vic] ]] slashing damage --?? $Atk.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all --?? $Atk.base == 1 ?? !|**Fumble:** [[ [TXT] 1t[CFM] ]] }} any help would be greatly appreciated.  Craven
Craven said: Looking to mod some of my macros. Try to get ( Prof, Stat and magic stored) in [$Bns] and this part works. then make [$ATK] = to 1d20 + [^Bns] but its not adding Bns to the atk roll. any help would be greatly appreciated.  Craven Unfortunately I don't think you can "nest" rolls in PowerCards.  Although it seems like a pain, I think your only option is to replace [^Bns] in the ATK roll with the Prof, Stat, and magic stored.
How do I change the format of the PowerCards using the pchelper and replacements? I added the PowerCard Formats handout. Below is my current list.  atwill: --txcolor|#FFFFFF --bgcolor|#3D59AB --titlefontshadow|none --corners|10 encounter: --txcolor|#FFFFFF --bgcolor|#440000 --titlefontshadow|none --corners|10 default: --txcolor|#FFFFFF --bgcolor|#0000EE --titlefontshadow|none --corners|10 item: --txcolor|#FFFFFF --bgcolor|#e58900 --titlefontshadow|none --corners|10 recharge: --txcolor|#FFFFFF --bgcolor|#000044 --titlefontshadow|none --corners|10 GM: --txcolor|#030303 --bgcolor|#7171C6 --titlefontshadow|none --corners|10 Dice: --txcolor|#FFFFFF --bgcolor|#175b76 --titlefontshadow|none --corners|10 Conditions: --txcolor|#FFFFFF --bgcolor|#800000 --titlefontshadow|none --corners|10 Green: --txcolor|#FFFFFF --bgcolor|#16541c --titlefontshadow|none --corners|10 badguys: --txcolor|#FFFFFF --bgcolor|#175b76 --titlefontshadow|none --corners|10 SpellBook: --txcolor|#FFFFFF --bgcolor|#7c08dd --titlefontshadow|none --corners|10
Need to call the format in PC !power {{ --format|atwill rest of stuff
Ya I know that I am looking to replace it within the templates. 
Hi there people, I'm trying to go conditionnal in the power cards. But I can't get the correct macro output though. Here's the macro : !power {{ --hroll|[[ [$MP] 1D0 +?{Pouvoir surchargé?|Oui,1|Non,0}]]      --?? $MP == 1 ?? Pouvoir plus instable (90% des chance de causer un phénomène Warp):|[[ [$warp90] 1D10]]      --?? $MP == 0 ?? Pouvoir plus stable (10% des chance de causer un phénomène Warp) :|[[ [$warp10] 1D10]]          --?? $warp90 == 1 ?? Le warp est stable|Le pouvoir demeure stable malgré le déchaînement.          --?? $warp90 > 1 ?? Le warp réagit:|perturbation dans la tempête          --?? $warp10 > 1 ?? le warp est immobile|Le pouvoir demeure stable dans le calme          --?? $warp10 == 1 ?? Le warp est en tumulte:|explosion dans le clame }} Here's the output : This result tells me that both the warp90 and warp10 get fired. But it should normally be one or the other. What am I doing wrong? Thanks.
Try (with out the underline) --?? $MP .total == 1 ?? Stuff here
I think the issue is that the rolls you make for warp90/warp10 will always be visible to the rest of the macro no matter where you put them. If you want this to work the way you want you would probably need to add this to your code: --?? $warp90 == 1 AND $MP == 1 ?? Le warp est stable|Le pouvoir demeure stable malgré le déchaînement. --?? $warp90 > 1 AND $MP == 1 ?? Le warp réagit:|perturbation dans la tempête --?? $warp10 > 1 AND $MP == 0 ?? le warp est immobile|Le pouvoir demeure stable dans le calme --?? $warp10 == 1 AND $MP == 0 ?? Le warp est en tumulte:|explosion dans le clame
1589808023

Edited 1589808349
-G-
Pro
Thanks for the input guys. Cindurion, it's worked A1. It's now proposing me the right result. I'm now wondering why I can't get the hroll| info right... When I put this : !power {{ --hroll|[[ [$MS] [NH] 4df - @{selected|will} + ?{Surcharge?|Non,0|-4 NP,+4|-3 NP,+3|-2 NP,+2|-1 NP, 1|+1 NP,-1|+2 NP,-2|+3 NP,-3|+4 NP,-4} -?{Niveau de difficulté?|0|+1|+2|+3}]]      --?? $MS < 0 ?? Test de volontée|[^MS] degré d'échec      --?? $MS >= 0 ?? Test de volonté:|[^MS] degré de succès --hroll|[[ [$MP] 1D0 +?{Pouvoir surchargé?|Non,0|Oui,1}]]      --?? $MP == 1 ?? $Pouvoir plus instable (90% des chance de causer un phénomène Warp):|[[  [$warp90] 1D10]]      --?? $MP == 0 ?? $Pouvoir plus stable (10% des chance de causer un phénomène Warp) :|[[ [$warp10] 1D10]]      --?? $warp90 == 1 AND $MP == 1 ?? !À roulé un "1!|Le pouvoir surchargé demeure stable.      --?? $warp90 > 1 AND $MP == 1 ?? !À roulé un 2+:|Le pouvoir surchargé cause un phénomène psychique.      --?? $warp10 > 1 AND $MP == 0 ?? !À roulé un 2+|Le pouvoir non-surchargé ne cause aucun phénomène psychique.      --?? $warp10 == 1 AND $MP == 0 ?? !à roulé un "1":|Le pouvoir non-surchargé cause un phénomène psychique. }} I get : So, this means that the second hroll : " [[ [$MP] 1D0 +?{Pouvoir surchargé?|Non,0|Oui,1}]]"   is processed in the right way. But, the first one (hroll :  [[ [$MS] [NH] 4df -stuff ] ]   is not written at all in the output. Normally, it should show along the line of "Will test : [^MS] degree of success" I've thought about the fact that having two "hroll" tag could cause problem. So I've tried a few options. As soon as I change the second "hroll" tag, it works. But the fact that it forces me to choose between which tag I want to hide is problematic. I seems that I can't have both at the same time. (Which is the thing I'm looking for) Any idea how I can bypass this?
Yeah, Powercards can only have one hroll command. However, there's nothing stopping you from adding the second hroll right after the first: --hroll|[[ [$MS] [NH] 4df - @{selected|will} + ?{Surcharge?|Non,0|-4 NP,+4|-3 NP,+3|-2 NP,+2|-1 NP, 1|+1 NP,-1|+2 NP,-2|+3 NP,-3|+4 NP,-4} -?{Niveau de difficulté?|0|+1|+2|+3}]] [[ [$MP] 1D0 +?{Pouvoir surchargé?|Non,0|Oui,1}]]
Cindurion said: Yeah, Powercards can only have one hroll command. However, there's nothing stopping you from adding the second hroll right after the first: --hroll|[[ [$MS] [NH] 4df - @{selected|will} + ?{Surcharge?|Non,0|-4 NP,+4|-3 NP,+3|-2 NP,+2|-1 NP, 1|+1 NP,-1|+2 NP,-2|+3 NP,-3|+4 NP,-4} -?{Niveau de difficulté?|0|+1|+2|+3}]] [[ [$MP] 1D0 +?{Pouvoir surchargé?|Non,0|Oui,1}]] You changed my life...
Is it possible to put a button in a power card?
Brian N. said: Is it possible to put a button in a power card? Totally. It  can refer to characters ability, macro, etc. 
G said: Brian N. said: Is it possible to put a button in a power card? Totally. It  can refer to characters ability, macro, etc.  Can you give me or point me to some guidance as to how to do that?
!power {{ --name|SOMETHING --1|[Button name 1](~character_name|reference_macro) }} Something that I do so when I know the PC is looking at the macro The PC's macro... !power {{ --format|mitem --whisper|self --name|S P R I N G^^ Holy Avenger +3 --leftsub|At your command --rightsub|Master --1|**[Swing Spring](~Elias|swing-HolySword)** ^^**2 [Swing Spring vs CE Opponent](~Elias|swing-HolySword-E)** --3|**[Magic Resistance](~Elias|HS-res) / [Dispel Magic](~Elias|HS-dm)** }} !power {{ --format|mitem --whisper|GM --name|SPRING --leftsub|in use }} He can click on the buttons to use the macros for the Holy Avenger But it whispers me that he is looking at the sword to do something. Very useful in situations as a GM.... :)
1589927479

Edited 1589927671
I would see just the top part. But the PC would see the buttons.... and not the top part... The weapon has a personality.. so I need to do this..as a GM Just so I can notify PC of information if necessary.
Heyas! Doing a little cross-posting from the TokenMod thread to here. :) Is it possible to use pass-through variables from Powercards with Tokenmod? I'm trying to set up an AOE heal for one of my players so he can select the related tokens and it will automatically update everyone's hit points. This is what I'm trying: !power {{  --name|Burst Heal  --!Howmuch|//The priest heals everyone around him for [[ [$Pwr] 1d10+8 ]] points.//  --api_token-mod| _set bar1|+[^Pwr] }} Thanks!
The Aaron figured it out. I need to pass through the token ids as well so here is what I did if anyone else has this: --api_token-mod| _set bar1_value|+[^Pwr] _ids @{target|1|token_id} _ids @{target|2|token_id} _ids @{target|3|token_id} _ids @{target|4|token_id} _ids @{target|5|token_id} _ids @{target|6|token_id} If the cleric has less than 6 targets, he can just click a token more than once. 
1590215742

Edited 1590215805
Hi guys, hopefully a simple question. We have a fighter with a couple of abilities which I'd like to 'call upon' using a menu structure, however, when I pop them into the Powercard, the 'button' formatting stops working and the button doesn't work. In the example below, the first bit 'Attacks' works perfectly, but in the 'Special' section, formatted in the same way, they do not work.... Specifically, why is... --Attacks:| [@{selected|repeating_attack_$0_atkname}](~selected|repeating_attack_$0_attack) [@{selected|repeating_attack_$1_atkname}](~selected|repeating_attack_$1_attack) ...working any differently to... --Special:| [Superiority Dice](~Ravna Wilder|Superiority_Dice) [Hellish Rebuke](~Ravna Wilder|Hellish-Rebuke) Any help would be appreciated! Thanks
Update - Now I'm even more confused. In the image below, does anyone know why some are showing as buttons (correctly) and the others as links (which break if click them)?
Just a quick question people, it is in regards to formatting the power cards. I have the correct handout as far as I can tell and am calling the script, but nothing will change, I have changed the name of atwill to other names such as lootcolor, lootroll ect but the colour will not change for anything, am i missing something very simple?  
1590361459

Edited 1590526287
Hello everyone. Quite new on Roll20 Pro, I'm trying to create some scripts for my players... and I'm struggling a looooooottttttt... I made one for my barbarian, and now I'm trying to do so for my rogue... I found some information, especially in old posts from Silvyre, but at the end it doesn't work at all works partially ! : !power {{ --tokenid|@{selected|token_id} --emote|**@{selected|token_name}** tente d'entailler @{target|character_name} --target_list|@{target|token_id} --name|Epée courte MD --leftsub|Action d'Attaque --rightsub|CàC 1,5m --hroll|[[ [$AttSour] 0d0 + ?{Attaque Sournoise|Oui, 1|Non, 0} ]] --Attaque|[[ [$Atq] ?{Type de jet?| Normal, 1d20ro<1cs>20 | Avantage, 2d20ro<1cs>20kh1 | Désavantage, 2d20ro<1cs>20kl1} + [Mod. Spé] ?{Modif spécial à l'attaque ?|0} + [DEX] [[@{selected|dexterity_mod}]] + [Maîtrise] [[@{selected|pb}]] ]} ]] vs CA --?? $Atq.base == 1 ?? !EchecCritique:|**Echec Critique** --?? $Atq.base >= 2 AND $Atq.total < @{target|npc_ac} ?? !Miss:|Raté ! --?? $Atq.total >= @{target|npc_ac} ?? vfx_opt|@{target|token_id} glow-blood --?? $Atq.total >= @{target|npc_ac} AND $Atq.base <> 1 AND $Atq.base <> 20 ?? Dégâts :|[[ [$Dgts] 1d6 + [DEX] @{selected|dexterity_mod}]] dégâts tranchants --?? $Atq.total >= @{target|npc_ac} AND $Atq.base <> 1 AND $Atq.base <> 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dgts] _show|all --?? $Atq.base == 20 ?? Coup critique :|[[ [$DgtsCrit] 2d6 + [DEX] @{selected|dexterity_mod}]] dégâts tranchants --?? $Atq.base == 20 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^DgtsCrit] _show|all --?? $Atq.total >= @{target|npc_ac} AND $Atq.base <> 1 AND $Atq.base <> 20 AND $AttSour == 1 ?? !AttSour| **+** [[ [$DgtsAttSour] (@{selected|level}/2)d6]] dégâts d'attaque sournoise --?? $Atq.total >= @{target|npc_ac} AND $Atq.base <> 1 AND $Atq.base <> 20 AND $AttSour == 1 ?? alterbar2|_target|@{target|token_id} _bar|1 _amount|-[^DgtsAttSour] _show|all --?? $Atq.base == 20 AND $AttSour == 1 ?? !AttSourCrit| **+** [[ [$DgtsCritAttSour] @{selected|level}d6]] dégâts d'attaque sournoise, un coup bien placé ! --?? $Atq.base == 20 AND $AttSour == 1 ?? alterbar3|_target|@{target|token_id} _bar|1 _amount|-[^DgtsCritAttSour] _show|all }} I found another part supposed to deal with the "2 weapon fighting" stuff in the same script, but for now I didn't even try to use it because the first part is still KO... This second part is supposed to be something like this : ? {Two-Weapon Fighting| No, | Yes,     --hrolls|[[ [$Sneak2] ?{Off-hand Sneak Attack|No, 0|Yes, 1} + 0d0 ]]     --Off-hand Attack:|[[ [$Atk2] ?{Off-hand Attack|Standard, 1d20|w/Advantage, 2d20KH1|w/Disadvantage, 2d20KL1} + 4 [Dex Mod] + 2 [Proficiency] ]] vs AC     -- ?? $Atk2.base == 1 ?? Off-hand Critical Fail:|[[ [txt] 1t[CFM] ]]     -- ?? $Atk2.base <> 1 AND $Atk2.total < [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 ?? !Off-hand Miss|You missed.     -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 ?? Off-hand Hit:|[[1d4]] Piercing damage     -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 AND $Sneak2 == 1 AND $Sneak == 0 ?? !Off-hand SneakAtk|^* **+** [[2d6]] Sneak Attack Damage     -- ?? $Atk2.base == 20 ?? !Off-hand CritHit|^* **+** [[2d4]] critical piercing damage     -- ?? $Atk2.base == 20 AND $Sneak2 == 1 AND $Sneak == 0 ?? !Off-hand CritSneak|^* **+** [[4d6]] critical sneak attack damage } }} Is there a good soul here who can try to point out what's the issue please (at least in the first part) ? Thanks to all ! EDIT : I fixed the first part, so I let it here if it can helps some people... (one issue I had was that "rogue_level" doesn't exist, or I don't manage to use it... So I put "selected|level" instead... Now I'm going after the second part...
Hello, some help with templates. what is the proper way to enter the following in a template: "--Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + ~5![bonus] - ~6![wounds] | Advantage, 2d20kh1 + ~5![bonus] - ~6![wounds] | Disadvantage, 2d20kl1 + ~5![bonus] - ~6![wounds] } ]] vs **AC** [[@{target||AC}]] "  the " ?{Advantage?| " is returning errors. thank you.
1590599960

Edited 1590600058
Kariaudhanaur :   Looks like you use "--hrolls" not "--hroll" in the second part.  But in any case, I don't think you can have two "--hroll" tags in the same card. I would probably have just added [[ [$TwoWeapon] ? {Two-Weapon Fighting| No,0| Yes,1} + 0d0 ]] to your original hroll, then just add " AND $TwoWeapon == 1 " to all of the conditionals in your second section.  You would also have to add  [[ [$Sneak2] ?{Off-hand Sneak Attack|No, 0|Yes, 1} + 0d0 ]] to the hroll as well. --Off-hand Attack:|[[ [$Atk2] ?{Off-hand Attack|Standard, 1d20|w/Advantage, 2d20KH1|w/Disadvantage, 2d20KL1} + 4 [Dex Mod] + 2 [Proficiency] ]] vs AC    -- ?? $Atk2.base == 1 AND $TwoWeapon == 1 ?? Off-hand Critical Fail:|[[ [txt] 1t[CFM] ]]     -- ?? $Atk2.base <> 1 AND $Atk2.total < [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 AND $TwoWeapon == 1 ?? !Off-hand Miss|You missed.     -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 AND $TwoWeapon == 1 ?? Off-hand Hit:|[[1d4]] Piercing damage     -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 AND $Sneak2 == 1 AND $Sneak == 0 AND $TwoWeapon == 1 ?? !Off-hand SneakAtk|^* **+** [[2d6]] Sneak Attack Damage     -- ?? $Atk2.base == 20 AND $TwoWeapon == 1 ?? !Off-hand CritHit|^* **+** [[2d4]] critical piercing damage     -- ?? $Atk2.base == 20 AND $Sneak2 == 1 AND $Sneak == 0 AND $TwoWeapon == 1 ?? !Off-hand CritSneak|^* **+** [[4d6]] critical sneak attack damage You might also consider asking for sneak attack only once (would the player typically ask for sneak on the off-hand attack but not on the first attack?), applying it to the first attack if it hits, and applying it to the second attack only if the first attack misses. -- ?? $Atk2.base == 20 AND $Sneak == 1 AND $Atq.total < @{target|npc_ac} AND $Atq.base < 20 AND $TwoWeapon == 1 ?? !Off-hand CritSneak|^* **+** [[4d6]] critical sneak attack damage Note that I've also added in a check for the case where Atq.total < NPC's AC but Atq.base = 20.  Not very likely, but in case you have an attack that only hits on a crit because the AC is so high. I'll just mention that I typically have the two-weapon fighting handled by two different powercards -- for example, the first might just be "shortsword" and the second is "shortsword (off-hand)".  This makes for two steps for the player, but you don't have the sneak attack issue (because each gives the option) and it also helps if the first attack is against a different creature than the second (off-hand) attack.  It also allows the player to change up the order if they have two attacks (e.g., attack/off-hand/attack vs. attack/attack/off-hand).
1590669851

Edited 1590671631
Scott P. said: Kariaudhanaur :   Looks like you use "--hrolls" not "--hroll" in the second part.  But in any case, I don't think you can have two "--hroll" tags in the same card. I would probably have just added [[ [$TwoWeapon] ? {Two-Weapon Fighting| No,0| Yes,1} + 0d0 ]] to your original hroll, then just add " AND $TwoWeapon == 1 " to all of the conditionals in your second section.  You would also have to add  [[ [$Sneak2] ?{Off-hand Sneak Attack|No, 0|Yes, 1} + 0d0 ]] to the hroll as well. --Off-hand Attack:|[[ [$Atk2] ?{Off-hand Attack|Standard, 1d20|w/Advantage, 2d20KH1|w/Disadvantage, 2d20KL1} + 4 [Dex Mod] + 2 [Proficiency] ]] vs AC    -- ?? $Atk2.base == 1 AND $TwoWeapon == 1 ?? Off-hand Critical Fail:|[[ [txt] 1t[CFM] ]]     -- ?? $Atk2.base <> 1 AND $Atk2.total < [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 AND $TwoWeapon == 1 ?? !Off-hand Miss|You missed.     -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 AND $TwoWeapon == 1 ?? Off-hand Hit:|[[1d4]] Piercing damage     -- ?? $Atk2.base <> 1 AND $Atk2.total >= [[@{target|2nd Target|AC}]] AND $Atk2.base <> 20 AND $Sneak2 == 1 AND $Sneak == 0 AND $TwoWeapon == 1 ?? !Off-hand SneakAtk|^* **+** [[2d6]] Sneak Attack Damage     -- ?? $Atk2.base == 20 AND $TwoWeapon == 1 ?? !Off-hand CritHit|^* **+** [[2d4]] critical piercing damage     -- ?? $Atk2.base == 20 AND $Sneak2 == 1 AND $Sneak == 0 AND $TwoWeapon == 1 ?? !Off-hand CritSneak|^* **+** [[4d6]] critical sneak attack damage You might also consider asking for sneak attack only once (would the player typically ask for sneak on the off-hand attack but not on the first attack?), applying it to the first attack if it hits, and applying it to the second attack only if the first attack misses. -- ?? $Atk2.base == 20 AND $Sneak == 1 AND $Atq.total < @{target|npc_ac} AND $Atq.base < 20 AND $TwoWeapon == 1 ?? !Off-hand CritSneak|^* **+** [[4d6]] critical sneak attack damage Note that I've also added in a check for the case where Atq.total < NPC's AC but Atq.base = 20.  Not very likely, but in case you have an attack that only hits on a crit because the AC is so high. I'll just mention that I typically have the two-weapon fighting handled by two different powercards -- for example, the first might just be "shortsword" and the second is "shortsword (off-hand)".  This makes for two steps for the player, but you don't have the sneak attack issue (because each gives the option) and it also helps if the first attack is against a different creature than the second (off-hand) attack.  It also allows the player to change up the order if they have two attacks (e.g., attack/off-hand/attack vs. attack/attack/off-hand). First of all... Thanks a looootttt for your help ! I decided to do as you said at the end... It will be more flexible to have to different attacks, I agree. But the "complex hroll" remains very interesting, so thanks for that. I'm learning :) And I'm pretty sure it could be helpful soon ! (and for the case of Atq.total < NPC's AC but Atq.base = 20 => in DD5 an Atq.base = 20 hits everytime, even with and AC of 50 ;-) ) I have another question, but I think this one is easier... It's just I don't see the error even if I'm pretty sure it's not a complex one : It's for DD5, "Scorching Ray" spell. I don't how to deal with everything (3 different rays on multiple targets and automatic reduction of the HP if it hits) in one script, so I decided to go with one script executed 3 times by my player. My issue is I don't manage to deal with constant damage + adaptative ones depending on an answer to a question. (I'm not sure it's very clear, I'm french and english is not my first language ahah). Here the line : After the attack roll : --?? $Atq.total >= @{target|npc_ac} AND $Atq.base <> 1 AND $Atq.base <> 20 ?? Dégâts :| [[ [$Dgts] 2d6 + ?{Sort lancé au niveau |2,0|3,1|4,2|5,3|6,4|7,5|8,6|9,7} d6 ]] dégâts de feu It doesn't take into account the answer to the question. For a speel casted at level 3, it should add 1d6... I see in the chat "1 d6" but it's not rolled, just text... Which { or ( or | or anything else have I misplaced / forgot please ? Ok, I've changed my way to do it, and now it's working \o/ --?? $Atq.total >= @{target|npc_ac} AND $Atq.base <> 1 AND $Atq.base <> 20 ?? Dégâts :|[[ [$Dgts] 2d6 + ?{Sort lancé au niveau |2,0d0|3,1d6|4,2d6|5,3d6|6,4d6|7,5d6|8,6d6|9,7d6 } ]] dégâts de feu
Glad you got it working and glad I provided since help. (and for the case of Atq.total < NPC's AC but Atq.base = 20 => in DD5 an Atq.base = 20 hits everytime, even with and AC of 50 ;-) ) Yes, that is what I was referring to.  But my point was, if the monster has 50 AC and the attacker rolls a 20, not only will the "hit" appear, but the "you have missed" will appear as well.  So it's important (if you wish to address this rare case) to include "AND Atk.base < 20" in anything you don't want to show when the attacker rolls a critical hit.  I hope I've described it in a way that makes sense.
Well... Me again... Sorry. For cantrips in DD5 for example, damage of a spell can evolve with the caster level... I found around here the magic formula to adapt constantly without updating the damage part of the script... But when I don't manage to adapt for critical hit... --?? $Atq.total >= @{target|npc_ac} AND $Atq.base <> 1 AND $Atq.base <> 20 ?? Dégâts :|[[ [$Dgts] ((@{selected|level} + 1) / 6 + 0.5)d8r<1 ]] dégâts de foudre I have to multiply the damage by 2 for a critical hit, but I don't know how (when I put a "2" anywhere I can think of, the script doesn't work anymore). Can you help me please ? (for now I did : [[ [$DgtsCrit] ((@{selected|level} + 1) / 6 + 0.5)d8r<1 + ((@{selected|level} + 1) / 6 + 0.5)d8r<1 ]] but I guess there is a better and proper way) ------------------------------------------ Another question around the same format difficulty : I made a script for Save checks for npc. I don't want my player can see the bonus of the npc, so I display only the result. But I would like to display the save type too (Constitution / Dextérité ... ) --hroll| ?{Jet de sauvegarde | Dextérité, **Dextérité : **[[ [$Résultat] 1d20+@{selected|npc_dex_save} [DEX]]] | Constitution, **Constitution : **[[ [$Résultat] 1d20+@{selected|npc_con_save} [CON]]] } --JS :| [^Résultat] --Type :| [^SaveType] }} Is there a way to grab the answer to the question ? In this case I need to add [$SaveType] somewhere... Thank you !
1590831507

Edited 1590831626
Kariaudhanaur said: Well... Me again... Sorry. For cantrips in DD5 for example, damage of a spell can evolve with the caster level... I found around here the magic formula to adapt constantly without updating the damage part of the script... But when I don't manage to adapt for critical hit... --?? $Atq.total >= @{target|npc_ac} AND $Atq.base <> 1 AND $Atq.base <> 20 ?? Dégâts :|[[ [$Dgts] ((@{selected|level} + 1) / 6 + 0.5)d8r<1 ]] dégâts de foudre I have to multiply the damage by 2 for a critical hit, but I don't know how (when I put a "2" anywhere I can think of, the script doesn't work anymore). Can you help me please ? (for now I did : [[ [$DgtsCrit] ((@{selected|level} + 1) / 6 + 0.5)d8r<1 + ((@{selected|level} + 1) / 6 + 0.5)d8r<1 ]] but I guess there is a better and proper way) I messed around with this recently and I decided to just add the formula together twice as you did.  You mention "multiplying it by 2".  To clarify, using the formula twice or multiplying the number of dice by two is correct, but multiplying the result of the dice by two is not correct. Also, I actually store a (calculated) attribute called cantrip_level for every spellcaster.  I recalculate that attribute as part of my long rest macro, so I'm confident it stays accurate as players level up.  Here is what it looks like in use: -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|npc_ac}]] AND $Atk.base <> 20 ?? Hit:|[[@{selected|cantrip_level}d8]] Cold damage -- ?? $Atk.base == 20 ?? Critical:|[[@{selected|cantrip_level}d8+@{selected|cantrip_level}d8]] Critical Cold damage What I'm realizing as I type this is that I can not only calculate cantrip_level but also have cantrip_level|max be calculated and stored, in the long rest macro, as double the cantrip_level .  Then I can use it in this way: -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|npc_ac}]] AND $Atk.base <> 20 ?? Hit:|[[@{selected|cantrip_level}d8]] Cold damage -- ?? $Atk.base == 20 ?? Critical:|[[@{selected|cantrip_level|max}d8]] Critical Cold damage  Now to go and rewrite my cantrip_level calculation to reflect cantrip_level|max ... Another question around the same format difficulty : I made a script for Save checks for npc. I don't want my player can see the bonus of the npc, so I display only the result. But I would like to display the save type too (Constitution / Dextérité ... )  --hroll| ?{Jet de sauvegarde | Dextérité, **Dextérité : **[[ [$Résultat] 1d20+@{selected|npc_dex_save} [DEX]]] | Constitution, **Constitution : **[[ [$Résultat] 1d20+@{selected|npc_con_save} [CON]]] } --JS :| [^Résultat]  --Type :| [^SaveType] }} Is there a way to grab the answer to the question ? In this case I need to add [$SaveType] somewhere... I think for this I would probably just do --hroll|  [^SaveType]  ?{Jet de sauvegarde | Dextérité | Constitution } -- ?? $SaveType =  Dextérité ??  Dextérité Save|  [[ 1d20+@{selected|npc_dex_save} [DEX]]] -- ?? $SaveType =  Constitution  ??  Constitution Save|[[ 1d20+@{selected|npc_con_save} [CON]]] If you needed to reference those rolls later in the macro you could tag them with a [$DexSave] and [$ConSave] respectively.
1590860494

Edited 1590860628
Kizea said: Just a quick question people, it is in regards to formatting the power cards. I have the correct handout as far as I can tell and am calling the script, but nothing will change, I have changed the name of atwill to other names such as lootcolor, lootroll ect but the colour will not change for anything, am i missing something very simple?   You need to add something like --name|loot --leftsub|text --rightsub|text These are the headers of the power card, the stuff you have is the body and the format doesn't change that.  Example.  !power {{ --tokenid|@{selected|token_id} --emote| Readies for battle! --titlebackground|none --titlefontshadow|none --whisper|GM --format|Conditions --corners|10 --name|Initiative --leftsub|Creature --rightsub| d20 + @{selected|dexterity_mod} --!Initiative|~C Rolling: [[ [nh|trkr] [XPND] 1d20 + @{selected|dexterity_mod} ]]~C }}
1590925552

Edited 1590925689
Scott P. said: I messed around with this recently and I decided to just add the formula together twice as you did. Ok, so it's not me who will figure this out, so I'll keep it that way. multiplying the number of dice by two is correct, but multiplying the result of the dice by two is not correct. Absolutely true. Sorry if it was unclear, it was for me (for my defense, english is not my first language ahah) Also, I actually store a (calculated) attribute called cantrip_level for every spellcaster.  I recalculate that attribute as part of my long rest macro, so I'm confident it stays accurate as players level up.  Here is what it looks like in use: -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|npc_ac}]] AND $Atk.base <> 20 ?? Hit:|[[@{selected|cantrip_level}d8]] Cold damage -- ?? $Atk.base == 20 ?? Critical:|[[@{selected|cantrip_level}d8+@{selected|cantrip_level}d8]] Critical Cold damage What I'm realizing as I type this is that I can not only calculate cantrip_level but also have cantrip_level|max be calculated and stored, in the long rest macro, as double the cantrip_level .  Then I can use it in this way: -- ?? $Atk.base <> 1 AND $Atk.total >= [[@{target|npc_ac}]] AND $Atk.base <> 20 ?? Hit:|[[@{selected|cantrip_level}d8]] Cold damage -- ?? $Atk.base == 20 ?? Critical:|[[@{selected|cantrip_level|max}d8]] Critical Cold damage  Now to go and rewrite my cantrip_level calculation to reflect cantrip_level|max ... I keep that in my notes, it's interesting, but for now I don't have "spells number management" nor "long rest macro" or stuff like that :( ... Wayyyy to complicated for me, considering I took maybe 50 hours to do 15 powercards macro for my players main attacks / spells... Maybe one day though, thanks. I think for this I would probably just do --hroll|  [^SaveType]  ?{Jet de sauvegarde | Dextérité | Constitution } -- ?? $SaveType =  Dextérité ??  Dextérité Save|  [[ 1d20+@{selected|npc_dex_save} [DEX]]] -- ?? $SaveType =  Constitution  ??  Constitution Save|[[ 1d20+@{selected|npc_con_save} [CON]]] If you needed to reference those rolls later in the macro you could tag them with a [$DexSave] and [$ConSave] respectively. Of course it doesn't work... I don't know what I do wrong... To be more precise, I managed to make some updates to make the script work, but it doesn't do what I need : You fixed my issue about the label of the save (thx), but the maths behind the result are not hidden anymore in the hover-over output (and I would prefer to hide the characteristics bonus of my npcs). That's why I initially stored the result before displaying it... --hroll| [[ [$TypeJet] 0d0 + ?{Jet de sauvegarde | Force,1 | Dextérité,2 | Constitution,3 | Intelligence,4 | Sagesse,5 | Charisme,6} ]] --?? $TypeJet == 1 ?? JS de Force :| [[ 1d20+@{selected|npc_str_save} [FOR] ]] --?? $TypeJet == 2 ?? JS de Dextérité :| [[ 1d20+@{selected|npc_dex_save} [DEX] ]] ... I tried to hide the line of the calculation before displaying it ( --$ at the start ), I tried to "hide" the calculation ( [#[ math ]#] ), some other tricks, but it seems I'm too noob to figure this out... :'( : --$?? $TypeJet == 1 ?? !JS de Force :| [[ [$Résultat] 1d20+@{selected|npc_str_save} [FOR] ]] --?? $TypeJet == 1 ?? JS| [^Résultat] --?? $TypeJet == 1 ?? !JS de Force :| [#[ [$Résultat] 1d20+@{selected|npc_str_save} [FOR] ]#] --?? $TypeJet == 1 ?? JS| [^Résultat] Nothing works... Anyway, thanks for the help, I appreciate it !
I see.  It makes sense not to show the math.  I think you can avoid showing the math by doing a calculation for each possible save in the hroll... --hroll| [[ [$TypeJet] 0d0 + ?{Jet de sauvegarde | Force,1 | Dextérité,2 | Constitution,3 | Intelligence,4 | Sagesse,5 | Charisme,6} ]] [[ [$ForSave] 1d20+@{selected|npc_str_save} [FOR] ]] [[ [$DexSave] 1d20+@{selected|npc_dex_save} [DEX] ]] ... --?? $TypeJet == 1 ?? JS| [^ForSave] --?? $TypeJet == 2 ?? JS| [^DexSave] ... And if you want the result to look like a die roll, I think you can use [! [^ForSave] !].  It will look like a die roll but not have the math shared.
Hey there, I am looking for some help, trying to use the absolute value function in a power card where I am declaring a RollID. Any ideas on how this might be accomplished?
One more question - I am trying to do multiple conditionals. However, the second set does not seem to ever fire: --?? $skl > 0 ?? You failed by |[^skl] --?? $skl <= 0 ?? You succeeded by |[^skl] --?? $skl > 0 ??format|fail --?? $skl <= 0 ??format|success They are formats, and neither format is ever applied. The formats work, because I can apply them separately, outside the conditionals, but when I try the above, it does not work. Any ideas?
You don't seem to have any spaces between the ?? and the format like you do with the top 2 commands, would be my initial guess as to why. as for the absolute question, what is the actual problem? Do you need to know the syntax for using absolute values or are you having problem using absolute values in a roll? If so, send us what you got so far?
1591143374

Edited 1591144004
/w gm ?{Skill|Teamwork} !power {{ --replacesection|@{selected|character_id}|?{Skill}|skills|skill_name|SC- --hroll| [[ [$skl] 3d6 - ~SC-skill_roll_target$ [charmod] ]] --template|uchk|@{selected|character_name};Skill Check;?{Skill};[^skl.base];~SC-skill_roll_target$ --?? $skl.base > ~SC-skill_roll_target$ ?? format|fal --?? $skl.base > ~SC-skill_roll_target$ ?? You failed by |[^skl] --?? $skl.base <= ~SC-skill_roll_target$ ?? format|suc --?? $skl.base <= ~SC-skill_roll_target$ ?? You succeeded by |[^skl] }} I did some more experimenting. The call is slightly different, but it doesn't matter if I have spaces before the format or not. It doesn't work either way. And I am looking to use the absolute function in the hroll. If possible, I would absolute the whole thing. I need to know the absolute difference between the 3d6 roll and the ~SC-skill_roll_target$.
1591145881
Kurt J.
Pro
API Scripter
Matthew R. said: /w gm ?{Skill|Teamwork} !power {{ --replacesection|@{selected|character_id}|?{Skill}|skills|skill_name|SC- --hroll| [[ [$skl] 3d6 - ~SC-skill_roll_target$ [charmod] ]] --template|uchk|@{selected|character_name};Skill Check;?{Skill};[^skl.base];~SC-skill_roll_target$ --?? $skl.base > ~SC-skill_roll_target$ ?? format|fal --?? $skl.base > ~SC-skill_roll_target$ ?? You failed by |[^skl] --?? $skl.base <= ~SC-skill_roll_target$ ?? format|suc --?? $skl.base <= ~SC-skill_roll_target$ ?? You succeeded by |[^skl] }} I did some more experimenting. The call is slightly different, but it doesn't matter if I have spaces before the format or not. It doesn't work either way. And I am looking to use the absolute function in the hroll. If possible, I would absolute the whole thing. I need to know the absolute difference between the 3d6 roll and the ~SC-skill_roll_target$. The way the format code is written right now, cards only support a single format (can't be conditional) and are parsed near the beginning of the card creation before any RollIDs are created. I've been meaning to get back to updating with some new changes, so this is something I will look at, but I'm not sure that it wouldn't require a pretty major restructuring in order to make something like this work.
1591146275
Kurt J.
Pro
API Scripter
MorKazim said: Hello, some help with templates. what is the proper way to enter the following in a template: "--Attack|[[ [$Atk] ?{Advantage?| Normal, 1d20 + ~5![bonus] - ~6![wounds] | Advantage, 2d20kh1 + ~5![bonus] - ~6![wounds] | Disadvantage, 2d20kl1 + ~5![bonus] - ~6![wounds] } ]] vs **AC** [[@{target||AC}]] "  the " ?{Advantage?| " is returning errors. thank you. So what is happening here is that the template is never processed by the chat server, which is what handles the roll queries (?{Advantage?), so that whole string is being placed in the powercard as a literal. This is why in my PCMHelper templates, one of the requirements to use them is that all characters have to be set to Advantage Toggle so I can access the advantage roll via character attributes since queries can be used in a template. Alternatively you could use are replacement set that DOES get processed by the chat server and replace something in the template with the result of the above roll query (I believe I'm remembering the processing order correctly).
Thanks for the info about formats, Kurt. Any insight on absolute values?
Yet another question. !power {{ --replacementattrlist|CHR-|@{selected|character_id}|STR;DEX;CON;INT;EGO;PRE --testout| ~CHR-STR$ }} The character I am testing this on has STR=55. I am not getting that as output. Instead, I am getting this: testout  ~CHR-STR$ I do not understand what I am doing wrong.
I solved this, and you might want to update the documentation. Here is what is currently in the documentation: This new tag (--replaceattrlist) allows you to create replacement values for any number of attributes on your character sheet. This should work for any sheet (not limited to the  D&D 5E by Roll20 -sheet, or even to D&D). Specify a prefix, followed by a semicolon delimited list of attributes to create values for: --replacementattrlist|S-|@{selected|character_id}|strength_mod;dexterity_mod;wisdom_mod Would create three replacement values : ~S-strength_mod$, ~S-dexterity_mod$, and ~S-wisdom_mod$ which would contain the corresponding values from the selected character. Compare the example code to the new tag at the start of the section. They are different. I copied the example code and used that as the base in my work, and it consistently failed because it is not the correct tag. It should be --replaceattrlist instead of --replacementattrlist - that was the problem.
Matthew R. said: Thanks for the info about formats, Kurt. Any insight on absolute values? Have you tried: !power {{ --replacesection|@{selected|character_id}|?{Skill}|skills|skill_name|SC- --hroll| [[ [$skl] abs(3d6 - ~SC-skill_roll_target$ [charmod]) ]] --template|uchk|@{selected|character_name};Skill Check;?{Skill};[^skl.base];~SC-skill_roll_target$ --?? $skl.base > ~SC-skill_roll_target$ ?? format|fal --?? $skl.base > ~SC-skill_roll_target$ ?? You failed by |[^skl] --?? $skl.base <= ~SC-skill_roll_target$ ?? format|suc --?? $skl.base <= ~SC-skill_roll_target$ ?? You succeeded by |[^skl] }}
SInce we solved the format issue (can't call format twice), I stripped the code you suggested to this: !power {{ --replacesection|@{selected|character_id}|?{Skill}|skills|skill_name|SC- --hroll| [[ [$skl] abs(3d6 - ~SC-skill_roll_target$ [charmod]) ]] --template|uchk|@{selected|character_name};Skill Check;?{Skill};[^skl.base];~SC-skill_roll_target$ --?? $skl.base > ~SC-skill_roll_target$ ?? You failed by |[^skl] --?? $skl.base <= ~SC-skill_roll_target$ ?? You succeeded by |[^skl] }} It did not work. I am guessing the abs is not supported. Or, I might need a 0d6 to be first. I have found that sometimes, the roll doesn't want to resolve unless it has a d6 happening first. I will try that. *** Five. Minutes. Later. *** Okay, much learned. When using replacements in a roll, one must use [#[ ... ]#] instead of [[ ... ]] - I think that is why it was requiring the 0d6 because both worked. However, because of where the absolute is, now the logic is wrong. I can fix that, though. Thank you. You helped me break through the issue. As a side note, I had actually worked around the problem using ChatSetAttr to store a roll for me, but this will be better, I think, when I get the logic worked out. I will try to remember to come back and post it here as a final solution.