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][D&D4e] Combat Automation

1395254531

Edited 1395646523
Alex L.
Pro
Sheet Author
This is my second attempt at a Combat Automation script of D&D 4th edition. If you find a power that you can't get working post its name and I will look it up and see what I need to do to fix it. Please don't post powers that need: AOE Automated Status effects (ie dealing the damage each turn for you, etc) I already know about these and will add them in when I can. Usage: In order to be able to automate as many different powers as possible I split powers into three sections I call these Power, Check and Action. Power - A power is what you would think it is, it represents the power you are trying to use. It doesn't do very much on its own. There should only be one power for each of the character's powers. Check - A check is needed every time you want a different target or want to make some sort of attack roll. There can be many checks in each power. Action - Something that happens, this always happens to the target of the associated check, some examples would be dealing damage, healing or outputting text. There can be many actions in each check. The Commands: !ca-power @{selected|token_id} [name] [key] options... Required: @{selected|token_id} - This is needed for now. [name] - The name of the power. [key] - A unique (unique to the token using the power) name for the power. The Sorter the better. Options: --usage [eg: Encounter, At-Will] --action [eg: Standard Action] --powercard [power card key] - this is used to pass custom power card options to the power card output, please see Power Cards for details. You may have more than one of these. !ca-check @{selected|token_id} [key] [power key] options... Required: @{selected|token_id} - This is needed for now. [key] - A unique (unique to the power) name for the check. The Sorter the better. [power key] - The key of the power this check goes with. Options: --target @{target|Main|token_id} - The token id of the target. --roll [[inline roll]] - An attack roll. Requires Target and VS. --vs [ie: AC, Fort] - The defence to roll against. Requires Target and Roll. --crittarget [number] - lowers the crit target value from 20 to this. Valid Defences: "ac","fort","ref","will" --indent [power card indent ie: ^2] - Indent to be applied to the attack roll display. --condition [conditions] - conditions should be a string of comer separated check keys and tags in this format "check.tag" eg "myCheck.hit,myCheck.even". you can put multiple --condition, tags in one condition separated by comers will be treated as an AND ie: "myCheck.hit,myCheck.even" means if myCheck hits and the dice roll is even. Separate --condition will be treated as a OR ie: --condition "myCheck.hit" --condition "myCheck.even" would be if myCheck hits or the dice roll is even. Valid tags: "effect" - always happens,"hit" - On a hit,"miss" - On a miss,"crit" - On a crit,"fail" - On a nat 1,"odd" - If the dice rolls odd,"even" - If the dice rolls even. You can also use any icon as a tag. !ca-action @{selected|token_id} [key] [check key] [power key] options... Required: @{selected|token_id} - This is needed for now. [key] - A unique (unique to the Check) name for the action. The Sorter the better. [check key] - The key of the check this action goes with. [power key] - The key of the power this action goes with. Options: --damage [[inline roll]] - an inline roll for how much damage to deal. --type [damage types] - Comer separated list of damage types. --maxoncrit - If this is set the damage in this action will be maximised on a crit. Valid Damage Types: "acid","cold","fire","force","lightning","necrotic","poison","psychic","radiant","thunder" --heal [[inline roll]] - an inline roll for how much to heal. --temp - Just add this to make it heal temp damage instead. --textkey [key] - key should be the part from before the "|" in a power card option without the --. --text [some text] - What ever text you want displayed, you can include results from healing or damage using the format [checkKey.actionKey.damge] ie: "Heal [mycheck.myaction.heal] damage." --icon [icons] -icons should be a comer separated list of status icons you want put on the target. --condition [conditions] - conditions should be a string of comer separated check keys and tags or tags on their own in this format "check.tag" eg "myCheck.hit,myCheck.even". you can put multiple --condition, tags in one condition separated by comers will be treated as an AND ie: "myCheck.hit,myCheck.even" means if myCheck hits and the dice roll is even. Separate --condition will be treated as a OR ie: --condition "myCheck.hit" --condition "myCheck.even" would be if myCheck hits or the dice roll is even. If you put a tag on its own it will be checked against the check this action is connected to, if you put a key as well it will check what ever check you put the key for. Valid tags: "effect" - always happens,"hit" - On a hit,"miss" - On a miss,"crit" - On a crit,"fail" - On a nat 1,"odd" - If the dice rolls odd,"even" - If the dice rolls even. You can also use any icon as a tag. !ca-run @{selected|token_id} This is just needed once at the end of a power after all the checks and actions. Example: !ca-power @{selected|token_id} "Skip the Rock" "SkiptheRock" --usage "Encounter" --action "Standard Action" --powercard "Keywords|Martial, Weapon" --powercard "Range|Ranged weapon" --powercard "Requirement|You must be wielding a sling." --powercard "Primary Target|One creature" !ca-check @{selected|token_id} "firstAttack" "SkiptheRock" --roll [[d20+@{DEX}+floor(@{LVL}/2)+2+2+1]] --vs "AC" --target @{target|Main|token_id} !ca-action @{selected|token_id} "firstAttackDamage" "firstAttack" "SkiptheRock" --damage [[d6+@{DEX}+floor(@{LVL}/2)+2+1]] --condition "hit" !ca-action @{selected|token_id} "firstAttackHitText" "firstAttack" "SkiptheRock" --text "[firstAttack.firstAttackDamage.damage] damage, Make a secondary Attack" --textkey "Hit" --condition "hit" !ca-action @{selected|token_id} "secondAttackTargetText" "firstAttack" "SkiptheRock" --text "One creature within 10 squares of the primary target. " --textkey "^Secondary Target" --condition "hit" !ca-check @{selected|token_id} "secondAttack" "SkiptheRock" --roll [[d20+@{DEX}+floor(@{LVL}/2)+2+2+1]] --vs "AC" --target @{target|Second|token_id} --condition "firstAttack.hit" --indent "^" !ca-action @{selected|token_id} "secondAttackDamage" "secondAttack" "SkiptheRock" --damage [[@{DEX}]] --condition "hit" !ca-action @{selected|token_id} "secondAttackHitText" "secondAttack" "SkiptheRock" --text "[secondAttack.secondAttackDamage.damage] damage, and the secondary target is dazed until the end of your next turn." --textkey "^Hit" --condition "hit" !ca-action @{selected|token_id} "secondAttackHitIcon" "secondAttack" "SkiptheRock" --icon "stopwatch" --condition "hit" !ca-action @{selected|token_id} "cunningSneakDamage" "secondAttack" "SkiptheRock" --damage [[@{INT}]] --condition "hit" !ca-action @{selected|token_id} "secondAttackHitText" "secondAttack" "SkiptheRock" --text "The secondary attack deals [secondAttack.cunningSneakDamage.damage] extra damage." --textkey "^Cunning Sneak" --condition "hit" !ca-run @{selected|token_id} "SkiptheRock" This is an example of the power Skip the Rock that was posted in the Power Cards thread by Brian. Credits: HoneyBadger - Custom Power Cards Script that is used to make all the chat output for this script. Script Gist Link: <a href="https://gist.github.com/pigalot/9647281" rel="nofollow">https://gist.github.com/pigalot/9647281</a>
Would you mind posting a few screenshots of these in use? (both the set up of the macros and the outcome?) I think a visual would help me process the information lol
1395259189
Alex L.
Pro
Sheet Author
Jarrod . said: Would you mind posting a few screenshots of these in use? (both the set up of the macros and the outcome?) I think a visual would help me process the information lol There is nothing new it just goes in a ability (preferably a token action), and it outputs to the same old power card output.
1395287865
Gen Kitty
Forum Champion
Double-checking for clarity here: If an attack misses, does it continue to list damage and whatnot, or does it simply announce 'missed' and cuts short there?
1395331240
Alex L.
Pro
Sheet Author
GenKitty said: Double-checking for clarity here: If an attack misses, does it continue to list damage and whatnot, or does it simply announce 'missed' and cuts short there? This script announce what ever you tell it to. All output is decided by the user.
Hello Alex, I am wondering if two things are possible with your script at its current state. It looks great by the way. 1) Is it possible to make a skill like a Sorcerers Chromatic Orb that has a shifting Damage Type/Effect based off of a d6 dice roll 2) Is it possible to have a skill check for a certain icon marker to dictate an action? Like say an attack that checks if an enemy is bloodied to add extra damage. An example would be a Barbarians Bladesweep, without the effect being all adjacent enemies.
1395353960
Alex L.
Pro
Sheet Author
Matteo S. said: Hello Alex, I am wondering if two things are possible with your script at its current state. It looks great by the way. 1) Is it possible to make a skill like a Sorcerers Chromatic Orb that has a shifting Damage Type/Effect based off of a d6 dice roll 2) Is it possible to have a skill check for a certain icon marker to dictate an action? Like say an attack that checks if an enemy is bloodied to add extra damage. An example would be a Barbarians Bladesweep, without the effect being all adjacent enemies. 1. Maybe, you could try using rollable tables. But no I have no special functionality for it. If rollable tables don't work at this time I will sit down and make them work when I can. 2. Not at this time, I will expand the number of different tags soon.
1395361428

