Member
Join Date: Jun 2018
Posts: 83
|
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... Code:
<fieldval field="usrCandid1" value="component.BaseWep & (wProfReq.Martial|wProfReq.Simple) & !Helper.Helper"/> <fieldval field="usrCandid2" value="component.BaseWep & (wProfReq.Martial|wProfReq.Simple) & !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> </thing> |
#1 |
Senior Member
Join Date: Sep 2017
Posts: 600
|
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. 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! |
#2 |
|
|