• 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

Bootstrap Spell with Condition?

TCArknight

Well-known member
Ok, I think I'm having an issue here that I'm just going blank on.

I'm trying to bootstrap 4 spells to a Class special which has two choosers. The only two spells that should appear on the character are the ones chosen.

However, the chooser script runs at Post-Levels/1000 and I get an error for the condition if I try to run it after First/2500.
(This code is bootstrapping two spells for a test...)
Code:
  <thing id="cPsidtTel" name="Discipline Talents (Telepath)" description="Choose two powers from the following list:  conceal thoughts, mind link, mind thrust, telepathic lash.  As long as you maintain psionic focus, you may manifest either of your chosen powers without paying a power point cost, but the power may not be augmented or affected by metapsionic feats.  The damage of mind thrust is reduced to 1d6.  You may only use conceal thoughts on yourself if used as one of your discipline talents." compset="ClSpecial">
    <usesource source="pPUClass" parent="UserParent" name="Psionics Unleashed: Classes"/>
    <tag group="AbilType" tag="PsiLike"/>
    <tag group="StandardDC" tag="aINT"/>
    <tag group="Helper" tag="UseOwnLev"/>
    <tag group="ChooseSrc1" tag="Thing"/>
    <tag group="ChooseSrc2" tag="Thing"/>
    <tag group="Custom" tag="spMindlnk0" name="Mindlink Talent"/>
    <bootstrap thing="spMindlnk0">
      <containerreq phase="First" priority="2000">hero#Custom.spMindlnk0</containerreq>
      </bootstrap>
    <bootstrap thing="spConTho0"></bootstrap>
    <eval phase="PostLevel" priority="1000"><![CDATA[var searchStr as string
var myText as string

searchStr = "(thingid.spConTho0|thingid.spMindlnk0|thingid.spMindThr0|thingid.spTelLash0)"

field[usrCandid1].text = searchStr
field[usrCandid2].text = searchStr

if (field[usrChosen1].ischosen <> 0) then
  myText = field[usrChosen1].chosen.idstring

  ~ Exclude the previously selected talent from the list
  field[usrCandid2].text = "!thingid." & myText & "&" & searchStr
  myText = "Custom." & myText
  perform assignstr[myText]
endif

if (field[usrChosen2].ischosen <> 0) then
  myText =   field[usrChosen2].chosen.idstring

  ~ Exclude the previously selected talent from the list
  field[usrCandid1].text = "!thingid." & myText & "&" & searchStr
endif]]></eval>
    <eval phase="First" priority="1000" index="2"><![CDATA[var searchStr as string
var myText as string

if (field[usrChosen1].ischosen <> 0) then
  myText = field[usrChosen1].chosen.idstring

  myText = "Custom." & myText

  perform assignstr[myText]
endif

if (field[usrChosen2].ischosen <> 0) then
  myText =   field[usrChosen2].chosen.idstring

  ~ Exclude the previously selected talent from the list
  field[usrCandid1].text = "!thingid." & myText & "&" & searchStr
endif]]></eval>
    </thing>
Thoughts?

TC
 
Nevermind. :( I didn't need to run the script at PostLevels. Moved it to First/1000 and did hero.assignstr instead and it works fine.
 
Back
Top