View Single Post
Flappi
Junior Member
 
Join Date: Jun 2010
Posts: 26

Old July 14th, 2010, 02:49 PM
Is there a way to create a new tag or tag group ?


I explain my problem: since I use a variant rule for spells of forbidden schools, I have re-created the wizard class. Since the class knows every level 0 spells, I bootstrap them.

But, in fact, a wizard don't know every 0-level spells : he don't know the 0-level spells from his forbidden school. Then, the bootstraps look like this:
Code:
    <bootstrap thing="spDisrUnd0">
      <containerreq phase="First" priority="451">count:Ability.wfNecro=0</containerreq>
      <autotag group="sClass" tag="cHelpWiv"/>
      <autotag group="Spellbook" tag="cHelpWiv"/>
      </bootstrap>
(cHelpWiv is the variant wizard; Wiv is "wizard - variant")

But, the class gets the tag "Ability.wfNecro" (and other forbidden school tags) comes too late in the program: at first/500, the class hasn't the tag, and the containerreq must be before first/500. Therefore, I use the same trick as the resistance ability (from abjuration spec): I forward the tag with a script in the class:
Code:
   <eval phase="First" priority="450" index="4"><![CDATA[
      ~Now, handle the spellbook
      var expr as string
      foreach pick in hero from BaseCustSp where "Helper.Secondary & SpecSource.cHelpWiz"
        expr="Ability."&eachpick.idstring
        perform hero.assignstr[expr]
        nexteach]]></eval>
(additional note: would it be better to replace the tag expression"SpecSource.cHelpWiz" with "CustTaken.cHelpWiv" ?)

And here is the problem: now, the class has the tag "Ability.wfNecro", and will get the tag a second time if the program runs normally. Since I don't have access to the structure file, I don't know if the number of such tag is used or not. Then, I must clean up with another eval script:
Code:
    <eval phase="First" priority="452" index="5"><![CDATA[
      ~Now, delete the tags for spellbook
      var expr as string
      foreach pick in hero from BaseCustSp where "Helper.Secondary & SpecSource.cHelpWiz"
        expr="Ability."&eachpick.idstring
        perform hero.deletestr[expr]
        nexteach]]></eval>
It would be easier if I could create a new tag group, something like "dummy.wfNecro", which I know is used nowhere else...
Flappi is offline   #1 Reply With Quote