MonsterBlocks icon indicating copy to clipboard operation
MonsterBlocks copied to clipboard

Spellcasting Refactor

Open zeel01 opened this issue 3 years ago • 19 comments

At the moment spellcasting relies on the existence of a feature named "Spellcasting" or similar to host the spell list. The naming of the feature hints at the type of spellcaster the Actor is, and then spells that match that casting type are assigned to that casting feature's list. Spells that don't fit an existing feature are not shown at all.

Goals

The new version of spellcasting should accomplish the following:

  • [ ] If no spellcasting feature exists, display one anyway. #92 #93
  • [ ] If a spellcasting feature does exist, optionally use the description text from that feature as the paragraph above the spell list. #117
  • [ ] Determine the format of the spellcasting feature based on the kind of spells the Actor has, rather than the name of the feature. #92
  • [ ] Option to use the "Spellcasting Action" or "Spellcasting Feature" format. #121
  • [ ] With that option, also have an "automatic" mode, which will use the action style iff the actor only has action spells, and will use the feature style otherwise. #121

Bonus

  • [ ] Support an option to display a spell as an Action/Feature. This would allow for easier conversion to more modern spell-like features, or allow an NPC to have a "signature spell" made more readily available. #121 #179
  • [ ] #183

Spellcasting Feature

This will display more or less the same as the existing feature. A list using either slots, uses/day, or pact slots that includes spells of any action type or casting time. The actor might have more than one variation of this feature for different kinds of spellcasting or different spellcasting abilities.

Spellcasting Action

Unlike the official statblocks, the Spellcasting Action will display basically identically to the spellcasting feature including allowance for spell slots, and spells that are not actions. The only real difference is that it will appear in the Actions section of the sheet.

The assumption is that the GM will enter the details of the Actor in a logical and consistent way.

Auto Feature/Action

The idea here is to automatically determine if the casting feature should be a Feature or an Action based on the spells known. An Actor that only has x/day spells that are actions will have a Spellcasting Action, but any spells that break that strict requirement will cause the display to switch to the older Spellcasting Feature style.

The assumption is that the GM will enter the details of the Actor, and the sheet will try to organize those details in a way that seems to best fit. If the Actor seems to be an "old style" NPC, that's how it should be displayed. If it seems to be of the new style, it will display that way instead.

zeel01 avatar Mar 15 '22 14:03 zeel01

See #121 with list of modern creatures for reference.

zeel01 avatar Mar 15 '22 14:03 zeel01

Template pseudo-code

