• 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

Auto-Adding Commonly Used Boons/Penalties

Adam.Ormond

Well-known member
First, here's the situation our group is in:

1) The DM uses Hero Lab to construct encounters and run combat on his side
2) The Party frequently uses the same spells in combats, which apply Spell Adjustments
3) The DM grows weary of having to add the same ~6 adjustments to each NPC he creates

So a few questions here:

I found the auto-add element, and I added some to my bootstrap.aug file. I have our Spell Adjustments appearing in new portrait files.

Q1) All Spell Adjustments are auto-activated, and I'd like to deactivate them. My initial thought is to create another bootstrapped "hidden" Adjustment with an Eval Script that disables my auto-added Spell Adjustment picks. Is there a better way to go about this?

Q2) The DM has already created a host of encounters, prior to my creating this bootstrap.aug file. Is there a way to get the pre-existing Portrait files to read and reflect this new bootsrap.aug file? Or is this the nature of the auto-add? A user can remove them at any time, so they won't continually be reapplied -- that makes sense, now that I think about it.
 
Last edited:
So I created the Adjustment and auto-added it using a .aug file. The Eval Script for the adjustment runs fine, but I'm having trouble getting it to run once, and only once. This is what I have now:

Code:
trustme
if (hero.tagis[Custom.pDeselAdj] = 0) then
  hero.childfound[pEvilEyeAC].field[pIsOn].value = 0
  notify "activating"  
  perform hero.assign[Custom.pDeselAdj]
  if (hero.tagis[Custom.pDeselAdj] <> 0) then
    notify "activated"
  endif
endif
Every time I modify anything on the character, I see both notify statements: "activating -- activated". This would suggest that my Custom.pDeselAdj tag isn't lasting through the execution of the script. I've tried a lot of phase/timings combinations, and it hasn't seemed to make much difference.

What am I doing wrong?
 
So I created the Adjustment and auto-added it using a .aug file. The Eval Script for the adjustment runs fine, but I'm having trouble getting it to run once, and only once. This is what I have now:

Code:
trustme
if (hero.tagis[Custom.pDeselAdj] = 0) then
  hero.childfound[pEvilEyeAC].field[pIsOn].value = 0
  notify "activating"  
  perform hero.assign[Custom.pDeselAdj]
  if (hero.tagis[Custom.pDeselAdj] <> 0) then
    notify "activated"
  endif
endif
Every time I modify anything on the character, I see both notify statements: "activating -- activated". This would suggest that my Custom.pDeselAdj tag isn't lasting through the execution of the script. I've tried a lot of phase/timings combinations, and it hasn't seemed to make much difference.

What am I doing wrong?
I think your trying to get something to run one time and never run again. I am pretty sure that can't be done in HL as any time you modify anything on the character everything starts over again from scratch.

If it didn't it most of the rest of the changes like feats and adjustments couldn't work. So as you have seen as your script will run each time fresh when anything gets changed.

Your script in English says if I don't have Custom.Tag add the tag and look to see if the tag i just added was added. Then you make a change and every Thing is reset back to starting values and each script is run again in order of their timing sequence.

Sorry can't really help with your other questions as I don't use HL as a DM other than to make NPCs that I then import into another application.
 
Oh, I think I understand what's going on. Tags get added by things, and they aren't saved in the .POR file. The pDeselAdj thing is the only way the Custom.pDeselAdj tag gets added, so it doesn't exist until then this script runs. I'm running into a Chicken/Egg scenario.

Fields do appear to be saved with the .POR file. I tried creating my own custom field to use with the Adjustment, but the Editor just erased it every time I tried to save. I was able to use the pDuration field to do what I wanted:
Code:
trustme
var bExecute as string
bExecute = this.field[pDuration].text
if (compare(bExecute,"TRUE") = 0) then
  hero.childfound[pEvilEyeAC].field[pIsOn].value = 0
  hero.childfound[pEvilEyeSk].field[pIsOn].value = 0
  hero.childfound[pEvlEyeAtk].field[pIsOn].value = 0
  hero.childfound[pEvlEyeSav].field[pIsOn].value = 0
  hero.childfound[pPrayerFoe].field[pIsOn].value = 0
  this.field[pDuration].text = "FALSE"
endif
 
Back
Top