Edited 1395364679
Can't wait to see the variables by status and AoE sections of this script, it looks great so far. Interesting way of doing the Maxros too does this need apicmd like the old version?
1395382316
Alex L.
Pro
Sheet Author
Calhanol said: Can't wait to see the variables by status and AoE sections of this script, it looks great so far. Interesting way of doing the Maxros too does this need apicmd like the old version? No, this doesnt need apicmd.
Thanks, is there a way to make all attacks do something if a token is marked a certain way. e.g. if a target is marked for combat advantage it'll do +2 to hit, or does that have to be included in each macro?
1395547369

Edited 1395551302
Gen Kitty
Forum Champion
I'm going to ask my question a different way. (I haven't actively coded in about 15 years so I'm very rusty and I can't just look at the code and get the information I seek) I am not seeing the part where I can get the AC off the target and compare it to the dice roll and ONLY have the hit-stuff appear if the dice roll higher than the target value. I know this stuff must seem very simple to you because you're writing it, but idiots like me need examples ramping up in difficulty :&gt; Edited to add: Ok. The test card, from the example you gave earlier, is actually working now and is doing everything it seems it should be doing. Earlier, it seemed to be displaying hit information even when it shouldn't be, but I guess relaunching the table made it work better. Edited again to add: Can you please give an example of adding a crit textkey? For example, something that crits on an 18+. My attempt isn't working (though, it isn't erroring either, so that is something)
1395569546

