Add cast spell element to effects

Issue #142 resolved
Edward Crompton created an issue

The Provide Spells element adds the spell to the spell list of the actor allowing them to use their spell slots to cast the spell.

However numerous items allow the character to cast a spell for a set number of charges or number of times a day.

Adding an element that defines the spell to be cast, lvl cast at, save DC and all spell attributes. Settings would be needed for pulling through the character’s spell attributes for staffs ect. Output to chat as though the character had cast the spell themselves.

A ‘Consumes Resource’ element could then reduce the charges.

This would also be useful for racial traits or class features that grant the casting of spells without using spell slots of the character. ie Drow warriors able to cast Darkness.

Comments (20)

  1. Kim Mantas repo owner

    I think this is somewhat supported, though there are a lot of moving parts to it. For example, here is how you can set up a wand of magic missiles:

    And this is how you could do something like the Tiefling’s Infernal Legacy trait:

    Once you’ve dropped a spell onto the ‘provides spells’ section, you can click it to edit it and add things like a limited number of uses:

    Let me know if there’s additional functionality missing from this as to what you had in mind.

  2. Kim Mantas repo owner

    Oh, to add to this, when you’re setting up an item that allows multiple spells to be cast, I would recommend keeping the charges resource in its own separate effect, then adding a new effect for each spell that can be cast which has a ‘provides spell’ component alongside a ‘consumes resource’ component. It’s a bit verbose but it’s necessary to avoid the sheet getting confused with some of the shortcuts it otherwise attempts to implement.

  3. Edward Crompton reporter

    Both ‘Innate’ and ‘Provided by Item’ options added the spell to the custom spells and the Spells tab of the sheet. This allows the spells to be cast from the spell list using a spell slot.

    The Hellish rebuke popped up ‘Cast at level?’ when cast from the features or from the spell. The only way it wouldn’t pop up was to cast from ‘Uses’ in the notes of the Spell List entry.

    The way I’d solved the feature previously was by copying the spell effects onto the Feature directly and only referencing the spell in the description.

  4. Kim Mantas repo owner

    Setting the ‘provides spell’ component to ‘innate’ or ‘provided by item’ does not cause the spell to prompt for a spell slot when cast in my testing. What version of obsidian are you on?

  5. Edward Crompton reporter

    The wand only offers the progression by charge when clicking the Charge option in the notes of the equipment entry. Clicking the Use button pops up ‘Cast at Level?’

  6. Kim Mantas repo owner

    I created a brand new world with only obsidian enabled, created a new actor, gave them a spellcaster level (Wizard) and added the following feature:

    I didn’t modify the spell. When I clicked ‘Hellish Rebuke’ under the spells tab, it did not prompt for a spell level at all.

    Are you able to do the same test and report how it behaves?

  7. Edward Crompton reporter

    Hellish rebuke - feature

    Hellish rebuke - spell List

    Magic Missile - Equipment Use

    Magic Missile - Charges

    Magic Missile - Spell List

  8. Kim Mantas repo owner

    Ah, so it’s just old features that have the issue? Could be some stale data that wasn’t cleaned up properly in a migration. How much trouble is it to re-create those features?

  9. Edward Crompton reporter

    I have an actors.db with a character with both features present but can’t attach it.

  10. Edward Crompton reporter

    And I thought I’d finished the features… But it can be done.

    The original feature was a copy of a class feature after conversion to obsidian. If that helps.

  11. Kim Mantas repo owner

    Is it too big? Try zipping it first, it should compress quite a lot.

    I did a big refactor at some point around this provides spell stuff but I wouldn’t have expected old data to be the problem, so anything is possible really.

  12. Kim Mantas repo owner

    So this one turned out to be quite the rabbit hole. Thank you for sending me your test file. It seemed to actually be an issue with items created at the top level and then dragged onto the actor. If you created the item on the actor it worked fine, but if it was from the sidebar, the embedded spells would get out of sync.

    A pretty bad bug either way, and I’m sure there’s more work that will need to be done to get top-level items working smoothly, but this particular one should be fixed now at least.

  13. Log in to comment