Tuesday, September 27, 2011

New function for Links to pfd20srd Bestiary

If you liked the D20PFSRDSpellLink~ function, you're really going to like the D20PFSRDCreatureLink~ function. It's great for your custom random encounter tables. If you wrap it around your creature names (and follow some basic naming conventions), it will create a hyperlink in your generator results to the corresponding bestiary page on www.d20pfsrd.com!

I'd love to take credit for the idea, but I can't. In fact I'd abandoned the hope of linking random encounter results to creature pages. But, thanks to all the hard work being done at pfd20srd they've created a vehicle that uses a simple alias to get to the actual link (3pp.d20pfsrd.com). For example the Ogre URL might actually be nested in several subtype directories. A fictional example might be: http://www.d20pfsrd.com/bestiary/humanoid/ogre/common-ogre. But, through aliasing, the much simpler URL http://3pp.d20pfsrd.org/ogre will get you there as well. The power of this becomes obvious once you realize the only alternative is hand coding/copying the urls.

Earlier this week I'd converted the 13 Pathfinder random environment encounter tables into dxContent random generators. It was basic work, nothing fancy. After my friend John (creator of d20pfsrd) showed me the aliasing tools, I created the first version of the creature link function and rolled it out to the 13 generators.

I thought Id provide sample code for all the DMs out there who need custom encounter tables. You can make it happen with just on simple one script and one table.


#USES TABLES:FoulDungeon#
Foul Dungeon Encounter: [ENCDungCR2]

TABLE: FoulDungeon

8,{Dice~2d6} {D20PFSRDCreatureLink~goblins}
4,{Dice~1d4} {D20PFSRDCreatureLink~ghouls}
6,{Dice~1d4} {D20PFSRDCreatureLink~giant spiders}
(add rows as needed)

Have fun building your custom [RandomTerrain] encounter tables at dxContent.com!

No comments:

Post a Comment