• 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

Unique Linkage of a Bootstrap

Vallaki

Member
Background of Issue
I'm writing several spell adjustments that bootstrap weapons (similar to Flameblade), and then based on either choices on the adjustment or other attributes, pushes bonuses and/or tags to the bootstraped weapon.

Challenge is that (and this occurs with the current implementation of Flame Blade) when you add multiple instances of the spell adjustment, multiple items are bootstrapped, but the evaluation scripts (for both instances of the spell adjustment) always modify the first instance of the boot strapped item.

In a the case of Flameblade, if I add two instances of the adjustment, each with a +5 pAdjust, the first Flameblade weapon gets a +10 damage bonus, and the second gets a +0.

Question
So, my question is: "Is there a way, in an eval script, to travel specifically to or restrict choices to only things bootstraped by the eval scripts parent?"
 
Yes, everything that is added to a character has a uniquindex. So if your script is iterating through all the weapon copies it can check their root's unique index and compare it to its own unique index to know if it is the correct copy. Here is an example we use for building a statblock name.

Code:
        ~ Warpriest blessings are also specially built, since they incorporate
        ~ the names of their sub-abilities.
        elseif (tagis[abCategory.WaPBless] <> 0) then
          foreach pick in hero from BaseClSpec where "Helper.ShowSpec & !Helper.SpcDisable"
            if (eachpick.root.uniqindex = uniqindex) then
              field[sbName].text = splice(field[sbName].text, eachpick.field[thingname].text, ", ")
              perform eachpick.assign[Hide.Statblock]
              endif
            nexteach

          field[sbName].text = replace(field[thingname].text, " Blessing", "", 1) & ": " & field[sbName].text
          done
          endif
 
Back
Top