• 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

Prepared Spells limited to spellbook contents

RavenX

Well-known member
Mathias,

I'm trying to figure out how to limit the tag expression so that prepared spell choice is limited to the spells in the spellbook. I can't seem to understand what part of the spell expression tells herolab to limit it to spellbook spells though.

I have two tag expressions set up so far
Code:
  [I][COLOR="Navy"]cSplBkExpr = (spClass.cMage) & !Hide.Spell & !Helper.Helper[/COLOR][/I]
for the spell book expression

and
Code:
  [COLOR="Navy"][I]cSpellExpr = (spClass.cMage & Spellbook.cMage) & !Hide.Spell & !Helper.Helper[/I][/COLOR]

for pathfinder I noticed there is an extra bit in the cSpellExpr tag expr,
Code:
[COLOR="Navy"][I]hero#HasWizSplb[/I][/COLOR]
What is this piece used for?

Here is my portal for prepared spells:
Code:
  <portal
    id="clSpellAdd"
    style="tblInvis">
    <table_dynamic
      component="Spell"
      showtemplate="clSpelThin"
      choosetemplate="clSpelPick"
      showsortset="Spells"
      choosesortset="Spells"
      useagentadd="yes"
      useagentcandidate="yes"
      agentlist="SpellSort"
      agentautotag="SpellSort"
      useagentlinkage="yes"
      candidatefield="clSpelExpr">
      <list></list>
      <candidate></candidate>
      <headertitle><![CDATA[
        @text = "Spells" 
        ]]></headertitle>
      <additem>
        @text = "Add Prepared Spells"
        </additem>
      </table_dynamic>
    </portal>
 
Last edited:
Since the 0-level spells are added free to all the spellbooks, even a starting character has some spells there, so their cSpellExpr is not empty, and generates a list of spells to choose from. So, we want to force the user to add some more spells to their spellbook before preparing spells. That tag is only added to the hero if there are user-added spells at level > 0. Otherwise, we get bug reports about wizards not being able to select spells - people prepare spells before adding spells to their spellbook. With that tag in the expression, the automatic spells are hidden until some manually added spells are present.
 
So I'm guessing the reason my prepared spells aren't showing up is based on the agent list and list tag expressions?
 
I can't help without seeing all the tags on the spells in the spellbook of your test character - this is something you'll need to study - why is this tag expression not matching the spells I want it to match.

Also, spelling - your portal calls the field clSpelExpr, your listing of the expressions call it cSpellExpr.
 
Mathias,

I've attached a screen shot showing the pick fields for the Mage class and tags for the Spell Affect Normal Fires from the spellbook.
 

Attachments

  • Spell tags.png
    Spell tags.png
    476.6 KB · Views: 5
Actually, it doesn't look like the problem is in the tags.

Study the choosepicks setting that's available for the tables.

Hint: in d20/pathfinder, there are actually separate tables for the spells for a spellbook caster and the spells for a non-spellbook caster.
 
Added

choosepicks="container"

And now the list of spells from the spellbook is appearing.
Based on what you're telling me, I'll need a completely different table for non-spellbook casters because they don't need spellbooks so hero lab would throw an error searching for a non-existant spell list. I'll build a new table to handle divine spontaneous casters. Thanks for the help on this.
 
Back
Top