PDA

View Full Version : Actions Parsing for Custom Spells in Dec-2021 Update



leozelig
December 16th, 2021, 18:32
Hey folks,

Just want to give some details on actions parsing for custom spells that I am including in the December 2021 ruleset update. Up to this point, custom spells have required users to enter the actions on the char sheet manually, while the actions for core rules spells are hard coded into the ruleset. Entering them yourself can be a tedious job depending on how detailed your casting table is.

This feature is intended to lighten the load a little bit. It will definitely not be perfect - some phrases will be missed or misinterpreted, and duplication will occur if your casting table repeats the same effects for different results. Still, I think this will be an improvement over doing everything yourself.

Here is a list of phrases that are translated into effects, where <dice> can be 1d4, 1d6+1, or simply +2:

CHECK
Anything dropped from the spells library will get a spell check roll.

SAVE
If a saving throw is specified in the 'Save' field on the spell record, it will be added as an action. Otherwise, the results table is parsed as follows:
"make(s) a <save type> save"
"succeed on a <save type> saving throw"
As above, but with "DC <target number>" before the save type, where <save type> is reflex, fortitude, or willpower. This is not case-sensitive, but avoid using the short form Ref, Fort, or Will.

DAMAGE
"<dice> damage"
"<dice> points of damage"
"damage equal to <dice>"
Damage type can be specified as "<dmg type> damage" for all of those.
The words "additional damage" or "extra damage" indicate that this should be a DMG effect.
The words "damage each round" indicate that this should be a DMGO effect.

HEAL
"heal(s) [or gain(s) or regain(s)] <dice> hit points (or hp)"
"heals <dice> temporary hit points" -- specified as temp hp
"regains <dice> lost hit points"
"heals <dice> + caster level (or CL) hit points" -- make sure the spaces are there, 1d4+CL clustered together will not work
"heals <dice> + <ability> modifier hit points" where <ability> is strength, agility, etc. As with saving throws, it's best to avoid short forms (eg, Str or Agi).

EFFECT
Durations are parsed if "for <duration text> <duration units>" follows the effect phrase (eg, "knocked unconscious for 1d6 rounds") . In this case, "1d4+CL" works without spaces because it is not being converted to a dice phrase, and units can be rounds, turns, minutes, hours, days, weeks, months, or years. Specific effects are parsed as follows:
AC
"<dice> bonus/penalty to AC"
"<dice> to AC"
"<dice> AC" as in "+2 AC"
"AC is increased/decreased/reduced by <dice>"

DMG
"additional (or extra) <dice> damage"
"additional <dice> points of damage"
Can specify <damage type> damage.

DMGO
"<dice> damage each round"
"<dice> points of damage each round"
Can specify <damage type> damage.

CONDITIONS
These mostly match up with the condition name.
"or be dazed"
"knocked prone"
"are blinded and deafened"
"turns invisible"
"falls asleep"
"instill fear"

ALL, ATK, CHECK, INIT, SAVE, SKILL, and SPELL
"<dice> to all rolls"
"<dice> bonus/penalty to attack rolls" or "to attacks" -- can specify range type (ie, melee attack rolls)
"<dice> to initiative rolls"
"<dice> to saves" or "saving throws" -- can specify save type (reflex saving throws), avoid short form
"<dice> to ability/skill/spell checks" -- can specify ability type (eg, "+2 bonus to strength checks")

I avoided the word "recover" because the core rules use this in the context of recovering ability damage. This is intended to cover the basics, so don't expect complicated phrases listing multiple action types in sequence to parse correctly.

Feel free to post any questions here. Bugs or feature requests should still be posted here (https://www.fantasygrounds.com/forums/showthread.php?49035-Dungeon-Crawl-Classics-Role-Playing-Game-Ruleset-Bug-reports-feedback-etc).

Tabarkus
December 19th, 2021, 04:57
Very nice!

leozelig
December 21st, 2021, 16:51
I should add that the short form does work for saves (eg, DC 15 Ref save) and ability modifiers for damage and healing (eg, heals 1d4 + Per modifier hit points). But in general, if a save or ability modifier is not parsing for you, try the full name (ie, Reflex, not Ref). Nothing is case-sensitive by the way.