misthero / dnd5e-spellpoints

FoundryVTT module for spellpoints magic system 5e
MIT License
8 stars 16 forks source link

D&D 3.0.0 system compatibility #65

Open misthero opened 8 months ago

misthero commented 8 months ago

Right now this module is partially compatible with the new dnd system. Specifically resources are gone on the new character sheet, if you need to create a new resource named "Spell Points" you must switch to the legacy character sheet. After the resource is created you can switch back to the new character sheet and it should work.

I've not tested everything but for now this could be a way around to keep using this module.

Resources will be handled by "Items" from now on, so I will need to change the inner logic of the module. No ETA.

I checked on the official channels and right now many modules are not compatible with d&d 3.0.0+ system. I suggest to wait a litte before updating your current campaign.

Remember to backup your world data anyway.

Battenhatch commented 7 months ago

I'm just happy you are working on it. This module is so crucial to my games.

FrankIsAtank commented 7 months ago

I'd like to highlight an issue with migration to D&D v3. It used to be pretty easy to use effects to manipulate resources, it isn't as easy to use effects to add or remove max charges from an item. This means items won't cover all the use cases that resources cover now. I'd request during this migration attention is brought to continue supporting legacy resources for spell point tracking while possible.

Vilonight commented 7 months ago

Hi, I don't know much about programming, for me it's a real dark magic. I'll just describe the problem. We are playing on dnd5e v3.0.3 using the Tidy sheet. I created a resource called Spell Points and turned on automatic calculations, then updated the server and edited the class items, but nothing was applied. The value of the resource did not change, but spells still consumed slots. I'm probably doing something wrong, I would be extremely grateful for your help.

Vilonight commented 7 months ago

Hi, I don't know much about programming, for me it's a real dark magic. I'll just describe the problem. We are playing on dnd5e v3.0.3 using the Tidy sheet. I created a resource called Spell Points and turned on automatic calculations, then updated the server and edited the class items, but nothing was applied. The value of the resource did not change, but spells still consumed slots. I'm probably doing something wrong, I would be extremely grateful for your help.

UPD: Wrong! Spell Points are spent, but do not change independently based on level.

misthero commented 7 months ago

I'd like to highlight an issue with migration to D&D v3. It used to be pretty easy to use effects to manipulate resources, it isn't as easy to use effects to add or remove max charges from an item. This means items won't cover all the use cases that resources cover now. I'd request during this migration attention is brought to continue supporting legacy resources for spell point tracking while possible.

I know, but I'm not in charge of dnd v3 development, also being the resources now "deprecated" this means that sooner or later they will disappear for good. So I cannot count on "legacy resources" to keep the module working in the future. We also don't know if the "items as resources" will become easier to manage in the future. I'm still evaluating other "long term" alternatives.

misthero commented 6 months ago

@Battenhatch, @Vilonight, @FrankIsAtank Hello,

I've had some time this weekend to try the item approach, it's at the following link. https://github.com/misthero/dnd5e-spellpoints/archive/refs/heads/dev/dndV3-testing.zip

It is not finished if you wanna help debugging it it would be helpful.

This version now works without resources but using a spell points item. The item itself is in a compendium added to the module, you just need to drag it on the character sheet that needs the spell points.

I advise to backup your world or create a new fresh world before trying the module to avoid messing with your current campaigns.

Aleswall commented 6 months ago

Oh, thank you!! I've been waiting for this one, I gave it a brief test just now and it seemed to work wonderfully. There's only two slight flaws I noted, neither serious:

1) This might be out of your hands, but the Spell Points resource bar on the new v3 sheets extends beyond its bounds if your current is higher than your max. Not that this'd ever be the case.

2) When adding the feature to the first character sheet, it popped up asking me if I wanted to remove the old resource and when I clicked yes, I received the Foundry error message 'TypeError: SpellPoints.removeOldResource is not a function'.

It may get more extensive testing by us come this weekend, but I cast a few spells and didn't notice any unwanted behaviour.

If I may have a minor suggestion, it'd be nice if the description of the compendium item included some of the rules text. How many points a spell of each level casts given that doesn't seem to display anywhere, what spell points you have at each level etc. I can and have put that on myself, of course, but it may be a nice default.

misthero commented 6 months ago

thankyou @Aleswall for your feedback and taking your time helping me to debug. I will soon release the final version.

  1. I can fix that forcing the value to be equal the max when it happen to be higher.
  2. that should be fixed in the final version.

