Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old October 29th, 2021, 07:36 AM
Yes, those were definitely missing. I added them in, but I'm still getting all kinds of trash in the dropdown boxes. Here is the latest code:
Code:
  <thing id="cBerPRDewbInst" name="Dewback&apos;s Instinct" description="Choose three damage types other than true damage. While raging, you have resistance to the chosen damage types." compset="CustomSpec" uniqueness="unique">
    <fieldval field="usrCandid1" value="(thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thinid.dtPRIon||thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) &amp; !Helper.Helper"/>
    <fieldval field="usrCandid2" value="(thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thinid.dtPRIon||thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) &amp; !Helper.Helper"/>
    <fieldval field="usrCandid3" value="(thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thinid.dtPRIon||thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) &amp; !Helper.Helper"/>
    <tag group="abCategory" tag="BersInstinct"/>
    <tag group="abRange" tag="Personal"/>
    <tag group="abDuration" tag="ConstRage"/>
    <tag group="SpecSource" tag="cHelpBrs"/>
    <tag group="Helper" tag="Helper"/>
    <tag group="Helper" tag="Free"/>
    <tag group="ChooseSrc1" tag="Thing"/>
    <tag group="ChooseSrc2" tag="Thing"/>
    <tag group="ChooseSrc3" tag="Thing"/>
    <tag group="Helper" tag="Primary"/>
    <eval phase="First" index="3"><![CDATA[
       doneif (hero.tagis[Hero.Raging] = 0)

       doneif (tagis[Helper.Disable] <> 0)

      ~ If nothing chosen then get out now!
      doneif (field[usrChosen1].ischosen = 0)
      doneif (field[usrChosen2].ischosen = 0)
      doneif (field[usrChosen3].ischosen = 0)

       ~ Collect selected types of damage and pull the Resistance tags from them.
      perform field[usrChosen1].chosen.pulltags[DamageRes.?]
      perform field[usrChosen2].chosen.pulltags[DamageRes.?]
      perform field[usrChosen3].chosen.pulltags[DamageRes.?]

      perform hero.pushtags[DamageRes.?]]]></eval>
    </thing>
DeathSheep is offline   #11 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old October 29th, 2021, 11:18 AM
So...I figured it out. You've got some typoes in your Tag Expression. Look at "|thinid.dtPRIon||"