Edited 1395569609
Alex L.
Pro
Sheet Author
GenKitty said: I'm going to ask my question a different way. (I haven't actively coded in about 15 years so I'm very rusty and I can't just look at the code and get the information I seek) I am not seeing the part where I can get the AC off the target and compare it to the dice roll and ONLY have the hit-stuff appear if the dice roll higher than the target value. I know this stuff must seem very simple to you because you're writing it, but idiots like me need examples ramping up in difficulty :&gt; Edited to add: Ok. The test card, from the example you gave earlier, is actually working now and is doing everything it seems it should be doing. Earlier, it seemed to be displaying hit information even when it shouldn't be, but I guess relaunching the table made it work better. Edited again to add: Can you please give an example of adding a crit textkey? For example, something that crits on an 18+. My attempt isn't working (though, it isn't erroring either, so that is something) Ok this would be Skip the Rock if i had a +1 vicious weapon (+1d12 extra damage on crit): !ca-power @{selected|token_id} "Skip the Rock" "SkiptheRock" --usage "Encounter" --action "Standard Action" --powercard "Keywords|Martial, Weapon" --powercard "Range|Ranged weapon" --powercard "Requirement|You must be wielding a sling." --powercard "Primary Target|One creature" !ca-check @{selected|token_id} "firstAttack" "SkiptheRock" --roll [[d20+@{DEX}+floor(@{LVL}/2)+2+2+1]] --vs "AC" --target @{target|Main|token_id} --crittarget 18 !ca-action @{selected|token_id} "firstAttackDamage" "firstAttack" "SkiptheRock" --damage [[d6+@{DEX}+floor(@{LVL}/2)+2+1]] --condition "hit" !ca-action @{selected|token_id} "firstAttackHitText" "firstAttack" "SkiptheRock" --text "[firstAttack.firstAttackDamage.damage] damage, Make a secondary Attack" --textkey "Hit" --condition "hit" !ca-action @{selected|token_id} "firstAttackCritDamage" "firstAttack" "SkiptheRock" --damage [[1d12]] --condition "hit,crit" !ca-action @{selected|token_id} "firstAttackCritText" "firstAttack" "SkiptheRock" --text "Deal [firstAttack.firstAttackCritDamage.damage] extra damage" --textkey "Critical Hit" --condition "hit,crit" !ca-action @{selected|token_id} "secondAttackTargetText" "firstAttack" "SkiptheRock" --text "One creature within 10 squares of the primary target. " --textkey "^Secondary Target" --condition "hit" !ca-check @{selected|token_id} "secondAttack" "SkiptheRock" --roll [[d20+@{DEX}+floor(@{LVL}/2)+2+2+1]] --vs "AC" --target @{target|Second|token_id} --condition "firstAttack.hit" --indent "^" !ca-action @{selected|token_id} "secondAttackDamage" "secondAttack" "SkiptheRock" --damage [[@{DEX}]] --condition "hit" !ca-action @{selected|token_id} "secondAttackHitText" "secondAttack" "SkiptheRock" --text "[secondAttack.secondAttackDamage.damage] damage, and the secondary target is dazed until the end of your next turn." --textkey "^Hit" --condition "hit" !ca-action @{selected|token_id} "secondAttackHitIcon" "secondAttack" "SkiptheRock" --icon "stopwatch" --condition "hit" !ca-action @{selected|token_id} "cunningSneakDamage" "secondAttack" "SkiptheRock" --damage [[@{INT}]] --condition "hit" !ca-action @{selected|token_id} "secondAttackHitText" "secondAttack" "SkiptheRock" --text "The secondary attack deals [secondAttack.cunningSneakDamage.damage] extra damage." --textkey "^Cunning Sneak" --condition "hit" !ca-run @{selected|token_id} "SkiptheRock" This is what we added: !ca-action @{selected|token_id} "firstAttackCritDamage" "firstAttack" "SkiptheRock" --damage [[1d12]] --condition "hit,crit" !ca-action @{selected|token_id} "firstAttackCritText" "firstAttack" "SkiptheRock" --text "Deal [firstAttack.firstAttackCritDamage.damage] extra damage" --textkey "Critical Hit" --condition "hit,crit" The first line deals the damage when it hits and is a crit (if you change one of the setting you can have it so crit != hit), and the second line outputs some text with the damage in it. And i added the line "--crittarget 18" to the first check to lower the crit target to 18.
1395599199
Gen Kitty
Forum Champion
Great, this is the sort of stuff that is very helpful! 1) I added your tweaks to my test macro and I came across an interesting bug: On a crit, no matter what the inline roll shows on mouseover, the attack is doing max damage for BOTH the primary damage and the critical damage. Always-max for primary damage is 4e, and this may be the feature that prevents the script from being used outside of 4e games, but the added damage on a crit shouldn't be maxed, should it? 2) On line 18 of your script there's a setting for no damage. What happens if you set that to true? I tested toggling it and nothing /seemed/ to change, so I'm curious :)
1395643743

