• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Using the spells in configurable

frumple

Well-known member
I am trying to use the new ability to use spells in a configurable for a template that allows the GM to choose the spell-like abilities it has. It can choose a certain number of 1st, 2nd, and 3rd level spells.

I can get the configurable showing spells, that is easy.

Is there a way to limit the number of spells chosen for each level of spell (vs. the maximum number of spells) other than making a validation rule?

Additionally, it is not clear to me how to script the cfgSpenSp1 field so it shows the number of spell's chosen. I don't just want to count all spells, since if the hero is a spellcaster I will overcount.
 
Is there a way to limit the number of spells chosen for each level of spell (vs. the maximum number of spells) other than making a validation rule?

Additionally, it is not clear to me how to script the cfgSpenSp1 field so it shows the number of spell's chosen. I don't just want to count all spells, since if the hero is a spellcaster I will overcount.

Currently, the only way to limit the number of spells chosen for each level of spell would be with a validation rule. You can look for spells added to the configurable using the CfgSpell spell tag that the table adds to every spell.

Here's the relevant code from the Dreamed Secrets configurable:

Code:
var tagexpr as string
tagexpr = "Helper.Spell1st & " & this.tagids[CfgSpell.?]
foreach pick in hero from BaseSpell where tagexpr
  ~code for how spells are counted goes here
  field[cfgSpenSp1].value += 1
  nexteach
 
Back
Top