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] Fantasy Craft - Standard character damage save

1384566195

Edited 1384566344
Here is a quick attempt to automate the damage against Standard Characters for Fantasy Craft, by Crafty Games. There are some assumptions in order to make this work. ASSUMPTIONS ---------------------- Whether the attack hits or not is not determined here Damage amount to apply is not taken care of here (i.e. Damage Reduction, Resistance, etc) Default colors for the bars/circles You don't use the Yellow status dot for anything else You don't use the three circles/bar for anything else on Standard Characters A character sheet or journal is not required for this functionality, nor are any attributes, abilities, or other macros SETUP ---------- Use the "Yellow" status dot to designate the token as a Standard Character. Use the Green circle (bar1) as the Damage Save modifier. Use the Blue circle (bar2) as the tough NPC Quality grade. ( leave blank for regular, set to "1" for tough I, "2" for tough II, etc. IN-PLAY ------------ Use the Red circle (bar3) to track accumulated damge. PSEUDOCODE ----------------------- Listen for changes to a token Check to see if the token is a Standard Character Get the current and previous Accumulated Damage values If the current damage is greater than previous, it took damage (ignore changes to other values, heals, etc) Determine the Damage Save DC based on current damage Roll save against DC using Damage Save Bonus If save is successful, do nothing (SuperGoblin!) If save is failed, either decrement the non-zero tough grade and reset damage, or make it dead. <a href="https://gist.github.com/lifer4700/7494622" rel="nofollow">https://gist.github.com/lifer4700/7494622</a> Enjoy!
Awesome! I'll take a look at some time. You might be interested in my FC condition tracker I'm working on. I hope to have it done by the end of the year. A key design goal: Conditions are associated to individual tokens not characters. This allows the use of multiple tokens to be associated to a single character while each token can have different conditions. But each token needs to be associated a character. A Condition contains a list of Effects. An Effect can be associated to either an attribute, an action or a reaction to an action (such as "vs melee attack") Each Effect has the following (all of which are configurable): a flag that determines whether the effect will prohibit the associated action optional modifier optional note string An Action is something the token is trying to do that requires a successful roll to succeed. This could be an attack or skill check. An Action has the following (all of which are configurable): name of attribute (as in D&D attribute ex: Strength) from the character that is associated to the action. For example, Melee Attack action could be STR name of attribute (as in a character's rank in a skill) from the character that is associated to the action. For example, Sneak action could be Sneak_Skill Additional Features: GM can add/remove condition on all selected tokens. [done] Ability to configure what Effects are associated with a given Condition. [done] Ability to set timer on a specific condition on a specific token. Ability to stack multiple occurrences of a Condition on the same token up to a configurable number. [done] Ability to set a condition to be automatically added to token when a specific Condition has reached it max stack size. [done] Apply optional Effect modifier to result. [done] If Effect is associated to an attribute, it will be applied to that attribute of the character, which then affects the result. [done] Code to define the conditions and their effects is separate from code that tracks and actually applies effects. [done] Ability to select 1 or more targets of an action. Compute roll result for each target.
1384615524

Edited 1384615595
I'm currently in the process of re-writing this as a function, since the on(change:token) event listener doesn't trigger from obj.set("bar1_value",x), which means that my "give damage to selected tokens" script does not trigger a damage save. So, I need to write the damage save itself as a function called from both this script and also from the "give damage to selected tokens" script. I also have macros written for all players to access to make basic attacks, and token specific macros to roll damage. These assume a character sheet attached to the token.
1384616512

Edited 1384617200
So far, my character sheet for Special Characters has the following 19 attributes. STR, DEX, CON, INT, WIS, CHA VITALITY, WOUNDS, DEF FORT, REF, WILL ProfUnarmed, ProfBlunt, ProfEdged, ProfHurled, ProfBows MAHitMod, MADamMod The stats are simply the stat bonus, not the stat itself. I currently link VITALITY to the green circle, WOUNDS to the red circle, and DEF to the blue circle. The saves are simply the total save from the paper sheet, I do not add stat bonuses for saves in Roll20. The "Prof" attributes are either -4, 0, or 1 representing untrained, trained, and forte respectively. The two MA mod attributes are for characters that have the Martial Arts and Master's Art feats. It's just fudge number to account for the stat difference between Str and whatever they picked, as well as the extra +2 or +4 damage. Here the attack macros available to all players. Edged-Attack @{selected|token_name} slashes at @{target|token_name}: [[1d20+@{selected|STR}+@{selected|BAB}+@{selected|ProfEdged}]]! Blunt-Attack @{selected|token_name} tries to smash @{target|token_name}: [[1d20+@{selected|STR}+@{selected|BAB}+@{selected|ProfBlunt}]]! Unarmed-Attack @{selected|token_name} takes a swing at @{target|token_name}: [[1d20+@{selected|STR}+@{selected|BAB}+@{selected|ProfUnarmed}+@{selected|MAHitMod}]]! Bow-Attack @{selected|token_name} shoots at @{target|token_name}: [[1d20+@{selected|DEX}+@{selected|BAB}+@{selected|ProfBows}]]! Hurled-Attack @{selected|token_name} throws something at @{target|token_name}: [[1d20+@{selected|DEX}+@{selected|BAB}+@{selected|ProfHurled}]]! Here are a few sample damage macros. They are token actions, designed for each character on their journal as abilities. Saber-Damage @{selected|token_name} hits with the Saber for [[1d10+@{DEX} ]] (Stress or Lethal) Hatchet-Damage @{selected|token_name} hits with the Hatchet for [[1d6+@{STR}]] (AP2) Unarmed-Damage @{selected|token_name} hits with an Unarmed attack for [[1d4+@{STR}+@{MADamMod}]]
1384617072

Edited 1384617287
I am making no attempt to fully automate combat or damage delivery. I'm leaving all that up to the DM... me. I just want the basic die rolls to be handled by the system. I still add in any appropriate modifiers, subtract any relevant DR or resistances, etc. I still decide if it's a hit or not. Character sheets will be maintained on paper (or relevant software), outside of Roll20 The addition of conditions would be of great benefit, of course!
1384617431

Edited 1384617970
Oh, I'm still not sure how (or if) I plan on dealing with stress and subdual damage on special characters in Roll20. I could use all three circles, each to represent lethal, subdual, and stress, but then what about wounds? I haven't figured that out yet. Coming from MapTool, I'm not used to being limited to exactly 3 bars, and only these status icons... And no pop-up character sheet on hover... Right now, my focus is on standard characters, since there are always SO MANY of them!
Ok, I've completely re-written this. I will post it soon, and link it here. Here is the list of changes and additions. I have separated out the Damage Save function, since modifying a bar using the API does not trigger the change:token listener event. I have added in a chat command that allows you to select a group of tokens and apply damage to them all. It ignores all but Standards. I have added in a chat command that allows you to select a group of tokens and reset * them. It ignores all but Standards. * reset - does the following sets Accumulated Damage to zero Removes the "Dead" status sets Damage Save to the 1st argument, 0 if not present sets ToughGrade to 2nd argument, 0 if not present This can help setup when you drop a bunch of Standard characters (copy/paste, etc) then want to give them their stats.
1384666669

Edited 1384667135
This post is now outdated, and can be closed. Although this is now obsolete, it is still fully functional as designed, but will not be maintained or updated by me. Here is the updated thread. <a href="https://app.roll20.net/forum/post/468108/#post-468" rel="nofollow">https://app.roll20.net/forum/post/468108/#post-468</a>...