forked from rpgtex/DND-5e-LaTeX-Template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.tex
343 lines (285 loc) · 11 KB
/
example.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
% Changing book to article will make the footers match on each page,
% rather than alternate every other.
%
% Note that the article class does not have chapters.
\documentclass[letterpaper,10pt,twoside,twocolumn,openany]{dndbook}
% Use babel or polyglossia to automatically redefine macros for terms
% Armor Class, Level, etc...
% Default output is in English; captions are located in lib/dndstring-captions.sty.
% If no captions exist for a language, English will be used.
%1. To load a language with babel:
% \usepackage[<lang>]{babel}
%2. To load a language with polyglossia:
% \usepackage{polyglossia}
% \setdefaultlanguage{<lang>}
\usepackage[english]{babel}
%\usepackage[italian]{babel}
% For further options (multilanguage documents, hypenations, language environments...)
% please refer to babel/polyglossia's documentation.
\usepackage[utf8]{inputenc}
\usepackage{lipsum}
\usepackage{listings}
\lstset{%
basicstyle=\ttfamily,
language=[LaTeX]{TeX},
}
% Start document
\begin{document}
% Your content goes here
% Comment this out if you're using the article class.
\chapter{Chapter 1: The Dark \LaTeX}
\section{Main Section}
\lipsum[2] % filler text
\begin{quotebox}
As you approach this template you get a sense that the blood and tears of many generations went into its making. A warm feeling welcomes you as you type your first words.
\end{quotebox}
\subsection{Fun with boxes}
\subsubsection{Even more fun!}
\begin{commentbox}{This Is a Comment Box!}
A \lstinline!commentbox! is a box for minimal highlighting of text. It lacks the ornamentation of \lstinline!paperbox!, but it can handle being broken over a column.
\end{commentbox}
\subtitlesection{Weapon, +1, +2, or +3}
{Weapon (any), uncommon (+1), rare (+2), or very rare (+3)}
\lipsum[3]
\begin{paperbox}[float=!t]{Behold, the Paperbox!}
The \lstinline!paperbox! is used as a sidebar. It does not break over columns and is best used with a figure environment to float it to one corner of the page where the surrounding text can then flow around it.
\end{paperbox}
% For more columns, you can say \begin{dndtable}[your options here].
% For instance, if you wanted three columns, you could say
% \begin{dndtable}[XXX]. The usual host of tabular parameters are
% available as well.
\header{Nice table}
\begin{dndtable}
\textbf{Table head} & \textbf{Table head} \\
Some value & Some value \\
Some value & Some value \\
Some value & Some value
\end{dndtable}
\section{Spells}
\begin{spell}
{Beautiful Typesetting}
{4th-level illusion}
{1 action}
{5 feet}
{S, M (ink and parchment, which the spell consumes)}
{Until dispelled}
You are able to transform a written message of any length into a beautiful scroll. All creatures within range that can see the scroll must make a wisdom saving throw or be charmed by you until the spell ends.
While the creature is charmed by you, they cannot take their eyes off the scroll and cannot willingly move away from the scroll. Also, the targets can make a wisdom saving throw at the end of each of their turns. On a success, they are no longer charmed.
\end{spell}
\lipsum[2]
% You can optionally not include the background by saying
% begin{monsterboxnobg}
\begin{monsterbox}{Monster Foo}
\begin{hangingpar}
\textit{Medium metasyntactic variable (goblinoid), neutral evil}
\end{hangingpar}
\dndline%
\basics[%
armorclass = 9 (12 with \emph{mage armor}),
hitpoints = \dice{3d8 + 3},
speed = {30 ft., fly 30 ft.},
]
\dndline%
\stats[
STR = \stat{12}, % This stat command will autocomplete the modifier for you
DEX = \stat{8},
CON = \stat{13},
INT = \stat{10},
WIS = \stat{14},
CHA = \stat{15},
]
\dndline%
\details[% If you want to use commas in these sections, enclose the description in braces.
%savingthrows = {Str +0, Dex +0, Con +0, Int +0, Wis +0, Cha +0},
%skills = {Acrobatics +0, Animal Handling +0, Arcana +0, Athletics +0, Deception +0, History +0, Insight +0, Intimidation +0, Investigation +0, Medicine +0, Nature +0, Perception +0, Performance +0, Persuasion +0, Religion +0, Sleight of Hand +0, Stealth +0, Survival +0},
%damagevulnerabilities = {},
%damageresistances = {},
%damageimmunities = {},
%conditionimmunities = {},
senses = {darkvision 60 ft., passive Perception 10},
languages = {Common, Goblin},
challenge = {1},
]
\dndline%
% Traits
\begin{monsteraction}[Innate Spellcasting]
Foo's spellcasting ability is Charisma (spell save DC 12, +4 to hit with spell attacks). It can innately cast the following spells, requiring no material components:
\DndInnateSpellLevel{misty step}
\DndInnateSpellLevel[3]{fog cloud, rope trick}
\DndInnateSpellLevel[1]{identify}
\end{monsteraction}
\begin{monsteraction}[Spellcasting]
Foo is a 3rd-level spellcaster. Its spellcasting ability is Charisma (spell save DC 12, +4 to hit with spell attacks). It has the following sorcerer spells prepared:
\DndMonsterSpellLevel{blade ward, fire bolt, light, shocking grasp}
\DndMonsterSpellLevel[1][4]{burning hands, mage armor}
\DndMonsterSpellLevel[2][2]{scorching ray}
\end{monsteraction}
\monstersection{Actions}
\begin{monsteraction}[Multiattack]
The foo makes two melee attacks.
\end{monsteraction}
%Default values are shown commented out
\monsterattack[
%name=Dagger,
%enum* type={both,melee,ranged},
mod=+3,%mod=+0,
%reach=5,
%range=20/60,
%targets=one target,
dmg=\dice{1d4+1},%dmg=\dice{1d4},
%dmgtype=piercing,
%plusdmg=,
%plusdmgtype=,
%ordmg=,
%ordmgwhen=,
%extra=,
]
%\monstermelee calls \monsterattack with the melee option
\monstermelee[
name=Flame Tongue Longsword,
mod=+3,
%reach=5,
%targets=one target,
dmg=\dice{1d8+1},
dmgtype=slashing,
ordmg=\dice{1d10+1},
ordmgwhen=if used with two hands,
plusdmg=\dice{2d6},
plusdmgtype=fire
]
%\monsterranged calls \monsterattack with the ranged option
\monsterranged[
name=Assassin's Light Crossbow,
%mod=+0,
range=80/320,
dmg=\dice{1d8},
dmgtype=piercing,
extra={, and the target must make a DC 15 Constitution saving throw, taking 24 (7d6) poison damage on a failed save, or half as much damage on a successful one}
]
\end{monsterbox}
\section{Colors}
This package provides several global color variables to style \lstinline!commentbox!, \lstinline!quotebox!, \lstinline!paperbox!, and \lstinline!dndtable! environments.
\begin{dndtable}[lX]
\textbf{Color} & \textbf{Description} \\
\lstinline!commentboxcolor! & Controls \lstinline!commentbox! background. \\
\lstinline!paperboxcolor! & Controls \lstinline!paperbox! background. \\
\lstinline!quoteboxcolor! & Controls \lstinline!quotebox! background. \\
\lstinline!tablecolor! & Controls background of even \lstinline!dndtable! rows. \\
\end{dndtable}
See Table~\ref{tab:colors} for a list of accent colors that match the core books.
\begin{table*}
\begin{dndtable}[XX]
\textbf{Color} & \textbf{Description} \\
\lstinline!PhbLightGreen! & Light green used in PHB Part 1 \\
\lstinline!PhbLightCyan! & Light cyan used in PHB Part 2 \\
\lstinline!PhbMauve! & Pale purple used in PHB Part 3 \\
\lstinline!PhbTan! & Light brown used in PHB appendix \\
\lstinline!DmgLavender! & Pale purple used in DMG Part 1 \\
\lstinline!DmgCoral! & Orange-pink used in DMG Part 2 \\
\lstinline!DmgSlateGray! (\lstinline!DmgSlateGrey!) & Blue-gray used in PHB Part 3 \\
\lstinline!DmgLilac! & Purple-gray used in DMG appendix \\
\end{dndtable}
\caption{Colors supported by this package}%
\label{tab:colors}
\end{table*}
\begin{itemize}
\item Use \lstinline!\setthemecolor[<color>]! to set \lstinline!themecolor!, \lstinline!commentcolor!, \lstinline!paperboxcolor!, and \lstinline!tablecolor! to a specific color.
\item Calling \lstinline!\setthemecolor! without an argument sets those colors to the current \lstinline!themecolor!.
\item \lstinline!commentbox!, \lstinline!dndtable!, \lstinline!paperbox!, and \lstinline!quoteboxcolor! also accept an optional color argument to set the color for a single instance.
\end{itemize}
\subsection{Examples}
\subsubsection{Using \lstinline!themecolor!}
\begin{lstlisting}
\setthemecolor[PhbMauve]
\begin{paperbox}{Example}
\lipsum[2]
\end{paperbox}
\setthemecolor[PhbLightCyan]
\header{Example}
\begin{dndtable}[cX]
\textbf{d8} & \textbf{Item} \\
1 & Small wooden button \\
2 & Red feather \\
3 & Human tooth \\
4 & Vial of green liquid \\
6 & Tasty biscuit \\
7 & Broken axe handle \\
8 & Tarnished silver locket \\
\end{dndtable}
\end{lstlisting}
\begingroup
\setthemecolor[PhbMauve]
\begin{paperbox}{Example}
\lipsum[2]
\end{paperbox}
\setthemecolor[PhbLightCyan]
\header{Example}
\begin{dndtable}[cX]
\textbf{d8} & \textbf{Item} \\
1 & Small wooden button \\
2 & Red feather \\
3 & Human tooth \\
4 & Vial of green liquid \\
6 & Tasty biscuit \\
7 & Broken axe handle \\
8 & Tarnished silver locket \\
\end{dndtable}
\endgroup
\subsubsection{Using element color arguments}
\begin{lstlisting}
\begin{dndtable}[cX][DmgCoral]
\textbf{d8} & \textbf{Item} \\
1 & Small wooden button \\
2 & Red feather \\
3 & Human tooth \\
4 & Vial of green liquid \\
6 & Tasty biscuit \\
7 & Broken axe handle \\
8 & Tarnished silver locket \\
\end{dndtable}
\end{lstlisting}
\begin{dndtable}[cX][DmgCoral]
\textbf{d8} & \textbf{Item} \\
1 & Small wooden button \\
2 & Red feather \\
3 & Human tooth \\
4 & Vial of green liquid \\
6 & Tasty biscuit \\
7 & Broken axe handle \\
8 & Tarnished silver locket \\
\end{dndtable}
\section{Map Regions}
The map region commands provide automatic numbering of areas.
\noindent\begin{minipage}{\linewidth}
\begin{lstlisting}
\area{Village of Hommlet}
This is the village of hommlet.
\subarea{Inn of the Welcome Wench}
Inside the village is the inn of the
Welcome Wench.
\subarea{Blacksmith's Forge}
There's a blacksmith in town, too.
\area{Foo's Castle}
This is foo's home, a hovel of mud and
sticks.
\subarea{Moat}
This ditch has a board spanning it.
\subarea{Entrance}
A five-foot hole reveals the dirt floor
illuminated by a hole in the roof.
\end{lstlisting}
\end{minipage}
\area{Village of Hommlet}
This is the village of hommlet.
\subarea{Inn of the Welcome Wench}
Inside the village is the inn of the Welcome Wench.
\subarea{Blacksmith's Forge}
There's a blacksmith in town, too.
\area{Foo's Castle}
This is foo's home, a hovel of mud and sticks.
\subarea{Moat}
This ditch has a board spanning it.
\subarea{Entrance}
A five-foot hole reveals the dirt floor illuminated by a hole in the roof.
% End document
\end{document}