View Single Post
TheIronGolem
Senior Member
 
Join Date: Feb 2015
Posts: 576

Old November 18th, 2019, 04:03 PM
First, if you haven't already, start by reading up on bootstrap conditions.

The important thing to remember here is that bootstraps cannot be done programatically. Gods, how I wish they could be. But nope. You have to spell out every possible thing that could be bootstrapped by a pick beforehand, and tell Hero Lab the conditions under which the bootstrap should happen.

So instead, you have to have the pick that does the bootstrapping either apply a tag to the container ("container" is usually synonymous with "hero" for these purposes), or set a field value on itself, and then the conditional bootstrap should look for that tag or field value. This means the bootstrap condition must run AFTER any scripts on the bootstrapping pick that set the tag/fieldvals, while still running BEFORE any scripts on the bootstrapped pick. First/500 is generally a pretty good timing for conditionals, but your mileage may vary.

Generally, if I want to bootstrap a pick from another pick that employs a dropdown to decide what to bootstrap, I do it one of two ways:

1. Use usrChosen1 and the ChooseSrc1.Thing tag. An early script on the bootstrapping pick pulls a tag from the chosen item and pushes it to the container. Any conditional bootstraps are predicated on a particular tag being on the container.

2. Use the usrArray and usrIndex fields. Populate usrArray from the editor with the "Array-based menu?" button, then have the conditional bootstraps be predicated on "fieldval:usrIndex = X", where X is the corresponding index of whatever text item corresponds to the bootstrapped pick.

EDIT: As Mathias points out below, a Configurable is the better solution to your problem. My suggestion is for when you need to bootstrap one of a small number of choices that isn't going to get larger as more sourcebooks come into play, which I initially misread your situation as being.

Last edited by TheIronGolem; November 19th, 2019 at 06:51 AM.
TheIronGolem is offline   #2 Reply With Quote