Sunday, December 9, 2007

Abulafia

I've been contributing to Abulafia for the last few days, ever since I realized that the generators on that site were perfect for creating interesting and unique loot. I've had the idea of a complex treasure generator kicking around in my head for a long, long time. Imagine my surprise when I found that Abulafia already did what I wanted, and that someone had already done 90% of the work.

Abulafia's generators typically create natural text descriptions. Jewelry is a good example. Here are some examples:
  • A platinum costume mask, with the image of a scarab beetle.
  • A matching pair of Magically Treated Platinum toe rings, each with the coat of arms of a city, nation, or other location and set with 3 Jargoons. It appears to be of Wood Elven make.
  • A electrum breastplate, with the symbol of Servants of the Dark Lord (a pentagram).
  • A bronze comb inlaid with giant crab chitin.
  • A copper knife handle with the image of a diving falcon and set with a Feldspar. Much of the piece's value comes from the fact that it is obviously quite old.
  • A mammoth ivory sickle, etched with a twisting, vine-like pattern and set with a Malachite. It is of ancient workmanship.
Imagine a player cracking open a chest of pirate treasure and finding that list instead of "5000 sp, 1000 gp, and 2 diamonds." Treasure like this generates adventure hooks without even trying. The site had already secured a permanent place in my GM's Notebook, but once I get my own stuff in there, it'll be a must-have.

The generator tables are all housed in regular MediaWiki pages, making them really easy to edit. You have to Edit a page to get a look at the generator tables for a page. Since you need an account to edit, here's an example. A generator looks something like this: (I had to replace angle brackets with curly braces so it would display correctly.)
{sgdisplay iterations="5"}A [main]
{/sgdisplay}

{sgtable}
;main
5,[JewelryMaterial] [Item][Predicate]
1,matching pair of [JewelryMaterial] [Item]s, each [Predicate]

;Predicate
4, set with a [Utility.GemType]. [Craftsmanship]
3, set with [Dice.2d6] [Utility.GemType]s. [Craftsmanship]
4, [Design]. [Craftsmanship]
2, [Design] and set with a [Utility.GemType]. [Craftsmanship]
2, [Design] and set with [Dice.2d6] [Utility.GemType]s. [Craftsmanship]
4, with [Utility.Symbols]. [Craftsmanship]
2, with [Utility.Symbols] and set with a [Utility.GemType]. [Craftsmanship]
2, with [Utility.Symbols] and set with [Dice.1d12] [Utility.GemType]s. [Craftsmanship]
2, with the inscription "[Inscriptions.main]" written in [Inscriptions.Language]. [Craftsmanship]
2, with the inscription "[Inscriptions.main]" written in [Inscriptions.Language] and set with [Dice.2d6] [Utility.GemType]s. [Craftsmanship]

...
{/sgtable}
This might seem complex, but if you've ever worked with computer language grammar or parsers, it's very intuitive and powerful. Basically, any time you see an item in single brackets, like [main], it gets replaced by a result from the table with that name. You can freely mix text and table names within a table. The numbers indicate the relative frequency that an item will be chosen.

So from the initial call of A [main] it could become :
  1. A [JewelryMaterial] [Item][Predicate]
  2. A gold [Item][Predicate]
  3. A gold bracelet [Predicate]
  4. A gold bracelet set with a [Utility.GemType]. [Craftsmanship]
  5. A gold bracelet set with a [Utility.SemiPrecious]. [Craftsmanship]
  6. A gold bracelet set with a Spinel. [Craftsmanship]
  7. A gold bracelet set with a Spinel. It is of exquisite workmanship.
[Utility.GemType] is just a list of other tables that contain gems, so it was replaced with a call to one of the other tables. It also happens to be on another page, which is very convenient for making multiple generators that all reference the same sets of tables.

The SGDISPLAY tags are how you call the generator to display items. SGTABLE indicates the beginning of the generator tables and the items in single brackets are references to table names. The actual tables start with a semicolon followed by the table name. Each line after the table name starts with a number that indicates the relative frequency of the item, so on the [main] table you're 5 times more likely to get a result of [JewelryMaterial] [Item][Predicate] than you are to get matching pair of [JewelryMaterial] [Item]s, each [Predicate]. The comma indicates the beginning of the text or table names.

The hardest part of making the tables is choosing exactly how to phrase each chunk so that you get a readable result. It's possible to get results like "A Adamantine cloak pin" and "A matching pair of pair of spectacles", and there's not an easy way to fix it. Still, if you can overlook little glitches like that, Abulafia can be an incredible resource

Right now you might notice that you can't sign up for an account or edit Abulafia (the generators are still working). The database of the site has been locked so that the owner can move it to another web host, hopefully a faster one. I'm not sure how long it will take, but Dave (the owner) warns that it could take several days.

2 comments:

Dave Y said...

So this is where you hide out online - subscribezorred!

Thanks for contributing to Abulafia - I used results from the Household Goods table just last night in my own D&D game.

Sorry the move took so long, and that it was while you were right in the middle of a project. All should be restored now.

Also, this is a great, concise introduction of the type I can't seem to write. Is it OK to repost on Abu, or to point people towards?

Dave

xcorvis said...

Dave,

No problem, glad to hear it was useful.

Go ahead and repost it on Abu, that's fine with me. Then someone else can polish it up even more.

--Adam