{{feature.name}}. The {{actor.name}} is a {{actor.castingLevel}}th-level spellcaster. 
Its spellcasting ability is {{actor.castingAbility}} (spell save DC {{actor.saveDc}}, +{{actor.spAtkBonus}} to hit with spell attacks). 
The {{actor.name}} can cast {{each actor.atWillSpells[]}} at will and has the following spells prepared:
{{each spellbook.pages[]}}
    page.isCantrip   ?? Cantrips (at will)
    page.isSlots     ?? {{page.level}}th level ({{actor[page.level].slots.current}}/{{actor[page.level].slots.max}} slots)
    page.isPactMagic ?? 1st-{{page.level}}th level ({{actor[page.level].slots.current}}/{{actor[page.level].slots.max}} {{page.level}}th-level slots)
    page.isUses      ?? {{page.uses}}/day each
        : {{each page.spells[]}} {{spell.name}} ({{spell.uses.curent}}, {{each}}
{{/each}}
  • Actor
    • Name - name of the actor
    • Spellcasting Level
    • Spellcasting ability (could be overridden on a per-spell basis) (creatures can technically have more than one, though Actors can not)
    • Save DC (derived from ability and proficiency)
    • Spell Attack Bonus (derived)
    • Spell slots per level
    • Spell slots per level max
    • Feature - The spellcasting feature item (optional)
      • Name
      • Description (optional)
    • Spells/Spellbook
      • Page []
        • Level
        • Uses - Taken from spells within
          • Max
        • Cantrips?
        • Pact Magic?
        • Spell []
          • Name
          • Uses
            • Current

zeel01 avatar Mar 16 '22 03:03 zeel01

Standard Casting (slots)

  • If any spell has a preparation mode of prepared or always prepared
  • Includes all spells with those two modes

At-Will List

  • If there are any spells with an at-will preparation mode
  • Only if the Actor doesn't have any innate spells

Pact Magic

  • If any spell has the preparation mode of pact magic
  • Includes all the spells with that mode
  • Includes Cantrips not set as pact magic iff there is not a standard casting feature

Innate Casting

  • If any spell has the innate casting prep mode or if there are spells with the at-will mode but none with prepared
  • Includes all at-will spells if there are any innate spells, even if there are prepared spells

Spellcasting Action

Choice

If the user selects the spellcasting action style, then the spellcasting feature is displayed under the Actions header, but is otherwise the same as usual.

Automatic

The spellcasting action will display under actions only if all of the spells are at-will and/or innate and they all have a casting time of one action. Otherwise, the spellcasting feature is displayed in the features section.

An actor with both innate and prepared spells may have both a spellcasting feature and action.

zeel01 avatar Mar 16 '22 03:03 zeel01

At-Will List

  • If there are any spells with an at-will preparation mode
  • Only if the Actor doesn't have any innate spells

Innate Casting

  • If any spell has the innate casting prep mode or if there are spells with the at-will mode but none with prepared
  • Includes all at-will spells if there are any innate spells, even if there are prepared spells

Currently Innate At-Will spells are defined by spells that are set to Innate, and have unlimited uses (no n/day uses). I would be worried assuming all at-will spells fall into Innate casting, when there are casters that have Innate spells and At-Will usage in their normal spellcasting feature.

jeremyregnerus avatar Mar 16 '22 14:03 jeremyregnerus

The logic here is that if there are prepared spells, the at-will spells will live with them in the at-will line of the top paragraph. If there are not prepared spells, then at-will will be assumed to be part of an innate casting feature.

Since with this change, all casting features will be "intuited" instead of linked directly to features on the actor, the assumption being made is that a caster that only has at-will spells is probably an innate caster, otherwise they would surely have some cantrips as prepared and some first level prepared spells.

zeel01 avatar Mar 16 '22 14:03 zeel01

It is good to note that innate spells with no use limit need to be grouped with the at-will spells though, I forgot about that.

zeel01 avatar Mar 16 '22 14:03 zeel01

Spellcasting Action

Choice

If the user selects the spellcasting action style, then the spellcasting feature is displayed under the Actions header, but is otherwise the same as usual.

Just understanding here that the display of the spells is more similar to Innate casting when the Spellcasting feature is an action, listing uses per day, instead of spell-slot consumption.

jeremyregnerus avatar Mar 16 '22 14:03 jeremyregnerus

there are casters that have Innate spells and At-Will usage in their normal spellcasting feature.

Wait, are there casters that have both innate at-will and prepared at-will spells?

zeel01 avatar Mar 16 '22 15:03 zeel01

Spellcasting Action

Choice

If the user selects the spellcasting action style, then the spellcasting feature is displayed under the Actions header, but is otherwise the same as usual.

Just understanding here that the display of the spells is more similar to Innate casting when the Spellcasting feature is an action, listing uses per day, instead of spell-slot consumption.

Yes, however I'm not going to police the way they input the spells. They should make them all innate if they want to use the casting action, since that's how the casting action works. But if they make them prepared, and choose this option, there is a logical conflict. The best resolution is to just show the feature as an action, but format it as a prepared casting feature. It's wrong but the GM has entered a technically invalid combination, so that can't be helped.

zeel01 avatar Mar 16 '22 15:03 zeel01

Auto Feature/Action

The idea here is to automatically determine if the casting feature should be a Feature or an Action based on the spells known. An Actor that only has x/day spells that are actions will have a Spellcasting Action, but any spells that break that strict requirement will cause the display to switch to the older Spellcasting Feature style.

The assumption is that the GM will enter the details of the Actor, and the sheet will try to organize those details in a way that seems to best fit. If the Actor seems to be an "old style" NPC, that's how it should be displayed. If it seems to be of the new style, it will display that way instead.

If you want to do "automatic" spellcasting recognition, one thing you could consider is allowing the user to change the spells from prepared (traditional) to alwaysprepared (new action) as a way to define them as traditional prepared, to always available using n uses per day.

jeremyregnerus avatar Mar 16 '22 15:03 jeremyregnerus

That would not be a valid distinction for that preparation mode though. Always prepared mode probably shouldn't be a prep mode in the system, and should just be a check box instead. The system data model for spells doesn't match how the game really works very well. But the intended use is that this is chosen for any spells that a class grants as "always prepared" rather than a daily selection. I can't mis-use it to mean something else.

zeel01 avatar Mar 16 '22 15:03 zeel01

there are casters that have Innate spells and At-Will usage in their normal spellcasting feature.

Wait, are there casters that have both innate at-will and prepared at-will spells?

Spellcaster with Spellcasting and Innate Spellcasting Arcanaloth MM p313 image

I will try to find one with Innate and Spellcasting with At-Will

jeremyregnerus avatar Mar 16 '22 15:03 jeremyregnerus

Innate Spellcaster with Warlock Spellcasting Mordenkainen's Tome of Foes p128 image

jeremyregnerus avatar Mar 16 '22 15:03 jeremyregnerus

This is probably the most complicated example I've seen, Drow Arachnomancer from MTF p182. Innate spellcasting, Warlock like spellblock, with n/day usage for 3 spells. image

jeremyregnerus avatar Mar 16 '22 15:03 jeremyregnerus

Right, but notice that the Arcanaloth doesn't have at-will spells in both of those features. The at-will spells are in its innate feature, unlike an Archmage which has at-will spells in its normal casting feature.

Archmage: All spells are prepared or at-will. So all spells live in the prepared casting feature. Arcanaloth: Some spells are prepared, some are innate. So at-will spells live in the innate feature.

The counterexample I would need, is a creature that has at-will spells listed in more than one feature. I don't think this exists, as it's a special exception that NPCs like the Archmage have.

zeel01 avatar Mar 16 '22 15:03 zeel01

This is probably the most complicated example I've seen, Drow Arachnomancer from MTF p182.

... wtf

I guess those are its mystic arcanum? Yeah, there isn't a realistic way to deal with that in the Foundry 5e data model.

zeel01 avatar Mar 16 '22 15:03 zeel01

I have found (only) three (edge-case) examples; AND, they are not technically published stat blocks, so they can probably be disregarded. I'll list them here anyway for reference. Out of the Abyss p155 Vizeran DeVir Elf Archmage, His Fey ancestry gives him Innate Spellcasting At will: dancing lights 1/day each: darkness, faerie fire

Being an Archmage, he uses Intelligence and can cast disguise self and invisibility at will listed in his spellcasting feature Baldur's Gate: Descent Into Avernus p46 Sylvira Savikas Tiefling Archmage, like above, being a Tiefling he has At will: thaumaturgy 1/day each: darkness, hellish rebuke And an Archmage gives him disguise self and invisibility as at-will spells in his spellcasting feature Waterdeep: Dungeon of the Mad Mage p169 Drivvin Freth Like above Drivven Freth is an Elf Archmage, and has the exact same Innate and Spellcasting features.

jeremyregnerus avatar Mar 16 '22 15:03 jeremyregnerus

Yeah, I don't think there is anything we can do for these adventure NPCs. The system doesn't even support multiple spellcasting abilities. So tiefling Archmage is going to be wrong no matter what.

zeel01 avatar Mar 16 '22 15:03 zeel01

I found this while trying to add spells to a brand new NPC. Had no idea it needed a "spellcasting" feature. I'm a little late to the party, but personally I'd like to see a separate "Spellcasting" section, rather than a massive entry as a feature. For attacking spells I'd like to see the to hit / DC, range, and targets at a glance, like normal attacks. But that's just like, my opinion man.

ChrisHamilton91 avatar Jun 01 '22 05:06 ChrisHamilton91