View Full Version : Adding a spell by dragging defaults to having 1 daily charge
Farratto
November 3rd, 2024, 16:05
This is new, but I'm not sure when it started. I first noticed it yesterday (Saturday, Nov 2nd). It's happening in 5e but don't know if it's happening in other rulesets. It's happening with no extensions loaded and on every spell I tried. Screenshot provided.
62517
Zacchaeus
November 3rd, 2024, 16:29
I suspect that your power group isn't set to a spell power group in the meta data. The heading should say Spells (Cantrips), Spells (1st level) etc
Farratto
November 3rd, 2024, 18:41
I suspect that your power group isn't set to a spell power group in the meta data. The heading should say Spells (Cantrips), Spells (1st level) etc
I appreciate your help, and swift response. And it is true, that if you switch the power group to spell type (in the picture, I used an ability group type), that FGU will not give it a charge.
Unfortunately though, there is still a problem. Not all spell effects go into spell type groups. And the number of spell effects that use charges is in the minority. So having it default to 1 charge is increasing workload on the player or DM setting up a new or modding a character sheet. This is also a new behavior. Until recently, the default was 0 charges.
But, of course, if this is working as intended, please let me know, and I will work around it.
Moon Wizard
November 3rd, 2024, 20:06
The original intent was to automatically prepare spells for spellcasters, so that the spells weren't available immediately for use after adding to the character sheet.
I think I've gotten some code set up to only do that if the "caster type" of the action group it is added to is "memorization" now. You'll have to let me know if that works for your case, since spells normally get allocated to Spells group by default but I see that your picture is different behavior or manually configured groups. It will be pushed on Tuesday.
Regards,
JPG
Farratto
November 3rd, 2024, 22:25
The original intent was to automatically prepare spells for spellcasters, so that the spells weren't available immediately for use after adding to the character sheet.
I think I've gotten some code set up to only do that if the "caster type" of the action group it is added to is "memorization" now. You'll have to let me know if that works for your case, since spells normally get allocated to Spells group by default but I see that your picture is different behavior or manually configured groups. It will be pushed on Tuesday.
Regards,
JPG
I appreciate all your good work. So you know the logic behind how we set this up for people who have Equipped Effects Extension and 5e Automatic Effects modules. For items, features, or feats, it checks for a spell record of the same name and it adds it to the player's character sheet. Spell records have fields in the general database for the group they are in, and for the number of charges it has and recharge timer. These are still saved to the spell record even when they are not on a character sheet. So we have leveraged this so when these spells get added automatically with Equipped Effects, they get added into the group we saved them in and with the number of charges we saved them as. Also worthy of note, some of the grouping logic we use comes from character sheets that are imported from DnD Beyond (i.e. grouping as feats, features, traits, items, & spells)
After this conversation, I conducted another test and noticed it's not only defaulting to 1 charge, it's even overwriting whatever the number of charges that were previously saved. Defaulting is an inconvenience, but overwriting would hinder the previous functionality that we had been leveraging. It wouldn't be the end of the world, but it also would not be our preference.
I appreciate your time. Here are a couple screenshots to help show you what I'm trying to describe. The first screenshot comes from db.xml from the exporting campaign. You can't see that we are located at root.spells.categoryname.nodeID. The second screenshot is inside FGU, showing the same spell, after it has been dragged to a character sheet actions tab. Notice that the prepared field has been overwritten with a once per dual, instead of twice per dual.
62518
62519
Moon Wizard
November 4th, 2024, 02:26
I am moving the changes from where it was up one level from PowerManager.addPower, up to CharPowerManager.addPowerDB (which is only called when records are dropped directly on the Actions tab in the main code). As long as those extensions don't call that function, they should no longer be affected.
Regards,
JPG
Farratto
November 4th, 2024, 14:32
I am moving the changes from where it was up one level from PowerManager.addPower, up to CharPowerManager.addPowerDB (which is only called when records are dropped directly on the Actions tab in the main code). As long as those extensions don't call that function, they should no longer be affected.
Regards,
JPG
Thank you very much for accommodating us. Equipped Effects does use PowerManager.addPower and not CharPowerManager.addPowerDB so that is a welcome change. Having it apply to "memorization" groups only also seems like it would work for us. I will check again on Tuesday. At the moment, it's overwriting charges on drag into an abilities type group. But when automatically added with the extension, the charges don't get overwritten. yay, thank you! I will drop one more post after Tuesday when I test it on live.
Thank you again for your good works!
Farratto
November 5th, 2024, 21:19
Working as desired now. Thank you again!
Powered by vBulletin® Version 4.2.1 Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.