Gemstone and Jewelry Generator

Gemstone and Jewelry Generator

Did Marco Polo return from China with a caravan loaded with chests of silver and gold?

Of course not. Marco Polo is said to have returned to Venice disguised as a beggar, concealing countless jewels sewn into the lining of his clothes.

I only recently discovered D&D 5e, having last played decades ago when AD&D first arrived on the scene. For my campaign setting, I've decided to starve low level characters with lack of gold and magic, allow mid levels to be free of the burden of working to pay for their next meal, and encourage the highest level players to rub elbows with royal sovereigns and renown sorcerers.

As such, most adventuring types face similar challenges as Marco Polo might have: how do you carry your amassed treasure from locale to locale without attracting unwanted attention? Without a Templar-style banking industry in my campaign world, the roaming adventurer will naturally gravitate to converting loot into the mobile currency of gemstones (and the occasional magical item that may be offered for sale). And, how better to gain that audience with the local Count (your hopefully soon-to-be-patron) than with a gift of a finely wrought piece of jewelry?

Linked below is a random gemstone (and jewelry) generator. It's mostly keyed to the 5e base values for gems: for average size, quality, and finished stones the gp value is roughly similar to the values given in 5e.

https://1drv.ms/u/s!Amd5j_tEzLgZnl5XzkKivSKHc2I6

The only user input required is to enter the CR of the gem owner (i.e. the creature defeated to acquire the gem, or the NPC seller). Higher CR will obviously have more rare, larger size, higher quality quality, and better finished pieces to loot/steal/purchase. There are still slight chances for a low CR to have an exceptional stone (a 3rd level thief could be surprised to find that he pilfered a serious score), or for an epic villain to have a relatively low value item (sentimental value, gift from an underling, once better piece that has become damaged, huge mundane stone set in an ornate scepter, or raw stone that has yet to be finished and set). But, the generator has been weighted to result in items mostly expected for a particular CR level.

The biggest deviation from the 5e basic rules is probably the size property. Obviously not every diamond is the same size or quality, so why would every diamond found be worth exactly 5,000 gp? Gem sizes include:
* Tiny
* Small
* Medium
* Large
* Huge
* Monumental

Other properties may be viewed in the IPP table. The gem types don't precisely line up with 5e tables - I took some liberties with personal preferences for my campaign setting. Feel free to adjust the tables and value formula as you see fit for your campaign.

With some testing of the posted version, the upper limit I have reached is near 100,000 gp in several hundred draws at CR=30. Pieces in the 20,000 - 60,000 gp value range are not all that uncommon for CR=20+, but seem to pop up pretty infrequently. Mid level CR's result in frequent items of a few hundred to a few thousand gp value, which is the sweet spot in staying true to the 5e values.

The way I intend to use the generator in practice is to use other 5e rules/treasure tables to determine a foe's treasure, but reroll gems and jewelry using this generator for more interesting role play. My campaign world will also make gems more common as treasure and portable currency, with dealers in large towns and cities catering to exchanges with roaming adventurers.

This is my first experience with IPP. I put this together just to learn the syntax and see what it could do. Any feedback would be much appreciated.

https://1drv.ms/u/s!Amd5j_tEzLgZnl5XzkKivSKHc2I6