Edited 1395644231
Alex L.
Pro
Sheet Author
GenKitty said: Great, this is the sort of stuff that is very helpful! 1) I added your tweaks to my test macro and I came across an interesting bug: On a crit, no matter what the inline roll shows on mouseover, the attack is doing max damage for BOTH the primary damage and the critical damage. Always-max for primary damage is 4e, and this may be the feature that prevents the script from being used outside of 4e games, but the added damage on a crit shouldn't be maxed, should it? 2) On line 18 of your script there's a setting for no damage. What happens if you set that to true? I tested toggling it and nothing /seemed/ to change, so I'm curious :) 1) Yes its something i noticed last night, i will add some sort of mod to say what ones you want maxed on crit. 2) It does nothing, its a throw back from the last script. It used to disable all the damage and healing so the script could be used like HBs power cards. Update: Fixed no.1 !ca-power @{selected|token_id} "Skip the Rock" "SkiptheRock" --usage "Encounter" --action "Standard Action" --powercard "Keywords|Martial, Weapon" --powercard "Range|Ranged weapon" --powercard "Requirement|You must be wielding a sling." --powercard "Primary Target|One creature" !ca-check @{selected|token_id} "firstAttack" "SkiptheRock" --roll [[d20+@{DEX}+floor(@{LVL}/2)+2+2+1]] --vs "AC" --target @{target|Main|token_id} --crittarget 18 !ca-action @{selected|token_id} "firstAttackDamage" "firstAttack" "SkiptheRock" --damage [[d6+@{DEX}+floor(@{LVL}/2)+2+1]] --condition "hit" --maxoncrit !ca-action @{selected|token_id} "firstAttackHitText" "firstAttack" "SkiptheRock" --text "[firstAttack.firstAttackDamage.damage] damage, Make a secondary Attack" --textkey "Hit" --condition "hit" !ca-action @{selected|token_id} "firstAttackCritDamage" "firstAttack" "SkiptheRock" --damage [[1d12]] --condition "hit,crit" !ca-action @{selected|token_id} "firstAttackCritText" "firstAttack" "SkiptheRock" --text "Deal [firstAttack.firstAttackCritDamage.damage] extra damage" --textkey "Critical Hit" --condition "hit,crit" !ca-action @{selected|token_id} "secondAttackTargetText" "firstAttack" "SkiptheRock" --text "One creature within 10 squares of the primary target. " --textkey "^Secondary Target" --condition "hit" !ca-check @{selected|token_id} "secondAttack" "SkiptheRock" --roll [[d20+@{DEX}+floor(@{LVL}/2)+2+2+1]] --vs "AC" --target @{target|Second|token_id} --condition "firstAttack.hit" --indent "^" !ca-action @{selected|token_id} "secondAttackDamage" "secondAttack" "SkiptheRock" --damage [[@{DEX}]] --condition "hit" !ca-action @{selected|token_id} "secondAttackHitText" "secondAttack" "SkiptheRock" --text "[secondAttack.secondAttackDamage.damage] damage, and the secondary target is dazed until the end of your next turn." --textkey "^Hit" --condition "hit" !ca-action @{selected|token_id} "secondAttackHitIcon" "secondAttack" "SkiptheRock" --icon "stopwatch" --condition "hit" !ca-action @{selected|token_id} "cunningSneakDamage" "secondAttack" "SkiptheRock" --damage [[@{INT}]] --condition "hit" !ca-action @{selected|token_id} "secondAttackHitText" "secondAttack" "SkiptheRock" --text "The secondary attack deals [secondAttack.cunningSneakDamage.damage] extra damage." --textkey "^Cunning Sneak" --condition "hit" !ca-run @{selected|token_id} "SkiptheRock" All that i added was --maxoncrit to firstAttackDamage.
1395646656
Alex L.
Pro
Sheet Author
Matteo S. said: 2) Is it possible to have a skill check for a certain icon marker to dictate an action? Like say an attack that checks if an enemy is bloodied to add extra damage. An example would be a Barbarians Bladesweep, without the effect being all adjacent enemies. This will now work, with the newest update you can use status icons as tags.SO by default if you use half-heart as the tag it will trigger on a bloodied target.
Alex L. said: Matteo S. said: 2) Is it possible to have a skill check for a certain icon marker to dictate an action? Like say an attack that checks if an enemy is bloodied to add extra damage. An example would be a Barbarians Bladesweep, without the effect being all adjacent enemies. This will now work, with the newest update you can use status icons as tags.SO by default if you use half-heart as the tag it will trigger on a bloodied target. Is there a way to make campaign wide tags for fights, in the script, without every macro having to include it. For example if someone is marked for second wind they gain +2 to all defenses to any attack. It just seems a lot of hassel to have it in every single macro/attack.
This script is awesome. I have been going through and creating macros for my gaming group and everything was working perfectly until I got to the barbarian. I have run into two issues. First, he has several powers that grant him temporary HP. However, every way I attempt the syntax of the --temp command I get an output of [Heal.HealDamage.heal]. Removing the --temp flag works correctly. Second, he has several powers which have additional effects when he is raging. I would like to simply set up an Icon for him as a --condition tag to trigger them, however I cannot seem to get this to work. I also tried to simply display the rage effects in the text, however it won't handle in-line rolls for Pressing Strike's 1d6 extra damage.
1395677377

