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

Yet another 4e damage automation script

January 30 (11 years ago)
Alex L.
Pro
Sheet Author

Jarrod . said:

Were they registering as 0s?


no i just wasn't showing them correctly. Now it will say "Critical Miss".
January 31 (11 years ago)
Alex, i may have found one "bug" in your script. When making an attack roll that MATCHES a target's defense, it is being reported as a miss. I believe it should be a hit.

January 31 (11 years ago)
Alex L.
Pro
Sheet Author

Kenny T. said:

Alex, i may have found one "bug" in your script. When making an attack roll that MATCHES a target's defense, it is being reported as a miss. I believe it should be a hit.



Check the top of the script, its a config option:
var EQUAL_TO_DEF_HIT = false;
True means that if Attack = Defence it will hit, False means it will miss. It is set to false because that is the rule my GM uses.
January 31 (11 years ago)
ah, sorry i missed that, thanks Alex!

February 03 (11 years ago)
Alex L.
Pro
Sheet Author
New Update:
Added resistances, just create a attribute with the name [damage type]_resist and give it the value you want it to resist, ie cold_resist.
February 03 (11 years ago)

Edited February 03 (11 years ago)
Alex, This thing is shaping up into something epic! Is it possible to add a damage type "all" ? so one can have a stat "all_resist"?
February 03 (11 years ago)
Alex L.
Pro
Sheet Author

Kenny T. said:

Alex, This thing is shaping up into something epic! Is it possible to add a damage type "all" ? so one can have a stat "all_resist"?

Done, will use typed resists first, then all resist.
when putting your script in I get this error "Cannot call method 'on' of undefined"
February 03 (11 years ago)
Alex L.
Pro
Sheet Author

Saevar L. said:

when putting your script in I get this error "Cannot call method 'on' of undefined"

I don't get any errors during testing.
February 03 (11 years ago)

Edited February 03 (11 years ago)
nvm it seems to work now ^^
February 03 (11 years ago)
SWEET! oh oh, sorry to be a pain, but what about a "-x" command that would allow the addition of temp hp to bar 3?
February 04 (11 years ago)
I've been testing and it doesn't seem to me that there is any damage reduction with corresponding damage types that my sheets have the _resist attribute for, and I can't find what I'm doing wrong.
February 04 (11 years ago)

Jarrod . said:

I've been testing and it doesn't seem to me that there is any damage reduction with corresponding damage types that my sheets have the _resist attribute for, and I can't find what I'm doing wrong.


Jarrod, seems to work for me, i would recommend double checking that in your macro's that all your damage types are lower case and that they are lower case in your attributes as well (also the first column) - so it should "cold-resist" 5/0 in your attributes and "-T cold" in your macro's.

February 04 (11 years ago)

Edited February 04 (11 years ago)
Dunno I think you need all of nothing. For me they seem to only work if I set one with all_resist aswell. So if I put cold_resist 4/4 and all_resist 4/4 it works but in no other combin
February 04 (11 years ago)

Edited February 04 (11 years ago)
That's odd, it works just fine for me...i wonder if it matters in what order you put all the macro modifiers?

!power @{selected|token_id} "Pimp Slap" -t @{target|token_id} -a [[d20+9]] -d [[d8+6]] -C [[d8]] -v ac -T cold -H snail -h "target slowed, Save ends." -E interdiction -e "Target suffers a -2 to all defenses, end of my next turn."

is generally the order i put mine in.

/me berates his ally for lying down on the job!
CLOSE: BURST 5
!power @{selected|token_id} "Majestic Word" -t @{target|token_id} -c [[@{target|svalue}+4]] -e "The target regains health! FEAT: Improved Majestic Word: target gains +4 Temporary HP"

for heal spells.
Not sure. Would need more time to experiment with it. I use Radiance rpg similar to 4E but uses Danage reduction instead of armor so ofc it reduces aloy if not all damage alot of the time.
February 04 (11 years ago)
Alex L.
Pro
Sheet Author
Damage types shouldn't be caps sensitive, Cold or cold should work. I will look at adding Temp HP healing soon.
February 04 (11 years ago)
Is everyone using both boxes for the attributes of the resist? I was thinking that it was only the first box like with AC, Fort, Reflex and Will and such..
February 04 (11 years ago)

