I’ve packaged and uploaded a new release of the Windows, Linux, and macOS files. This fixes the above “bug”, added a generator that was included by NBOS but didn’t work from the CLI due to prompts, and edited a common file to clean up output that didn’t work from the command line.
Details below:
- Fixed “bug” related to only providing one result even when asking the script to generate multiple
This was related to an argument within a specific script file. For some reason whoever wrote the Adventure Hooks.ipt
file had MaxReps: 1
hard-coded in the common file. This didn’t make sense to me, and was probably simply used as an example. As such, in the releases above I’ve commented out this argument so the script will generate as many results as you tell it to.
- I re-added the
Random Treasure (CR1 - CR30).ipt
generator file that was originally distributed by NBOS back to the three releases.
This generator didn’t work properly due to requiring a prompt from the user; however, by hard-coding the Random
result into the script it now generates random treasure of a random CR from the OGL treasure tables and outputs the results properly.
This generator also required a lot of editing and cleanup to make the results look readable in the terminal, most of which was done in the AdventureHooks.ipt
file in the common
folder. I’m very happy with the results:
The original generator file running on the full Windows client had a prompt that asked the user to select a Challenge Rating between 1 and 30 (or Random) and it would generate that result. Since one of the limitations of the command-line binary is that it can’t interpret prompts, if you don’t want a random CR you can simply temporarily hard-code the result you want in the .ipt file:
For example, if you wanted only CR 3 results, you would edit the Random Treasure (CR1 - CR30).ipt
file in the generators/Treasure
folder and change the line
\n {!CRValue=={1d30}} [@TreasureByCR] \n
to
\n {!CRValue=={3}} [@TreasureByCR] \n