Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Vallaki
Junior Member
 
Join Date: Sep 2014
Location: Chicago, IL
Posts: 14

Old September 25th, 2017, 11:29 AM
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?"
Vallaki is offline   #1 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old September 25th, 2017, 01:39 PM
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
Aaron is offline   #2 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:59 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.