Advertisement Create a free account

[Script] LootGenerator - generate random treasure for D&D 5E

1572747324
Another of my "why haven't I shared this in the forums yet" scripts... ;) LootGenerator generates treasure according to the treasure tables in the D&amp;D 5th Edition Dungeon Master's Guide, but with adventuring gear from the Players Handbook thrown in as well. It generates loot randomly with loads of options for modifying the results. You can also import your own custom items and (new to v2.0) easily distribute generated loot to players. Check it out here:&nbsp; <a href="https://github.com/blawson69/LootGenerator" rel="nofollow">https://github.com/blawson69/LootGenerator</a>
1572953017
Ben, &nbsp; &nbsp; Great addition writing the loot to sheet and distributing treasure. Most functionality is working except I am getting a sheet error and I am unable to run the config command and change settings. Error on New Loot Gen When running Loot Gen I get the following message to setup the character sheet, but when selecting 5E OGL the API crashes (see below).&nbsp; The sheet selected for the game is actually "D&amp;D 5E by Roll20". I am not sure if that makes a difference.&nbsp; Hope I can get this working again. Great API. Thanks For reference, the error message generated was:&nbsp; ReferenceError: sheet is not defined ReferenceError: sheet is not defined at apiscript.js:22891:21 at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:186:9) at commandConfig (apiscript.js:22888:11) at handleInput (apiscript.js:21955:7) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1637:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)
Getting the same error. Tried with Shaped, 5E by Roll20 and Shaped installed as custom. Hoping for a fix, these scripts look really promising.
1573104640
Sorry, I've been working like a dog this past week. I just pushed a fix (v2.0.1) for those bugs. Let me know if you have any more problems. ;)
Thank you so much for the update - everyting seems to be working now. Is there a good way to use LootGenerator and it's companions to distribute pre-made/non-random loot?
1573179908
Thanks so much!&nbsp; I can't wait to give this whirl this weekend.&nbsp;&nbsp;
1573187834
Marius said: Is there a good way to use LootGenerator and it's companions to distribute pre-made/non-random loot? Although there's not a mod to turn off coins, you can turn everything else off in LootGenerator using the --mod parameter (or set defaults if that's the norm for your game) and then use the --incl parameter to send your pre-made/non-random items as a comma-delimited list. Then it will show up and allow distribution like the randomly generated loot. And, if you have added those pre-made/non-random items to the companion scripts they will be distributed according to those scripts.
Thank you, I was thinking along those lines. But if you ever release a version that allows complete control over coins, and perhaps perhaps some kind of import function (using handouts?) or perhaps adding items from Gear-/PotionManager to loot, you will make me very very happy! (I'm already very happy...)
1573280311
Marius said: Thank you, I was thinking along those lines. But if you ever release a version that allows complete control over coins, and perhaps perhaps some kind of import function (using handouts?) or perhaps adding items from Gear-/PotionManager to loot, you will make me very very happy! (I'm already very happy...) You can already import anything you like for any of the item categories. Please read the instructions on Github thoroughly. They will tell you everything you need to know. P.S. I misspoke about the coins. While there is not a default for no coins, using the --mod parameter you can send "no-coins" for the expected results. ;)