Jarrod . said:
Is everyone using both boxes for the attributes of the resist? I was thinking that it was only the first box like with AC, Fort, Reflex and Will and such..
i am only using the first

February 04 (11 years ago)
same here, and the reduction isn't going through.. hm.
Try useing all_resist and cold_resist. First boxes.
February 05 (11 years ago)
I've tried cold, fire, and poison.. Maybe I'll have to copy and paste the crypt again.
February 05 (11 years ago)
yeah the resist was a recent addition; perhaps you are using a older version of the script?
Honestly I had the same problem. It wouldnt detect cold_resist alone but would if I mixed it with all_resist
February 05 (11 years ago)
Alex L.
Pro
Sheet Author
New update:
  • Almost total recode, now more readable.
  • -b will heal temp hp, same useage as -c.
February 05 (11 years ago)
Alex, awesome! my combat times are getting cut in half!
February 05 (11 years ago)

Alex L. said:

Kenny T. said:

Alex, i may have found one "bug" in your script. When making an attack roll that MATCHES a target's defense, it is being reported as a miss. I believe it should be a hit.



Check the top of the script, its a config option:
var EQUAL_TO_DEF_HIT = false;
True means that if Attack = Defence it will hit, False means it will miss. It is set to false because that is the rule my GM uses.

You should fix the comment in your script on line 26:

var EQUAL_TO_DEF_HIT=false;//hit on Def == to_hit. Default 4e = false

To say that 'Default 4e = true' instead.
February 06 (11 years ago)
Alex L.
Pro
Sheet Author

HoneyBadger said:

Alex L. said:

Kenny T. said:

Alex, i may have found one "bug" in your script. When making an attack roll that MATCHES a target's defense, it is being reported as a miss. I believe it should be a hit.



Check the top of the script, its a config option:
var EQUAL_TO_DEF_HIT = false;
True means that if Attack = Defence it will hit, False means it will miss. It is set to false because that is the rule my GM uses.

You should fix the comment in your script on line 26:

var EQUAL_TO_DEF_HIT=false;//hit on Def == to_hit. Default 4e = false

To say that 'Default 4e = true' instead.


yes i realy should.
February 06 (11 years ago)
By far the best and most stable API I have used on roll20; thanks again for all your hard work Alex!
February 07 (11 years ago)

Edited February 07 (11 years ago)
So i wanted to make a direct-heal macro for one of my cleric characters based on your script (for all those random type heals he can do). the macro goes:

!power @{selected|token_id} "Healing" -t @{target|token_id} -c [[?{How Much HP?|0}]] -b [[?{How Much THP?|0}]]

So it prompts the macro user for a set number to heal and a set number to add to the THP bar.

typing in 5 for the hp prompt and 5 to the THP prompt should add 5 to each of those bars (in theory)

However when healing target who has 25 health for 5 health and 5 Temp results in his health bar becoming 255 and his THP becoming 5.

Does anyone see a mistake in my macro?

EDIT-
changing my macro to !power @{selected|token_id} "Healing" -t @{target|token_id} -c [[0+?{How Much HP?|0}]] -b [[?{How Much THP?|0}]]
had no effect.
February 07 (11 years ago)
Alex L.
Pro
Sheet Author

Kenny T. said:

So i wanted to make a direct-heal macro for one of my cleric characters based on your script (for all those random type heals he can do). the macro goes:

!power @{selected|token_id} "Healing" -t @{target|token_id} -c [[?{How Much HP?|0}]] -b [[?{How Much THP?|0}]]

So it prompts the macro user for a set number to heal and a set number to add to the THP bar.

typing in 5 for the hp prompt and 5 to the THP prompt should add 5 to each of those bars (in theory)

However when healing target who has 25 health for 5 health and 5 Temp results in his health bar becoming 255 and his THP becoming 5.

Does anyone see a mistake in my macro?





Its a problem with javascripts soft typing, it sometimes decides that it will only treat something as a string and when you add 5 to a string of "25" you get "255". I will go through my code and add some fixes.
February 07 (11 years ago)

Edited February 07 (11 years ago)
oh wow, you were fast, you answered it before this post :-)

Further experimenting: i think there may have been a bug in the new "-c" string macro; previous working healing macros no longer work as well.

