• 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

Conditional overwriting of conditional skill bonus

Redcap's Corner

Well-known member
I've set out on the long journey of programming all the custom items available through Pathfinder Society into Hero Lab (which I will, of course, make available to the community once I'm done), and most of it has been easy enough so far, but I've hit a snag. The blade of the open road from PFS 6-16 has, among other things, the following clause: "Any wayfinder the wielder carries grants a +2 circumstance bonus on all Survival checks, not just checks to avoid becoming lost." I used the following code to add the Survival bonus, but is it possible for me to delete the preexisting conditional bonus from the wayfinder when they have the sword equipped? If so, how? I'm good at reverse engineering if someone can point me in the direction of an existing thing that works similarly.

POST-LEVELS/100
Code:
doneif (field[gIsEquip].value = 0)

foreach pick in hero where "Custom.Wayfinder"
  if (eachpick.field[gIsEquip].value <> 0) then
    hero.childfound[skSurvival].field[ModCirc].value += 2
  endif
nexteach

As a follow-up, the way this is currently coded means multiple equipped wayfinders will lead to multiple stacking circumstance bonuses. I know how to fix that, but the way I read the item, it might not need fixing. Circumstances do normally stack with each other, and the sentence says "any wayfinder the wielder carries" gains the benefit, but there's certainly an argument that multiple wayfinders would trigger the "essentially the same source" clause that would stop circumstance bonuses from stacking. I'd like a second opinion.
 
Situational text is stored in an array field on the skill in question, so assuming you know the exact text wayfinders apply and when, you could loop through the rows of that pick's array and find that, then replace the old text with the new.

As for stacking, I would say that it is the same bonus, and thus does not stack.
 
Back
Top