about entering the points gained per level and the spell costs is a nice idea, but the module allow any formula to be entered along with the default DMG variant rule.

I could just add the default, what do you think?

Aleswall commented 6 months ago

I think the default is fair, others can always change it if they wish but Spell Points aren't included in any of the SRD rule materials that come with the D&D 5e system so I think it'd be nice to include somewhere. It could always be a journal, but those are so tucked away and easy to miss.

I'll likely add it myself to the Spell Points item, solely so my players can know what spells cost what; they don't have that memorised yet.

misthero commented 6 months ago

v2.0 is officially released ok foundry ,you should get the update soon

Battenhatch commented 6 months ago

Hi @misthero Getting into updating my characters, I notice that it sets recovery to Short Rest. This should be Long Rest, right?

edit: Otherwise, seems to be working great!

misthero commented 6 months ago

Hi @misthero Getting into updating my characters, I notice that it sets recovery to Short Rest. This should be Long Rest, right?

edit: Otherwise, seems to be working great!

sorry, you are right, short rest is the default, but the import function is not importing the recovery configuration from the old resource, you should be able to edit that with the new cog button anyway:

immagine

misthero commented 6 months ago

or if you configure the item uses recovery to long rest "before" dragging it on the character sheets, it will keep the long rest once dropped on the sheet.

Battenhatch commented 6 months ago

Yep, it's easy enough to edit :)

I might have foundt something, though. One of my PC's is a Sorcerer/Warlock Multiclass, and on this character, only the "Use Spell Slots" checkbox appears, where on all the others both that and the "Use Spell Points" one is present. When casting spells, it will only spend slots for theís character. The "Cast at Level" box still says "Costs x Spell Points"

edit: No, that one speaks of slots as well, now I check again.

misthero commented 6 months ago

there is a setting in the module configuration to allow warlocks to use spell points, by default it is disabled since warlocks cannot use spell points according to the variant rule on the DMG.

did you check that?

Battenhatch commented 6 months ago

Ah! No, I didn't! All good now :)

heyngra commented 6 months ago

hi, I was using the mixed (opt in) feature of this module to use it only on one character in a party. After the update, all of the characters use spell points, instead of only that one player that had it enabled before. As I've checked I'm pretty sure this is the part of the code in the previous version that made sure the character is using mixed mode. I've checked the settings a couple of times, but I couldn't find a way to enable it. Is there a way to still use that feature in the new 2.0 version?

misthero commented 6 months ago

hi, I was using the mixed (opt in) feature of this module to use it only on one character in a party. After the update, all of the characters use spell points, instead of only that one player that had it enabled before. As I've checked I'm pretty sure this is the part of the code in the previous version that made sure the character is using mixed mode. I've checked the settings a couple of times, but I couldn't find a way to enable it. Is there a way to still use that feature in the new 2.0 version?

In version 2 you give the "Spell Points Item" to characters who needs spell points. If not they don't use spellpoints, so it's like having mixed mode always on. That's why the mixed mode has been removed since now you can only use spellpoints if you have the item in your character sheet.

megahead11 commented 6 months ago

Is there a way you could provide a (universal) flag or something that can be accessed by active effects (especially DAE) to increase the maximum amount of spell points? At the current moment, there exists only @scale.(classname).scale-value as a method, which works fine for set classes, but you can't increase that with a universal active effect without editing the class name for each character.

Before 3.0, you could simply increase resource,primary.max (as an example). So perhaps a flag that is like resource.spell-points.max or something, that is linked to the items maximum?

Orionox commented 6 months ago

hi, I was using the mixed (opt in) feature of this module to use it only on one character in a party. After the update, all of the characters use spell points, instead of only that one player that had it enabled before. As I've checked I'm pretty sure this is the part of the code in the previous version that made sure the character is using mixed mode. I've checked the settings a couple of times, but I couldn't find a way to enable it. Is there a way to still use that feature in the new 2.0 version?

In version 2 you give the "Spell Points Item" to characters who needs spell points. If not they don't use spellpoints, so it's like having mixed mode always on. That's why the mixed mode has been removed since now you can only use spellpoints if you have the item in your character sheet.

I keep getting an error telling me that characters don't have spell points when I try to cast spells even though they have never had the spell points item. Alos on an unrelated note, is there an easy way to get other resources bars like the spell points one? I'd love on for KI.

Zanderaf commented 6 months ago

Also getting a similar error, not sure if its this specifically image

Zanderaf commented 6 months ago

Actually, looks like it only errors out when adding new spellcasting types / progression that 3.1 allowed