Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old March 24th, 2020, 08:48 PM
I'm having trouble figuring out what is wrong with my code. This is supposed to add situational text on any saves the Hero is not proficient with, while the referenced ability is active.

It shows the situational text on all saveswhen activated, no matter what I do.

Code:
     ~ If we're disabled, do nothing & 
     doneif (tagis[Helper.Disable] <> 0 )
   
      doneif (hero.childfound[cWlk5CPacTal].field[abilActive].value = 0)    

     var sText as string
     sText = "+1d4"

     foreach pick in hero from BaseSave where "!Helper.ProfDouble & !Helper.Proficient"
   #situational[eachpick,sText,field[thingname].text]
         nexteach
The weird thing is, almost the exact same code works just fine for skills. Only the non-proficient skills get the situational when activated.
Code:
     ~ If we're disabled, do nothing & 
     doneif (tagis[Helper.Disable] <> 0 )

      doneif (field[abilActive].value = 0)    

     var sText as string
     sText = "+1d4"

     foreach pick in hero from BaseSkill where "!Helper.ProfDouble & !Helper.Proficient"

         #situational[eachpick,sText,field[thingname].text]
         nexteach
I don't think it's a timing issue, as I've tried a whole bunch of different ones. Interestingly enough, any timing before Final phase causes the situational to show up twice on each save.

Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub.

Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts!
Fenris447 is offline   #1 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old March 25th, 2020, 11:17 AM
I figured it out. Unlike skills, there's an extra save that is svAll. The code was applying to svAll, because normally characters aren't proficient with that. Which is why the situational showed up twice on some saves. It showed up twice on each save that the hero wasn't proficient in (once for STR, once for ALL), and once on the proficient saves (once for ALL).

So when I added "& !ProfSave.svAll" to the end of the tag expression, it worked perfectly.

Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub.

Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts!
Fenris447 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 07:12 AM.


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