Edited 1395677565
Alex L.
Pro
Sheet Author
Calhanol said: Alex L. said: Matteo S. said: 2) Is it possible to have a skill check for a certain icon marker to dictate an action? Like say an attack that checks if an enemy is bloodied to add extra damage. An example would be a Barbarians Bladesweep, without the effect being all adjacent enemies. This will now work, with the newest update you can use status icons as tags.SO by default if you use half-heart as the tag it will trigger on a bloodied target. Is there a way to make campaign wide tags for fights, in the script, without every macro having to include it. For example if someone is marked for second wind they gain +2 to all defenses to any attack. It just seems a lot of hassel to have it in every single macro/attack. This would be a status effect, i have not finished working on them, they will come at a later date, you can just add a prompt to the roll to ask for any bonuses or negatives to attacks, this is how i deal with such things. Martin W. said: This script is awesome. I have been going through and creating macros for my gaming group and everything was working perfectly until I got to the barbarian. I have run into two issues. First, he has several powers that grant him temporary HP. However, every way I attempt the syntax of the --temp command I get an output of [Heal.HealDamage.heal]. Removing the --temp flag works correctly. Second, he has several powers which have additional effects when he is raging. I would like to simply set up an Icon for him as a --condition tag to trigger them, however I cannot seem to get this to work. I also tried to simply display the rage effects in the text, however it won't handle in-line rolls for Pressing Strike's 1d6 extra damage. temp healing works exactly the same as normal healing, if you post the macro in a code block I will have a look at it. To check what status the user has all you do is set up a check that has the user as the target and then link any of the actions to that, if they only happen when the main attack hits you just put a conndition on the check for it.
Sure thing, thanks for this. I've been trying to sort out a twin strike macro for my Ranger but the output is only showing one attack and one damage block when I show it. What am I doing wrong? /emas RITH DUSKHIDE !ca-power @{selected|token_id} "Twin Strike" "MB" --usage "At-Will" --action "Standard Action" --powercard "Keywords|Martial, Weapon" --powercard "Range|Ranged Weapon" --powercard "Target|@{target|First Target|token_name}, @{target|Second Target|token_name}" !ca-check @{selected|token_id} "Attack1" "MB" --roll [[d20+11+?{Attack Modifier 1|0}]] --vs "AC" --target @{target|First Target|token_id} !ca-action @{selected|token_id} "AttackDamage1" "Attack1" "MB" --damage [[1d10+2+?{Damage Modifier 1|0}]] --condition "Attack1.hit" !ca-action @{selected|token_id} "AttackDamage1" "Attack1" "MB" --damage [[1d6+12+?{Damage Modifier 1|0}]] --condition "Attack1.crit" !ca-action @{selected|token_id} "AttackHitText1" "Attack1" "MB" --text "First Target: [Attack1.AttackDamage1.damage] damage," --textkey "Hit" --condition "Attack1.hit" !ca-check @{selected|token_id} "Attack2" "MB" --roll [[d20+11+?{Attack Modifier 2|0}]] --vs "AC" --target @{target|Second Target|token_id} !ca-action @{selected|token_id} "AttackDamage2" "Attack2" "MB" --damage [[1d10+2+?{Damage Modifier 2|0}]] --condition "Attack2.hit" !ca-action @{selected|token_id} "AttackDamage2" "Attack2" "MB" --damage [[1d6+12+?{Damage Modifier 2|0}]] --condition "Attack2.crit" !ca-action @{selected|token_id} "AttackHitText2" "Attack2" "MB" --text "Second Target: [Attack2.AttackDamage2.damage] damage," --textkey "Hit" --condition "Attack2.hit" !ca-run @{selected|token_id} "MB"
1395678224
Alex L.
Pro
Sheet Author
This Will show both but it will indent the second one and although that isn't ideal I will have to make some changes to my modified version on Power cards to do it any other way. /emas RITH DUSKHIDE !ca-power @{selected|token_id} "Twin Strike" "MB" --usage "At-Will" --action "Standard Action" --powercard "Keywords|Martial, Weapon" --powercard "Range|Ranged Weapon" --powercard "Target|@{target|First Target|token_name}, @{target|Second Target|token_name}" !ca-check @{selected|token_id} "Attack1" "MB" --roll [[d20+11+?{Attack Modifier 1|0}]] --vs "AC" --target @{target|First Target|token_id} !ca-action @{selected|token_id} "AttackDamage1" "Attack1" "MB" --damage [[1d10+2+?{Damage Modifier 1|0}]] --condition "hit" !ca-action @{selected|token_id} "AttackDamage1" "Attack1" "MB" --damage [[1d6+12+?{Damage Modifier 1|0}]] --condition "crit" !ca-action @{selected|token_id} "AttackHitText1" "Attack1" "MB" --text "First Target: [Attack1.AttackDamage1.damage] damage," --textkey "Hit" --condition "hit" !ca-check @{selected|token_id} "Attack2" "MB" --roll [[d20+11+?{Attack Modifier 2|0}]] --vs "AC" --target @{target|Second Target|token_id} --indent "^" !ca-action @{selected|token_id} "AttackDamage2" "Attack2" "MB" --damage [[1d10+2+?{Damage Modifier 2|0}]] --condition "hit" !ca-action @{selected|token_id} "AttackDamage2" "Attack2" "MB" --damage [[1d6+12+?{Damage Modifier 2|0}]] --condition "crit" !ca-action @{selected|token_id} "AttackHitText2" "Attack2" "MB" --text "Second Target: [Attack2.AttackDamage2.damage] damage," --textkey "^Hit" --condition "hit" !ca-run @{selected|token_id} "MB"
Alright, thanks again for the help, about the tags for conditions. I've tried to make a condition happen by making it --condition "hit,green" But even on targets that don't have the Status_green marker, it still occurs. Sorry I'm asking a lot of things I just wish to make sure what exactly I'm doing wrong.
1395695111