Comments

  • Very nice!

  • edited August 2017

    This is very nice. I like your take on the variability of gem value. I'm slowly converting the built in generators to 5e, so this will come in handy when I get to the treasure gen.
    -Thanks

    _I finished the spell list and spell book gens and placed on the exchange _

  • I like that you were able to take something generic and imprecise from the corebook and build something so solid from it. This is a very creative take on the D&D economy as well.
  • This is beautiful. Thanks!!!

  • edited February 2018

    Update: I've added the "comma thing" from another post and tweaked the formulas for a bit better distribution (CR plays a bigger role in the determination). Here's a link to the new generator file:

    https://1drv.ms/u/s!Amd5j_tEzLgZnmAvE0EI27shz7vo

    Notes:
    1. A CR entry greater than 30 actually can hurt the results.
    2. The highest value possible is (I think) 960,000 gp. That would require the generator to roll a 100 (or very near 100) 5 or more times in a row.
    3. If you find an extraordinary gem of monumental size as a raw stone (40,000 gp max), you could always seek the most skilled gem cutter and most renown jeweler in the realm to finish and set your stone to create a million gp piece! I'd have a sorcerer enchant it as well at that point...

  • I'm not using 5e but that looks great and easy to adapt to whatever value system you happen to be using. Thanks!

  • edited February 2018

    Sorry, but I think, I don't get the result you wanted to show: spielerun.de/IPP-Gemstone-Error.jpg
    And additionally I had to replace all "0." and "1." with "0," and "1,". :(

  • Hey Levendor, excuse the thread necromancy, but I just threw your edit of the Addcomma tables into one of my generators. For every group of 3 characters, it's adding the , but it's doing it on all groups of 3 characters. Example:

    $,789
    $,321,789
    $,123,456,789

    I did a straight copy/paste of your code into my generator and used this table call - [@Cnum with [#{$Game} wealth]]

    Any thoughts on why it might be doing that?

  • Oh, that's ugly. Let me pull it up and see if I ever tweaked it after original post. I'll put whatever I'm using up here shortly.

  • Here's the two subtables, and it doesn't do that weird stuff in my generator.

    Table: CNum
    Set: number={$1}
    Set: count=0
    Set: MyValue=[[{number} >> reverse >> eachchar AddComma] >> reverse]
    [when][{MyValue} >> Left]=,[do][{MyValue} >> SubStr 2 0][else]{MyValue}[end]
    EndTable:
    
    Table: AddComma
    Set: MyChar={$1}
    Set: count={!{$count}+1}
    [when]{count}=3 [do][@count==0][{MyChar},][else][{MyChar}][end]
    EndTable: 
    

    Now when I call it, I use it with a round function. Since it reverses the numerals to insert the commas, I wonder if any kind of decimal number could throw off it's count. Just a thought. Anyway, maybe try:

    [@Cnum with {round([#{$Game} wealth])}]

    I'd expect that the round can't hurt anything in your function.

  • I'm getting really weird results. I hand typed the round with the curly braces and I got 0.

    I took the curly braces off just to experiment and got results like --> ro,und,($$,124,06)

    Which I would expect something along those lines without the braces. I knew it was wrong.

    Then I copied and pasted your code again, same thing. The round keeps taking me to 0 for some reason.

  • Round would probably give you zero if it doesn't think the value is a number. For example you might have a stray space in there.

  • edited April 2021

    No stray spaces but each line had a $ sign. I took it out and everything is working perfectly.

    Levendor, I replaced my number with 22.98 with some modifiers and there seemed to be no problems with the decimals. I got everything from $5 to $2,298,000. Nothing seemed to break.

  • So all good now??? Just send a pure number (no $) and it's working? Good to know.

  • edited April 2021

    Eddie, Can I get a copy when you are done?

    I write fanfiction stories where character's lives are turned into video games and am considering having HP to harvest the basilisk after the event in second year. A basilisk has to be worth something, right?

  • Sure,

    Here is the table call I'm using:

    table: notes2
    &#8226;&nbsp;&nbsp;NPC wealth: $[@Cnum with {round([#{$Game} wealth])}]<BR>&
    

    Here is what it calls to:

    table: normalwealth
    type: lookup
    0:{{1d250}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    1:{{1d500}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    2:{{1d750}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    3:{{1d1000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    4:{{1d2000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    5:{{1d5000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    6:{{1d10000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    7:{{1d15000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    8:{{1d20000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    9:{{1d30000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    10:{{1d50000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    11:{{1d75000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    12:{{1d100000}*{[|0|.2|.5|1|2|5|20|100|1000|10000|100000]}}
    

    The comma thing is a straight copy paste from above but I'll repost it in one post for you.

    Table: CNum
    Set: number={$1}
    Set: count=0
    Set: MyValue=[[{number} >> reverse >> eachchar AddComma] >> reverse]
    [when][{MyValue} >> Left]=,[do][{MyValue} >> SubStr 2 0][else]{MyValue}[end]
    EndTable:
    
    Table: AddComma
    Set: MyChar={$1}
    Set: count={!{$count}+1}
    [when]{count}=3 [do][@count==0][{MyChar},][else][{MyChar}][end]
    EndTable:
    

Leave a Comment