You're missing a "g" on "thingid", and you have an empty spot between two "|"s, which basically tells Hero Lab "or anything". So fix those and you're good to go. I tested it myself (without your extra damage types since I don't have those programmed).

Still not sure about displaying the third box. I'd do what I mentioned earlier; make a second ability with the chooser box, and bootstrap it to the first ability. But if you do figure out how to show the third box in the same ability, please share!

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   #12 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old October 29th, 2021, 11:22 AM
There is one way you could do the third box, though it's messier. You'd use an Array-Based menu, manually list out each of the available types, then add an eval script that manually looks at which is chosen (field[usrIndex].value) and assigns the corresponding DamageRes.? tag. You'd have to type each damage resistance tag out with multiple if/elseif statements for each possible usrIndex value. But you'd have it all together.

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   #13 Reply With Quote
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old October 30th, 2021, 09:32 AM
Wow. Good catch, and thank you!
DeathSheep is offline   #14 Reply With Quote
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old October 30th, 2021, 09:45 AM
Quote:
Originally Posted by Fenris447 View Post
There is one way you could do the third box, though it's messier. You'd use an Array-Based menu, manually list out each of the available types, then add an eval script that manually looks at which is chosen (field[usrIndex].value) and assigns the corresponding DamageRes.? tag. You'd have to type each damage resistance tag out with multiple if/elseif statements for each possible usrIndex value. But you'd have it all together.
I think I'll go with the easier option for now. If I get through the rest of my stuff I may revisit it. How do I bootstrap it and have it automatically add when I choose the first one? And how do I get the second ability to not show up in the initial list of choices. These are custom abilities not class specials, but even if I don't choose an ability table, the second one just shows up as another choice.

I really appreciate your advice...there is a bit of a learning curve here, but I'm starting to get on top of things slowly.
DeathSheep is offline   #15 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old October 30th, 2021, 01:07 PM
(On the second ability) try playing around with some of the tags that label it as an ability for the spec, like <tag group="abCategory" tag="BersInstinct"/>. Remove that and see if it still shows up. Just go into the bootstraps of the first ability and select the second one. Without any conditions, it will go onto the character whenever you select the first. There *may* be an issue with how Hero Lab handles bootstrapped class specials, but we'll take that one step at a time.

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   #16 Reply With Quote
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old October 30th, 2021, 02:05 PM
Okay here's how things look. The primary version is coded like this:
Code:
  <thing id="cBerPRDewbInst" name="Dewback&apos;s Instinct" description="Choose three damage types other than true damage. While raging, you have resistance to the chosen damage types." compset="CustomSpec" uniqueness="unique">
    <fieldval field="usrCandid1" value="(thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thingid.dtPRIon|thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) &amp; !Helper.Helper"/>
    <fieldval field="usrCandid2" value="(thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thingid.dtPRIon|thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) &amp; !Helper.Helper"/>
    <fieldval field="usrCandid3" value="(thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thingid.dtPRIon|thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) &amp; !Helper.Helper"/>
    <tag group="abCategory" tag="BersInstinct"/>
    <tag group="abRange" tag="Personal"/>
    <tag group="abDuration" tag="ConstRage"/>
    <tag group="SpecSource" tag="cHelpBrs"/>
    <tag group="Helper" tag="Helper"/>
    <tag group="Helper" tag="Free"/>
    <tag group="ChooseSrc1" tag="Thing"/>
    <tag group="ChooseSrc2" tag="Thing"/>
    <tag group="ChooseSrc3" tag="Thing"/>
    <tag group="Helper" tag="Primary"/>
    <bootstrap thing="cBerPRDewbInst2"></bootstrap>
    <eval phase="First" index="3"><![CDATA[
       doneif (hero.tagis[Hero.Raging] = 0)

       doneif (tagis[Helper.Disable] <> 0)

      ~ If nothing chosen then get out now!
      doneif (field[usrChosen1].ischosen = 0)
      doneif (field[usrChosen2].ischosen = 0)

       ~ Collect selected types of damage and pull the Resistance tags from them.
      perform field[usrChosen1].chosen.pulltags[DamageRes.?]
      perform field[usrChosen2].chosen.pulltags[DamageRes.?]


      perform hero.pushtags[DamageRes.?]]]></eval>
    </thing>
The second one like this:

Code:
  <thing id="cBerPRDewbInst2" name="Dewback&apos;s Instinct" description="Choose three damage types other than true damage. While raging, you have resistance to the chosen damage types." compset="CustomSpec" uniqueness="unique">
    <fieldval field="usrCandid1" value="(thingid.dtAcid|thingid.dtCold|thingid.dtFire|thingid.dtPRForce|thingid.dtPRIon|thingid.dtLightning|thingid.dtNecrotic|thingid.dtPoison|thingid.dtPsychic|thingid.dtPRSonic) &amp; !Helper.Helper"/>
    <tag group="abRange" tag="Personal"/>
    <tag group="abDuration" tag="ConstRage"/>
    <tag group="SpecSource" tag="cHelpBrs"/>
    <tag group="Helper" tag="Helper"/>
    <tag group="Helper" tag="Free"/>
    <tag group="ChooseSrc1" tag="Thing"/>
    <eval phase="First" index="3"><![CDATA[
       doneif (hero.tagis[Hero.Raging] = 0)

       doneif (tagis[Helper.Disable] <> 0)

      ~ If nothing chosen then get out now!
      doneif (field[usrChosen1].ischosen = 0)

       ~ Collect selected types of damage and pull the Resistance tags from them.
      perform field[usrChosen1].chosen.pulltags[DamageRes.?]



      perform hero.pushtags[DamageRes.?]]]></eval>
    </thing>
With this configuration, the second one is not automatically added, but shows up as an additional choice in the list of abilities. It *seems* like the bootstrap is just adding it to the list instead of adding the power automatically.
DeathSheep is offline   #17 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old October 30th, 2021, 07:23 PM
Can you share (via a .zip or something) the whole .user file so I can see the whole thing?

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   #18 Reply With Quote
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old October 31st, 2021, 07:37 AM
PM'd location to you. Thanks!
DeathSheep is offline   #19 Reply With Quote
DeathSheep
Member
 
Join Date: Jun 2018
Posts: 83

Old November 3rd, 2021, 07:14 AM
So I had this idea that I could use the syntax for the Skilled feat and do essentially the same thing for damage resistance. I've created this procedure:

Code:
    var NumOfRes as number

    ~ Increase number of damage resistances
    if (NumOfRes <> 0) then
      hero.childfound[cfg5CRes].field[cToolMax].value += NumOfRes
I just need to know what to replace cToolMax with to affect resistances. THEN I need to know how to create the cfg5CRes helper thing to add a resistances tab. In theory then I can create a new tab called Resistances that has the ability to choose as many damage types as specified. I'm confident this will work. I'm just stuck on how exactly to do the last couple pieces.
DeathSheep is offline   #20 Reply With Quote
Reply

Thread Tools
Display Modes

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 04:35 AM.


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