Skip to content

Instantly share code, notes, and snippets.

@benwebber
Last active May 21, 2018 16:06
Show Gist options
  • Save benwebber/26e8567380c9f4e291b12a8da3c651c8 to your computer and use it in GitHub Desktop.
Save benwebber/26e8567380c9f4e291b12a8da3c651c8 to your computer and use it in GitHub Desktop.
\documentclass[letterpaper,10pt,twoside,twocolumn,openany]{book}
\usepackage[bg=none]{dnd}
\usepackage{xtab}
% Normally, @ is not a valid character in macro names. Make the @ symbol a
% normal letter in order to call an internal command from the dnd package.
% See <https://tex.stackexchange.com/a/8353> for more information.
\makeatletter
% Define a new `dndlongtable` environment similar to the `dndtable` environment.
%
% \begin{dndlongtable}[column spec][row colour]
% % ...
% \end{dndlongtable}
%u
% Unlike `dndtable`, this will use the `xtabular*` environment from the xtab
% package to create a table that spans multiple text columns.
%
% `dndtable` wraps `tabularx`, which offers a special X column type that
% automatically wraps text to the table width. Unfortunately, we can't use that
% column type with xtabular* tables. We have to replicate it using fixed column
% widths:
%
% >{\centering}p{0.1\linewdith} Create a centred column 10% as wide as the line.
% p{0.8\linewidth} Create a left-aligned column 85% as wide as the line.
%
% The 5% difference leaves some space between columns.
%
% Refer to the xparse documentation for more information on the
% `\NewDocumentEnvironment` command and O argument type.
\NewDocumentEnvironment{dndlongtable}{O{>{\centering}p{0.1\linewidth} p{0.8\linewidth}} O{tablecolor}}{%
% End horizontal mode. Pad the top of the table with some vertical space.
\par\vspace*{8pt}
% Disable indentation on the next line.
\noindent
% Set the sans-serif table body font.
\dnd@TableBodyFont
% Set alternating row colours.
\rowcolors{1}{}{#2}
% Create an `xtabular*` table as wide as the current line (column) and pass
% the column spec to it (#1).
\begin{xtabular*}{\linewidth}{#1}
}{%
\end{xtabular*}
% Pad the bottom of the table with some vertical space.
\vspace{8pt plus 1pt}
% Disable indentation on the next line.
\noindent
}
% Disable the @ character in macro names again.
\makeatother
% Create a counter for table entries.
\newcounter{trinket}
% Define a new command that increments and prints the counter with zero-padding.
\newcommand{\roll}{%
\stepcounter{trinket}%
\ifnum\value{trinket}<10 0\fi\arabic{trinket}%
}
\begin{document}
\header{Trinkets}
% Trinkets from <https://www.dandwiki.com/wiki/5e_Trinkets>
\begin{dndlongtable}
\textbf{d100} & \textbf{Trinket} \\
\roll & A miniature, tame mimic \\
\roll & A carved marble elephant \\
\roll & A small round cactus with two eyes \\
\roll & A pocket book of dwarven poetry \\
\roll & A bronze box containing a tiny wooden owl \\
\roll & A solid blue metal sphere, one inch in diameter, with three parallel grooves around the circumference \\
\roll & A pouch containing ten dried peas \\
\roll & A ceramic puzzle cube, with each face divided into four independently rotating squares enameled with astronomical signs \\
\roll & A square of bear-beetle leather, a creature unique to the misty woods of Cix \\
\roll & A sheet of vellum on which is crudely painted a herbal plant that you have yet to identify \\
\roll & A petrified frog \\
\roll & A twenty-sided die \\
\roll & A cut yellow chrysanthemum that never dies \\
\roll & A palm-sized iron cage: the door doesn't shut properly, as the tiny lock was broken from the inside \\
\roll & A blob of grey goo, slippy but safe to touch, kept in a ceramic pot \\
\roll & A dried sky lily, from the tip of the Godshead, an impossibly high mountain. \\
\roll & A glowing blue-green line, six inches long, but with no discernible radius \\
\roll & A pretty conch shell \\
\roll & A scrap of paper on which is written, in Goblin, ``My dearest Bess,'' \\
\roll & A keychain holding the head of a broken key \\
\roll & An echo pearl from the depths of the Vibration Lake \\
\roll & A toy crossbow \\
\roll & Lip balm \\
\roll & A fossil of an extinct many-limbed critter \\
\roll & A brass prosthetic nose \\
\roll & A corkscrew \\
\roll & A dried poison gland of a jaggedfish \\
\roll & A bronze gear on which is etched the word ``Moon'' \\
\roll & A map of a labyrinth, on which is penciled a line that starts at the centre but fails to connect to the entrance \\
\roll & A cube of ice that never melts \\
\roll & A square of ironsilk sewn by the geargrubs of ancient Siclari \\
\roll & An ivory knitting needle \\
\roll & A peacock feather \\
\roll & A travel set of paints: someone has used up all the black \\
\roll & A wig of short platinum-blonde hair \\
\roll & A child's charm bracelet \\
\roll & A small bar of orichalcum, a metal only mentioned in ancient literature \\
\roll & A deed to a ruined tower \\
\roll & An invitation to a formal ball to be held in two years time \\
\roll & A smoking pipe carved from granite \\
\roll & A vial of scented oil \\
\roll & A preserved basilisk eye \\
\roll & A torn page on which is written ``Death! / Plop. / The barges down in the river flop. / Flop, plop. / Above, beneath'' \\
\roll & An intricate knot that nobody seems to know how to tie or untie – sailors believe it to be bad luck \\
\roll & Pages ripped out of an accounting journal of a local merchant \\
\roll & A ring with a poison reservoir for slipping into drinks and a tiny razor edge for cutting purse-strings \\
\roll & A glass globe of swirling green goop, no openings \\
\roll & A bundle of ragged ``treasure maps'' drawn by inventive local children \\
\roll & A sliver from a spear said to have pierced the armpit of a saint \\
\roll & A portfolio of pressed flowers \\
\roll & A small handbook of foreign coins, for travelers to identify denominations \\
\roll & A slightly out of date guidebook to foreign inns, taverns, and transportation \\
\roll & Six useless wooden tokens previously issued by a traitor-prince as currency \\
\roll & Two false fingernails painted with mysterious symbols \\
\roll & A set of cosmetic tools for cleaning the ears \\
\roll & A harmless stage dagger with retracting blade and blood-compartment \\
\roll & A floating glass orb that follows you around and makes whirring sounds \\
\roll & A goblin-made key that can lock any door, but unlock none \\
\roll & A translucent coin, minted in an unknown land \\
\roll & A bronze ring engraved with dark symbols that was supposedly buried with a legendary necromancer long ago \\
\roll & A ring carved with the unfinished insignia to a defunct secret organization \\
\roll & A thimble on which is an enamel painting of a turtle \\
\roll & A puzzle box holding 10 fingernail clippings \\
\roll & A pair of badly worn hairdressing scissors \\
\roll & A wax hand shaped to hold a large cup \\
\roll & A measuring tape, marked in ink at 23 inches \\
\roll & A seashell that is silent when held up to your ear \\
\roll & A coprolite \\
\roll & One piece of unknown paper currency with no obvious denomination \\
\roll & A bootlace entwined with gold thread \\
\roll & A dented sheriff's badge \\
\roll & A tiny bubble level that is calibrated incorrectly \\
\roll & A belt buckle \\
\roll & A letter of complaint to a toy shop owner \\
\roll & A decorative leather stud \\
\roll & A penny whistle that plays the same note no matter which holes are covered \\
\roll & A ticket admitting an adult and child onto a thing called a ``semiotic tram'' \\
\roll & A small glass vial holding three eyelashes \\
\roll & A tub of putty \\
\roll & A leather shoe made for a dog \\
\roll & A doll head with no hair and poorly applied makeup \\
\roll & A pewter spork \\
\roll & Illustrated instructions on how to make a paper hat \\
\roll & A clear glass dish with four round notches around the outside edge \\
\roll & A wire circlet that bestows upon its wearer perfect posture \\
\roll & A small hand-sized box covered with numbered buttons \\
\roll & An empty whiskey tumbler that causes any liquid poured into it to become bourbon \\
\roll & A book of flumph grammar \\
\roll & A hunk of metal which appears to be several gears jammed together at unnatural and impossible angles: attempting to turn it causes it to emit a horrible shrieking sound \\
\roll & A crystal prism that refracts shadow instead of light \\
\roll & A smokeless and odorless candle \\
\roll & A flat disc of layered metal and prismatic glass with a hole in the centre \\
\roll & An ornate pewter tankard made without a bottom \\
\roll & A wooden device designed to be gripped in two hands; two levers protrude from the top, and two triggers from the underside \\
\roll & Two perfectly identical pine cones \\
\roll & A sponge that can absorb 60 gallons of ale (and only ale) \\
\roll & A pepper grinder containing an unlimited supply of pepper unless opened, at which point it becomes half empty \\
\roll & A poorly cultivated bonsai juniper in a glazed ceramic pot \\
\roll & An oval-shaped soapstone tablet inscribed with a short list of religious prohibitions \\
\roll & A wooden doll with a door that opens to reveal a slightly smaller, identical, doll; this one is empty, perhaps there are still smaller dolls that are missing? \\
\end{dndlongtable}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment