Hello, again.
Thanks for the quick reply.
Yes, the spells_pack init.lua has the hook framework set to' false'. If it's set to 'true', nothing seems to be affected. It is odd, because the vanilla spells cost energy.
I looked at the requirements in the party.lua, but nothing seemed to stand out as an issue.
The only thing I can think of is that I changed some of the spell casting commands as they overwrote the vanilla spells.
I must have done something, because your spells work perfectly in the main campaign and in other mods. I have also looked at the fw.lua and fw_hooks.lua; but again, nothing stood out.
I'll keep looking.
Perhaps the issue is the 'owning a scroll' in order to cast it.
}
defineObject{
name = "party",
baseObject = "party",
components = {
{
class = "Party",
onCastSpell =
function(party,champion,spellName)
local itemName = "scroll_"..spellName
for i = 1, 32, 1 do
if champion:getItem(i) ~= nil and champion:getItem(i).go.name == itemName then
return true
end
end
hudPrint(champion:getName().." must possess the spell scroll to be able to cast it.")
return false
end
}
}
}
I added this to my init.lua, which may be the cause. If it is, do you have any recommendations on how to ensure the caster has the spell in their possession or can 'consume' the spell in order to cast it?
I have tried a few variations, but placing the scroll in a container doesn't seem to work - the caster needs the scroll in the inventory. I could list every spell as mentioned on this
viewtopic.php?f=22&t=8365&hilit=own+a+scroll page, but that is pretty time consuming and I would rather a faster work-a-round.
Again, this is not your fault, but any help is appreciated.
Okay, back to work.
