Replies: 3 comments 2 replies
-
hello @RcwynnDM Chri's premade is a big module and have a lot of dependencies, not easy to pinpoint where and why the issue occurs, I know some time ago Midi-QoL prevented the spell point resource from decreasing, (#42) some module skips the default methods and hooks and the spell point module functions will never trigger. Or it can be a bug somwhere. You can try turning off and on some of the options in midi or in one or the other modules involved to try to understand what configuration is causing the issue. Also check the browser console (F12) looking for errors from some of the modules. I tried to install Chris's premade on a test world, but I coudn't figure out ho to get to your setup for the automated divine smite. |
Beta Was this translation helpful? Give feedback.
-
@misthero So for Chris Premade to automate the divine smite or any other spells, you either grab the item or feature that you want to use from the module's compendium or click a button at the top of the item. The button usually looks like a health briefcase and will glow yellow when it detects an automation, then it turns green when the automation is on. I might need to contact the creator for Chris's Premade, since other spell automated with it works with spell points. I checked the browser and found the divine smite.js do you think changing anything in the file js would help. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the heads up, looking at the script you sent I can see why spellpoints are not consumed, that is not a spell. The DnD 5e system uses the hook That hook carry all the information the spellpoint module uses, like if that is a spell, what kind o spell, is that a warlock pact spell? who is the character casting it? how many slot should consume? and so on... in the divine smite example, the item divine smite is a "class feature" item type, with no consume resource data, it just triggers a macro with the help of dae. the script does it things than directly remove one of the slots from the actor without triggering other processing. That works, since it change the actor data, but is not done in a way to make it easy for other modules to interact with it. I think that maybe it's easier to clone that script and making a special copy that remove the spell points resource instead of the slot... than point the feature to trigger the new script? don't know if it's easily doable, but something like this: Caution I haven't tested it // assume we use the secondary resource for our spell points/ mana
const currentSpellPoints = actor.system.resources.secondary.value;
switch (selectedOption) {
// replace [Spell Points Cost] with the actual cost of this slot
case 'p':
// update = {'system.spells.pact.value': pactSlots - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = pactLevel + 1;
break;
case 1:
// update = {'system.spells.spell1.value': spell1 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 2;
break;
case 2:
// update = {'system.spells.spell2.value': spell2 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 3;
break;
case 3:
// update = {'system.spells.spell3.value': spell3 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 4;
break;
case 4:
// update = {'system.spells.spell4.value': spell4 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 5;
break;
case 5:
// update = {'system.spells.spell5.value': spell5 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 5;
break;
case 6:
// update = {'system.spells.spell6.value': spell6 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 5;
break;
case 7:
// update = {'system.spells.spell7.value': spell7 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 5;
break;
case 8:
// update = {'system.spells.spell8.value': spell8 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 5;
break;
case 9:
// update = {'system.spells.spell9.value': spell9 - 1};
update = {'system.resources.secondary.value': currentSpellPoints - [Spell Points Cost] };
damageDiceNum = 5;
break;
} |
Beta Was this translation helpful? Give feedback.
-
So I use a module called Chris's premade, which helps with a lot of automation. The ability Divine Smite for paladin is automated to allow the user to choose between the levels of spells they can use divine smite, as seen in the image below. The problem is the player is when they do choose it the spell level slot is the value that goes away, not the mana point value in resources. Everything else works great with the spell points otherwise.
Beta Was this translation helpful? Give feedback.
All reactions