Edited 1395697738
Gen Kitty
Forum Champion
Alex, thank you, you are awesome! Edited to add: I just had a crushing realization. The other difference between pathfinder and 4e is 4e doesn't have you roll to confirm crits. And this tweak isn't a simple one because it means rerolling the attack roll (with the same bonuses) to see if you hit at all, without invoking a crit-check on the reroll. I can't and won't ask you to make such a change, given your previous statement about not supporting games outside of 4e. I can still use this for /my/ game, though.
Alex L. said: temp healing works exactly the same as normal healing, if you post the macro in a code block I will have a look at it. To check what status the user has all you do is set up a check that has the user as the target and then link any of the actions to that, if they only happen when the main attack hits you just put a conndition on the check for it. !ca-power @{selected|token_id} "Pressing Strike" "PressingStrike" --usage "At-Will" --action "Standard Action" --powercard "Keywords|Primal, Weapon" --powercard "Melee|Melee weapon" --powercard "Target|One creature" !ca-check @{selected|token_id} "Attack" "PressingStrike" --roll [[d20+@{STR_MOD}+@{WEAPON_PROF}+@{ENHANCEMENT}+@{HALF_LEVEL}]] --vs "AC" --target @{target|Main|token_id} !ca-check @{selected|token_id} "Rage" "PressingStrike" --target @{selected|token_id} --condition "strong" !ca-action @{selected|token_id} "AttackDamage" "Attack" "PressingStrike" --damage [[d@{MELEE_DAMAGE}+@{STR_MOD}+@{ENHANCEMENT}+1]] --condition "hit" !ca-action @{selected|token_id} "rageDamage" "Attack" "PressingStrike" --damage [[1d6}]] --condition "Attack.hit,Rage.strong" !ca-action @{selected|token_id} "HealDamage" "Rage" "PressingStrike" --heal [[@{STR_MOD}]] --temp --condition "Attack.hit,Rage.strong" !ca-action @{selected|token_id} "AttackHitText" "Attack" "PressingStrike" --text "[Attack.AttackDamage.damage] damage." --textkey "Hit" --condition "hit" !ca-action @{selected|token_id} "RageText" "Attack" "PressingStrike" --text "[Attack.rageDamage.damage] extra damage. Gain [Rage.HealDamage.heal] temporary hp" --textkey "^If Raging" --condition "Attack.hit,Rage.strong" !ca-run @{selected|token_id} "PressingStrike" Above is a unfinished copy of a Pressing Strike Macro. When he uses Macetail's Rage, he deals an additional 1d6 and gains STR_MOD temp hp. I have tried this without --condition "strong" on line 3 and with every configuration of --temp I can think of. I have also tried it without listing the the checks before the tag, ie "Attack.hit".The Rage effects trigger regardless of whether the token has the icon or not, and the --temp prevents it from recognizing the --heal at all. Without any Icons on the token, running the macro above along with all variations I have tested results in the following output:
Thanks for the update Alex. This is really a fantastic script. Out of curiosity though, Do you have a plan to implement daily/encounter usages through attributes? If it is already implemented then thank you for that as well.
1396174005
Alex L.
Pro
Sheet Author
Martin W. said: Alex L. said: temp healing works exactly the same as normal healing, if you post the macro in a code block I will have a look at it. To check what status the user has all you do is set up a check that has the user as the target and then link any of the actions to that, if they only happen when the main attack hits you just put a conndition on the check for it. !ca-power @{selected|token_id} "Pressing Strike" "PressingStrike" --usage "At-Will" --action "Standard Action" --powercard "Keywords|Primal, Weapon" --powercard "Melee|Melee weapon" --powercard "Target|One creature" !ca-check @{selected|token_id} "Attack" "PressingStrike" --roll [[d20+@{STR_MOD}+@{WEAPON_PROF}+@{ENHANCEMENT}+@{HALF_LEVEL}]] --vs "AC" --target @{target|Main|token_id} !ca-check @{selected|token_id} "Rage" "PressingStrike" --target @{selected|token_id} --condition "strong" !ca-action @{selected|token_id} "AttackDamage" "Attack" "PressingStrike" --damage [[d@{MELEE_DAMAGE}+@{STR_MOD}+@{ENHANCEMENT}+1]] --condition "hit" !ca-action @{selected|token_id} "rageDamage" "Attack" "PressingStrike" --damage [[1d6}]] --condition "Attack.hit,Rage.strong" !ca-action @{selected|token_id} "HealDamage" "Rage" "PressingStrike" --heal [[@{STR_MOD}]] --temp --condition "Attack.hit,Rage.strong" !ca-action @{selected|token_id} "AttackHitText" "Attack" "PressingStrike" --text "[Attack.AttackDamage.damage] damage." --textkey "Hit" --condition "hit" !ca-action @{selected|token_id} "RageText" "Attack" "PressingStrike" --text "[Attack.rageDamage.damage] extra damage. Gain [Rage.HealDamage.heal] temporary hp" --textkey "^If Raging" --condition "Attack.hit,Rage.strong" !ca-run @{selected|token_id} "PressingStrike" Above is a unfinished copy of a Pressing Strike Macro. When he uses Macetail's Rage, he deals an additional 1d6 and gains STR_MOD temp hp. I have tried this without --condition "strong" on line 3 and with every configuration of --temp I can think of. I have also tried it without listing the the checks before the tag, ie "Attack.hit".The Rage effects trigger regardless of whether the token has the icon or not, and the --temp prevents it from recognizing the --heal at all. Without any Icons on the token, running the macro above along with all variations I have tested results in the following output: if rage has the condition strong then you should use Rage.effect (as rage has already checked to see if the char has strong on it by then)
I finally found time to go back over the macro I needed help with. I have solved most of the issues, although there is still one problem with it. Before I get into the issue, one thing that might be useful to others working with this script is that as of my last testing the temporary hp flag --temp only works if PLACED LAST. Thus if the Temp HP gain only occurs under a certain condition, such as Macetail's Rage, the condition check for the Rage effect must go BEFORE the --temp flag. My current issue is that the Rage Damage will trigger on any hit, regardless of whether the "strong" icon is on the token. Below is a copy of my revised macro without ability references for rolls to make testing easier. I have included in it two different attempts to get the script to recognize that the attack must hit AND the "strong" icon be on the token for the extra damage to trigger. First, I added a Rage.Effect condition to the rageDamage line, and to make it more definitive, added the Attack.hit condition to the Rage check. Nevertheless, the Rage damage ignores whether the Rage check is true, even though all other Rage check dependent actions don't trigger. !ca-power @{selected|token_id} "Pressing Strike" "PressingStrike" --usage "At-Will" --action "Standard Action" --powercard "Keywords|Primal, Weapon" --powercard "Melee|Melee weapon" --powercard "Target|One creature" !ca-check @{selected|token_id} "Attack" "PressingStrike" --roll [[d20+10]] --vs "AC" --target @{target|Main|token_id} !ca-check @{selected|token_id} "Rage" "PressingStrike" --target @{selected|token_id} --condition "strong,Attack.hit" !ca-action @{selected|token_id} "AttackDamage" "Attack" "PressingStrike" --damage [[d10+1]] --condition "hit" !ca-action @{selected|token_id} "rageDamage" "Attack" "PressingStrike" --damage [[1d6]] --condition "hit,Rage.effect" !ca-action @{selected|token_id} "HealDamage" "Rage" "PressingStrike" --heal [[4]] --condition "effect" --temp !ca-action @{selected|token_id} "AttackHitText" "Attack" "PressingStrike" --text "[Attack.AttackDamage.damage] damage." --textkey "Hit" --condition "hit" !ca-action @{selected|token_id} "RageText" "Rage" "PressingStrike" --text "[Attack.rageDamage.damage] extra damage. Gain [Rage.HealDamage.heal] temporary hp" --textkey "^Raging" --condition "effect" !ca-run @{selected|token_id} "PressingStrike" I suspect from this and other tests that the script isn't functioning correctly when actions are dependent on checks that they don't directly 'inherit' from. To test this I made the moderately less complex macro below: !ca-power @{selected|token_id} "Test" "Test" --usage "At-Will" --action "Standard Action" --powercard "Keywords|Weapon" --powercard "Melee|Melee weapon" --powercard "Target|One creature" !ca-check @{selected|token_id} "Attack" "Test" --roll [[d20+10]] --vs "AC" --target @{target|Main|token_id} !ca-check @{selected|token_id} "Red" "Test" --target @{selected|token_id} --condition "red" !ca-action @{selected|token_id} "AttackDamage" "Attack" "Test" --damage [[d10+1]] --condition "hit,Red.effect" !ca-action @{selected|token_id} "AttackHitText" "Attack" "Test" --text "[Attack.AttackDamage.damage] damage." --textkey "Hit" --condition "hit" !ca-action @{selected|token_id} "IconOnText" "Red" "Test" --text "Icon is on." --textkey "Red" --condition "effect" !ca-run @{selected|token_id} "Test" The way I understand your script the damage should only occur if the red icon is on the target, however it is not recognizing the condition generated by a different check. If this is simply not the correct syntax, is there a way without modifying the script to get an action to only trigger on the result of two different checks? It would be easy if I had to check two conditions on the target of the attack, however as the conditions in question are based on the both the target and attacker, two checks are necessary.
(Posted this by accident in the legacy thread...whoops!) I have setup this script to work alongside HB's Power Cards for my campaign. I have everything working very well so far, except my players have requested that I update the Power Cards that are shown in chat with which target they targetted in the output. I noticed that you are able to reference the damage value of a previous !ca-action with something like [firstcheck.dmgaction.damage] - are you able to reference the --target @{target|token_id} from the initial !ca-check attack roll the same way? That way I could put something like --text "You hit [firstcheck.target] for [firstcheck.dmgaction.damage]" in the !ca-action "hitText" line that I have in the macros. Ideas?
1398406364
Gen Kitty
Forum Champion
So, now I'm chewing on this for the game I GM, and I've run into my first issue (of this second attempt). How does one code something like Magic Missile, which always hits?
I would try setting the roll so high, it always hits... !ca-check @{selected|token_id} "Attack" "MagicMisile" --roll [[d20+1000]] --vs "AC" --target @{target|Main|token_id}
1398418048
Alex L.
Pro
Sheet Author
Matt G. said: I would try setting the roll so high, it always hits... !ca-check @{selected|token_id} "Attack" "MagicMisile" --roll [[d20+1000]] --vs "AC" --target @{target|Main|token_id} or you could just use no roll or vs then use the effect tag instead of hit.
1398452031

Edited 1398454355
Hi all. I`m trying to play with some powers which use temporary HP. What I want to know is, what attribute do I need to set on a character to use the Temp HP?