Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - D&D 5th Edition SRD (http://forums.wolflair.com/forumdisplay.php?f=89)
-   -   Choose Tool or Weapon Proficiencies (http://forums.wolflair.com/showthread.php?t=66463)

DeathSheep October 22nd, 2021 07:13 AM

Choose Tool or Weapon Proficiencies
Today's stumper (for me anyway):

I'm trying to create a Racial Special that allows the member of the race to choose two proficiencies from a select set of tools or any weapon proficiencies. I figured out how to pull in all the weapon proficiencies, but I'm not sure what to add to the code to put the two tool proficiencies in the list as well.

Here is what I have so far...


    <fieldval field="usrCandid1" value="component.BaseWep &amp; (wProfReq.Martial|wProfReq.Simple) &amp; !Helper.Helper"/>
    <fieldval field="usrCandid2" value="component.BaseWep &amp; (wProfReq.Martial|wProfReq.Simple) &amp; !Helper.Helper"/>
    <tag group="Helper" tag="ShowSpec"/>
    <tag group="Helper" tag="Helper"/>
    <tag group="Helper" tag="Free"/>
    <tag group="ChooseSrc1" tag="Thing"/>
    <tag group="ChooseSrc2" tag="Thing"/>
    <eval phase="First"><![CDATA[      ~ If we're disabled, do nothing &
      doneif (tagis[Helper.Disable] = 1)
      ~ If nothing chosen then get out now!
      doneif (field[usrChosen1].ischosen = 0)
      doneif (field[usrChosen2].ischosen = 0)
      ~ Pull all the selected weapon proficiency tags to ourself
      perform field[usrChosen1].chosen.pulltags[WepProf.?]
      perform field[usrChosen2].chosen.pulltags[WepProf.?]
      ~ Now push both tags to the hero
      perform hero.pushtags[WepProf.?]]]></eval>

Fenris447 October 22nd, 2021 07:39 AM

This is going to be tough, because Hero Lab handles tool proficiencies in a more complicated way than weapons. Take a look at the Custom Background to get an idea how to handle multiple options from two different lists. You need to basically program it so that when one tool is taken, the second weapon option becomes unavailable, and vice versa. Pull up the debug screen to look at the fields for the race, and see what changes when you select a tool proficiency. Then you can watch for changes in that field to remove the code from the fields that allow you to select a second weapon proficiency.

It’s going to be a logic puzzle, but it’s doable. I don’t think there’s any way you can just put all the tools and weapons in the same list. This is because Hero Lab adds a pick for that tool when you select proficiency in it, and selecting things from a generated list can’t add a pick without an extreme number of conditional bootstraps.

All times are GMT -8. The time now is 09:05 PM.

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