Skip to content

Commit 5c1ee61

Browse files
Numerous updates and additions; read on for more info.
THEMES ====== There is now an eberron theme that will set some fonts and recto/verso background images to match the Eberron book stylings. Top-level titles get some new fonts, and a couple of colors change. You can now choose between three font sets. The default uses the original font settings from the rpgtex implementation. In addition, you can provide the option `fonts=wotc` or `fonts=dmsguild`. Use `wotc` to select the fonts that WotC uses in their published books (you'll have to pay for the fonts, and I can't speak to any trade dress issues that might arise). I like using this because I'm vain and I mostly write these adventures for myself, for fun. Yes, I'm a typography nerd, this is fun. The `dmsguild` version uses the fonts specified by the DM's Guild materials. I've included details on where to obtain each of these fonts. The official DM's Guild fonts are all available for free download, the paid fonts can be found at either MyFonts or Adobe. IMAGES ====== I've added support for floatable images using `tcolorbox`, with `\DndImage` providing a plain image, and `\DndCaptionedImage` for an image with a corresponding caption, in the correct (themed) font. You can provide options from `tcolorbox` to both of these to provide some fine-tuning or to have images extend out to the edges of the printed page, for example. STAT BLOCKS =========== You can now create stat blocks for sentient items via `\DndSentientItemAbilityScores`. Sentient items use `Int`, `Wis`, `Cha`, and `Alignment`. Added `psionic` as an attack type, alongside `weapon` and `spell`. I'm working on some Dark Sun ideas, and one approach I have defines psionic attacks. Added support for vehicle stat blocks using the `DndVehicle` environment. This functions the same way as for `DndMonster`, with appropriate no-bg variants. There are corresponding commands for the various components of the stat block: - `DndVehicleBasics` - `DndVehicleDetails` - `DndVehicleAbilityScores` - `DndVehicleSection` - `DndVehicleAction` - `DndVehicleSpeed` - `DndVehicleComponent` - `DndVehicleControl` - `DndVehicleMovement` - `DndVehicleWeapon` - `DndVehicleAttack` NEW BOXES ========= You can add quotation boxes now with the `DndQuotation` and `DndAside` environments. `DndQuotation` expects an attribution argument, and is intended for either book quotes or for notes from e.g. Tasha or Xanathar. `DndAside` provides the same without an attribution. Both render in the form of a small sticky note attached to the page, as close as I can get it to the ones in the official books. AREAS ===== Areas have been updated to allow for specifying ranges. You can use `\DndAreaRange` to supply an area description for e.g. "Area 1.10–1.12". Area references are now also updated to make it easier to reference areas outside the current set. For instance, if you're in "F.3." and you want to build a reference back to "C.5", you can now do so directly. `\DndAreaRef` now generates the `C5` string, rather than a page number, since that's the more common usage. To get a page number, there's a new `\DndAreaPageRef` command which takes on the original behavior. UTILITIES ========= There are new `\DndSkillCheck` and `\DndAbilityCheck` macros that can be used to generate DC checks using localized strings from the locale file. Ability checks render as e.g. "DC 12 Dexterity", while skill checks render as e.g. "DC 12 Strength (Athletics)". There are macros wrapping these for ability saves (`\DndStrSave`, `\DndConSave` etc.). There are also macros wrapping skills checks that provide the usual attribute name, though this can be overridden. You can use `\DndAthletics{12}` to get "DC 12 Strength (Athletics)", or `\DndAthletics[\conname]{12}` to get "DC 12 Constitution (Athletics)", for example. In addition to these are a couple of macros for the things I consistently forget: - `\DndPickLock{12}` creates "DC 12 Dexterity" because I forget lock-picking is straight Dex. - `\DndThievesTools{12} creates "DC 12 Dexterity (Thieves' Tools)" for those cases where tool proficiency is helpful. The eagle-eyed will note a `dndmonsterlookup.sty` in here as well, which is being superceded by a separate package. The intent is for you to be able to say `A \Boar\ approaches` and receive "A \textbf{boar} (\textit{MM}, p. 319) approaches" in the output. The separate package is better because it defines each source in an optional module, and provides a way to get plurals in place properly. That's coming Real Soon Now™.
1 parent 2c94ab9 commit 5c1ee61

20 files changed

+5522
-73
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
*.pdf
88
*.synctex.gz
99
*.toc
10+
.DS_Store

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
11+
### Added
12+
13+
* Theming class options:
14+
- Eberron-style header/footers on request
15+
- Font set options:
16+
* `fonts=dmsguild` for DMs Guild fonts (freely available).
17+
* `fonts=wotc` for canonical WotC (paid, fairly expensive) font sets.
18+
* Leave off the option to get current default fonts.
19+
* Image floats, captioned and standalone, based on `tcolorbox`.
20+
* Stat blocks: small inline ones for sentient weapons, and fully-fledged blocks for vehicles.
21+
* Quotation and aside environments: on a slightly rotated sticky note, with an attribution (quotation) or not (aside).
22+
* Area references:
23+
- Define ranges (e.g. `Area 10-12: Small prison cells`).
24+
- Better ways to reach outside the current top-level area to reference things from elsewhere (e.g. reference 'Area A5' from within 'Area C2').
25+
- `\DndAreaRef` now prints 'C5' instead of 'p. 32'. Use `\DndAreaPageRef` to get 'p. 32' now.
26+
* Several utility macros:
27+
- `\DndAbilityCheck` (DC 11 Strength) and `\DndSkillCheck` (DC 11 Strength (Athletics))
28+
- Ability check macros built on those, e.g. `\DndStrSave{12}` gets 'DC 12 Strength'
29+
- Skill check macros also built on those, e.g. `\DndAthletics{12}` gets 'DC 12 Strength (Athletics)', or `\DndAthletics[\conname]{12}` gets 'DC 12 Constitution (Athletics)'.
30+
1031
### Added
1132
* French translation
1233

dndcore.def

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
\RequirePackage {tikz} % drawing ornaments and lines
2020
\RequirePackage {xcolor}
2121
\RequirePackage {xparse} % \NewDocumentCommand and expl3
22+
\RequirePackage {graphicx}
2223

2324
\sys_if_engine_luatex:T
2425
{
@@ -82,9 +83,13 @@
8283
% Main modules in alphabetical order
8384
\RequirePackage {lib/dndcomment} % inline comment boxes
8485
\RequirePackage {lib/dndheader} % fancy headers and footers
86+
\RequirePackage {lib/dndimage} % image display
8587
\RequirePackage {lib/dndmonster} % stat blocks
88+
\RequirePackage {lib/dndquote} % quotation/aside blocks
8689
\RequirePackage {lib/dndreadaloud} % read-aloud text
8790
\RequirePackage {lib/dndsections} % section styling and special section headers
8891
\RequirePackage {lib/dndsidebar} % sidebars
8992
\RequirePackage {lib/dndtable} % tables
9093
\RequirePackage {lib/dndtoc} % table of contents styling
94+
\RequirePackage {lib/dndvehicle} % vehicle/ship stat blocks
95+
% \RequirePackage {lib/dndmonsterlookup} % monster stat references

dndoptions.clo

+53
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@
3131
\bool_new:N \l__dnd_multitoc_bool
3232
\bool_new:N \l__dnd_layout_bool
3333
\bool_new:N \l__dnd_no_deprecated_code_bool
34+
\bool_new:N \l__dnd_eberron_mode_bool
35+
\bool_new:N \l__dnd_img_draft_bool
36+
\tl_new:N \l__dnd_background_name_tl
37+
\tl_new:N \l__dnd_fontset_tl
38+
39+
\tl_const:Nn \l__dnd_fontset_plain_tl {plain}
40+
\tl_const:Nn \l__dnd_fontset_wotc_tl {wotc}
41+
\tl_const:Nn \l__dnd_fontset_dmsguild_dl {dmsguild}
3442

3543
\bool_set_true:N \l__dnd_multitoc_bool
3644
\bool_set_eq:NN \l__dnd_layout_bool \c__dnd_isclass_bool
@@ -48,18 +56,55 @@
4856
{
4957
\bool_set_true:N \l__dnd_show_background_bool
5058
\bool_set_true:N \l__dnd_show_footer_scroll_bool
59+
\bool_set_false:N \l__dnd_eberron_mode_bool
60+
},
61+
bg / eberron .code:n =
62+
{
63+
\bool_set_true:N \l__dnd_show_background_bool
64+
\bool_set_false:N \l__dnd_show_footer_scroll_bool
65+
\bool_set_true:N \l__dnd_eberron_mode_bool
5166
},
5267
bg / print .code:n =
5368
{
5469
\bool_set_false:N \l__dnd_show_background_bool
5570
\bool_set_true:N \l__dnd_show_footer_scroll_bool
71+
\bool_set_false:N \l__dnd_eberron_mode_bool
5672
},
5773
bg / none .code:n =
5874
{
5975
\bool_set_false:N \l__dnd_show_background_bool
6076
\bool_set_false:N \l__dnd_show_footer_scroll_bool
77+
\bool_set_false:N \l__dnd_eberron_mode_bool
6178
},
6279
bg .initial:n = full,
80+
81+
% Font choice: use wotc to use the official DnD fonts
82+
fonts .choice:,
83+
fonts / wotc .code:n =
84+
{
85+
\tl_set_eq:NN \l__dnd_fontset_tl \l__dnd_fontset_wotc_tl
86+
},
87+
fonts / dmsguild .code:n =
88+
{
89+
\tl_set_eq:NN \l__dnd_fontset_tl \l__dnd_fontset_dmsguild_tl
90+
},
91+
fonts / plain .code:n =
92+
{
93+
\tl_set_eq:NN \l__dnd_fontset_tl \l__dnd_fontset_plain_tl
94+
},
95+
fonts .initial:n = plain,
96+
97+
% Draft-mode DndImage
98+
img .choice:,
99+
img / draft .code:n =
100+
{
101+
\bool_set_true:N \l__dnd_img_draft_bool
102+
},
103+
img / final .code:n =
104+
{
105+
\bool_set_false:N \l__dnd_img_draft_bool
106+
},
107+
img .initial:n = final,
63108

64109
% Justified text
65110
justified .code:n =
@@ -129,6 +174,14 @@
129174

130175
\ProcessKeysOptions { dnd / options }
131176

177+
\bool_if:NTF \l__dnd_eberron_mode_bool
178+
{
179+
\tl_set:Nn \l__dnd_background_name_tl {img/eberron}
180+
}
181+
{
182+
\tl_set:Nn \l__dnd_background_name_tl {img/paper}
183+
}
184+
132185
% BEGIN section to remove in version 1.0.0
133186
\bool_if:NF \c__dnd_isclass_bool
134187
{

img/eberron-recto.jpg

180 KB
Loading

img/eberron-verso.jpg

190 KB
Loading
File renamed without changes.

img/paper-verso.jpg

1.54 MB
Loading

lib/dndcolors.sty

+8-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66

77
% Page
8-
\definecolor {bgtan} {HTML} {F7F2E5} % DndReadAloud background
9-
\definecolor {bgtan2018}{HTML} {F9EFD6} % lighter version of bgtan from the 2018 Basic Rules
10-
\definecolor {pagegold} {HTML} {B89A67} % pagenumbers and footer
8+
\definecolor {bgtan} {HTML} {F7F2E5} % DndReadAloud background
9+
\definecolor {bgtan2018} {HTML} {F9EFD6} % lighter version of bgtan from the 2018 Basic Rules
10+
\definecolor {pagegold} {HTML} {B89A67} % pagenumbers and footer
1111

1212
% Type
1313
\definecolor {titlered} {HTML} {58180D} % titles
@@ -42,8 +42,11 @@
4242

4343
% Element colors that do not respond to \DndSetThemeColor
4444
\colorlet {readaloudcolor} {bgtan} % DndReadAloud background
45-
\definecolor {statblockribbon} {HTML} {E69A28} % stat block top/bottom borders (gold)
46-
\definecolor {statblockbg} {HTML} {FDF1DC} % stat block background (tan)
45+
\colorlet {quotecolor} {PhbMauve} % DndQuotation background
46+
\definecolor {statblockribbon} {HTML} {E69A28} % stat block top/bottom borders (gold)
47+
\definecolor {statblockbg} {HTML} {FDF1DC} % stat block background (tan)
48+
\definecolor {vehiclestatbg} {HTML} {F2FFFF} % vehicle stat block background (pale turquoise)
49+
\definecolor {vehiclestatribbon} {HTML} {8777BB}
4750

4851
% Sets the themecolor and colors for all themed elements
4952
% If called without the optional color, resets the color of all themed elements to the current themecolor

lib/dndcompat.sty

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
\ExplSyntaxOn
2+
3+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4+
% Compatibility with external packages
5+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6+
7+
\cs_if_free:NT \str_case_e:nnF
8+
{
9+
% \str_case_x was renamed \str_case_e mid-2018. \str_case_x will be removed
10+
% at the end of 2019:
11+
%
12+
% https://github.com/latex3/latex3/blob/8fcb571ddda61c01773d9746d32cecdbe63afb26/l3kernel/l3obsolete.txt#L65
13+
\cs_new_eq:NN \str_case_e:nnF \str_case_x:nnF
14+
}

0 commit comments

Comments
 (0)