New Release - Swords & Wizardry Treasure Generator

tl;dr: Stephen Faure and I are releasing a fork of the original Swords & Wizardry Treasure Generator created by Brian Ramsay ( 

Our version incorporates a different approach by allowing you to enter the XP to generate against. From that, it will calculating the multiplier, a divided coin haul and running totals of gems/jewelry and the haul. 

Our version can be found here:

For the rest of the story...

Back in March of 2011, Brian Ramsay of released the Swords & Wizardry Treasure Generator. It's a neat little tool, taking into account the unique way that S&W does "tradeouts" of coins to come up with the gems, jewelry and magic items of a loot haul.

It's one of those tools that I bookmarked and have used over the years without really thinking about it.

Well, fast forward to 2023, and with the Dungeon23 project going on, I've been using this tool a lot more.  I came to desire some changes:

  • A way to calculate the gold based on the XP of the monster(s) overcome in obtaining the treasure
  • A breakdown into various other coins than gold pieces. 
Fortunately, Brian created a GitHub repository of his source code and made it open to others to fiddle with. So, knowing PHP, JavaScript and HTML, I did exactly that. 

Swords & Wizardry Whitebox has a neat little chart in their treasure section that allows one to take the XP, roll to determine the multiplier of gold earned, and how the coins will be broken down:

I love it! It's definitely an old school haul if there are thousands of copper pennies to sort through! This is exactly what I wanted the generator to do.

So I made a fork (a copy) of Brian's freely available code and got to work. My initial version looked like this:

I was pretty happy with this. Then I looked to see who else may have forked Brian's code and met Stephen Faure, who describes himself as "a fellow old-school RPG enthusiast and software developer."

Stephen had modified Brian's code to remove the need for PHP and turn it into a pure JavaScript application. This was awesome, because it made it a lot easier to host versions of this generator! I reached out to him; he and I collaborated on ideas and he came up with some great suggestions:
  • Calculate a running total of the value of gems/jewelry
  • Calculate a running total of the whole haul, including gems/jewelry and coins
Done! After some more coding and testing, we've got this:

Since Stephen removed the need for PHP, I'm hosting this for now on my campaign site. I can't imagine I'll get too much traffic, but we'll see!

I've tried to get ahold of Brian to see if he wanted to incorporate our changes into his hosted generator, or cared if we released our own fork -- but as of writing of this post (3/25/2023), he's not responded to emails or to a request through GitHub to incorporate our changes into his version. So, the release of this fork is made with all due respect and gratitude to Brian, but with the desire to share our updates and tweaks. Hopefully you will find them helpful and useful!

As for future plans? I don't know. I'm not sure what Brian intended with monsters and spells, so I might end up removing those tabs, but for now, we're releasing it as-is with just the treasure changes. 

If you find bugs or have ideas, please feel free to drop us a line and let us know!


Post a Comment