/me utter a soothing word that mends wounds of the body and spirit.
!power @{selected|token_id} "Healing Word" -t @{target|token_id} -c [[@{target|svalue}+2d6+5]] -e "The target can spend a healing surge and regain d6 + Wis mod (3) additional hit points. Pacifist Healer: Add an additional d6 + Cha Mod (2) to the amount of health gained."
February 07 (11 years ago)
Alex L.
Pro
Sheet Author
Update:
Fixed some shit :P

This update should fix your problem Kenny, let me know if it doesnt.
February 07 (11 years ago)
Flawless! only 2 cents is that you may wanna add the -b option to the list of grey options at the beginning of your script for follow on users :-) I'd also maybe have your APICMD link go directly to that GIST rather than the thread, with the various version of it littering that thread it may confuse other script-nubs like myself ;-)
February 08 (11 years ago)
This is amazing.. I love seeing all the progression and improvements done to this script since the start. It's by far my favorite script that I currently use. Thank you so much for this Alex. You are amazing!
February 09 (11 years ago)
Also, here's a modified script based on Brian's character sheet generation script that will generate a sheet with all the required fields for this script. Hope this helps contribute to this project!

https://gist.github.com/anonymous/8903593
February 09 (11 years ago)
Is anyone else noticing a cumulative damage total when there's a critical hit rolled?
Here's what I'm getting:



The crit damage is fine as that is a roll and will vary. The normal damage, however, keeps going up. Here's the macro for the power:
February 10 (11 years ago)
Alex L.
Pro
Sheet Author

Jarrod . said:

Is anyone else noticing a cumulative damage total when there's a critical hit rolled?
Here's what I'm getting:

The crit damage is fine as that is a roll and will vary. The normal damage, however, keeps going up. Here's the macro for the power:
Fixed.
Update:
  • Fixed bug in max damage calculation when using more than one dice.
  • Added SHOW_ROLLS option that will add some mouse over details to the damage roll. (just a debug thing really)
February 10 (11 years ago)
Alex, I swear that if I could I would give you a massive bear hug lol. You're awesome! Thank you :)
February 10 (11 years ago)
How does the SHOW_Rolsl option work? when i set it to "true" i can mouse over the inline damage rolls? i#ve tried it with both true and false values but not seeing any noticable changes. do i have to add a variable to the macros as well?
February 10 (11 years ago)
Alex L.
Pro
Sheet Author

Kenny T. said:

How does the SHOW_Rolsl option work? when i set it to "true" i can mouse over the inline damage rolls? i#ve tried it with both true and false values but not seeing any noticable changes. do i have to add a variable to the macros as well?


no set it to true then mouse over the damage value, its only for the damage value as i said it is just in there for debugging.
February 10 (11 years ago)
I cant get the output in the chat to be formated like yours. I get this. What am i doing wrong?
February 10 (11 years ago)
Alex L.
Pro
Sheet Author

Kevin H. said:

I cant get the output in the chat to be formated like yours. I get this. What am i doing wrong?


looks like your missing a !
February 10 (11 years ago)
nevermind i found it. I was missing a ! in the marco.
Is it possible to have maybe a macro which creates one of these powers onto a character represented token? (To save time on prep)
February 10 (11 years ago)
Alex L.
Pro
Sheet Author

Saevar L. said:

Is it possible to have maybe a macro which creates one of these powers onto a character represented token? (To save time on prep)

no.
February 10 (11 years ago)
a mouse over on attack rolls would be grand; i had my hunter hit between 13 and 15's 8 times on a row with her twin strike; so my party was like - "Kenny i don't know about these new macros, i think something is wrong." and i was like" it's cool, i just spent 3 hours changing all my macros to the new format, we can change back to the old ones, np." >.<

/sigh what ever happened to "for Science!"
February 11 (11 years ago)
Alex L.
Pro
Sheet Author

Kenny T. said:

a mouse over on attack rolls would be grand; i had my hunter hit between 13 and 15's 8 times on a row with her twin strike; so my party was like - "Kenny i don't know about these new macros, i think something is wrong." and i was like" it's cool, i just spent 3 hours changing all my macros to the new format, we can change back to the old ones, np." >.<

/sigh what ever happened to "for Science!"


You can tell them its just how RNG works, all the rolls are exactly the same as they would be if you put them in a normal macro, I don't edit them in any way (unless it crits).
February 14 (11 years ago)
Alex, have you found out a way to implement vulnerabilities into the script?