Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[Script] 5e Treasure Hoard Generator

1419550460

Edited 1420183296
v.0.0.3 (2014-12-27) BUGFIX: Changed "friends" to "fiends" in Scroll of Protection types BUGFIX: Art rewards are now whispered to GM instead of sent to all chat Spell scrolls of a certain level now properly pull from lists of ALL spells that can be cast at that level (all levels below it) v.0.0.2 (2014-12-25) Functional for first tier of challenge levels (0-4) as per the 5e DMG v.0.0.1 (2014-12-24) Alpha Dungeons and Dragons' 5e Dungeon Master's Guide has a section dedicated to randomly generating treasure hoards based on their challenge level. As I plan on using this system in my campaign, I have created an exhaustive script that follows the books instructions with the following remarks: When the book allows for "DM choice" or "randomly selected," this script assumes the latter option Any magical item that calls for a weapon or armor will select from a list that is weighed by "utility," which for armor is AC (- stealth disadvantages) and for weapons is (max dmg + min dmg) + 1 for every positive trait (versatility, thrown, finesse) and -1 for negative ones (two-handed, heavy). In short, plate is more rare than padded armor, and greatswords are more rare than clubs. This script even goes so far as to perform rolls that an individual item calls for. For example, this script will automatically roll the amount of beads on a Necklace of Fireballs, and will roll whether a Ring of Spell Storing has spells stored when you find it, what the spells are, and what level they are. To do: Complete all tables and challenge levels Adjust scroll loot to reflect different levels. For example, a lvl 2 scroll should also sometimes have lvl 1 spells that are cast at level 2. Allow variables, such as manual control of the roll or other features Pretty up the results, which are currently spat out to the GM in the form of an enormous wall of text. (CSS possibly) Clean up the code USAGE: !mtt [challenge level] (example: !mtt 3) <a href="https://gist.github.com/anonymous/0e870941508204ca6624" rel="nofollow">https://gist.github.com/anonymous/0e870941508204ca6624</a>
What is the exact syntax to get this to work? Using !mmt [1] did not do anything.
1419676137
Stephen S.
Pro
Marketplace Creator
Sheet Author
API Scripter
Try !mtt 1
Stephen is correct. I've updated the OP with an example.
Thanks boys...
1419871666
The Aaron
Pro
API Scripter
Hey John, nice work on the script. I've got a suggestion for you: Since you have a version number (and I think that's a good idea) you should add it to the script so users know which version they are using. Also, as you update the gist, you can add something to the end of the URL to defeat the caching and allow the new version to show up. I like to use the version number: http..../foo/something#v0.0.3
Oh yeah, good idea. I should pick up these habits as I intend on doing some serious work here. Thanks Aaron!
1419882385
The Aaron
Pro
API Scripter
No problem! Take my advice, I'm not using it! =D (Well, technically, I am... but I've always thought that was a funny expression. =D )
Great Script! Been playing with it a bit now and just used it in my last session for one of the first parties dungeons. So far everything looks good probabilities seem to be sticking and especially nice with the amounts of certain items/ charages. Anyway Great work :D
oh man. I want this, hooked into something like the lootpile script, so I have to do NO work setting up random treasures. Man, I'm lazy :P
1421292819
The Aaron
Pro
API Scripter
Laziness is one of the 3 virtues of a computer programmer, according to Larry Wall. :)
John..Good job so far. Is it supposed to show multiple rolls as many as 8 or so ? Also for your to dos maybe a popup that asks gm treasure type (%), Magical Items (%) Money (%) . You get the gist. I used to use a program called DM Genie and it had a random treasure generator where the gm could put in a quick set of percentages and it would spit our the treasure. This one would be awesome if the gm could select the amount. I tested it by making a treasure character sheet so I could insert the macro and set a treasure chest as the Token. I named the macro Open chest and set it to show as token action. This way the players could interact. Looking forward to the finish product. This was one of the rolls.... (From Kylar): You roll 43 (d100). (From Kylar): Rolling from Treasure Hoard: Challenge 0-4 (From Kylar): 6 beautiful gemstone(s). (From Kylar): 1 blue quartz gemstone(s) (10 gp each) (From Kylar): 2 eye agate gemstone(s) (10 gp each) (From Kylar): 1 moss agate gemstone(s) (10 gp each) (From Kylar): 1 rhodochrosite gemstone(s) (10 gp each) (From Kylar): 1 tiger eye gemstone(s) (10 gp each) (From Kylar): 6 magical items (table A) (From Kylar): Rolled a 12 (From Kylar): Rolled a 36 (From Kylar): Rolled a 91 (From Kylar): Rolled a 68 (From Kylar): Rolled a 95 (From Kylar): Rolled a 11 (From Kylar): 3 potion(s) of healing (From Kylar): 1 potion(s) of climbing Bobby