• 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

Timing and Bootstrap Conditions

Umarian

Well-known member
Trying to create a class and some difficulty with some conditions.

The class selects an elemental type at levels 3, 6, 9 and 10. So on the Class Special, under "Item Selection" I have them choosing from the Element option. Based on the element, I am having a custom tag added. The earliest I can get the tag to pass to the hero is Post-Levels 1000.

Code:
~If we chose Air, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElAir] <> 0) Then
   perform hero.assign[Custom.CngEleAir]
Endif

~If we chose Earth, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElEarth] <> 0) Then
   perform hero.assign[Custom.CngEleEart]
Endif

~If we chose Fire, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElFire] <> 0) Then
   perform hero.assign[Custom.ChgEleFire]
Endif

~If we chose Water, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElWater] <> 0) Then
   perform hero.assign[Custom.ChgEleWate]
Endif

There are other Class Specials that should show up when a certain 2 elements are taken. For instance Air & Earth. The problem I am having, is if I bootstrap that ability to the class, and try to use a condition to look for the custom tags, the condition is checking before the tags are applied.

Code:
    <bootstrap thing="cSonChElAE">
      <containerreq phase="First" priority="5000"><![CDATA[Custom.CngEleAir & Custom.CngEleEart]]></containerreq>
      <autotag group="ClSpecWhen" tag="6"/>
      </bootstrap>

How else could I get the second class special to not display unless the two appropriate tags are present?
 
The earliest I can get the tag to pass to the hero is Post-Levels 1000.
Have to ask why? Nothing in your below code requires Post-Levels/1000 timing. You could run it at First/100 if you wanted. Is their additional code in the script you didn't post?

My guess is left in the following code:
Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] <> 1)
~ if we've been disabled, get out now
doneif (tagis[Helper.SpcDisable] <> 0)
Which if so then yes the script will not run until Post-levels/1000 as that is after the Helper.ShowSpec tag is assigned.

Code:
~If we chose Air, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElAir] <> 0) Then
   perform hero.assign[Custom.CngEleAir]
Endif

~If we chose Earth, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElEarth] <> 0) Then
   perform hero.assign[Custom.CngEleEart]
Endif

~If we chose Fire, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElFire] <> 0) Then
   perform hero.assign[Custom.ChgEleFire]
Endif

~If we chose Water, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElWater] <> 0) Then
   perform hero.assign[Custom.ChgEleWate]
Endif
The above should be changed to "elseif" logic as you can only have one of the above conditions as being "TRUE" so once you found that TRUE condition whats the point in testing the rest?

Code:
~If we chose Air, then assign the proper tag
If (field[usrChosen1].chosen.tagis[thingid.selElAir] <> 0) Then
   perform hero.assign[Custom.CngEleAir]
~..we chose Earth, then assign the proper tag
elseIf (field[usrChosen1].chosen.tagis[thingid.selElEarth] <> 0) Then
   perform hero.assign[Custom.CngEleEart]
~..we chose Fire, then assign the proper tag
elseIf (field[usrChosen1].chosen.tagis[thingid.selElFire] <> 0) Then
   perform hero.assign[Custom.ChgEleFire]
~..we chose Water, then assign the proper tag
elseIf (field[usrChosen1].chosen.tagis[thingid.selElWater] <> 0) Then
   perform hero.assign[Custom.ChgEleWate]
Endif
Hey on the bright side at least you have comments. ;)
 
It does have a shut-down code in it.

Code:
~ If we're not shown, just get out now
    doneif (tagis[Helper.ShowSpec] = 0)

I did change to the code you presented above. It is displaying the second ability before any of the userchosen fields are selected, once the first selection is made, the second class special disappears and does not re-appear when the correct types are selected.
 
Ctrl-R is your friend. It worked once I re-loaded.
Just an FYI for future readers when ever you work with "Bootstrap" conditions ALWAYS use "CTRL-R" to reload the game system instead of "Test Now!". Test Now will often give you funky/strange results.

Also don't try saving a Test character as again the .por file on reload can do strange things if the .por was originally saved without a bootstrap condition.
 
Back
Top