Initial commit
Initial project scaffolding
This commit is contained in:
commit
7b33fef50e
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
*.pdf
|
||||
*~
|
||||
|
362
example.tex
Normal file
362
example.tex
Normal file
@ -0,0 +1,362 @@
|
||||
\documentclass[letterpaper,twocolumn,openany,nodeprecatedcode]{rpgbook}
|
||||
|
||||
% Use babel or polyglossia to automatically redefine macros for terms
|
||||
% Armor Class, Level, etc...
|
||||
% Default output is in English; captions are located in lib/rpgstrings.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[singlelinecheck=false]{caption}
|
||||
\usepackage{lipsum}
|
||||
\usepackage{listings}
|
||||
\usepackage{shortvrb}
|
||||
\usepackage{stfloats}
|
||||
|
||||
\captionsetup[table]{labelformat=empty,font={sf,sc,bf,},skip=0pt}
|
||||
|
||||
\MakeShortVerb{|}
|
||||
|
||||
\lstset{%
|
||||
basicstyle=\ttfamily,
|
||||
language=[LaTeX]{TeX},
|
||||
breaklines=true,
|
||||
}
|
||||
|
||||
\title{The Dark \LaTeX{} \\
|
||||
\large An Example of the rpgbook Class}
|
||||
\author{The rpgTeX Team}
|
||||
\date{2020/04/21}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\frontmatter
|
||||
|
||||
\maketitle
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\mainmatter%
|
||||
|
||||
\part{Layout}
|
||||
|
||||
\chapter{Sections}
|
||||
|
||||
\RpgDropCapLine{T}{his package is designed to aid you in} writing beautifully typeset documents for the fifth edition of the world's greatest roleplaying game. It starts by adjusting the section formatting from the defaults in \LaTeX{} to something a bit more familiar to the reader. The chapter formatting is displayed above.
|
||||
|
||||
\section{Section}
|
||||
Sections break up chapters into large groups of associated text.
|
||||
|
||||
\subsection{Subsection}
|
||||
Subsections further break down the information for the reader.
|
||||
|
||||
\subsubsection{Subsubsection}
|
||||
Subsubsections are the furthest division of text that still have a block header. Below this level, headers are displayed inline.
|
||||
|
||||
\paragraph{Paragraph}
|
||||
The paragraph format is seldom used in the core books, but is available if you prefer it to the ``normal'' style.
|
||||
|
||||
\subparagraph{Subparagraph}
|
||||
The subparagraph format with the paragraph indent is likely going to be more familiar to the reader.
|
||||
|
||||
\section{Special Sections}
|
||||
The module also includes functions to aid in the proper typesetting of multi-line section headers: |\RpgFeatHeader| for feats, |\RpgItemHeader| magic items and traps, and |\RpgSpellHeader| for spells.
|
||||
|
||||
\RpgFeatHeader{Typesetting Savant}[Prerequisite: \LaTeX{} distribution]
|
||||
You have acquired a package which aids in typesetting source material for one of your favorite games, giving you the following benefits:
|
||||
|
||||
\begin{itemize}
|
||||
\item You have advantage on Intelligence checks to typeset new content.
|
||||
\item When you fail an Intelligence check to typeset new content, you can ask questions online at the package's website.
|
||||
\end{itemize}
|
||||
|
||||
\RpgItemHeader{Foo's Quill}{Wondrous item, rare}
|
||||
This quill has 3 charges. While holding it, you can use an action to expend 1 of its charges. The quill leaps from your hand and writes a contract applicable to your situation.
|
||||
|
||||
The quill regains 1d3 expended charges daily at dawn.
|
||||
|
||||
\RpgSpellHeader%
|
||||
{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.
|
||||
|
||||
\section{Map Regions}
|
||||
The map region functions |\RpgArea| and |\RpgSubArea| provide automatic numbering of areas.
|
||||
|
||||
\RpgArea{Village of Hommlet}
|
||||
This is the village of hommlet.
|
||||
|
||||
\RpgSubArea{Inn of the Welcome Wench}
|
||||
Inside the village is the inn of the Welcome Wench.
|
||||
|
||||
\RpgSubArea{Blacksmith's Forge}
|
||||
There's a blacksmith in town, too.
|
||||
|
||||
\RpgArea{Foo's Castle}
|
||||
This is foo's home, a hovel of mud and sticks.
|
||||
|
||||
\RpgSubArea{Moat}
|
||||
This ditch has a board spanning it.
|
||||
|
||||
\RpgSubArea{Entrance}
|
||||
A five-foot hole reveals the dirt floor illuminated by a hole in the roof.
|
||||
|
||||
\chapter{Text Boxes}
|
||||
|
||||
The module has three environments for setting text apart so that it is drawn to the reader's attention. |RpgReadAloud| is used for text that a game master would read aloud.
|
||||
|
||||
\begin{RpgReadAloud}
|
||||
As you approach this module 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{RpgReadAloud}
|
||||
|
||||
\section{As an Aside}
|
||||
The other two environments are the |RpgComment| and the |RpgSidebar|. The |RpgComment| is breakable and can safely be used inline in the text.
|
||||
|
||||
\begin{RpgComment}{This Is a Comment Box!}
|
||||
A |RpgComment| is a box for minimal highlighting of text. It lacks the ornamentation of |RpgSidebar|, but it can handle being broken over a column.
|
||||
\end{RpgComment}
|
||||
|
||||
The |RpgSidebar| is not breakable and is best used floated toward a page corner as it is below.
|
||||
|
||||
\begin{RpgSidebar}[float=!b]{Behold the RpgSidebar!}
|
||||
The |RpgSidebar| 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{RpgSidebar}
|
||||
|
||||
\section{Tables}
|
||||
The |RpgTable| colors the even rows and is set to the width of a line by default.
|
||||
|
||||
\begin{RpgTable}[header=Nice Table]{XX}
|
||||
Table head & Table head \\
|
||||
Some value & Some value \\
|
||||
Some value & Some value \\
|
||||
Some value & Some value
|
||||
\end{RpgTable}
|
||||
|
||||
\chapter{Monsters and NPCs}
|
||||
|
||||
% Monster stat block
|
||||
\begin{RpgMonster}[float*=b,width=\textwidth + 8pt]{Monster Foo}
|
||||
\begin{multicols}{2}
|
||||
\RpgMonsterType{Medium aberration (metasyntactic variable), neutral evil}
|
||||
|
||||
% If you want to use commas in the key values, enclose the values in braces.
|
||||
\RpgMonsterBasics[
|
||||
armor-class = {9 (12 with \emph{mage armor})},
|
||||
hit-points = {\RpgDice{3d8 + 3}},
|
||||
speed = {30 ft., fly 30 ft.},
|
||||
]
|
||||
|
||||
\RpgMonsterAbilityScores[
|
||||
str = 12,
|
||||
dex = 8,
|
||||
con = 13,
|
||||
int = 10,
|
||||
wis = 14,
|
||||
cha = 15,
|
||||
]
|
||||
|
||||
\RpgMonsterDetails[
|
||||
%saving-throws = {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},
|
||||
%damage-vulnerabilities = {cold},
|
||||
%damage-resistances = {bludgeoning, piercing, and slashing from nonmagical attacks},
|
||||
%damage-immunities = {poison},
|
||||
%condition-immunities = {poisoned},
|
||||
senses = {darkvision 60 ft., passive Perception 10},
|
||||
languages = {Common, Goblin, Undercommon},
|
||||
challenge = 1,
|
||||
proficiency-bonus, % = +2
|
||||
]
|
||||
% Traits
|
||||
\RpgMonsterAction{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:
|
||||
\begin{RpgMonsterSpells}
|
||||
\RpgInnateSpellLevel{misty step}
|
||||
\RpgInnateSpellLevel[3]{fog cloud, rope trick}
|
||||
\RpgInnateSpellLevel[1]{identify}
|
||||
\end{RpgMonsterSpells}
|
||||
|
||||
\RpgMonsterAction{Spellcasting}
|
||||
Foo is a 2nd-level spellcaster. Its spellcasting ability is Charisma (spell save DC 12, +4 to hit with spell attacks). It has the following sorcerer spells prepared:
|
||||
\begin{RpgMonsterSpells}
|
||||
\RpgMonsterSpellLevel{blade ward, fire bolt, light, shocking grasp}
|
||||
\RpgMonsterSpellLevel[1][3]{burning hands, mage armor, shield}
|
||||
\end{RpgMonsterSpells}
|
||||
|
||||
\RpgMonsterSection{Actions}
|
||||
\RpgMonsterAction{Multiattack}
|
||||
The foo makes two melee attacks.
|
||||
|
||||
%Default values are shown commented out
|
||||
\RpgMonsterAttack[
|
||||
name=Dagger,
|
||||
%distance=both, % valid options are in the set {both,melee,ranged},
|
||||
%type=weapon, %valid options are in the set {weapon,spell}
|
||||
mod=+3,
|
||||
%reach=5,
|
||||
%range=20/60,
|
||||
%targets=one target,
|
||||
dmg=\RpgDice{1d4+1},
|
||||
dmg-type=piercing,
|
||||
%plus-dmg=,
|
||||
%plus-dmg-type=,
|
||||
%or-dmg=,
|
||||
%or-dmg-when=,
|
||||
%extra=,
|
||||
]
|
||||
|
||||
%\RpgMonsterMelee calls \RpgMonsterAttack with the melee option
|
||||
\RpgMonsterMelee[
|
||||
name=Flame Tongue Longsword,
|
||||
mod=+3,
|
||||
%reach=5,
|
||||
%targets=one target,
|
||||
dmg=\RpgDice{1d8+1},
|
||||
dmg-type=slashing,
|
||||
plus-dmg=\RpgDice{2d6},
|
||||
plus-dmg-type=fire,
|
||||
or-dmg=\RpgDice{1d10+1},
|
||||
or-dmg-when=if used with two hands,
|
||||
%extra=,
|
||||
]
|
||||
|
||||
%\RpgMonsterRanged calls \RpgMonsterAttack with the ranged option
|
||||
\RpgMonsterRanged[
|
||||
name=Assassin's Light Crossbow,
|
||||
mod=+1,
|
||||
range=80/320,
|
||||
dmg=\RpgDice{1d8},
|
||||
dmg-type=piercing,
|
||||
%plus-dmg=,
|
||||
%plus-dmg-type=,
|
||||
%or-dmg=,
|
||||
%or-dmg-when=,
|
||||
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}
|
||||
]
|
||||
|
||||
% Legendary Actions
|
||||
\RpgMonsterSection{Legendary Actions}
|
||||
The foo can take 3 legendary actions, choosing from the options below. Only one legendary action option can be used at a time and only at the end of another creature's turn. The foo regains spent legendary actions at the start of its turn.
|
||||
|
||||
\begin{RpgMonsterLegendaryActions}
|
||||
\RpgMonsterLegendaryAction{Move}{The foo moves up to its speed.}
|
||||
\RpgMonsterLegendaryAction{Dagger Attack}{The foo makes a dagger attack.}
|
||||
\RpgMonsterLegendaryAction{Create Contract (Costs 3 Actions)}{The foo presents a contract in a language it knows and waves it in the face of a creature within 10 feet. The creature must make a DC 10 Intelligence saving throw. On a failure, the creature is incapacitated until the start of the foo's next turn. A creature who cannot read the language in which the contract is written has advantage on this saving throw.}
|
||||
\end{RpgMonsterLegendaryActions}
|
||||
\end{multicols}
|
||||
\end{RpgMonster}
|
||||
|
||||
The |RpgMonster| environment is used to typeset monster and NPC stat blocks. The module supplies many functions to easily typeset the contents of the stat block
|
||||
|
||||
\part{Customization}
|
||||
|
||||
\chapter{Colors}
|
||||
|
||||
\begin{table*}[b]
|
||||
\caption{\RpgFontTableTitle{}Colors Supported by this Package}\label{tab:colors}
|
||||
|
||||
\begin{tabularx}{\linewidth}{lX}
|
||||
\textbf{Color} & \textbf{Description} \\
|
||||
\rowcolor{PhbLightGreen}
|
||||
|PhbLightGreen| & Light green used in PHB Part 1 (Default) \\
|
||||
\rowcolor{PhbLightCyan}
|
||||
|PhbLightCyan| & Light cyan used in PHB Part 2 \\
|
||||
\rowcolor{PhbMauve}
|
||||
|PhbMauve| & Pale purple used in PHB Part 3 \\
|
||||
\rowcolor{PhbTan}
|
||||
|PhbTan| & Light brown used in PHB appendix \\
|
||||
\rowcolor{DmgLavender}
|
||||
|DmgLavender| & Pale purple used in DMG Part 1 \\
|
||||
\rowcolor{DmgCoral}
|
||||
|DmgCoral| & Orange-pink used in DMG Part 2 \\
|
||||
\rowcolor{DmgSlateGray}
|
||||
|DmgSlateGray| (|DmgSlateGrey|) & Blue-gray used in PHB Part 3 \\
|
||||
\rowcolor{DmgLilac}
|
||||
|DmgLilac| & Purple-gray used in DMG appendix \\
|
||||
\rowcolor{BrGreen}
|
||||
|BrGreen| & Gray-green used for tables in Basic Rules\\
|
||||
\end{tabularx}
|
||||
\end{table*}
|
||||
|
||||
This package provides several global color variables to style |RpgComment|, |RpgReadAloud|, |RpgSidebar|, and |RpgTable| environments.
|
||||
|
||||
\begin{RpgTable}[header=Box Colors]{lX}
|
||||
Color & Description \\
|
||||
|commentcolor| & |RpgComment| background \\
|
||||
|readaloudcolor| & |RpgReadAloud| background \\
|
||||
|sidebarcolor| & |RpgSidebar| background \\
|
||||
|tablecolor| & background of even |RpgTable| rows \\
|
||||
\end{RpgTable}
|
||||
|
||||
They also accept an optional color argument to set the color for a single instance. See Table~\ref{tab:colors} for a list of core book accent colors.
|
||||
|
||||
\begin{lstlisting}
|
||||
\begin{RpgTable}[color=PhbLightCyan]{cX}
|
||||
d8 & Item \\
|
||||
1 & Small wooden button \\
|
||||
2 & Red feather \\
|
||||
3 & Human tooth \\
|
||||
4 & Vial of green liquid \\
|
||||
5 & Loaded dice \\
|
||||
6 & Tasty biscuit \\
|
||||
7 & Broken axe handle \\
|
||||
8 & Tarnished silver locket \\
|
||||
\end{RpgTable}
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{RpgTable}[color=PhbLightCyan]{cX}
|
||||
d8 & Item \\
|
||||
1 & Small wooden button \\
|
||||
2 & Red feather \\
|
||||
3 & Human tooth \\
|
||||
4 & Vial of green liquid \\
|
||||
5 & Loaded dice \\
|
||||
6 & Tasty biscuit \\
|
||||
7 & Broken axe handle \\
|
||||
8 & Tarnished silver locket \\
|
||||
\end{RpgTable}
|
||||
|
||||
\section{Themed Colors}
|
||||
Use |\RpgSetThemeColor[<color>]| to set |commentcolor|, |readaloudcolor|, |sidebarcolor|, and |tablecolor| to a specific color. Calling |\RpgSetThemeColor| without an argument sets those colors to the current |themecolor|. In the following example the group limits the change to just a few boxes; after the group finishes, the colors are reverted to what they were before the group started.
|
||||
|
||||
\begin{lstlisting}
|
||||
\begingroup
|
||||
\RpgSetThemeColor[PhbMauve]
|
||||
|
||||
\begin{RpgComment}{This Comment Is in Mauve}
|
||||
This comment is in the the new color.
|
||||
\end{RpgComment}
|
||||
|
||||
\begin{RpgSidebar}{This Sidebar Is Also Mauve}
|
||||
The sidebar is also using the new theme color.
|
||||
\end{RpgSidebar}
|
||||
\endgroup
|
||||
\end{lstlisting}
|
||||
|
||||
\begingroup
|
||||
\RpgSetThemeColor[PhbMauve]
|
||||
|
||||
\begin{RpgComment}{This Comment Is in Mauve}
|
||||
This comment is in the the new color.
|
||||
\end{RpgComment}
|
||||
|
||||
\begin{RpgSidebar}{This Sidebar Is Also Mauve}
|
||||
The sidebar is also using the new theme color.
|
||||
\end{RpgSidebar}
|
||||
\endgroup
|
||||
|
||||
\end{document}
|
BIN
img/alchemy.png
Normal file
BIN
img/alchemy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 MiB |
BIN
img/combatmastery.png
Normal file
BIN
img/combatmastery.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 MiB |
BIN
img/paper-low-res.jpg
Normal file
BIN
img/paper-low-res.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
BIN
img/paper.jpg
Normal file
BIN
img/paper.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 MiB |
62
img/src/footerscroll.svg
Normal file
62
img/src/footerscroll.svg
Normal file
@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="svg9003"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
width="742.5"
|
||||
height="52.497936"
|
||||
viewBox="0 0 742.5 52.497937"
|
||||
sodipodi:docname="footerscroll.svg">
|
||||
<metadata
|
||||
id="metadata9009">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs9007" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1250"
|
||||
inkscape:window-height="786"
|
||||
id="namedview9005"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="2.3617843"
|
||||
inkscape:cx="583.86608"
|
||||
inkscape:cy="-3.6412426"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg9003" />
|
||||
<path
|
||||
style="fill:#deca82;fill-opacity:1"
|
||||
d="m 716.15703,48.179688 c -2.40239,-2.367577 -8.17364,-8.037652 -12.825,-12.600168 -4.65137,-4.562516 -8.9196,-8.815016 -9.48497,-9.45 -0.56535,-0.634985 -1.58839,-1.933205 -2.27341,-2.884932 -0.68502,-0.951728 -1.55424,-2.015024 -1.93163,-2.362881 l -0.68614,-0.632468 -322.76544,0.04096 C 60.398373,20.329009 43.334287,20.344889 41.7,20.592132 c -4.120092,0.623308 -6.896573,1.248609 -9.86014,2.220636 -4.419299,1.449493 -7.693502,3.243538 -10.609199,5.813131 l -1.19434,1.052568 -0.242548,-0.776733 C 19.081184,26.619727 17.272842,22.985586 15.542402,20.357938 14.434685,18.675888 8.5842288,12.295691 7.0937778,11.144317 5.3643608,9.808342 3.357209,8.527622 1.5788057,7.625333 0.0675966,6.858608 0.0013293,6.804686 6.789e-4,6.341213 5e-5,5.893055 0.0263929,5.867461 0.3583713,5.993678 0.8582919,6.183748 2.9148272,7.241939 3.8790801,7.80526 4.3213242,8.063621 4.6292693,8.185006 4.5634025,8.075005 4.4975355,7.965002 3.4438245,6.785938 2.2218222,5.454862 L 0,3.034724 0,1.517362 C 0,0.682812 0.033782,0 0.075071,0 0.11636,0 0.7815517,0.437174 1.5532749,0.971498 8.9601699,6.09986 19.247601,10.0871 31.5,12.578359 c 6.986554,1.420564 12.826762,2.17491 23.625,3.051508 1.754106,0.142398 71.12971,0.201227 314.775,0.266924 l 312.525,0.08427 1.275,0.32157 c 2.49111,0.628287 4.59162,1.524893 5.8785,2.50925 l 0.7035,0.538119 2.109,0 c 1.80774,0 2.109,0.03332 2.109,0.233231 0,0.282333 0.92404,1.66305 1.97326,2.948446 4.52363,5.541935 10.57744,9.013869 17.90174,10.266879 2.05317,0.351248 6.76614,0.349743 8.85,-0.0028 6.54979,-1.108165 12.04387,-3.990949 16.50444,-8.659996 0.66244,-0.693404 1.55682,-1.726425 1.9875,-2.295603 l 0.78306,-1.03487 0,0.793172 c 0,0.738619 -0.0564,0.862117 -0.82012,1.795608 -1.00247,1.225315 -3.28708,3.444699 -4.50488,4.376271 -11.14257,8.523639 -26.38486,8.353628 -37.22327,-0.415187 -2.15503,-1.743534 -4.49464,-4.330122 -5.91621,-6.540768 l -0.36052,-0.560643 -1.17501,-0.0019 -1.17501,-0.0019 0.3147,0.4125 c 0.17308,0.226875 0.70129,0.9525 1.17379,1.6125 1.88745,2.636448 3.99071,4.882595 6.26153,6.686921 8.34213,6.628425 19.5066,8.624583 29.625,5.296824 4.68618,-1.541198 8.63443,-3.934862 12.1875,-7.388757 l 1.6125,-1.567496 0,1.124978 0,1.124979 -0.9375,0.893124 c -4.96824,4.733077 -11.81954,7.903178 -18.92958,8.758725 -1.69391,0.203828 -6.08003,0.203583 -7.65792,-4.5e-4 -3.57129,-0.461739 -6.88607,-1.369173 -9.65862,-2.644089 -0.60975,-0.28038 -1.13952,-0.509783 -1.17729,-0.509783 -0.0378,0 2.75613,2.781122 6.20863,6.180269 3.45251,3.399147 7.66103,7.549952 9.35228,9.22401 l 3.075,3.04374 -1.125,-0.0068 -1.125,-0.0068 -4.36797,-4.304686 z M 21.570502,27.092527 C 26.218979,23.355808 32.255883,21.076509 41.175,19.690636 42.726429,19.449573 62.077825,19.4295 365.1,19.354629 l 322.275,-0.07963 -0.75,-0.346683 c -0.96246,-0.444886 -2.25603,-0.86246 -3.675,-1.18631 C 681.89082,17.500271 663.51061,17.479649 368.775,17.389504 196.5975,17.336844 55.455,17.251427 55.125,17.199692 54.795,17.147952 53.14125,17.000639 51.45,16.87232 37.774615,15.834745 25.143585,13.313809 15.375,9.672371 9.9887089,7.664522 6.0762066,5.730089 1.125,2.626834 0.6810608,2.348588 0.6822366,2.352737 1.212305,2.934895 c 4.9450098,5.430955 7.6895749,8.36566 9.670171,10.340106 1.324112,1.32 2.933243,3.094597 3.575846,3.943549 2.294605,3.031436 4.30792,6.487721 5.501183,9.443951 0.27473,0.680625 0.523581,1.2375 0.553004,1.2375 0.02942,0 0.505519,-0.363363 1.057993,-0.807474 z"
|
||||
id="path9553"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
After Width: | Height: | Size: 5.1 KiB |
BIN
img/unarmed.png
Normal file
BIN
img/unarmed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 MiB |
14
lib/compat.sty
Normal file
14
lib/compat.sty
Normal file
@ -0,0 +1,14 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Compatibility with external packages
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\cs_if_free:NT \str_case_e:nnF
|
||||
{
|
||||
% \str_case_x was renamed \str_case_e mid-2018. \str_case_x will be removed
|
||||
% at the end of 2019:
|
||||
%
|
||||
% https://github.com/latex3/latex3/blob/8fcb571ddda61c01773d9746d32cecdbe63afb26/l3kernel/l3obsolete.txt#L65
|
||||
\cs_new_eq:NN \str_case_e:nnF \str_case_x:nnF
|
||||
}
|
73
lib/languages/_template.sty
Normal file
73
lib/languages/_template.sty
Normal file
@ -0,0 +1,73 @@
|
||||
\ExplSyntaxOn % Use tilde (~) for spaces.
|
||||
|
||||
\addto\captions<language> % Replace <language> tag with your language
|
||||
{
|
||||
% Monster basics
|
||||
\renewcommand\armorclassname{Armor~Class}
|
||||
\renewcommand\hitpointsname{Hit~Points}
|
||||
\renewcommand\speedname{Speed}
|
||||
% Monster ability scores
|
||||
\renewcommand\strstatname{STR}
|
||||
\renewcommand\dexstatname{DEX}
|
||||
\renewcommand\constatname{CON}
|
||||
\renewcommand\intstatname{INT}
|
||||
\renewcommand\wisstatname{WIS}
|
||||
\renewcommand\chastatname{CHA}
|
||||
% Monster details
|
||||
\renewcommand\skillsname{Skills}
|
||||
\renewcommand\dimmname{Damage~Immunities}
|
||||
\renewcommand\dvulname{Damage~Vulnerabilities}
|
||||
\renewcommand\dresname{Damage~Resistances}
|
||||
\renewcommand\cimmname{Condition~Immunities}
|
||||
\renewcommand\savesname{Saving~Throws}
|
||||
\renewcommand\sensesname{Senses}
|
||||
\renewcommand\defaultsensesname{passive~Perception~10}
|
||||
\renewcommand\languagesname{Languages}
|
||||
\renewcommand\challengename{Challenge}
|
||||
\renewcommand\xpname{XP}
|
||||
% Monster attack
|
||||
\renewcommand\unitsname{ft.}
|
||||
\renewcommand\weaponname{Weapon}
|
||||
\renewcommand\spellname{Spell}
|
||||
\renewcommand\meleeattackname{Melee~|1|~Attack}
|
||||
\renewcommand\rangedattackname{Ranged~|1|~Attack}
|
||||
\renewcommand\meleeorrangedattackname{Melee~or~Ranged~|1|~Attack}
|
||||
\renewcommand\orname{or}
|
||||
\renewcommand\tohitname{|1|~to~hit}
|
||||
\renewcommand\defaulttargetsname{one~target}
|
||||
\renewcommand\reachname{reach}
|
||||
\renewcommand\rangename{range}
|
||||
\renewcommand\hitname{Hit}
|
||||
\renewcommand\damagename{damage}
|
||||
\renewcommand\plusname{plus}
|
||||
% Spell levels
|
||||
\renewcommand\spellcantripsname{Cantrips}
|
||||
\renewcommand\spellfirstlevelname{1st~level}
|
||||
\renewcommand\spellsecondlevelname{2nd~level}
|
||||
\renewcommand\spellthirdlevelname{3rd~level}
|
||||
\renewcommand\spellfourthlevelname{4th~level}
|
||||
\renewcommand\spellfifthlevelname{5th~level}
|
||||
\renewcommand\spellsixthlevelname{6th~level}
|
||||
\renewcommand\spellseventhlevelname{7th~level}
|
||||
\renewcommand\spelleighthlevelname{8th~level}
|
||||
\renewcommand\spellninthlevelname{9th~level}
|
||||
% Spell slots
|
||||
\renewcommand\spellatwillname{at~will}
|
||||
\renewcommand\spelloneslotname{1~slot}
|
||||
\renewcommand\spelltwoslotsname{2~slots}
|
||||
\renewcommand\spellthreeslotsname{3~slots}
|
||||
\renewcommand\spellfourslotsname{4~slots}
|
||||
% Innate spellcasting
|
||||
\renewcommand\innateatwillname{At~will}
|
||||
\renewcommand\numberperdayname{|1|/day}
|
||||
\renewcommand\numberperdayeachname{|1|/day~each}
|
||||
% Spell header
|
||||
\renewcommand\spellcastingtimename{Casting~Time}
|
||||
\renewcommand\spellrangename{Range}
|
||||
\renewcommand\spellcomponentsname{Components}
|
||||
\renewcommand\spelldurationname{Duration}
|
||||
% Miscellaneous
|
||||
\renewcommand\tocchapterabbreviationname{Ch.}
|
||||
\renewcommand\pageabbreviationname{pg.}
|
||||
\renewcommand\dname{d}
|
||||
}
|
73
lib/languages/french.sty
Normal file
73
lib/languages/french.sty
Normal file
@ -0,0 +1,73 @@
|
||||
\ExplSyntaxOn % Use tilde (~) for spaces.
|
||||
|
||||
\addto\captionsfrench%
|
||||
{
|
||||
% Monster basics
|
||||
\renewcommand\armorclassname{Classe~d'armure}
|
||||
\renewcommand\hitpointsname{Points~de~vie}
|
||||
\renewcommand\speedname{Vitesse}
|
||||
% Monster ability scores
|
||||
\renewcommand\strstatname{FOR}
|
||||
\renewcommand\dexstatname{DEX}
|
||||
\renewcommand\constatname{CON}
|
||||
\renewcommand\intstatname{INT}
|
||||
\renewcommand\wisstatname{SAG}
|
||||
\renewcommand\chastatname{CHA}
|
||||
% Monster details
|
||||
\renewcommand\skillsname{Compétences}
|
||||
\renewcommand\dimmname{Immunité~contre~les~dégâts}
|
||||
\renewcommand\dvulname{Vulnérabilité~aux~dégâts}
|
||||
\renewcommand\dresname{Résistances~aux~dégâts}
|
||||
\renewcommand\cimmname{Immunité~contre~les~états}
|
||||
\renewcommand\savesname{Jets~de~sauvegarde}
|
||||
\renewcommand\sensesname{Sens}
|
||||
\renewcommand\defaultsensesname{Perception~passive~10}
|
||||
\renewcommand\languagesname{Langues}
|
||||
\renewcommand\challengename{Dangerosité}
|
||||
\renewcommand\xpname{PX}
|
||||
% Monster attack
|
||||
\renewcommand\unitsname{m}
|
||||
\renewcommand\weaponname{d'arme}
|
||||
\renewcommand\spellname{de~sort}
|
||||
\renewcommand\meleeattackname{Attaque~|1|~au~corps~à~corps}
|
||||
\renewcommand\rangedattackname{Attaque~|1|~à~distance}
|
||||
\renewcommand\meleeorrangedattackname{Attaque~|1|~au~corps~à~corps~ou~à~distance}
|
||||
\renewcommand\orname{ou}
|
||||
\renewcommand\tohitname{|1|~pour~toucher}
|
||||
\renewcommand\defaulttargetsname{une~cible}
|
||||
\renewcommand\reachname{allonge}
|
||||
\renewcommand\rangename{portée}
|
||||
\renewcommand\hitname{Touché}
|
||||
\renewcommand\damagename{dégâts}
|
||||
\renewcommand\plusname{plus}
|
||||
% Spell levels
|
||||
\renewcommand\spellcantripsname{Tour~de~magie}
|
||||
\renewcommand\spellfirstlevelname {Niveau~1}
|
||||
\renewcommand\spellsecondlevelname {Niveau~2}
|
||||
\renewcommand\spellthirdlevelname {Niveau~3}
|
||||
\renewcommand\spellfourthlevelname {Niveau~4}
|
||||
\renewcommand\spellfifthlevelname {Niveau~5}
|
||||
\renewcommand\spellsixthlevelname {Niveau~6}
|
||||
\renewcommand\spellseventhlevelname{Niveau~7}
|
||||
\renewcommand\spelleighthlevelname {Niveau~8}
|
||||
\renewcommand\spellninthlevelname {Niveau~9}
|
||||
% Spell slots
|
||||
\renewcommand\spellatwillname{à~volonté}
|
||||
\renewcommand\spelloneslotname{1~emplacement}
|
||||
\renewcommand\spelltwoslotsname{2~emplacements}
|
||||
\renewcommand\spellthreeslotsname{3~emplacements}
|
||||
\renewcommand\spellfourslotsname{4~emplacements}
|
||||
% Innate spellcasting
|
||||
\renewcommand\innateatwillname{À~volonté}
|
||||
\renewcommand\numberperdayname{|1|/jour}
|
||||
\renewcommand\numberperdayeachname{|1|/jour~chacun}
|
||||
% % Spell header
|
||||
\renewcommand\spellcastingtimename{Durée~d'incantation}
|
||||
\renewcommand\spellrangename{Portée}
|
||||
\renewcommand\spellcomponentsname{Composantes}
|
||||
\renewcommand\spelldurationname{Durée}
|
||||
% % Miscellaneous
|
||||
\renewcommand\pageabbreviationname{p.}
|
||||
\renewcommand\dname{d}
|
||||
\renewcommand\tocchapterabbreviationname{Ch.}
|
||||
}
|
75
lib/languages/italian.sty
Normal file
75
lib/languages/italian.sty
Normal file
@ -0,0 +1,75 @@
|
||||
\ExplSyntaxOn
|
||||
% Use tilde (~) for spaces.
|
||||
|
||||
% Italian captions
|
||||
\addto\captionsitalian
|
||||
{
|
||||
% Monster basics
|
||||
\renewcommand\armorclassname{Classe~Armatura}
|
||||
\renewcommand\hitpointsname{Punti~Ferita}
|
||||
\renewcommand\speedname{Velocit\`a}
|
||||
% Monster ability scores
|
||||
\renewcommand\strstatname{FOR}
|
||||
\renewcommand\dexstatname{DES}
|
||||
\renewcommand\constatname{COS}
|
||||
\renewcommand\intstatname{INT}
|
||||
\renewcommand\wisstatname{SAG}
|
||||
\renewcommand\chastatname{CAR}
|
||||
% Monster details
|
||||
\renewcommand\skillsname{Abilit\`a}
|
||||
\renewcommand\dimmname{Immunità~Danni}
|
||||
\renewcommand\dvulname{Debolezze~Danni}
|
||||
\renewcommand\dresname{Resistenze~Danni}
|
||||
\renewcommand\cimmname{Immunit\`a~Condizioni}
|
||||
\renewcommand\savesname{Tiri~Salvezza}
|
||||
\renewcommand\sensesname{Sensi}
|
||||
% \renewcommand\defaultsensesname{passive~Perception~10}
|
||||
\renewcommand\languagesname{Linguaggi}
|
||||
\renewcommand\challengename{Sfida}
|
||||
\renewcommand\xpname{PE}
|
||||
% Monster attack
|
||||
\renewcommand\unitsname{m.}
|
||||
\renewcommand\weaponname{Arma}
|
||||
\renewcommand\spellname{Sillabare}
|
||||
\renewcommand\meleeattackname{Attacco~con~|1|~da~Mischia}
|
||||
\renewcommand\rangedattackname{Attacco~con~|1|~a~Distanza}
|
||||
\renewcommand\meleeorrangedattackname{Attacco~con~|1|~da~Mischia~o~a~Distanza}
|
||||
\renewcommand\orname{o}
|
||||
\renewcommand\tohitname{|1|~per~colpire}
|
||||
% \renewcommand\defaulttargetsname{one~target}
|
||||
\renewcommand\reachname{portata}
|
||||
\renewcommand\rangename{gittata}
|
||||
\renewcommand\hitname{Colpito}
|
||||
\renewcommand\damagename{danno}
|
||||
% \renewcommand\plusname{plus}
|
||||
% Spell levels
|
||||
\renewcommand\spellcantripsname{Trucchetti}
|
||||
\renewcommand\spellfirstlevelname{1\degree{}~livello}
|
||||
\renewcommand\spellsecondlevelname{2\degree{}~livello}
|
||||
\renewcommand\spellthirdlevelname{3\degree{}~livello}
|
||||
\renewcommand\spellfourthlevelname{4\degree{}~livello}
|
||||
\renewcommand\spellfifthlevelname{5\degree{}~livello}
|
||||
\renewcommand\spellsixthlevelname{6\degree{}~livello}
|
||||
\renewcommand\spellseventhlevelname{7\degree{}~livello}
|
||||
\renewcommand\spelleighthlevelname{8\degree{}~livello}
|
||||
\renewcommand\spellninthlevelname{9\degree{}~livello}
|
||||
% Spell slots
|
||||
\renewcommand\spellatwillname{a~volont\`a}
|
||||
\renewcommand\spelloneslotname{1~slot}
|
||||
\renewcommand\spelltwoslotsname{2~slot}
|
||||
\renewcommand\spellthreeslotsname{3~slot}
|
||||
\renewcommand\spellfourslotsname{4~slot}
|
||||
% Innate spellcasting
|
||||
\renewcommand\innateatwillname{A~volont\`a}
|
||||
\renewcommand\numberperdayname{|1|/giorno}
|
||||
\renewcommand\numberperdayeachname{|1|/g.~ciascuno}
|
||||
% Spell header
|
||||
\renewcommand\spellcastingtimename{Tempo~di~Lancio}
|
||||
\renewcommand\spellrangename{Gittata}
|
||||
\renewcommand\spellcomponentsname{Componenti}
|
||||
\renewcommand\spelldurationname{Durata}
|
||||
% Miscellaneous
|
||||
% \renewcommand\pageabbreviationname{pg.}
|
||||
% \renewcommand\dname{d}
|
||||
% \newcommand\tocchapterabbreviationname{Ch.}
|
||||
}
|
72
lib/languages/japanese.sty
Normal file
72
lib/languages/japanese.sty
Normal file
@ -0,0 +1,72 @@
|
||||
\ExplSyntaxOn % Use tilde (~) for spaces.
|
||||
|
||||
% Japanese captions
|
||||
\addto\captionsjapanese
|
||||
{
|
||||
% Monster basics
|
||||
\renewcommand\armorclassname{AC:}
|
||||
\renewcommand\hitpointsname{hp:}
|
||||
\renewcommand\speedname{移動速度:}
|
||||
% Monster ability scores
|
||||
\renewcommand\strstatname{【筋】}
|
||||
\renewcommand\dexstatname{【敏】}
|
||||
\renewcommand\constatname{【耐】}
|
||||
\renewcommand\intstatname{【知】}
|
||||
\renewcommand\wisstatname{【判】}
|
||||
\renewcommand\chastatname{【魅】}
|
||||
% Monster details
|
||||
\renewcommand\skillsname{技能:}
|
||||
\renewcommand\dimmname{ダメージ完全耐性:}
|
||||
\renewcommand\dvulname{ダメージ脆弱性:}
|
||||
\renewcommand\dresname{ダメージ抵抗:}
|
||||
\renewcommand\cimmname{状態完全耐性:}
|
||||
\renewcommand\savesname{セーブ:}
|
||||
\renewcommand\sensesname{感覚:}
|
||||
\renewcommand\defaultsensesname{受動〈知覚〉10}
|
||||
\renewcommand\languagesname{言語:}
|
||||
\renewcommand\challengename{脅威度:}
|
||||
\renewcommand\xpname{XP}
|
||||
% Monster attack
|
||||
\renewcommand\unitsname{フィート}
|
||||
\renewcommand\meleeattackname{近接武器攻撃:}
|
||||
\renewcommand\rangedattackname{遠隔武器攻撃:}
|
||||
\renewcommand\meleeorrangedattackname{近接/遠隔武器攻撃:}
|
||||
\renewcommand\orname{または}
|
||||
\renewcommand\tohitname{攻撃|1|}
|
||||
\renewcommand\defaulttargetsname{目標1つ}
|
||||
\renewcommand\reachname{間合い}
|
||||
\renewcommand\rangename{射程}
|
||||
\renewcommand\hitname{ヒット:}
|
||||
\renewcommand\damagename{ダメージ}
|
||||
\renewcommand\plusname{および}
|
||||
% Spell levels
|
||||
\renewcommand\spellcantripsname{初級呪文}
|
||||
\renewcommand\spellfirstlevelname{1レベル}
|
||||
\renewcommand\spellsecondlevelname{2レベル}
|
||||
\renewcommand\spellthirdlevelname{3レベル}
|
||||
\renewcommand\spellfourthlevelname{4レベル}
|
||||
\renewcommand\spellfifthlevelname{5レベル}
|
||||
\renewcommand\spellsixthlevelname{6レベル}
|
||||
\renewcommand\spellseventhlevelname{7レベル}
|
||||
\renewcommand\spelleighthlevelname{8レベル}
|
||||
\renewcommand\spellninthlevelname{9レベル}
|
||||
% Spell slots
|
||||
\renewcommand\spellatwillname{無限回}
|
||||
\renewcommand\spelloneslotname{1スロット}
|
||||
\renewcommand\spelltwoslotsname{2スロット}
|
||||
\renewcommand\spellthreeslotsname{3スロット}
|
||||
\renewcommand\spellfourslotsname{4スロット}
|
||||
% Innate spellcasting
|
||||
\renewcommand\innateatwillname{無限回}
|
||||
\renewcommand\numberperdayname{|1|回/日}
|
||||
\renewcommand\numberperdayeachname{各|1|回/日}
|
||||
% Spell header
|
||||
\renewcommand\spellcastingtimename{発動時間}
|
||||
\renewcommand\spellrangename{射程}
|
||||
\renewcommand\spellcomponentsname{構成要素}
|
||||
\renewcommand\spelldurationname{持続時間}
|
||||
% Miscellaneous
|
||||
\renewcommand\tocchapterabbreviationname{章} % TODO: Update to 第|1|章 when https://github.com/rpgtex/DND-5e-LaTeX-Template/issues/308 is closed
|
||||
\renewcommand\pageabbreviationname{ページ} % TODO: Update to |1|ページ when https://github.com/rpgtex/DND-5e-LaTeX-Template/issues/308 is closed
|
||||
\renewcommand\dname{d}
|
||||
}
|
68
lib/languages/ngerman.sty
Normal file
68
lib/languages/ngerman.sty
Normal file
@ -0,0 +1,68 @@
|
||||
\ExplSyntaxOn % Use tilde (~) for spaces.
|
||||
|
||||
% German captions
|
||||
\addto\captionsngerman
|
||||
{
|
||||
\renewcommand\armorclassname{Rüstungsklasse}
|
||||
\renewcommand\hitpointsname{Trefferpunkte}
|
||||
\renewcommand\speedname{Bewegungsrate}
|
||||
\renewcommand\strstatname{STR}
|
||||
\renewcommand\dexstatname{GES}
|
||||
\renewcommand\constatname{KON}
|
||||
\renewcommand\intstatname{INT}
|
||||
\renewcommand\wisstatname{WEI}
|
||||
\renewcommand\chastatname{CHA}
|
||||
\renewcommand\skillsname{Fertigkeiten}
|
||||
\renewcommand\dimmname{Schadensimmunitäten}
|
||||
\renewcommand\dvulname{Schadensanfälligkeiten}
|
||||
\renewcommand\dresname{Schadensresistenzen}
|
||||
\renewcommand\cimmname{Zustandsimmunitäten}
|
||||
\renewcommand\savesname{Rettungswürfe}
|
||||
\renewcommand\sensesname{Sinne}
|
||||
\renewcommand\languagesname{Sprachen}
|
||||
\renewcommand\challengename{Herausforderungsgrad}
|
||||
\renewcommand\xpname{EP}
|
||||
% Monster attack
|
||||
\renewcommand\unitsname{m}
|
||||
\renewcommand\meleeattackname{Nahkampf-Waffenangriff}
|
||||
\renewcommand\rangedattackname{Fernkampf-Waffenangriff}
|
||||
\renewcommand\meleeorrangedattackname{Nah-~oder~Fernkampf-Waffenangriff}
|
||||
\renewcommand\orname{oder}
|
||||
\renewcommand\tohitname{|1|~zum~Treffen}
|
||||
\renewcommand\defaulttargetsname{ein~Ziel}
|
||||
\renewcommand\reachname{Reichweite}
|
||||
\renewcommand\rangename{Reichweite}
|
||||
\renewcommand\hitname{Treffer}
|
||||
\renewcommand\damagename{Schaden}
|
||||
\renewcommand\plusname{plus}
|
||||
% Spell levels
|
||||
\renewcommand\spellcantripsname{Zaubertricks}
|
||||
\renewcommand\spellfirstlevelname{1.~Grad}
|
||||
\renewcommand\spellsecondlevelname{2.~Grad}
|
||||
\renewcommand\spellthirdlevelname{3.~Grad}
|
||||
\renewcommand\spellfourthlevelname{4.~Grad}
|
||||
\renewcommand\spellfifthlevelname{5.~Grad}
|
||||
\renewcommand\spellsixthlevelname{6.~Grad}
|
||||
\renewcommand\spellseventhlevelname{7.~Grad}
|
||||
\renewcommand\spelleighthlevelname{8.~Grad}
|
||||
\renewcommand\spellninthlevelname{9.~Grad}
|
||||
% Spell slots
|
||||
\renewcommand\spellatwillname{beliebig oft}
|
||||
\renewcommand\spelloneslotname{1~Platz}
|
||||
\renewcommand\spelltwoslotsname{2~Plätze}
|
||||
\renewcommand\spellthreeslotsname{3~Plätze}
|
||||
\renewcommand\spellfourslotsname{4~Plätze}
|
||||
% Innate spellcasting
|
||||
\renewcommand\innateatwillname{Willentlich}
|
||||
\renewcommand\numberperdayname{|1|/Tag}
|
||||
\renewcommand\numberperdayeachname{jeweils~|1|/Tag}
|
||||
% Spell header
|
||||
\renewcommand\spellcastingtimename{Zeitaufwand}
|
||||
\renewcommand\spellrangename{Reichweite}
|
||||
\renewcommand\spellcomponentsname{Komponenten}
|
||||
\renewcommand\spelldurationname{Wirkungsdauer}
|
||||
% Miscellaneous
|
||||
\renewcommand\pageabbreviationname{S.}
|
||||
\renewcommand\dname{W}
|
||||
\renewcommand\tocchapterabbreviationname{Kap.}
|
||||
}
|
73
lib/languages/portuguese.sty
Normal file
73
lib/languages/portuguese.sty
Normal file
@ -0,0 +1,73 @@
|
||||
\ExplSyntaxOn % Use tilde (~) for spaces.
|
||||
|
||||
\addto\captionsportuguese
|
||||
{
|
||||
% Monster basics
|
||||
\renewcommand\armorclassname{Classe~de~Armadura}
|
||||
\renewcommand\hitpointsname{Pontos~de~Vida}
|
||||
\renewcommand\speedname{Deslocamento}
|
||||
% Monster ability scores
|
||||
\renewcommand\strstatname{FOR}
|
||||
\renewcommand\dexstatname{DES}
|
||||
\renewcommand\constatname{CON}
|
||||
\renewcommand\intstatname{INT}
|
||||
\renewcommand\wisstatname{SAB}
|
||||
\renewcommand\chastatname{CAR}
|
||||
% Monster details
|
||||
\renewcommand\skillsname{Habilidades}
|
||||
\renewcommand\dimmname{Imunidade~a~Dano}
|
||||
\renewcommand\dvulname{Vulnerabilidade~a~Dano}
|
||||
\renewcommand\dresname{Resistência~a~Dano}
|
||||
\renewcommand\cimmname{Imunidade~a~Condição}
|
||||
\renewcommand\savesname{Testes~de~Resistência}
|
||||
\renewcommand\sensesname{Sentidos}
|
||||
\renewcommand\defaultsensesname{Percepção~passiva~10}
|
||||
\renewcommand\languagesname{Idiomas}
|
||||
\renewcommand\challengename{Nível~de~Desafio}
|
||||
\renewcommand\xpname{XP}
|
||||
% Monster attack
|
||||
\renewcommand\unitsname{m}
|
||||
\renewcommand\weaponname{Arma}
|
||||
\renewcommand\spellname{Magia}
|
||||
\renewcommand\meleeattackname{Ataque~Corpo-a-Corpo~com~|1|}
|
||||
\renewcommand\rangedattackname{Ataque~à~Distância~com~|1|}
|
||||
\renewcommand\meleeorrangedattackname{Ataque~Corpo-a-Corpo~ou~à~Distancia~com~|1|}
|
||||
\renewcommand\orname{ou}
|
||||
\renewcommand\tohitname{|1|~para~atingir}
|
||||
\renewcommand\defaulttargetsname{um~alvo}
|
||||
\renewcommand\reachname{alcance}
|
||||
\renewcommand\rangename{alcance}
|
||||
\renewcommand\hitname{Acerto}
|
||||
\renewcommand\damagename{dano}
|
||||
\renewcommand\plusname{e}
|
||||
% Spell levels
|
||||
\renewcommand\spellcantripsname{Truques}
|
||||
\renewcommand\spellfirstlevelname{1º~nível}
|
||||
\renewcommand\spellsecondlevelname{2º~nível}
|
||||
\renewcommand\spellthirdlevelname{3º~nível}
|
||||
\renewcommand\spellfourthlevelname{4º~nível}
|
||||
\renewcommand\spellfifthlevelname{5º~nível}
|
||||
\renewcommand\spellsixthlevelname{6º~nível}
|
||||
\renewcommand\spellseventhlevelname{7º~nível}
|
||||
\renewcommand\spelleighthlevelname{8º~nível}
|
||||
\renewcommand\spellninthlevelname{9º~nível}
|
||||
% Spell slots
|
||||
\renewcommand\spellatwillname{à~vontade}
|
||||
\renewcommand\spelloneslotname{1~espaço}
|
||||
\renewcommand\spelltwoslotsname{2~espaços}
|
||||
\renewcommand\spellthreeslotsname{3~espaços}
|
||||
\renewcommand\spellfourslotsname{4~espaços}
|
||||
% Innate spellcasting
|
||||
\renewcommand\innateatwillname{À~vontade}
|
||||
\renewcommand\numberperdayname{|1|/dia}
|
||||
\renewcommand\numberperdayeachname{|1|/dia~cada}
|
||||
% Spell header
|
||||
\renewcommand\spellcastingtimename{Tempo~de~Conjuração}
|
||||
\renewcommand\spellrangename{Alcance}
|
||||
\renewcommand\spellcomponentsname{Componentes}
|
||||
\renewcommand\spelldurationname{Duração}
|
||||
% Miscellaneous
|
||||
\renewcommand\dname{d}
|
||||
\renewcommand\pageabbreviationname{pág.}
|
||||
\renewcommand\tocchapterabbreviationname{cap.}
|
||||
}
|
74
lib/languages/russian.sty
Normal file
74
lib/languages/russian.sty
Normal file
@ -0,0 +1,74 @@
|
||||
\ExplSyntaxOn % Use tilde (~) for spaces.
|
||||
|
||||
% Russian captions
|
||||
\addto\captionsrussian
|
||||
{
|
||||
% Monster basics
|
||||
\renewcommand\armorclassname{Класс~Доспехов}
|
||||
\renewcommand\hitpointsname{Хиты}
|
||||
\renewcommand\speedname{Скорость}
|
||||
% Monster ability scores
|
||||
\renewcommand\strstatname{СИЛ}
|
||||
\renewcommand\dexstatname{ЛОВ}
|
||||
\renewcommand\constatname{ТЕЛ}
|
||||
\renewcommand\intstatname{ИНТ}
|
||||
\renewcommand\wisstatname{МДР}
|
||||
\renewcommand\chastatname{ХАР}
|
||||
% Monster details
|
||||
\renewcommand\skillsname{Навыки}
|
||||
\renewcommand\dimmname{Иммунитет~к~урону}
|
||||
\renewcommand\dvulname{Уязвимость~к~урону}
|
||||
\renewcommand\dresname{Сопротивление~урону}
|
||||
\renewcommand\cimmname{Иммунитет~к~состояниям}
|
||||
\renewcommand\savesname{Спасброски}
|
||||
% \renewcommand\defaultsensesname{passive~Perception~10}
|
||||
\renewcommand\sensesname{Чувства}
|
||||
\renewcommand\languagesname{Языки}
|
||||
\renewcommand\challengename{Опасность}
|
||||
% \renewcommand\xpname{XP}
|
||||
% Monster attack
|
||||
% \renewcommand\unitsname{ft.}
|
||||
% \renewcommand\weaponname{Weapon}
|
||||
% \renewcommand\spellname{Spell}
|
||||
% \renewcommand\meleeattackname{Melee~|1|~Attack}
|
||||
% \renewcommand\rangedattackname{Ranged~|1|~Attack}
|
||||
% \renewcommand\meleeorrangedattackname{Melee~or~Ranged~|1|~Attack}
|
||||
% \renewcommand\orname{or}
|
||||
% \renewcommand\tohitname{|1|~to~hit}
|
||||
% \renewcommand\defaulttargetsname{one~target}
|
||||
% \renewcommand\reachname{reach}
|
||||
% \renewcommand\rangename{range}
|
||||
% \renewcommand\hitname{Hit}
|
||||
% \renewcommand\damagename{damage}
|
||||
% \renewcommand\plusname{plus}
|
||||
% Spell levels
|
||||
% \renewcommand\spellcantripsname{Cantrips}
|
||||
% \renewcommand\spellfirstlevelname{1st~level}
|
||||
% \renewcommand\spellsecondlevelname{2nd~level}
|
||||
% \renewcommand\spellthirdlevelname{3rd~level}
|
||||
% \renewcommand\spellfourthlevelname{4th~level}
|
||||
% \renewcommand\spellfifthlevelname{5th~level}
|
||||
% \renewcommand\spellsixthlevelname{6th~level}
|
||||
% \renewcommand\spellseventhlevelname{7th~level}
|
||||
% \renewcommand\spelleighthlevelname{8th~level}
|
||||
% \renewcommand\spellninthlevelname{9th~level}
|
||||
% Spell slots
|
||||
% \renewcommand\spellatwillname{at~will}
|
||||
% \renewcommand\spelloneslotname{1~slot}
|
||||
% \renewcommand\spelltwoslotsname{2~slots}
|
||||
% \renewcommand\spellthreeslotsname{3~slots}
|
||||
% \renewcommand\spellfourslotsname{4~slots}
|
||||
% Innate spellcasting
|
||||
% \renewcommand\innateatwillname{At~will}
|
||||
% \renewcommand\numberperdayname{|1|/day}
|
||||
% \renewcommand\numberperdayeachname{|1|/day~each}
|
||||
% % Spell header
|
||||
% \renewcommand\spellcastingtimename{Casting~Time}
|
||||
% \renewcommand\spellrangename{Range}
|
||||
% \renewcommand\spellcomponentsname{Components}
|
||||
% \renewcommand\spelldurationname{Duration}
|
||||
% % Miscellaneous
|
||||
% \renewcommand\pageabbreviationname{pg.}
|
||||
% \renewcommand\dname{d}
|
||||
% \newcommand\tocchapterabbreviationname{Ch.}
|
||||
}
|
73
lib/languages/spanish.sty
Executable file
73
lib/languages/spanish.sty
Executable file
@ -0,0 +1,73 @@
|
||||
\ExplSyntaxOn % Use tilde (~) for spaces.
|
||||
|
||||
\addto\captionsspanish
|
||||
{
|
||||
% Monster basics
|
||||
\renewcommand\armorclassname{Clase~de~Armadura}
|
||||
\renewcommand\hitpointsname{Puntos~de~Golpe}
|
||||
\renewcommand\speedname{Velocidad}
|
||||
% Monster ability scores
|
||||
\renewcommand\strstatname{FUE}
|
||||
\renewcommand\dexstatname{DES}
|
||||
\renewcommand\constatname{CON}
|
||||
\renewcommand\intstatname{INT}
|
||||
\renewcommand\wisstatname{SAB}
|
||||
\renewcommand\chastatname{CAR}
|
||||
% Monster details
|
||||
\renewcommand\skillsname{Habilidades}
|
||||
\renewcommand\dimmname{Inmunidad~a~daño}
|
||||
\renewcommand\dvulname{Vulnerabilidad~a~daño}
|
||||
\renewcommand\dresname{Resistencia~a~daño}
|
||||
\renewcommand\cimmname{Inmunidad~a~estados}
|
||||
\renewcommand\savesname{Tiradas~de~salvación}
|
||||
\renewcommand\sensesname{Sentidos}
|
||||
\renewcommand\defaultsensesname{Percepción~pasiva~10}
|
||||
\renewcommand\languagesname{Idiomas}
|
||||
\renewcommand\challengename{Desafío}
|
||||
\renewcommand\xpname{PE}
|
||||
% Monster attack
|
||||
\renewcommand\unitsname{pies}
|
||||
\renewcommand\weaponname{arma}
|
||||
\renewcommand\spellname{Hechizo}
|
||||
\renewcommand\meleeattackname{Ataque~con~|1|~cuerpo~a~cuerpo}
|
||||
\renewcommand\rangedattackname{Ataque~con~|1|~a~distancia}
|
||||
\renewcommand\meleeorrangedattackname{Ataque~con~|1|~cuerpo~a~cuerpo~o~a~distancia}
|
||||
\renewcommand\orname{o}
|
||||
\renewcommand\tohitname{|1|~a~impactar}
|
||||
\renewcommand\defaulttargetsname{un~objetivo}
|
||||
\renewcommand\reachname{alcance}
|
||||
\renewcommand\rangename{alcance}
|
||||
\renewcommand\hitname{Impacto}
|
||||
\renewcommand\damagename{daño}
|
||||
\renewcommand\plusname{y}
|
||||
% Spell levels
|
||||
\renewcommand\spellcantripsname{Trucos}
|
||||
\renewcommand\spellfirstlevelname{Nivel~1}
|
||||
\renewcommand\spellsecondlevelname{Nivel~2}
|
||||
\renewcommand\spellthirdlevelname{Nivel~3}
|
||||
\renewcommand\spellfourthlevelname{Nivel~4}
|
||||
\renewcommand\spellfifthlevelname{Nivel~5}
|
||||
\renewcommand\spellsixthlevelname{Nivel~6}
|
||||
\renewcommand\spellseventhlevelname{Nivel~7}
|
||||
\renewcommand\spelleighthlevelname{Nivel~8}
|
||||
\renewcommand\spellninthlevelname{Nivel~9}
|
||||
% Spell slots
|
||||
\renewcommand\spellatwillname{a~voluntad}
|
||||
\renewcommand\spelloneslotname{1~espacio}
|
||||
\renewcommand\spelltwoslotsname{2~espacios}
|
||||
\renewcommand\spellthreeslotsname{3~espacios}
|
||||
\renewcommand\spellfourslotsname{4~espacios}
|
||||
% Innate spellcasting
|
||||
\renewcommand\innateatwillname{A~voluntad}
|
||||
\renewcommand\numberperdayname{|1|~al~día}
|
||||
\renewcommand\numberperdayeachname{|1|~al~día~cada~uno}
|
||||
% Spell header
|
||||
\renewcommand\spellcastingtimename{Tiempo~de~lanzamiento}
|
||||
\renewcommand\spellrangename{Alcance}
|
||||
\renewcommand\spellcomponentsname{Componentes}
|
||||
\renewcommand\spelldurationname{Duración}
|
||||
% Miscellaneous
|
||||
\renewcommand\dname{d}
|
||||
\renewcommand\pageabbreviationname{pág.}
|
||||
\renewcommand\tocchapterabbreviationname{cap.}
|
||||
}
|
56
lib/rpgcolors.sty
Normal file
56
lib/rpgcolors.sty
Normal file
@ -0,0 +1,56 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Define colors, sampled from the books.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Page
|
||||
\definecolor {bgtan} {HTML} {F7F2E5} % RpgReadAloud background
|
||||
\definecolor {bgtan2018}{HTML} {F9EFD6} % lighter version of bgtan from the 2018 Basic Rules
|
||||
\definecolor {pagegold} {HTML} {B89A67} % pagenumbers and footer
|
||||
|
||||
% Type
|
||||
\definecolor {titlered} {HTML} {58180D} % titles
|
||||
\definecolor {titlegold} {HTML} {C9AD6A} % titlerules
|
||||
\definecolor {rulered} {HTML} {9C2B1B} % triangular rule in statsblock
|
||||
\definecolor {contourgray} {HTML} {CACCBE} % outline color in part & chapter font
|
||||
|
||||
% Type aliases
|
||||
\colorlet {contourgrey} {contourgray}
|
||||
|
||||
% Trim
|
||||
\definecolor {BrGreen} {HTML} {E8E6DC} % Basic Rules
|
||||
\definecolor {PhbLightGreen} {HTML} {E0E5C1} % PHB Part 1
|
||||
\definecolor {PhbLightCyan} {HTML} {B5CEB8} % PHB Part 2
|
||||
\definecolor {PhbMauve} {HTML} {DCCCC5} % PHB Part 3
|
||||
\definecolor {PhbTan} {HTML} {E5D5AC} % PHB appendix
|
||||
\definecolor {DmgLavender} {HTML} {E3CED3} % DMG Part 1
|
||||
\definecolor {DmgCoral} {HTML} {F3D7C1} % DMG Part 2
|
||||
\definecolor {DmgSlateGray} {HTML} {DBE4E4} % DMG Part 3
|
||||
\definecolor {DmgLilac} {HTML} {D7D4D6} % DMG appendix
|
||||
|
||||
% Trim aliases
|
||||
\colorlet {DmgSlateGrey} {DmgSlateGray}
|
||||
|
||||
% The color used in \RpgSetThemeColor when a new color is not set
|
||||
\colorlet {themecolor} {PhbLightGreen} % Set the default theme to Part 1 of the PHB.
|
||||
|
||||
% Element colors that change when \RpgSetThemeColor is used
|
||||
\colorlet {commentcolor} {themecolor} % RpgComment background
|
||||
\colorlet {sidebarcolor} {themecolor} % RpgSidebar background
|
||||
\colorlet {tablecolor} {themecolor} % RpgTable even row background
|
||||
|
||||
% Element colors that do not respond to \RpgSetThemeColor
|
||||
\colorlet {readaloudcolor} {bgtan} % RpgReadAloud background
|
||||
\definecolor {statblockribbon} {HTML} {E69A28} % stat block top/bottom borders (gold)
|
||||
\definecolor {statblockbg} {HTML} {FDF1DC} % stat block background (tan)
|
||||
|
||||
% Sets the themecolor and colors for all themed elements
|
||||
% If called without the optional color, resets the color of all themed elements to the current themecolor
|
||||
\NewDocumentCommand {\RpgSetThemeColor} { O {themecolor} }
|
||||
{
|
||||
\colorlet {themecolor} {#1}
|
||||
\colorlet {commentcolor} {#1}
|
||||
\colorlet {sidebarcolor} {#1}
|
||||
\colorlet {tablecolor} {#1}
|
||||
}
|
78
lib/rpgcomment.sty
Normal file
78
lib/rpgcomment.sty
Normal file
@ -0,0 +1,78 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Environment for comments.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Standard for every comment
|
||||
\DeclareTColorBox {__rpg_comment} {o}
|
||||
{
|
||||
before~upper =
|
||||
{
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\bool_if:NF \l__rpg_justified_bool
|
||||
{ \RaggedRight }
|
||||
}
|
||||
},
|
||||
code = {\linespread{.9}},
|
||||
frame~hidden,
|
||||
boxrule = 0pt,
|
||||
breakable,
|
||||
enhanced,
|
||||
before~skip = 13pt plus 4pt minus 4pt,
|
||||
toptitle = 2pt,
|
||||
boxsep = 3pt,
|
||||
left = 6pt,
|
||||
right = 6pt,
|
||||
top = 0pt,
|
||||
bottom = 2pt,
|
||||
sharp~corners,
|
||||
fonttitle = \RpgFontCommentTitle,
|
||||
fontupper = \RpgFontCommentBody,
|
||||
fontlower = \RpgFontCommentBody,
|
||||
parbox = false,
|
||||
coltitle = black,
|
||||
after~skip = 13pt plus 4pt minus 4pt,
|
||||
#1,
|
||||
}
|
||||
|
||||
% Extra key for controlling the color of the title and the background
|
||||
\keys_define:nn { rpg / comment }
|
||||
{
|
||||
color .tl_set:N = \l__rpg_comment_color_tl,
|
||||
color .initial:n = commentcolor,
|
||||
color .value_required:n = true,
|
||||
}
|
||||
|
||||
% This function, through its variant, forces the expansion of the tcb keys
|
||||
% passed to the environment by the user before it invokes the tcolorbox
|
||||
\cs_new_protected:Nn \__rpg_start_comment:nn
|
||||
{
|
||||
\begin {__rpg_comment} [ #1, #2 ]
|
||||
}
|
||||
|
||||
\cs_generate_variant:Nn \__rpg_start_comment:nn { nV }
|
||||
|
||||
% The RpgComment environment
|
||||
% #1 - keys. We handle the custom color key before passing other keys on
|
||||
% #2 - title.
|
||||
\NewDocumentEnvironment {RpgComment} { o m }
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set_known:nnN { rpg / comment } {#1} \l_tmpa_tl
|
||||
|
||||
\str_if_eq:VnT \l_tmpa_tl { -NoValue- }
|
||||
{ \tl_set_eq:NN \l_tmpa_tl \c_empty_tl }
|
||||
|
||||
\__rpg_start_comment:nV
|
||||
{
|
||||
colback = \l__rpg_comment_color_tl,
|
||||
colbacktitle = \l__rpg_comment_color_tl,
|
||||
title = {#2},
|
||||
}
|
||||
{ \l_tmpa_tl }
|
||||
}
|
||||
{
|
||||
\end {__rpg_comment}
|
||||
\group_end:
|
||||
}
|
620
lib/rpgdeprecated.sty
Normal file
620
lib/rpgdeprecated.sty
Normal file
@ -0,0 +1,620 @@
|
||||
\RequirePackage {keycommand}
|
||||
|
||||
\ExplSyntaxOn
|
||||
\NewDocumentCommand{\RpgDeprecate}{ mmm }
|
||||
{
|
||||
\__rpg_deprecated:nnn {#1} {#2} {#3}
|
||||
}
|
||||
\ExplSyntaxOff
|
||||
|
||||
% Either hilariously, or infuriatingly, the \ifcommandkey
|
||||
% implementation is buggy. Here is a re-implementation
|
||||
% from tex.stackexchange.
|
||||
\begingroup
|
||||
\makeatletter
|
||||
\catcode`\/=8 %
|
||||
\@firstofone
|
||||
{
|
||||
\endgroup
|
||||
\renewcommand{\ifcommandkey}[1]{%
|
||||
\csname @\expandafter \expandafter \expandafter
|
||||
\expandafter \expandafter \expandafter \expandafter
|
||||
\kcmd@nbk \commandkey {#1}//{first}{second}//oftwo\endcsname
|
||||
}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% rpgcolors.sty - to be removed in version 1.0.0
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Sets the themecolor and colors for all themed elements
|
||||
% If called without the optional color, resets the color of all themed elements to the current themecolor
|
||||
\newcommand{\setthemecolor}[1][themecolor]{%
|
||||
\RpgDeprecate{\noexpand\setthemecolor}{1.0.0}{Use \noexpand\RpgSetThemeColor to set the theme color.}%
|
||||
\colorlet{themecolor}{#1}
|
||||
\colorlet{commentcolor}{#1}
|
||||
\colorlet{sidebarcolor}{#1}
|
||||
\colorlet{tablecolor}{#1}
|
||||
}
|
||||
|
||||
% Backwards-compatible aliases and colours
|
||||
\colorlet {commentgreen} {PhbLightGreen}
|
||||
\colorlet {itemtablepink} {DmgCoral}
|
||||
\colorlet {monstertan} {statblockbg}
|
||||
\definecolor {monstertandark} {HTML} {F0DBB5}
|
||||
|
||||
% Old interface
|
||||
\colorlet {commentboxcolor} {commentcolor}
|
||||
\colorlet {paperboxcolor} {sidebarcolor}
|
||||
\colorlet {quoteboxcolor} {readaloudcolor}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% rpgcomment.sty - to be removed in version 1.0.0
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%Usage \begin{commentbox}[options]{title}[color]
|
||||
\ExplSyntaxOn
|
||||
\DeclareTColorBox{commentbox}{O{} m O{commentboxcolor}}{%
|
||||
before~upper={%
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\bool_if:NF \l__rpg_justified_bool
|
||||
{ \RaggedRight }
|
||||
}
|
||||
},
|
||||
code={\RpgDeprecate{\noexpand\commentbox}{1.0.0}{Use~\noexpand\RpgComment~for~breakable~comment~boxes.}\linespread{.9}},
|
||||
frame~hidden,
|
||||
boxrule=0pt,
|
||||
breakable,
|
||||
enhanced,
|
||||
before~skip=13pt plus 4pt minus 4pt,
|
||||
toptitle=2pt,
|
||||
boxsep=3pt,
|
||||
left=6pt,
|
||||
right=6pt,
|
||||
top=0pt,
|
||||
bottom=2pt,
|
||||
sharp~corners,
|
||||
fonttitle=\RpgFontCommentTitle,
|
||||
fontupper=\RpgFontCommentBody,
|
||||
fontlower=\RpgFontCommentBody,
|
||||
title={#2},
|
||||
parbox=false,
|
||||
colback=#3,
|
||||
colbacktitle=#3,
|
||||
coltitle=black,
|
||||
after~skip=13pt plus 4pt minus 4pt,
|
||||
#1
|
||||
}
|
||||
\ExplSyntaxOff
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% rpgmonster.sty - to be removed in version 1.0.0
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Fancy DnD 5e stat block rule
|
||||
\newcommand{\rpgline}{%
|
||||
\RpgDeprecate{\noexpand\rpgline}{1.0.0}{Use \noexpand\RpgMonsterLine for stat block rules.}%
|
||||
\noindent
|
||||
\begin{tikzpicture}[]
|
||||
\draw [rulered, fill=rulered] (0, 0) --(0,0.1) -- (\textwidth, 0.05);
|
||||
\end{tikzpicture}%
|
||||
\par%
|
||||
}
|
||||
|
||||
\RequirePackage{fp}
|
||||
\RequirePackage{xstring}
|
||||
|
||||
% Macro to print stats with auto-computed modifier
|
||||
% e.g. \stat{12} prints "12 (+1)"
|
||||
\newcommand{\stat}[1]{%
|
||||
\RpgDeprecate{\noexpand\stat}{1.0.0}{Use \noexpand\RpgMonsterAbilityScores for the stat block ability score table.}%
|
||||
\FPeval{\mod}{(#1 - 10)/2}%
|
||||
\FPifpos\mod%
|
||||
\FPeval{\mod}{clip(trunc(mod,0))}#1\ (+\mod)%
|
||||
\else%
|
||||
\FPeval{\mod}{clip(abs(trunc(mod-0.5,0)))}#1\ (--\mod)%
|
||||
\fi%
|
||||
}
|
||||
|
||||
% Macro to print avarage dice based value
|
||||
% e.g. \dice{2d6+3} prints "10 (2d6 + 3)"
|
||||
\newcommand{\dice}[1]{%
|
||||
\RpgDeprecate{\noexpand\dice}{1.0.0}{Use \noexpand\RpgDice to typeset a dice roll with the average value.}%
|
||||
\StrSubstitute{#1}{ }{}[\DiceArg]% strip whitespaces
|
||||
\StrCut{\DiceArg}{d}\DiceNum\DiceSides% split string
|
||||
\StrCut{\DiceSides}{+}\DiceSides\DiceAddMod%
|
||||
\StrCut{\DiceSides}{-}\DiceSides\DiceSubMod%
|
||||
\FPeval{\DiceAvg}{(\DiceSides+1)/2*\DiceNum}% calculate avg roll
|
||||
\IfInteger{\DiceAddMod}{%
|
||||
\FPadd{\DiceAvg}{\DiceAvg}{\DiceAddMod}% add value
|
||||
\def\DiceMod{ + \DiceAddMod}%
|
||||
}{%
|
||||
\IfInteger{\DiceSubMod}{%
|
||||
\FPsub{\DiceAvg}{\DiceAvg}{\DiceSubMod}% subtract value
|
||||
\def\DiceMod{ -- \DiceSubMod}%
|
||||
}{%
|
||||
\def\DiceMod{}%
|
||||
}%
|
||||
}%
|
||||
\FPtrunc{\DiceAvg}{\DiceAvg}{0}% round down
|
||||
\FPprint{\DiceAvg\ (\DiceNum \dname\DiceSides\DiceMod)}%
|
||||
}
|
||||
|
||||
% Stat block without the background
|
||||
\newtcolorbox{monsterboxnobg}[2][]{
|
||||
enhanced,
|
||||
code={\RpgDeprecate{\noexpand\monsterboxnobg}{1.0.0}{Use \noexpand\RpgMonsterNoBg for stat blocks without a background.}},
|
||||
frame hidden,
|
||||
boxrule=0pt,
|
||||
breakable,
|
||||
parbox=false,
|
||||
boxsep=0pt,
|
||||
toptitle=3mm,
|
||||
left=0pt,
|
||||
right=0pt,
|
||||
sharp corners,
|
||||
opacityback=0,
|
||||
colframe=titlered,
|
||||
fonttitle=\RpgFontStatBlockTitle,
|
||||
fontupper=\RpgFontStatBlockBody,
|
||||
fontlower=\RpgFontStatBlockBody,
|
||||
title=#2,
|
||||
coltitle=titlered,
|
||||
#1
|
||||
}
|
||||
|
||||
% Stat block with background
|
||||
\newtcolorbox{monsterboxbg}[2][]{
|
||||
enhanced,
|
||||
code={\RpgDeprecate{\noexpand\monsterboxbg}{1.0.0}{Use \noexpand\RpgMonsterBg for stat blocks with a background.}},
|
||||
frame hidden,
|
||||
before skip=12pt plus 3pt minus 3pt,
|
||||
boxrule=0pt,
|
||||
breakable,
|
||||
parbox=false,
|
||||
boxsep=2pt,
|
||||
toptitle=8pt,
|
||||
top=0pt,
|
||||
left=2pt,
|
||||
right=2pt,
|
||||
bottom=7pt,
|
||||
sharp corners,
|
||||
oversize=0pt,
|
||||
borderline north={3pt}{0pt}{titlered},
|
||||
borderline north={2pt}{0.5pt}{statblockribbon},
|
||||
borderline south={3pt}{0pt}{titlered},
|
||||
borderline south={2pt}{0.5pt}{statblockribbon},
|
||||
colback=statblockbg,
|
||||
colbacktitle=statblockbg,
|
||||
colframe=titlered,
|
||||
fonttitle=\RpgFontStatBlockTitle,
|
||||
coltitle=titlered,
|
||||
fontupper=\RpgFontStatBlockBody,
|
||||
fontlower=\RpgFontStatBlockBody,
|
||||
title=#2,
|
||||
#1
|
||||
}
|
||||
|
||||
\ExplSyntaxOn
|
||||
\bool_if:NTF \l__rpg_show_background_bool
|
||||
{
|
||||
\let\monsterbox\monsterboxbg%
|
||||
\let\endmonsterbox\endmonsterboxbg%
|
||||
}
|
||||
{
|
||||
\let\monsterbox\monsterboxnobg%
|
||||
\let\endmonsterbox\endmonsterboxnobg%
|
||||
}
|
||||
|
||||
\ExplSyntaxOff
|
||||
|
||||
% Define Monster subsection header style
|
||||
\newcommand{\monstersection}[1]{%
|
||||
\RpgDeprecate{\noexpand\monstersection}{1.0.0}{Use \noexpand\RpgMonsterSection for stat blocks sections.}%
|
||||
\begingroup
|
||||
\par\medskip\noindent
|
||||
\RpgFontStatBlockSection #1
|
||||
% \rule is a horizontal command, so placing it under the title incurs extra
|
||||
% line spacing. Use \hrule (a vertical command) instead.
|
||||
\vspace{3pt}
|
||||
\hrule height 0.6pt
|
||||
\vspace{2pt}
|
||||
\endgroup%
|
||||
}
|
||||
|
||||
\NewDocumentEnvironment{monsteraction}{o}{%
|
||||
\RpgDeprecate{\noexpand\monsteraction}{1.0.0}{Use \noexpand\RpgMonsterAction for stat block actions.}%
|
||||
\IfValueTF{#1}{%
|
||||
\par\medskip\noindent\emph{\textbf{#1.}}%
|
||||
}{\unskip}%
|
||||
}{\par}
|
||||
|
||||
% A description variant used to list creature attributes.
|
||||
\newlist{rpg@monsterattrs}{description}{1}
|
||||
|
||||
\ExplSyntaxOn
|
||||
|
||||
\setlist[rpg@monsterattrs]{
|
||||
before=\color{titlered},
|
||||
font=\RpgFontStatBlockBody,
|
||||
labelsep=\l__rpg_space_dim,
|
||||
noitemsep,
|
||||
nosep,
|
||||
}
|
||||
|
||||
\ExplSyntaxOff
|
||||
|
||||
% A rpg@monsterattrs helper macro that always displays an attribute.
|
||||
\newcommand{\rpg@monsterattr}[2]{%
|
||||
\item[#2] \commandkey{#1}
|
||||
}
|
||||
|
||||
% A rpg@monsterattrs helper macro that displays an attribute if the user defined
|
||||
% it.
|
||||
\newcommand{\rpg@ifmonsterattr}[2]{%
|
||||
\ifcommandkey{#1}{%
|
||||
\item[#2] \commandkey{#1}
|
||||
}{}%
|
||||
}
|
||||
|
||||
%
|
||||
% Macros for use within the monster environment
|
||||
%
|
||||
\newkeycommand\basics[armorclass=0, hitpoints=0, speed=0]{%
|
||||
\RpgDeprecate{\noexpand\basics}{1.0.0}{Use \noexpand\RpgMonsterBasics for stat block AC, HP, and speed.}%
|
||||
\begin{rpg@monsterattrs}
|
||||
\rpg@monsterattr{armorclass}{\armorclassname}
|
||||
\rpg@monsterattr{hitpoints}{\hitpointsname}
|
||||
\rpg@monsterattr{speed}{\speedname}
|
||||
\end{rpg@monsterattrs}%
|
||||
}
|
||||
|
||||
% Taubular enviornment for stats-block
|
||||
\newkeycommand\stats[%
|
||||
STR=\stat{10},
|
||||
DEX=\stat{10},
|
||||
CON=\stat{10},
|
||||
INT=\stat{10},
|
||||
WIS=\stat{10},
|
||||
CHA=\stat{10}]{%
|
||||
\RpgDeprecate{\noexpand\stats}{1.0.0}{Use \noexpand\RpgMonsterAbilityScores for the stat block ability score table.}%
|
||||
\begingroup%
|
||||
\color{titlered}%
|
||||
\par\vspace{5pt}\noindent%
|
||||
\begin{tabularx}{\linewidth}{YYYYYY}
|
||||
\textbf{\strstatname} &
|
||||
\textbf{\dexstatname} &
|
||||
\textbf{\constatname} &
|
||||
\textbf{\intstatname} &
|
||||
\textbf{\wisstatname} &
|
||||
\textbf{\chastatname} \\
|
||||
\commandkey{STR} &
|
||||
\commandkey{DEX} &
|
||||
\commandkey{CON} &
|
||||
\commandkey{INT} &
|
||||
\commandkey{WIS} &
|
||||
\commandkey{CHA}
|
||||
\end{tabularx}%
|
||||
\par\vspace{4pt}%
|
||||
\endgroup%
|
||||
}
|
||||
|
||||
\newkeycommand\details[
|
||||
skills=,
|
||||
damageimmunities=,
|
||||
savingthrows=,
|
||||
conditionimmunities=,
|
||||
damageresistances=,
|
||||
damagevulnerabilities=,
|
||||
senses=---,
|
||||
languages=---,
|
||||
challenge=1,
|
||||
]{%
|
||||
\RpgDeprecate{\noexpand\details}{1.0.0}{Use \noexpand\RpgMonsterDetails for stat block details like resistances and CR.}%
|
||||
\begin{rpg@monsterattrs}
|
||||
\rpg@ifmonsterattr{savingthrows}{\savesname}
|
||||
\rpg@ifmonsterattr{skills}{\skillsname}
|
||||
\rpg@ifmonsterattr{damagevulnerabilities}{\dvulname}
|
||||
\rpg@ifmonsterattr{damageresistances}{\dresname}
|
||||
\rpg@ifmonsterattr{damageimmunities}{\dimmname}
|
||||
\rpg@ifmonsterattr{conditionimmunities}{\cimmname}
|
||||
\rpg@monsterattr{senses}{\sensesname}
|
||||
\rpg@monsterattr{languages}{\languagesname}
|
||||
\item[\challengename] \RpgCRExp{\commandkey{challenge}}
|
||||
\end{rpg@monsterattrs}%
|
||||
}
|
||||
|
||||
\ExplSyntaxOn
|
||||
\newcommand{\rpg@hit}[1]{%
|
||||
\__rpg_caption:nn {\tohitname} {#1}
|
||||
}
|
||||
\ExplSyntaxOff
|
||||
|
||||
\newcommand{\rpg@damage}[2]{%
|
||||
\commandkey{#1}\ \commandkey{#2}\ \damagename%
|
||||
}
|
||||
|
||||
\newcommand{\rpg@ifplusdmg}[2]{%
|
||||
\ifcommandkey{#1}{%
|
||||
{ }\plusname\ \commandkey{#1}\ \commandkey{#2}\ \damagename%
|
||||
}{}%
|
||||
}
|
||||
\newcommand{\rpg@ifordmg}[5]{%
|
||||
\ifcommandkey{#1}{%
|
||||
, \orname\ \commandkey{#1}\ \commandkey{#2}\ \damagename\rpg@ifplusdmg{#4}{#5}\ \commandkey{#3}%
|
||||
}{}%
|
||||
}
|
||||
|
||||
\newkeycommand+[\|]\monstermelee[
|
||||
name=Club,
|
||||
mod=+0,
|
||||
reach=5,
|
||||
targets=\defaulttargetsname,
|
||||
dmg=\dice{1d4},
|
||||
dmgtype=bludgeoning,
|
||||
plusdmg=,
|
||||
plusdmgtype=,
|
||||
ordmg=,
|
||||
ordmgwhen=,
|
||||
extra=,
|
||||
]{%
|
||||
|\monsterattack|[
|
||||
name={\commandkey{name}},
|
||||
type=melee,
|
||||
mod={\commandkey{mod}},
|
||||
reach={\commandkey{reach}},
|
||||
targets={\commandkey{targets}},
|
||||
dmg={\commandkey{dmg}},
|
||||
dmgtype={\commandkey{dmgtype}},
|
||||
plusdmg={\commandkey{plusdmg}},
|
||||
plusdmgtype={\commandkey{plusdmgtype}},
|
||||
ordmg={\commandkey{ordmg}},
|
||||
ordmgwhen={\commandkey{ordmgwhen}},
|
||||
extra={\commandkey{extra}},
|
||||
]
|
||||
}
|
||||
\newkeycommand+[\|]\monsterranged[
|
||||
name=Shortbow,
|
||||
mod=+0,
|
||||
range=80/320,
|
||||
targets=\defaulttargetsname,
|
||||
dmg=\dice{1d6},
|
||||
dmgtype=piercing,
|
||||
plusdmg=,
|
||||
plusdmgtype=,
|
||||
ordmg=,
|
||||
ordmgwhen=,
|
||||
extra=,
|
||||
]{%
|
||||
|\monsterattack|[
|
||||
name={\commandkey{name}},
|
||||
type=ranged,
|
||||
mod={\commandkey{mod}},
|
||||
range={\commandkey{range}},
|
||||
targets={\commandkey{targets}},
|
||||
dmg={\commandkey{dmg}},
|
||||
dmgtype={\commandkey{dmgtype}},
|
||||
plusdmg={\commandkey{plusdmg}},
|
||||
plusdmgtype={\commandkey{plusdmgtype}},
|
||||
ordmg={\commandkey{ordmg}},
|
||||
ordmgwhen={\commandkey{ordmgwhen}},
|
||||
extra={\commandkey{extra}},
|
||||
]
|
||||
}
|
||||
|
||||
\newkeycommand\monsterattack[
|
||||
name=Dagger,
|
||||
enum* type={both,melee,ranged},
|
||||
mod=+0,
|
||||
reach=5,
|
||||
range=20/60,
|
||||
targets=\defaulttargetsname,
|
||||
dmg=\dice{1d4},
|
||||
dmgtype=piercing,
|
||||
plusdmg=,
|
||||
plusdmgtype=,
|
||||
ordmg=,
|
||||
ordmgwhen=,
|
||||
extra=,
|
||||
]{%
|
||||
\RpgDeprecate{\noexpand\monsterattack}{1.0.0}{Use \noexpand\RpgMonsterMelee, \noexpand\RpgMonsterRanged, or \noexpand\RpgMonsterAttack for attacks that are melee, ranged, or both, respectively.}%
|
||||
\begin{monsteraction}[\commandkey{name}]
|
||||
\IfStrEqCase{\commandkey{type}}{%
|
||||
{melee}{\textit{\RpgCaption{\meleeattackname}{\weaponname}:} \rpg@hit{mod}, \reachname\ \commandkey{reach} \unitsname}%
|
||||
{ranged}{\textit{\RpgCaption{\rangedattackname}{\weaponname}:} \rpg@hit{mod}, \rangename\ \commandkey{range} \unitsname}%
|
||||
{both}{\textit{\RpgCaption{\meleeorrangedattackname}{\weaponname}:} \rpg@hit{mod}, \reachname\ \commandkey{reach} \unitsname\ \orname\ \rangename\ \commandkey{range} \unitsname}%
|
||||
}[]%
|
||||
, \commandkey{targets}.
|
||||
\textit{\hitname:} \rpg@damage{dmg}{dmgtype}%
|
||||
\rpg@ifplusdmg{plusdmg}{plusdmgtype}%
|
||||
\rpg@ifordmg{ordmg}{dmgtype}{ordmgwhen}{plusdmg}{plusdmgtype}%
|
||||
\ifcommandkey{extra}{\commandkey{extra}}{}.
|
||||
\end{monsteraction}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% rpgpaperbox.sty - to be removed in version 1.0.0
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%Usage \begin{paperbox}[options]{title}[color]
|
||||
\ExplSyntaxOn
|
||||
\DeclareTColorBox{paperbox}{O{} m O{paperboxcolor}}{%
|
||||
before~upper={%
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\bool_if:NF \l__rpg_justified_bool
|
||||
{\RaggedRight}
|
||||
}
|
||||
},
|
||||
code={\RpgDeprecate{\noexpand\paperbox}{1.0.0}{Use \noexpand\RpgSidebar for sidebars.}\linespread{.9}},
|
||||
frame~hidden,
|
||||
boxrule=0pt,
|
||||
enhanced,
|
||||
before~skip=13pt plus 4pt minus 4pt,
|
||||
toptitle=2pt,
|
||||
boxsep=3pt,
|
||||
left=6pt,
|
||||
right=6pt,
|
||||
top=0pt,
|
||||
bottom=3pt,
|
||||
fonttitle=\RpgFontSidebarTitle,
|
||||
fontupper=\RpgFontSidebarBody,
|
||||
fontlower=\RpgFontSidebarBody,
|
||||
title={#2},
|
||||
sharp~corners,
|
||||
parbox=false,
|
||||
borderline~north={1pt}{-0.5pt}{black},
|
||||
borderline~south={1pt}{-0.5pt}{black},
|
||||
colback=#3,
|
||||
colbacktitle=#3,
|
||||
coltitle=black,
|
||||
fuzzy~shadow={0mm}{-3.5pt}{-0.5pt}{0.4mm}{black!60!white},
|
||||
overlay={%
|
||||
\fill[black] (frame.south~west) -- ++ (7pt,0) -- ++ (0,-5pt) -- cycle;
|
||||
\fill[black] (frame.north~west) -- ++ (7pt,0) -- ++ (0,5pt) -- cycle;
|
||||
\fill[black] (frame.north~east) -- ++ (-7pt,0) -- ++ (0,5pt) -- cycle;
|
||||
\fill[black] (frame.south~east) -- ++ (-7pt,0) -- ++ (0,-5pt) -- cycle;
|
||||
},
|
||||
after~skip=14pt plus 4pt minus 4pt,
|
||||
#1
|
||||
}
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% rpgquote.sty - to be removed in version 1.0.0
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%Usage \begin{quotebox}[options][color]
|
||||
\ExplSyntaxOn
|
||||
\DeclareTColorBox{quotebox}{O{} O{quoteboxcolor}}{%
|
||||
before~upper={%
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\bool_if:NF \l__rpg_justified_bool
|
||||
{\RaggedRight}
|
||||
}
|
||||
},
|
||||
code={\RpgDeprecate{\noexpand\quotebox}{1.0.0}{Use~\noexpand\RpgReadAloud~for~read-aloud~text.}\linespread{1.1}},
|
||||
enhanced~jigsaw,
|
||||
frame~hidden,
|
||||
boxrule=0pt,
|
||||
breakable,
|
||||
enhanced,
|
||||
before~skip=13pt plus 4pt minus 4pt,
|
||||
boxsep=8pt,
|
||||
top=0pt,
|
||||
left=0pt,
|
||||
right=0pt,
|
||||
bottom=0pt,
|
||||
colback=#2,
|
||||
sharp~corners,
|
||||
parbox=false,
|
||||
borderline~west={1pt}{-0.5pt}{titlered},
|
||||
borderline~east={1pt}{-0.5pt}{titlered},
|
||||
fontupper=\RpgFontReadAloud,
|
||||
fontlower=\RpgFontReadAloud,
|
||||
overlay={%
|
||||
\foreach\n in {north~east,north~west,south~east,south~west}
|
||||
{\draw[titlered, fill=titlered] (frame.\n) circle (1.5pt); }; },
|
||||
after~skip=13pt plus 4pt minus 4pt,
|
||||
#1
|
||||
}
|
||||
\ExplSyntaxOff
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% rpgsections.sty - to be removed in version 1.0.0
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Special command for magic items, traps, and the like.
|
||||
\newcommand{\subtitlesection}[2]{%
|
||||
\RpgDeprecate{\noexpand\subtitlesection}{1.0.0}{Use \noexpand\RpgItemHeader for item headers.}%
|
||||
\subsubsection{#1}%
|
||||
\textit{#2}
|
||||
\par\vspace{3pt plus 1pt minus 1pt}\noindent\ignorespaces}
|
||||
|
||||
% Map Areas and their References
|
||||
|
||||
% Labelling helpers
|
||||
\newcommand{\AreaLabel@Prefix}{area}
|
||||
\newcommand{\SetAreaLabelPrefix}[1]{%
|
||||
\renewcommand{\AreaLabel@Prefix}{#1}}
|
||||
|
||||
\newcounter{Area}
|
||||
\newcommand\ResetAreas{%
|
||||
\RpgDeprecate{\noexpand\ResetAreas}{1.0.0}{Use \noexpand\RpgResetAreas to reset area counters.}%
|
||||
\setcounter{Area}{0}
|
||||
}
|
||||
|
||||
\NewDocumentCommand\area{mo}{%
|
||||
\RpgDeprecate{\noexpand\area}{1.0.0}{Use \noexpand\RpgArea to typeset a section with an area counter.}%
|
||||
\refstepcounter{Area}%
|
||||
\IfNoValueTF{#2}%
|
||||
{\label{\AreaLabel@Prefix:#1}}%
|
||||
{\label{\AreaLabel@Prefix:#2}}%
|
||||
\subsection{\arabic{Area}. #1}%
|
||||
}
|
||||
|
||||
% defines sub-areas, like '5a', '5b'
|
||||
\newcounter{SubArea}[Area]
|
||||
|
||||
\NewDocumentCommand\subarea{mo}{%
|
||||
\RpgDeprecate{\noexpand\subarea}{1.0.0}{Use \noexpand\RpgSubArea to typeset a section with an sub-area counter.}%
|
||||
\refstepcounter{SubArea}%
|
||||
\IfNoValueTF{#2}%
|
||||
{\label{\AreaLabel@Prefix:#1}}%
|
||||
{\label{\AreaLabel@Prefix:#2}}%
|
||||
\subsubsection{\arabic{Area}\alph{SubArea}. #1}%
|
||||
}
|
||||
|
||||
% sub area references should be '5a', '5b', not '1', '2'
|
||||
\renewcommand\p@SubArea{\arabic{Area}}
|
||||
\renewcommand\theSubArea{\alph{SubArea}}
|
||||
|
||||
\newcounter{DetailArea}[subsection]
|
||||
\newcommand{\DetailArea@Prefix}{}
|
||||
\newcommand{\SetDetailAreaPrefix}[1]{\renewcommand{\DetailArea@Prefix}
|
||||
{#1--\arabic{DetailArea}\par\expandafter\ignorespaces\noindent}}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% rpgspell.sty - to be removed in version 1.0.0
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\newcommand{\spellheader}[6]{%
|
||||
\RpgDeprecate{\noexpand\spellheader}{1.0.0}{Use \noexpand\RpgSpellHeader to typeset a spell header.}%
|
||||
\subtitlesection{#1}{#2}
|
||||
\begin{description}[noitemsep,nosep,after=\smallskip,leftmargin=1em]
|
||||
\item[\spellcastingtimename:] #3
|
||||
\item[\spellrangename:] #4
|
||||
\item[\spellcomponentsname:] #5
|
||||
\item[\spelldurationname:] #6
|
||||
\end{description}
|
||||
}
|
||||
|
||||
\newenvironment{spell}[6]
|
||||
{\spellheader{#1}{#2}{#3}{#4}{#5}{#6}}
|
||||
% Environment encloses description.
|
||||
{}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% rpgtable.sty - to be removed in version 1.0.0
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Table Header
|
||||
\newcommand{\header}[1]{%
|
||||
\begingroup%
|
||||
\par\vspace{10pt plus 3 pt minus 3pt}%
|
||||
\noindent%
|
||||
\RpgFontTableTitle%
|
||||
#1%
|
||||
\endgroup%
|
||||
}
|
||||
|
||||
% Table Environment
|
||||
\NewDocumentEnvironment{rpgtable}{O{XX} O{tablecolor}}{%
|
||||
\RpgDeprecate{\noexpand\rpgtable}{1.0.0}{Use \noexpand\RpgTable for tables.}%
|
||||
\par\vspace{2pt plus 1pt minus 1pt}%
|
||||
\noindent%
|
||||
\RpgFontTableBody%
|
||||
\setlength{\extrarowheight}{3pt}%
|
||||
\rowcolors{1}{}{#2}%
|
||||
\tabularx{\linewidth}{#1}%
|
||||
}{%
|
||||
\endtabularx%
|
||||
\par\vspace{10pt plus 3 pt minus 3pt}%
|
||||
}
|
348
lib/rpgfonts.sty
Normal file
348
lib/rpgfonts.sty
Normal file
@ -0,0 +1,348 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Font definitions
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\RequirePackage{lettrine}
|
||||
\RequirePackage{Royal}
|
||||
\RequirePackage[auto]{contour}
|
||||
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\RequirePackage{bookman}
|
||||
\RequirePackage[type1]{gillius2}
|
||||
\RequirePackage[notext,nomath,nott]{kpfonts}
|
||||
\RequirePackage[T1]{fontenc}
|
||||
\renewcommand{\sfdefault}{jkpss}
|
||||
}
|
||||
|
||||
\cs_new_protected:Npn \__rpg_sf_initial_family:
|
||||
{
|
||||
\bool_if:NTF \l__rpg_layout_bool
|
||||
{ \gilliustwo }
|
||||
{ \sffamily }
|
||||
}
|
||||
|
||||
\keys_define:nn { rpg / fonts }
|
||||
{
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Sectioning commands
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Part
|
||||
part-family .tl_set:N = \l__rpg_part_family_tl,
|
||||
part-family .initial:n = \normalfont,
|
||||
part-family .value_required:n = true,
|
||||
part-style .tl_set:N = \l__rpg_part_style_tl,
|
||||
part-style .initial:n = \color{titlered} \Huge \scshape,
|
||||
part-style .value_required:n = true,
|
||||
% Chapter
|
||||
chapter-family .tl_set:N = \l__rpg_chapter_family_tl,
|
||||
chapter-family .initial:n = \normalfont,
|
||||
chapter-family .value_required:n = true,
|
||||
chapter-style .tl_set:N = \l__rpg_chapter_style_tl,
|
||||
chapter-style .initial:n = \linespread{.9} \color{titlered} \Huge \scshape,
|
||||
chapter-style .value_required:n = true,
|
||||
% Section
|
||||
section-family .tl_set:N = \l__rpg_section_family_tl,
|
||||
section-family .initial:n = \normalfont,
|
||||
section-family .value_required:n = true,
|
||||
section-style .tl_set:N = \l__rpg_section_style_tl,
|
||||
section-style .initial:n = \linespread{.9} \color{titlered} \huge \scshape \RaggedRight,
|
||||
section-style .value_required:n = true,
|
||||
% Subsection
|
||||
subsection-family .tl_set:N = \l__rpg_subsection_family_tl,
|
||||
subsection-family .initial:n = \normalfont,
|
||||
subsection-family .value_required:n = true,
|
||||
subsection-style .tl_set:N = \l__rpg_subsection_style_tl,
|
||||
subsection-style .initial:n = \linespread{.9} \color{titlered} \Large \scshape \RaggedRight,
|
||||
subsection-style .value_required:n = true,
|
||||
% subsubsection
|
||||
subsubsection-family .tl_set:N = \l__rpg_subsubsection_family_tl,
|
||||
subsubsection-family .initial:n = \normalfont,
|
||||
subsubsection-family .value_required:n = true,
|
||||
subsubsection-style .tl_set:N = \l__rpg_subsubsection_style_tl,
|
||||
subsubsection-style .initial:n = \linespread{.9} \color{titlered} \large \scshape \RaggedRight,
|
||||
subsubsection-style .value_required:n = true,
|
||||
% paragraph
|
||||
paragraph-family .tl_set:N = \l__rpg_paragraph_family_tl,
|
||||
paragraph-family .value_required:n = true,
|
||||
paragraph-style .tl_set:N = \l__rpg_paragraph_style_tl,
|
||||
paragraph-style .initial:n = \bfseries \slshape,
|
||||
paragraph-style .value_required:n = true,
|
||||
% subparagraph
|
||||
subparagraph-family .tl_set:N = \l__rpg_subparagraph_family_tl,
|
||||
subparagraph-family .value_required:n = true,
|
||||
subparagraph-style .tl_set:N = \l__rpg_subparagraph_style_tl,
|
||||
subparagraph-style .initial:n = \bfseries \slshape,
|
||||
subparagraph-style .value_required:n = true,
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Tables
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Table title
|
||||
table-title-family .tl_set:N = \l__rpg_table_title_family_tl,
|
||||
table-title-family .initial:n = \sffamily,
|
||||
table-title-family .value_required:n = true,
|
||||
table-title-style .tl_set:N = \l__rpg_table_title_style_tl,
|
||||
table-title-style .initial:n = \bfseries \scshape \large,
|
||||
table-title-style .value_required:n = true,
|
||||
% Table header
|
||||
table-header-family .tl_set:N = \l__rpg_table_header_family_tl,
|
||||
table-header-family .initial:n = \sffamily,
|
||||
table-header-family .value_required:n = true,
|
||||
table-header-style .tl_set:N = \l__rpg_table_header_style_tl,
|
||||
table-header-style .initial:n = \bfseries,
|
||||
table-header-style .value_required:n = true,
|
||||
% Table body
|
||||
table-body-family .tl_set:N = \l__rpg_table_body_family_tl,
|
||||
table-body-family .initial:n = \__rpg_sf_initial_family:,
|
||||
table-body-family .value_required:n = true,
|
||||
table-body-style .tl_set:N = \l__rpg_table_body_style_tl,
|
||||
table-body-style .initial:n = \small,
|
||||
table-body-style .value_required:n = true,
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Comment boxes
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Comment title
|
||||
comment-title-family .tl_set:N = \l__rpg_comment_title_family_tl,
|
||||
comment-title-family .initial:n = \sffamily,
|
||||
comment-title-family .value_required:n = true,
|
||||
comment-title-style .tl_set:N = \l__rpg_comment_title_style_tl,
|
||||
comment-title-style .initial:n = \bfseries \scshape,
|
||||
comment-title-style .value_required:n = true,
|
||||
% Comment body
|
||||
comment-body-family .tl_set:N = \l__rpg_comment_body_family_tl,
|
||||
comment-body-family .initial:n = \__rpg_sf_initial_family:,
|
||||
comment-body-family .value_required:n = true,
|
||||
comment-body-style .tl_set:N = \l__rpg_comment_body_style_tl,
|
||||
comment-body-style .initial:n = \small,
|
||||
comment-body-style .value_required:n = true,
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Sidebars
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Sidebar title
|
||||
sidebar-title-family .tl_set:N = \l__rpg_sidebar_title_family_tl,
|
||||
sidebar-title-family .initial:n = \sffamily,
|
||||
sidebar-title-family .value_required:n = true,
|
||||
sidebar-title-style .tl_set:N = \l__rpg_sidebar_title_style_tl,
|
||||
sidebar-title-style .initial:n = \bfseries \scshape,
|
||||
sidebar-title-style .value_required:n = true,
|
||||
% Sidebar body
|
||||
sidebar-body-family .tl_set:N = \l__rpg_sidebar_body_family_tl,
|
||||
sidebar-body-family .initial:n = \__rpg_sf_initial_family:,
|
||||
sidebar-body-family .value_required:n = true,
|
||||
sidebar-body-style .tl_set:N = \l__rpg_sidebar_body_style_tl,
|
||||
sidebar-body-style .initial:n = \small,
|
||||
sidebar-body-style .value_required:n = true,
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Read-aloud boxes
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
readaloud-family .tl_set:N = \l__rpg_readaloud_family_tl,
|
||||
readaloud-family .initial:n = \__rpg_sf_initial_family:,
|
||||
readaloud-family .value_required:n = true,
|
||||
readaloud-style .tl_set:N = \l__rpg_readaloud_style_tl,
|
||||
readaloud-style .initial:n = \small,
|
||||
readaloud-style .value_required:n = true,
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Table of Contents
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Part
|
||||
toc-part-family .tl_set:N = \l__rpg_toc_part_family_tl,
|
||||
toc-part-family .initial:n = \normalfont,
|
||||
toc-part-family .value_required:n = true,
|
||||
toc-part-style .tl_set:N = \l__rpg_toc_part_style_tl,
|
||||
toc-part-style .initial:n = \Large \scshape \color{titlered},
|
||||
toc-part-style .value_required:n = true,
|
||||
% Chapter
|
||||
toc-chapter-family .tl_set:N = \l__rpg_toc_chapter_family_tl,
|
||||
toc-chapter-family .initial:n = \normalfont,
|
||||
toc-chapter-family .value_required:n = true,
|
||||
toc-chapter-style .tl_set:N = \l__rpg_toc_chapter_style_tl,
|
||||
toc-chapter-style .initial:n = \large \scshape \color{titlered},
|
||||
toc-chapter-style .value_required:n = true,
|
||||
% Section
|
||||
toc-section-family .tl_set:N = \l__rpg_toc_section_family_tl,
|
||||
toc-section-family .initial:n = \normalfont,
|
||||
toc-section-family .value_required:n = true,
|
||||
toc-section-style .tl_set:N = \l__rpg_toc_section_style_tl,
|
||||
toc-section-style .initial:n = \normalsize,
|
||||
toc-section-style .value_required:n = true,
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Stat blocks
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Stat block title
|
||||
stat-block-title-family .tl_set:N = \l__rpg_stat_block_title_family_tl,
|
||||
stat-block-title-family .initial:n = \normalfont,
|
||||
stat-block-title-family .value_required:n = true,
|
||||
stat-block-title-style .tl_set:N = \l__rpg_stat_block_title_style_tl,
|
||||
stat-block-title-style .initial:n = \bfseries \scshape \LARGE,
|
||||
stat-block-title-style .value_required:n = true,
|
||||
% Stat block body
|
||||
stat-block-body-family .tl_set:N = \l__rpg_stat_block_body_family_tl,
|
||||
stat-block-body-family .initial:n = \__rpg_sf_initial_family:,
|
||||
stat-block-body-family .value_required:n = true,
|
||||
stat-block-body-style .tl_set:N = \l__rpg_stat_block_body_style_tl,
|
||||
stat-block-body-style .initial:n = \small,
|
||||
stat-block-body-style .value_required:n = true,
|
||||
% Stat block section
|
||||
stat-block-section-family .tl_set:N = \l__rpg_stat_block_section_family_tl,
|
||||
stat-block-section-family .initial:n = \sffamily,
|
||||
stat-block-section-family .value_required:n = true,
|
||||
stat-block-section-style .tl_set:N = \l__rpg_stat_block_section_style_tl,
|
||||
stat-block-section-style .initial:n = \color{titlered} \scshape \large,
|
||||
stat-block-section-style .value_required:n = true,
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Miscellaneous
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Footer
|
||||
footer-family .tl_set:N = \l__rpg_footer_family_tl,
|
||||
footer-family .initial:n = \normalfont,
|
||||
footer-family .value_required:n = true,
|
||||
footer-style .tl_set:N = \l__rpg_footer_style_tl,
|
||||
footer-style .initial:n = \scriptsize \textcolor{pagegold},
|
||||
footer-style .value_required:n = true,
|
||||
% Page number
|
||||
page-number-family .tl_set:N = \l__rpg_page_number_family_tl,
|
||||
page-number-family .initial:n = \normalfont,
|
||||
page-number-family .value_required:n = true,
|
||||
page-number-style .tl_set:N = \l__rpg_page_number_style_tl,
|
||||
page-number-style .initial:n = \scriptsize \textcolor{pagegold},
|
||||
page-number-style .value_required:n = true,
|
||||
% Drop caps
|
||||
drop-cap-family .tl_set:N = \l__rpg_drop_cap_family_tl,
|
||||
drop-cap-family .initial:n = \Royal,
|
||||
drop-cap-family .value_required:n = true,
|
||||
drop-cap-style .tl_set:N = \l__rpg_drop_cap_style_tl,
|
||||
drop-cap-style .value_required:n = true,
|
||||
}
|
||||
|
||||
\NewDocumentCommand { \RpgSetFonts } { o }
|
||||
{
|
||||
\keys_set:nn { rpg / fonts } { #1 }
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Font access functions combine the selected family and style
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Sectioning commands
|
||||
\NewDocumentCommand{\RpgFontPart}{}
|
||||
{ \l__rpg_part_family_tl \l__rpg_part_style_tl}
|
||||
|
||||
\NewDocumentCommand{\RpgFontChapter}{}
|
||||
{ \l__rpg_chapter_family_tl \l__rpg_chapter_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontSection}{}
|
||||
{ \l__rpg_section_family_tl \l__rpg_section_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontSubsection}{}
|
||||
{ \l__rpg_subsection_family_tl \l__rpg_subsection_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontSubsubsection}{}
|
||||
{ \l__rpg_subsubsection_family_tl \l__rpg_subsubsection_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontParagraph}{}
|
||||
{ \l__rpg_paragraph_family_tl \l__rpg_paragraph_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontSubaragraph}{}
|
||||
{ \l__rpg_subparagraph_family_tl \l__rpg_subparagraph_style_tl }
|
||||
|
||||
% Tables
|
||||
\NewDocumentCommand{\RpgFontTableTitle}{}
|
||||
{ \l__rpg_table_title_family_tl \l__rpg_table_title_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontTableHeader}{}
|
||||
{ \l__rpg_table_header_family_tl \l__rpg_table_header_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontTableBody}{}
|
||||
{ \l__rpg_table_body_family_tl \l__rpg_table_body_style_tl }
|
||||
|
||||
% Comment boxes
|
||||
\NewDocumentCommand{\RpgFontCommentTitle}{}
|
||||
{ \l__rpg_comment_title_family_tl \l__rpg_comment_title_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontCommentBody}{}
|
||||
{ \l__rpg_comment_body_family_tl \l__rpg_comment_body_style_tl }
|
||||
|
||||
% Sidebars
|
||||
\NewDocumentCommand{\RpgFontSidebarTitle}{}
|
||||
{ \l__rpg_sidebar_title_family_tl \l__rpg_sidebar_title_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontSidebarBody}{}
|
||||
{ \l__rpg_sidebar_body_family_tl \l__rpg_sidebar_body_style_tl }
|
||||
|
||||
% Read-aloud boxes
|
||||
\NewDocumentCommand{\RpgFontReadAloud}{}
|
||||
{ \l__rpg_readaloud_family_tl \l__rpg_readaloud_style_tl }
|
||||
|
||||
% Table of Contents
|
||||
\NewDocumentCommand{\RpgFontTocPart}{}
|
||||
{ \l__rpg_toc_part_family_tl \l__rpg_toc_part_style_tl}
|
||||
|
||||
\NewDocumentCommand{\RpgFontTocChapter}{}
|
||||
{ \l__rpg_toc_chapter_family_tl \l__rpg_toc_chapter_style_tl}
|
||||
|
||||
\NewDocumentCommand{\RpgFontTocSection}{}
|
||||
{ \l__rpg_toc_section_family_tl \l__rpg_toc_section_style_tl}
|
||||
|
||||
% Stat blocks
|
||||
\NewDocumentCommand{\RpgFontStatBlockTitle}{}
|
||||
{ \l__rpg_stat_block_title_family_tl \l__rpg_stat_block_title_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontStatBlockBody}{}
|
||||
{ \l__rpg_stat_block_body_family_tl \l__rpg_stat_block_body_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontStatBlockSection}{}
|
||||
{ \l__rpg_stat_block_section_family_tl \l__rpg_stat_block_section_style_tl }
|
||||
|
||||
% Miscellaneous
|
||||
\NewDocumentCommand{\RpgFontFooter}{}
|
||||
{ \l__rpg_footer_family_tl \l__rpg_footer_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontPageNumber}{}
|
||||
{ \l__rpg_page_number_family_tl \l__rpg_page_number_style_tl }
|
||||
|
||||
\NewDocumentCommand{\RpgFontDropCap}{}
|
||||
{ \l__rpg_drop_cap_family_tl \l__rpg_drop_cap_style_tl }
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Drop Caps
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\renewcommand{\LettrineFontHook}
|
||||
{ \l__rpg_drop_cap_family_tl \l__rpg_drop_cap_style_tl }
|
||||
|
||||
% Usage: RpgDropCapLine[<lettrine options>]{<first letter>}{<small caps line>}
|
||||
% It takes trial and error to get the 2nd argument to align with
|
||||
% the linebreak. Lettrine package will not play nicely with \FirstLine. See
|
||||
% the lettrine package for options.
|
||||
\NewDocumentCommand{\RpgDropCapLine}{ O{} m m }
|
||||
{
|
||||
\lettrine[
|
||||
lines = 4,
|
||||
depth = 0,
|
||||
findent = \l__rpg_space_dim,
|
||||
nindent = 0pt,
|
||||
#1
|
||||
]
|
||||
{#2}
|
||||
{#3}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Contour that can break across lines. Can accept \newline to force a break.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\cs_new_protected:Npn \__rpg_contour_preserve_space:nn #1#2
|
||||
{
|
||||
\group_begin:
|
||||
\seq_set_split:Nnn \l_tmpa_seq { ~ } { #2 }
|
||||
\seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \exp_not:n {\contour{#1}{##1}} }
|
||||
\seq_use:Nn \l_tmpb_seq { ~ }
|
||||
\group_end:
|
||||
}
|
||||
|
||||
\NewDocumentCommand{\RpgContour}{ O{contourgray} m }
|
||||
{
|
||||
\group_begin:
|
||||
\seq_set_split:Nnn \l_tmpa_seq { \newline } { #2 }
|
||||
\seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \exp_not:n {\__rpg_contour_preserve_space:nn{#1}{##1}} }
|
||||
\seq_use:Nn \l_tmpb_seq { \newline }
|
||||
\group_end:
|
||||
}
|
74
lib/rpgheader.sty
Normal file
74
lib/rpgheader.sty
Normal file
@ -0,0 +1,74 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Custom headers and footers
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\RequirePackage {fancyhdr} % Adaptation of the footers
|
||||
|
||||
% Setup for custom footer
|
||||
\pagestyle {fancy}
|
||||
|
||||
\cs_if_free:NF \chaptermark
|
||||
{
|
||||
\renewcommand*{\chaptermark}[1]
|
||||
{
|
||||
\markboth
|
||||
{
|
||||
\MakeUppercase
|
||||
{
|
||||
\ifnum\value{secnumdepth}>-1
|
||||
\chaptertitlename\ \thechapter :~
|
||||
\fi
|
||||
#1
|
||||
}
|
||||
}
|
||||
{}
|
||||
}
|
||||
}
|
||||
|
||||
\renewcommand*{\headrulewidth}{0pt} % no rule for header
|
||||
\renewcommand*{\footrulewidth}{0pt} % no rule for footer
|
||||
|
||||
\fancyhf {} % clear all headers and footers
|
||||
|
||||
% Header is used to include the page background
|
||||
\fancyhead{
|
||||
\bool_if:NT \l__rpg_show_background_bool
|
||||
{
|
||||
\begin{tikzpicture}[remember~picture,overlay]
|
||||
\node[inner~sep=0pt] at (current~page.center) {\includegraphics[width=\paperwidth,height=\paperheight]{img/paper}};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
}
|
||||
|
||||
% Left-even page footer
|
||||
\fancyfoot[LE]{%
|
||||
\RpgFontFooter \leftmark
|
||||
\begin{tikzpicture}[remember~picture,overlay]
|
||||
\bool_if:NT \l__rpg_show_footer_scroll_bool {
|
||||
\node[xscale=-1,inner~sep=0pt,anchor=south,nearly~opaque] at (current~page.south) {\includegraphics[width=\paperwidth,height=.6in]{img/footerscroll}};
|
||||
}
|
||||
\node[inner~sep=0pt,anchor=south,xshift=.28in,yshift=.39in] at (current~page.south~west) {\RpgFontPageNumber \thepage};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
|
||||
% Right-odd page footer
|
||||
\fancyfoot[RO]{%
|
||||
\RpgFontFooter \leftmark
|
||||
\begin{tikzpicture}[remember~picture,overlay]
|
||||
\bool_if:NT \l__rpg_show_footer_scroll_bool {
|
||||
\node[inner~sep=0pt,anchor=south,nearly~opaque] at (current~page.south) {\includegraphics[width=\paperwidth,height=.6in]{img/footerscroll}};
|
||||
}
|
||||
\node[inner~sep=0pt,anchor=south,xshift=-.28in,yshift=.39in] at (current~page.south~east) {\RpgFontPageNumber \thepage};
|
||||
\end{tikzpicture}
|
||||
}
|
||||
|
||||
\fancypagestyle {plain} {}
|
||||
|
||||
\fancypagestyle{empty}{%
|
||||
\fancyfoot{}
|
||||
}
|
||||
|
||||
}
|
671
lib/rpgmonster.sty
Normal file
671
lib/rpgmonster.sty
Normal file
@ -0,0 +1,671 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
\NewDocumentCommand {\RpgCRExp} { m }
|
||||
{
|
||||
\str_case_e:nnF {#1}
|
||||
{
|
||||
{0} {#1~(0~\xpname)}
|
||||
{1/10} {0~(10~\xpname)}
|
||||
{1/8} {#1~(25~\xpname)}
|
||||
{1/4} {#1~(50~\xpname)}
|
||||
{1/2} {#1~(100~\xpname)}
|
||||
{1} {#1~(200~\xpname)}
|
||||
{2} {#1~(450~\xpname)}
|
||||
{3} {#1~(700~\xpname)}
|
||||
{4} {#1~(\numprint{1100}~\xpname)}
|
||||
{5} {#1~(\numprint{1800}~\xpname)}
|
||||
{6} {#1~(\numprint{2300}~\xpname)}
|
||||
{7} {#1~(\numprint{2900}~\xpname)}
|
||||
{8} {#1~(\numprint{3900}~\xpname)}
|
||||
{9} {#1~(\numprint{5000}~\xpname)}
|
||||
{10} {#1~(\numprint{5900}~\xpname)}
|
||||
{11} {#1~(\numprint{7200}~\xpname)}
|
||||
{12} {#1~(\numprint{8400}~\xpname)}
|
||||
{13} {#1~(\numprint{10000}~\xpname)}
|
||||
{14} {#1~(\numprint{11500}~\xpname)}
|
||||
{15} {#1~(\numprint{13000}~\xpname)}
|
||||
{16} {#1~(\numprint{15000}~\xpname)}
|
||||
{17} {#1~(\numprint{18000}~\xpname)}
|
||||
{18} {#1~(\numprint{20000}~\xpname)}
|
||||
{19} {#1~(\numprint{22000}~\xpname)}
|
||||
{20} {#1~(\numprint{25000}~\xpname)}
|
||||
{21} {#1~(\numprint{33000}~\xpname)}
|
||||
{22} {#1~(\numprint{41000}~\xpname)}
|
||||
{23} {#1~(\numprint{50000}~\xpname)}
|
||||
{24} {#1~(\numprint{62000}~\xpname)}
|
||||
{25} {#1~(\numprint{75000}~\xpname)}
|
||||
{26} {#1~(\numprint{90000}~\xpname)}
|
||||
{27} {#1~(\numprint{105000}~\xpname)}
|
||||
{28} {#1~(\numprint{120000}~\xpname)}
|
||||
{29} {#1~(\numprint{135000}~\xpname)}
|
||||
{30} {#1~(\numprint{155000}~\xpname)}
|
||||
}
|
||||
{#1}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Monster environments
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Stat block made to look like the Monster Manual NPC definitions
|
||||
\DeclareTColorBox {RpgMonsterNoBg} { O{} m }
|
||||
{
|
||||
enhanced,
|
||||
frame~hidden,
|
||||
boxrule = 0pt,
|
||||
breakable,
|
||||
parbox = false,
|
||||
boxsep = 0pt,
|
||||
toptitle = 3mm,
|
||||
left = 0pt,
|
||||
right = 0pt,
|
||||
sharp~corners,
|
||||
opacityback = 0,
|
||||
colframe = titlered,
|
||||
fonttitle = \RpgFontStatBlockTitle,
|
||||
fontupper = \RpgFontStatBlockBody,
|
||||
fontlower = \RpgFontStatBlockBody,
|
||||
title = {#2},
|
||||
coltitle = titlered,
|
||||
#1
|
||||
}
|
||||
|
||||
% Stat block made to look like stat blocks in the PHB.
|
||||
\DeclareTColorBox {RpgMonsterBg} { O{} m }
|
||||
{
|
||||
enhanced,
|
||||
frame~hidden,
|
||||
before~skip = 12pt plus 3pt minus 3pt,
|
||||
boxrule = 0pt,
|
||||
breakable,
|
||||
parbox = false,
|
||||
boxsep = 2pt,
|
||||
toptitle = 8pt,
|
||||
top = 0pt,
|
||||
left = 2pt,
|
||||
right = 2pt,
|
||||
bottom = 7pt,
|
||||
sharp~corners,
|
||||
oversize = 0pt,
|
||||
borderline~north = {3pt} {0pt} {titlered},
|
||||
borderline~north = {2pt} {0.5pt} {statblockribbon},
|
||||
borderline~south = {3pt} {0pt} {titlered},
|
||||
borderline~south = {2pt} {0.5pt} {statblockribbon},
|
||||
colback = statblockbg,
|
||||
colbacktitle = statblockbg,
|
||||
colframe = titlered,
|
||||
fonttitle = \RpgFontStatBlockTitle,
|
||||
coltitle = titlered,
|
||||
fontupper = \RpgFontStatBlockBody,
|
||||
fontlower = \RpgFontStatBlockBody,
|
||||
title = {#2},
|
||||
#1
|
||||
}
|
||||
|
||||
% Alias RpgMonster to correct background type
|
||||
\bool_if:NTF \l__rpg_show_background_bool
|
||||
{
|
||||
\let\RpgMonster\RpgMonsterBg
|
||||
\let\endRpgMonster\endRpgMonsterBg
|
||||
}{
|
||||
\let\RpgMonster\RpgMonsterNoBg
|
||||
\let\endRpgMonster\endRpgMonsterNoBg
|
||||
}
|
||||
|
||||
% Italicized text appearing immediately after monster's name
|
||||
\NewDocumentCommand {\RpgMonsterType} {m}
|
||||
{
|
||||
\begin {hangingpar}
|
||||
\textit {#1}
|
||||
\end {hangingpar}
|
||||
}
|
||||
|
||||
% Fancy DnD 5e stat block rule
|
||||
\NewDocumentCommand {\RpgMonsterLine} {}
|
||||
{
|
||||
\par \vspace{-2pt} \noindent
|
||||
\begin {tikzpicture}
|
||||
\draw [ rulered, fill = rulered ] ( 0, 0 ) -- ( 0, 0.1 ) -- ( \linewidth, 0.05 );
|
||||
\end {tikzpicture}
|
||||
\par
|
||||
}
|
||||
|
||||
% A description variant used to list creature attributes.
|
||||
\newlist {__rpg_monster_attributes} {description} {1}
|
||||
\setlist [__rpg_monster_attributes]
|
||||
{
|
||||
before = \color {titlered},
|
||||
font = \RpgFontStatBlockBody,
|
||||
labelsep = \l__rpg_space_dim,
|
||||
nosep,
|
||||
}
|
||||
|
||||
% Only prints the item label if the value was supplied
|
||||
\cs_new_protected_nopar:Npn \__rpg_if_monster_attribute:nn #1#2
|
||||
{
|
||||
\tl_if_empty:NF {#1}
|
||||
{ \item [#2] #1 }
|
||||
}
|
||||
|
||||
%% Monster basics
|
||||
\keys_define:nn { rpg / monster / basics }
|
||||
{
|
||||
armor-class .tl_set:N = \l__armor_class_tl,
|
||||
armor-class .initial:n = 10,
|
||||
armor-class .value_required:n = true,
|
||||
armorclass .meta:n = { armor-class = {#1} },
|
||||
hit-points .tl_set:N = \l__hit_points_tl,
|
||||
hit-points .initial:n = \RpgDice {1d8},
|
||||
hit-points .value_required:n = true,
|
||||
hitpoints .meta:n = { hit-points = {#1} },
|
||||
speed .tl_set:N = \l__speed_tl,
|
||||
speed .initial:n = 30 ~ \unitsname,
|
||||
speed .value_required:n = true,
|
||||
}
|
||||
|
||||
\cs_new_protected_nopar:Npn \__rpg_monster_basics:
|
||||
{
|
||||
\begin {__rpg_monster_attributes}
|
||||
\item [\armorclassname] \l__armor_class_tl
|
||||
\item [\hitpointsname] \l__hit_points_tl
|
||||
\item [\speedname] \l__speed_tl
|
||||
\end {__rpg_monster_attributes}
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgMonsterBasics} {o}
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set:nn { rpg / monster / basics } {#1}
|
||||
\RpgMonsterLine
|
||||
\__rpg_monster_basics:
|
||||
\RpgMonsterLine
|
||||
\group_end:
|
||||
}
|
||||
|
||||
%% Monster CR/XP helper
|
||||
% \l_tmpa_tl - CR
|
||||
% \l_tmpb_tl - XP
|
||||
\cs_new_protected_nopar:Npn \__rpg_cr_xp:N #1
|
||||
{
|
||||
\tl_set:Nn \l_tmpa_tl {#1}
|
||||
\str_case_e:nnTF {#1}
|
||||
{
|
||||
{0} { \tl_set:Nn \l_tmpb_tl {0} }
|
||||
{0/10}
|
||||
{
|
||||
\tl_set:Nn \l_tmpa_tl {0}
|
||||
\tl_set:Nn \l_tmpb_tl {10}
|
||||
}
|
||||
{1/10}
|
||||
{
|
||||
\rpg@deprecate{ Challenge ~ 1/10 } {0.8} [ Use ~ challenge ~ 0/10 ~ instead. ]
|
||||
\tl_set:Nn \l_tmpa_tl {0}
|
||||
\tl_set:Nn \l_tmpb_tl {10}
|
||||
}
|
||||
{1/8} { \tl_set:Nn \l_tmpb_tl {25} }
|
||||
{1/4} { \tl_set:Nn \l_tmpb_tl {50} }
|
||||
{1/2} { \tl_set:Nn \l_tmpb_tl {100} }
|
||||
{1} { \tl_set:Nn \l_tmpb_tl {200} }
|
||||
{2} { \tl_set:Nn \l_tmpb_tl {450} }
|
||||
{3} { \tl_set:Nn \l_tmpb_tl {700} }
|
||||
{4} { \tl_set:Nn \l_tmpb_tl {1100} }
|
||||
{5} { \tl_set:Nn \l_tmpb_tl {1800} }
|
||||
{6} { \tl_set:Nn \l_tmpb_tl {2300} }
|
||||
{7} { \tl_set:Nn \l_tmpb_tl {2900} }
|
||||
{8} { \tl_set:Nn \l_tmpb_tl {3900} }
|
||||
{9} { \tl_set:Nn \l_tmpb_tl {5000} }
|
||||
{10} { \tl_set:Nn \l_tmpb_tl {5900} }
|
||||
{11} { \tl_set:Nn \l_tmpb_tl {7200} }
|
||||
{12} { \tl_set:Nn \l_tmpb_tl {8400} }
|
||||
{13} { \tl_set:Nn \l_tmpb_tl {10000} }
|
||||
{14} { \tl_set:Nn \l_tmpb_tl {11500} }
|
||||
{15} { \tl_set:Nn \l_tmpb_tl {13000} }
|
||||
{16} { \tl_set:Nn \l_tmpb_tl {15000} }
|
||||
{17} { \tl_set:Nn \l_tmpb_tl {18000} }
|
||||
{18} { \tl_set:Nn \l_tmpb_tl {20000} }
|
||||
{19} { \tl_set:Nn \l_tmpb_tl {22000} }
|
||||
{20} { \tl_set:Nn \l_tmpb_tl {25000} }
|
||||
{21} { \tl_set:Nn \l_tmpb_tl {33000} }
|
||||
{22} { \tl_set:Nn \l_tmpb_tl {41000} }
|
||||
{23} { \tl_set:Nn \l_tmpb_tl {50000} }
|
||||
{24} { \tl_set:Nn \l_tmpb_tl {62000} }
|
||||
{25} { \tl_set:Nn \l_tmpb_tl {75000} }
|
||||
{26} { \tl_set:Nn \l_tmpb_tl {90000} }
|
||||
{27} { \tl_set:Nn \l_tmpb_tl {105000} }
|
||||
{28} { \tl_set:Nn \l_tmpb_tl {120000} }
|
||||
{29} { \tl_set:Nn \l_tmpb_tl {135000} }
|
||||
{30} { \tl_set:Nn \l_tmpb_tl {155000} }
|
||||
}
|
||||
{ \l_tmpa_tl\ ( \numprint {\l_tmpb_tl} ~ \xpname ) }
|
||||
{ #1 }
|
||||
}
|
||||
|
||||
%% Monster CR/PB helper
|
||||
% \l_tmpa_tl - CR
|
||||
% \l_tmpb_tl - PB
|
||||
\cs_new_protected_nopar:Npn \__rpg_cr_pb:N #1
|
||||
{
|
||||
\tl_set:Nn \l_tmpa_tl {#1}
|
||||
\str_case_e:nnTF {#1}
|
||||
{
|
||||
{0} { \tl_set:Nn \l_tmpb_tl {+2} }
|
||||
{1/8} { \tl_set:Nn \l_tmpb_tl {+2} }
|
||||
{1/4} { \tl_set:Nn \l_tmpb_tl {+2} }
|
||||
{1/2} { \tl_set:Nn \l_tmpb_tl {+2} }
|
||||
{1} { \tl_set:Nn \l_tmpb_tl {+2} }
|
||||
{2} { \tl_set:Nn \l_tmpb_tl {+2} }
|
||||
{3} { \tl_set:Nn \l_tmpb_tl {+2} }
|
||||
{4} { \tl_set:Nn \l_tmpb_tl {+2} }
|
||||
{5} { \tl_set:Nn \l_tmpb_tl {+3} }
|
||||
{6} { \tl_set:Nn \l_tmpb_tl {+3} }
|
||||
{7} { \tl_set:Nn \l_tmpb_tl {+3} }
|
||||
{8} { \tl_set:Nn \l_tmpb_tl {+3} }
|
||||
{9} { \tl_set:Nn \l_tmpb_tl {+4} }
|
||||
{10} { \tl_set:Nn \l_tmpb_tl {+4} }
|
||||
{11} { \tl_set:Nn \l_tmpb_tl {+4} }
|
||||
{12} { \tl_set:Nn \l_tmpb_tl {+4} }
|
||||
{13} { \tl_set:Nn \l_tmpb_tl {+5} }
|
||||
{14} { \tl_set:Nn \l_tmpb_tl {+5} }
|
||||
{15} { \tl_set:Nn \l_tmpb_tl {+5} }
|
||||
{16} { \tl_set:Nn \l_tmpb_tl {+5} }
|
||||
{17} { \tl_set:Nn \l_tmpb_tl {+6} }
|
||||
{18} { \tl_set:Nn \l_tmpb_tl {+6} }
|
||||
{19} { \tl_set:Nn \l_tmpb_tl {+6} }
|
||||
{20} { \tl_set:Nn \l_tmpb_tl {+6} }
|
||||
{21} { \tl_set:Nn \l_tmpb_tl {+7} }
|
||||
{22} { \tl_set:Nn \l_tmpb_tl {+7} }
|
||||
{23} { \tl_set:Nn \l_tmpb_tl {+7} }
|
||||
{24} { \tl_set:Nn \l_tmpb_tl {+7} }
|
||||
{25} { \tl_set:Nn \l_tmpb_tl {+8} }
|
||||
{26} { \tl_set:Nn \l_tmpb_tl {+8} }
|
||||
{27} { \tl_set:Nn \l_tmpb_tl {+8} }
|
||||
{28} { \tl_set:Nn \l_tmpb_tl {+8} }
|
||||
{29} { \tl_set:Nn \l_tmpb_tl {+9} }
|
||||
{30} { \tl_set:Nn \l_tmpb_tl {+9} }
|
||||
}
|
||||
{ \l_tmpb_tl }
|
||||
{ #1 }
|
||||
}
|
||||
|
||||
%% Monster details
|
||||
\keys_define:nn { rpg / monster / details }
|
||||
{
|
||||
saving-throws .tl_set:N = \l__saving_throws_tl,
|
||||
saving-throws .value_required:n = true,
|
||||
savingthrows .meta:n = { saving-throws = {#1} },
|
||||
skills .tl_set:N = \l__skills_tl,
|
||||
skills .value_required:n = true,
|
||||
damage-vulnerabilities .tl_set:N = \l__damage_vulnerabilities_tl,
|
||||
damage-vulnerabilities .value_required:n = true,
|
||||
damagevulnerabilities .meta:n = { damage-vulnerabilities = {#1} },
|
||||
damage-resistances .tl_set:N = \l__damage_resistances_tl,
|
||||
damage-resistances .value_required:n = true,
|
||||
damageresistances .meta:n = { damage-resistances = {#1} },
|
||||
damage-immunities .tl_set:N = \l__damage_immunities_tl,
|
||||
damage-immunities .value_required:n = true,
|
||||
damageimmunities .meta:n = { damage-immunities = {#1} },
|
||||
condition-immunities .tl_set:N = \l__condition_immunities_tl,
|
||||
condition-immunities .value_required:n = true,
|
||||
conditionimmunities .meta:n = { condition-immunities = {#1} },
|
||||
senses .tl_set:N = \l__senses_tl,
|
||||
senses .initial:n = \defaultsensesname,
|
||||
senses .value_required:n = true,
|
||||
languages .tl_set:N = \l__languages_tl,
|
||||
languages .initial:n = ---,
|
||||
languages .value_required:n = true,
|
||||
challenge .tl_set:N = \l__challenge_tl,
|
||||
challenge .initial:n = 1,
|
||||
challenge .value_required:n = true,
|
||||
proficiency-bonus .tl_set:N = \l__proficiency_tl,
|
||||
proficiency-bonus .value_required:n = false,
|
||||
proficiency-bonus .default:n = *,
|
||||
proficiencybonus .meta:n = { proficiency-bonus = {#1} },
|
||||
}
|
||||
|
||||
\cs_new_protected_nopar:Npn \__rpg_monster_details:
|
||||
{
|
||||
\begin {__rpg_monster_attributes}
|
||||
\__rpg_if_monster_attribute:nn {\l__saving_throws_tl} {\savesname}
|
||||
\__rpg_if_monster_attribute:nn {\l__skills_tl} {\skillsname}
|
||||
\__rpg_if_monster_attribute:nn {\l__damage_vulnerabilities_tl} {\dvulname}
|
||||
\__rpg_if_monster_attribute:nn {\l__damage_resistances_tl} {\dresname}
|
||||
\__rpg_if_monster_attribute:nn {\l__damage_immunities_tl} {\dimmname}
|
||||
\__rpg_if_monster_attribute:nn {\l__condition_immunities_tl} {\cimmname}
|
||||
\item [\sensesname] \l__senses_tl
|
||||
\item [\languagesname] \l__languages_tl
|
||||
\item [\challengename] \__rpg_cr_xp:N {\l__challenge_tl}
|
||||
\tl_if_empty:NF {\l__proficiency_tl}
|
||||
{
|
||||
{\enit@svlabel{\enit@format{\pbonname}}}
|
||||
\hskip \labelsep
|
||||
\str_if_eq:VnTF \l__proficiency_tl *
|
||||
{\__rpg_cr_pb:N {\l__challenge_tl}}
|
||||
{\l__proficiency_tl}
|
||||
}
|
||||
\end {__rpg_monster_attributes}
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgMonsterDetails} {o}
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set:nn { rpg / monster / details } {#1}
|
||||
\RpgMonsterLine{}
|
||||
\__rpg_monster_details:
|
||||
\RpgMonsterLine{}
|
||||
\group_end:
|
||||
}
|
||||
|
||||
%% Ability scores
|
||||
% Print ability score stats with auto-computed modifier
|
||||
% e.g. \stat{12} prints "12 (+1)"
|
||||
\cs_new_protected_nopar:Npn \__rpg_ability_score_modifier:N #1
|
||||
{
|
||||
\regex_match:NnTF \c__pos_int_regex {#1}
|
||||
{
|
||||
\int_set:Nn \l_tmpa_int { \fp_eval:n { floor ( ( #1 - 10 ) / 2 ) } }
|
||||
|
||||
#1 ~ (
|
||||
\int_compare:nNnTF {\l_tmpa_int} < {0}
|
||||
{ -- }
|
||||
{+}
|
||||
\int_abs:n \l_tmpa_int )
|
||||
}
|
||||
{#1}
|
||||
}
|
||||
|
||||
\keys_define:nn { rpg / monster / ability_scores }
|
||||
{
|
||||
str .tl_set:N = \l__str_tl,
|
||||
str .initial:n = 10,
|
||||
str .value_required:n = true,
|
||||
STR .meta:n = { str = #1 },
|
||||
dex .tl_set:N = \l__dex_tl,
|
||||
dex .initial:n = 10,
|
||||
dex .value_required:n = true,
|
||||
DEX .meta:n = { dex = #1 },
|
||||
con .tl_set:N = \l__con_tl,
|
||||
con .initial:n = 10,
|
||||
con .value_required:n = true,
|
||||
CON .meta:n = { con = #1 },
|
||||
int .tl_set:N = \l__int_tl,
|
||||
int .initial:n = 10,
|
||||
int .value_required:n = true,
|
||||
INT .meta:n = { int = #1 },
|
||||
wis .tl_set:N = \l__wis_tl,
|
||||
wis .initial:n = 10,
|
||||
wis .value_required:n = true,
|
||||
WIS .meta:n = { wis = #1 },
|
||||
cha .tl_set:N = \l__cha_tl,
|
||||
cha .initial:n = 10,
|
||||
cha .value_required:n = true,
|
||||
CHA .meta:n = { cha = #1 },
|
||||
}
|
||||
|
||||
% Ability scores in a table
|
||||
\cs_new_protected_nopar:Npn \__rpg_monster_ability_scores:
|
||||
{
|
||||
\color {titlered}
|
||||
\par \vspace{1pt} \noindent
|
||||
\begin{tabularx} {\linewidth} {YYYYYY}
|
||||
\rule {0pt} {3.7mm} % adds space between hline and table
|
||||
\textbf {\strstatname} &
|
||||
\textbf {\dexstatname} &
|
||||
\textbf {\constatname} &
|
||||
\textbf {\intstatname} &
|
||||
\textbf {\wisstatname} &
|
||||
\textbf {\chastatname} \\
|
||||
\exp_args:NV \__rpg_ability_score_modifier:N \l__str_tl &
|
||||
\exp_args:NV \__rpg_ability_score_modifier:N \l__dex_tl &
|
||||
\exp_args:NV \__rpg_ability_score_modifier:N \l__con_tl &
|
||||
\exp_args:NV \__rpg_ability_score_modifier:N \l__int_tl &
|
||||
\exp_args:NV \__rpg_ability_score_modifier:N \l__wis_tl &
|
||||
\exp_args:NV \__rpg_ability_score_modifier:N \l__cha_tl
|
||||
\end{tabularx}
|
||||
|
||||
\par \vspace{4pt}%
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgMonsterAbilityScores} {o}
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set:nn { rpg / monster / ability_scores } {#1}
|
||||
\__rpg_monster_ability_scores:
|
||||
\group_end:
|
||||
}
|
||||
|
||||
% Inline header for monster actions - similar to a paragraph
|
||||
\NewDocumentCommand {\RpgMonsterAction} {m}
|
||||
{ \par \smallskip \noindent \textsl { \textbf {#1.} } }
|
||||
|
||||
% Inline header for monster sub actions - similar to a subparagraph
|
||||
\NewDocumentCommand {\RpgMonsterSubAction} {m}
|
||||
{ \par \textsl { \textbf {#1.} } }
|
||||
|
||||
% Monster subsection header style
|
||||
\NewDocumentCommand {\RpgMonsterSection} {m}
|
||||
{
|
||||
\addvspace{6pt plus 2pt minus 2pt} \noindent
|
||||
\group_begin:
|
||||
\RpgFontStatBlockSection #1\nopagebreak[4]
|
||||
% \rule is a horizontal command, so placing it under the title incurs extra
|
||||
% line spacing. Use \hrule (a vertical command) instead.
|
||||
\vspace {2pt}\nopagebreak[4]
|
||||
\hrule height 0.6pt
|
||||
\group_end:
|
||||
\par \vspace{5pt}
|
||||
\noindent \ignorespaces
|
||||
}
|
||||
|
||||
% Spellcasting levels
|
||||
\newlist {RpgMonsterSpells} {description} {1}
|
||||
\setlist [RpgMonsterSpells]
|
||||
{
|
||||
font = \normalfont \RpgFontStatBlockBody,
|
||||
labelsep = \l__rpg_space_dim,
|
||||
noitemsep,
|
||||
topsep = 6pt plus 2pt minus 2pt,
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgEmphSpellString} {m}
|
||||
{
|
||||
\group_begin:
|
||||
\seq_set_from_clist:Nn \l_tmpa_seq {#1}
|
||||
\seq_set_map:NNn \l_tmpb_seq \l_tmpa_seq { \exp_not:n { \emph {##1} } }
|
||||
\seq_use:Nn \l_tmpb_seq { ,~ }
|
||||
\group_end:
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgInnateSpellLevel} { O {\innateatwillname} m }
|
||||
{
|
||||
\item
|
||||
[
|
||||
\regex_match:NnTF \c__pos_int_regex {#1}
|
||||
{
|
||||
\str_if_in:NnTF {#2} {,}
|
||||
{ \__rpg_caption:nn {\numberperdayeachname} {#1} }
|
||||
{ \__rpg_caption:nn {\numberperdayname} {#1} }
|
||||
}
|
||||
{#1}
|
||||
:
|
||||
]
|
||||
\RpgEmphSpellString {#2}
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgMonsterSpellLevel} { O{\spellcantripsname} O{\spellatwillname} m }
|
||||
{
|
||||
\item
|
||||
[
|
||||
\str_case_e:nnF {#1}
|
||||
{
|
||||
{1} {\spellfirstlevelname}
|
||||
{2} {\spellsecondlevelname}
|
||||
{3} {\spellthirdlevelname}
|
||||
{4} {\spellfourthlevelname}
|
||||
{5} {\spellfifthlevelname}
|
||||
{6} {\spellsixthlevelname}
|
||||
{7} {\spellseventhlevelname}
|
||||
{8} {\spelleighthlevelname}
|
||||
{9} {\spellninthlevelname}
|
||||
}
|
||||
{#1}
|
||||
{~}(
|
||||
\str_case_e:nnF {#2}
|
||||
{
|
||||
{1} {\spelloneslotname}
|
||||
{2} {\spelltwoslotsname}
|
||||
{3} {\spellthreeslotsname}
|
||||
{4} {\spellfourslotsname}
|
||||
}
|
||||
{#2}
|
||||
) :
|
||||
]
|
||||
\RpgEmphSpellString{#3}
|
||||
}
|
||||
|
||||
%% Monster attacks
|
||||
\tl_new:N \l__rpg_attack_distance_tl
|
||||
\tl_new:N \l__rpg_attack_type_tl
|
||||
|
||||
\keys_define:nn { rpg / monster / attack }
|
||||
{
|
||||
name .tl_set:N = \l__name_tl,
|
||||
name .value_required:n = true,
|
||||
distance .choice:,
|
||||
distance .choices:nn =
|
||||
{ both, melee, ranged }
|
||||
{ \tl_set:Nn \l__rpg_attack_distance_tl {\l_keys_choice_tl} },
|
||||
distance .initial:n = both,
|
||||
type .choice:,
|
||||
type / weapon .code:n = { \tl_set:Nn \l__rpg_attack_type_tl {\weaponname} },
|
||||
type / spell .code:n = { \tl_set:Nn \l__rpg_attack_type_tl {\spellname} },
|
||||
type .initial:n = weapon,
|
||||
mod .tl_set:N = \l__mod_tl,
|
||||
mod .value_required:n = true,
|
||||
reach .tl_set:N = \l__reach_tl,
|
||||
reach .initial:n = 5,
|
||||
reach .value_required:n = true,
|
||||
range .tl_set:N = \l__range_tl,
|
||||
range .initial:n = 20/60,
|
||||
range .value_required:n = true,
|
||||
targets .tl_set:N = \l__targets_tl,
|
||||
targets .initial:n = \defaulttargetsname,
|
||||
targets .value_required:n = true,
|
||||
dmg .tl_set:N = \l__dmg_tl,
|
||||
dmg .value_required:n = true,
|
||||
dmg-type .tl_set:N = \l__dmg_type_tl,
|
||||
dmg-type .value_required:n = true,
|
||||
plus-dmg .tl_set:N = \l__plus_dmg_tl,
|
||||
plus-dmg .value_required:n = true,
|
||||
plus-dmg-type .tl_set:N = \l__plus_dmg_type_tl,
|
||||
plus-dmg-type .value_required:n = true,
|
||||
or-dmg .tl_set:N = \l__or_dmg_tl,
|
||||
or-dmg .value_required:n = true,
|
||||
or-dmg-when .tl_set:N = \l__or_dmg_when_tl,
|
||||
or-dmg-when .value_required:n = true,
|
||||
extra .tl_set:N = \l__extra_tl,
|
||||
extra .value_required:n = true,
|
||||
}
|
||||
|
||||
\cs_new_protected:Npn \__rpg_monster_reach:
|
||||
{
|
||||
\reachname\ \l__reach_tl\ \unitsname
|
||||
}
|
||||
|
||||
\cs_new_protected:Npn \__rpg_monster_range:
|
||||
{
|
||||
\rangename\ \l__range_tl\ \unitsname
|
||||
}
|
||||
|
||||
\cs_new_protected:Npn \__rpg_if_plus_dmg:
|
||||
{
|
||||
\tl_if_empty:NF {\l__plus_dmg_tl}
|
||||
{ ~ \plusname\ \l__plus_dmg_tl\ \l__plus_dmg_type_tl\ \damagename }
|
||||
}
|
||||
|
||||
\cs_new_protected_nopar:Npn \__rpg_if_or_dmg:
|
||||
{
|
||||
\tl_if_empty:NF {\l__or_dmg_tl}
|
||||
{
|
||||
, ~ \orname\ \l__or_dmg_tl\ \l__dmg_type_tl\ \damagename\ \l__or_dmg_when_tl
|
||||
|
||||
\tl_if_empty:NF {\l__plus_dmg_tl}
|
||||
{,}
|
||||
}
|
||||
}
|
||||
|
||||
\cs_new_protected:Npn \__rpg_monster_attack:
|
||||
{
|
||||
\__rpg_check_for_key:Nnn \l__name_tl {\RpgMonsterAttack} {name}
|
||||
\__rpg_check_for_key:Nnn \l__mod_tl {\RpgMonsterAttack} {mod}
|
||||
|
||||
\begin{RpgMonsterAction} {\l__name_tl}~
|
||||
|
||||
\str_case_e:nnF {\l__rpg_attack_distance_tl}
|
||||
{
|
||||
{ melee }
|
||||
{
|
||||
\textit{ \__rpg_caption:nn {\meleeattackname} {\l__rpg_attack_type_tl} : } ~ \__rpg_caption:nn {\tohitname} {\l__mod_tl}, ~ \__rpg_monster_reach:
|
||||
}
|
||||
{ ranged }
|
||||
{
|
||||
\textit{ \__rpg_caption:nn {\rangedattackname} {\l__rpg_attack_type_tl} : } ~ \__rpg_caption:nn {\tohitname} {\l__mod_tl}, ~ \__rpg_monster_range:
|
||||
}
|
||||
}
|
||||
{% Melee and Ranged is the default
|
||||
\textit{ \__rpg_caption:nn {\meleeorrangedattackname} {\l__rpg_attack_type_tl} : } ~ \__rpg_caption:nn {\tohitname} {\l__mod_tl}, ~ \__rpg_monster_reach:\ \orname\ \__rpg_monster_range:
|
||||
}
|
||||
, ~ \l__targets_tl. ~
|
||||
\textit { \hitname : } ~
|
||||
|
||||
\str_if_empty:NF {\l__dmg_tl} % Don't show any damage if `dmg' is not set.
|
||||
{
|
||||
\l__dmg_tl\ \l__dmg_type_tl\ \damagename
|
||||
\__rpg_if_or_dmg:
|
||||
\__rpg_if_plus_dmg:
|
||||
}
|
||||
|
||||
% `extra' is any special text that goes after the final damage; do not
|
||||
% include the final full stop.
|
||||
\l__extra_tl .
|
||||
\end{RpgMonsterAction}
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgMonsterAttack} {o}
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set:nn { rpg / monster / attack } {#1}
|
||||
\__rpg_monster_attack:
|
||||
\group_end:
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgMonsterMelee} {o}
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set:nn { rpg / monster / attack } { #1, distance = melee }
|
||||
\__rpg_monster_attack:
|
||||
\group_end:
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgMonsterRanged} {o}
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set:nn { rpg / monster / attack } { #1, distance = ranged }
|
||||
\__rpg_monster_attack:
|
||||
\group_end:
|
||||
}
|
||||
|
||||
%% Legendary Actions
|
||||
|
||||
\newlist {RpgMonsterLegendaryActions} {description} {1}
|
||||
\setlist [RpgMonsterLegendaryActions]
|
||||
{
|
||||
font = \RpgFontStatBlockBody,
|
||||
labelsep = \l__rpg_space_dim,
|
||||
noitemsep,
|
||||
topsep = 6pt plus 2pt minus 2pt,
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgMonsterLegendaryAction} { m m }
|
||||
{
|
||||
\item [ #1 . ] #2
|
||||
}
|
||||
|
80
lib/rpgreadaloud.sty
Normal file
80
lib/rpgreadaloud.sty
Normal file
@ -0,0 +1,80 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Environment for read-aloud text.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Standard for every read-aloud text
|
||||
\DeclareTColorBox {__rpg_read_aloud} {o}
|
||||
{
|
||||
before~upper =
|
||||
{
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\bool_if:NF \l__rpg_justified_bool
|
||||
{\RaggedRight}
|
||||
}
|
||||
},
|
||||
code = {\linespread {1.1} },
|
||||
enhanced~jigsaw,
|
||||
frame~hidden,
|
||||
boxrule = 0pt,
|
||||
breakable,
|
||||
enhanced,
|
||||
before~skip = 13pt plus 4pt minus 4pt,
|
||||
boxsep = 8pt,
|
||||
top = 0pt,
|
||||
left = 0pt,
|
||||
right = 0pt,
|
||||
bottom = 0pt,
|
||||
sharp~corners,
|
||||
parbox = false,
|
||||
borderline~west = {1pt} {-0.5pt} {titlered},
|
||||
borderline~east = {1pt} {-0.5pt} {titlered},
|
||||
fontupper = \RpgFontReadAloud,
|
||||
fontlower = \RpgFontReadAloud,
|
||||
overlay =
|
||||
{
|
||||
\foreach\n ~ in ~ { north~east, north~west, south~east, south~west }
|
||||
{\draw [ titlered, fill = titlered ] ( frame.\n ) circle (1.5pt); };
|
||||
},
|
||||
after~skip = 13pt plus 4pt minus 4pt,
|
||||
#1,
|
||||
}
|
||||
|
||||
% Extra key for controlling the color of the title and the background
|
||||
\keys_define:nn { rpg / read_aloud }
|
||||
{
|
||||
color .tl_set:N = \l__rpg_read_aloud_color_tl,
|
||||
color .initial:n = readaloudcolor,
|
||||
color .value_required:n = true,
|
||||
}
|
||||
|
||||
% This function, through its variant, forces the expansion of the tcb keys
|
||||
% passed to the environment by the user before it invokes the tcolorbox
|
||||
\cs_new_protected:Nn \__rpg_start_read_aloud:nn
|
||||
{
|
||||
\begin {__rpg_read_aloud} [ #1, #2 ]
|
||||
}
|
||||
|
||||
\cs_generate_variant:Nn \__rpg_start_read_aloud:nn { nV }
|
||||
|
||||
% The RpgReadAloud environment
|
||||
% #1 - keys. We handle the custom color key before passing other keys on
|
||||
\NewDocumentEnvironment {RpgReadAloud} {o}
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set_known:nnN { rpg / read_aloud } {#1} \l_tmpa_tl
|
||||
|
||||
\str_if_eq:VnT \l_tmpa_tl { -NoValue- }
|
||||
{ \tl_set_eq:NN \l_tmpa_tl \c_empty_tl }
|
||||
|
||||
\__rpg_start_read_aloud:nV
|
||||
{
|
||||
colback = \l__rpg_read_aloud_color_tl,
|
||||
}
|
||||
{\l_tmpa_tl}
|
||||
}
|
||||
{
|
||||
\end {__rpg_read_aloud}
|
||||
\group_end:
|
||||
}
|
244
lib/rpgsections.sty
Normal file
244
lib/rpgsections.sty
Normal file
@ -0,0 +1,244 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
% Change part numbering to Arabic numbers from Roman numerals
|
||||
\renewcommand{\thepart}{\arabic{part}}
|
||||
|
||||
% Set spacing around floats
|
||||
\setlength{\textfloatsep}{11pt plus 4pt minus 4pt}
|
||||
\setlength{\intextsep}{11pt plus 4pt minus 4pt}
|
||||
\setlength{\dbltextfloatsep}{11pt plus 4pt minus 4pt}
|
||||
|
||||
% Remove Numbering (If you want Numbering set secnumdepth to the appropriate depth)
|
||||
\setcounter{secnumdepth}{0}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Section formatting
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Part
|
||||
\titleformat {\part}
|
||||
[display]
|
||||
{ \centering \RpgFontPart } % format
|
||||
{ \RpgContour{\partname\ \thepart} } % label
|
||||
{ 2ex } % sep
|
||||
{ \RpgContour } % before-code
|
||||
|
||||
% Chapter
|
||||
\titleformat {\chapter}
|
||||
{ \RpgFontChapter } % format
|
||||
{ \RpgContour{\chaptertitlename\ \thechapter :} } % label
|
||||
{ \wordsep } % sep
|
||||
{ \RpgContour } % before-code
|
||||
|
||||
\titlespacing* {\chapter}
|
||||
{ 0pt } % left
|
||||
{ .3ex } % before-sep
|
||||
{ 2.8ex } % after-sep
|
||||
|
||||
% Section
|
||||
\titleformat {\section}
|
||||
{ \RpgFontSection } % format
|
||||
{ \thesection } % label
|
||||
{ 1em } % sep
|
||||
{ \nopagebreak } % before-code
|
||||
|
||||
\titlespacing* { \section }
|
||||
{ 0pt } % left
|
||||
{ 1.3ex plus .43ex minus .43ex } % before-sep
|
||||
{ 0pt } % after-sep
|
||||
|
||||
% Subsection
|
||||
\titleformat {\subsection}
|
||||
{ \RpgFontSubsection } % format
|
||||
{ \thesubsection } % label
|
||||
{ 1em } % sep
|
||||
{ \nopagebreak } % before-code
|
||||
[ \vspace{-.3ex} \titleline{ \color{titlegold} \titlerule[1pt] } ] % after-code
|
||||
|
||||
\titlespacing*{ \subsection }
|
||||
{ 0pt } % left
|
||||
{ 1.4ex plus .47ex minus .47ex } % before-sep
|
||||
{ 1.2ex } % after-sep
|
||||
|
||||
% Subsubsection
|
||||
\titleformat {\subsubsection}
|
||||
{ \RpgFontSubsubsection } % format
|
||||
{ \thesubsubsection } % label
|
||||
{ 1em } % sep
|
||||
{ \nopagebreak } % before-code
|
||||
|
||||
\titlespacing* { \subsubsection }
|
||||
{ 0pt } % left
|
||||
{ 2ex plus .67ex minus .67ex } % before-sep
|
||||
{ .2ex } % after-sep
|
||||
|
||||
% Paragraph
|
||||
\titleformat {\paragraph} [runin]
|
||||
{ \RpgFontParagraph } % format
|
||||
{ \theparagraph \quad } % label
|
||||
{0pt} % sep
|
||||
{} % before-code
|
||||
[.] % after-code
|
||||
|
||||
\titlespacing* {\paragraph}
|
||||
{0pt} % left
|
||||
{\parskip} % before-sep
|
||||
{\wordsep} % after-sep
|
||||
|
||||
% Subparagraph
|
||||
\titleformat {\subparagraph} [runin]
|
||||
{ \RpgFontSubaragraph } % format
|
||||
{ \thesubparagraph \quad } % label
|
||||
{0pt} % sep
|
||||
{} % before-code
|
||||
[.] % after-code
|
||||
|
||||
\titlespacing* {\subparagraph}
|
||||
{\parindent} % left
|
||||
{\parskip} % before-sep
|
||||
{\wordsep} % after-sep
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Special command for magic items, traps, and the like.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\NewDocumentCommand {\RpgFeatHeader} { m o }
|
||||
{
|
||||
\subsection {#1}
|
||||
\IfValueT{#2}
|
||||
{
|
||||
\textit {#2}
|
||||
\par \vspace{3pt} \noindent \ignorespaces
|
||||
}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Special command for magic items, traps, and the like.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\NewDocumentCommand {\RpgItemHeader} { m m }
|
||||
{
|
||||
\subsubsection {#1}
|
||||
\textit {#2}
|
||||
\par \vspace{3pt} \noindent \ignorespaces
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Special command for spells.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% #1 - Name
|
||||
% #2 - Level and school
|
||||
% #3 - Casting time
|
||||
% #4 - Range
|
||||
% #5 - Components
|
||||
% #6 - Duration
|
||||
\NewDocumentCommand {\RpgSpellHeader} { m m m m m m }
|
||||
{
|
||||
\RpgItemHeader {#1} {#2}
|
||||
|
||||
\begin{description}
|
||||
[
|
||||
nosep,
|
||||
labelsep = \l__rpg_space_dim,
|
||||
after = { \vspace{4pt plus 1pt minus 1pt} },
|
||||
]
|
||||
\item [ \spellcastingtimename : ] #3
|
||||
\item [ \spellrangename : ] #4
|
||||
\item [ \spellcomponentsname : ] #5
|
||||
\item [ \spelldurationname : ] #6
|
||||
\end{description}
|
||||
}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Map Areas and their References
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
\tl_new:N \l__rpg_area_num_depth_tl
|
||||
|
||||
% Options
|
||||
\keys_define:nn { rpg / areas }
|
||||
{
|
||||
area-label .tl_set:N = \l__rpg_area_label_tl,
|
||||
area-label .initial:n = area,
|
||||
area-label .value_required:n = true,
|
||||
sub-area-label .tl_set:N = \l__rpg_sub_area_label_tl,
|
||||
sub-area-label .initial:n = subarea,
|
||||
sub-area-label .value_required:n = true,
|
||||
region .tl_set:N = \l__rpg_region_tl,
|
||||
region .value_required:n = true,
|
||||
area-num-depth .choice:,
|
||||
area-num-depth .choices:nn =
|
||||
{ 1, 2, 3, 4 }
|
||||
{ \tl_set:Nn \l__rpg_area_num_depth_tl {\l_keys_choice_tl} },
|
||||
area-num-depth .initial:n = 2, % subsection
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgSetAreaOptions} {o}
|
||||
{
|
||||
\keys_set:nn { rpg / areas } { #1 }
|
||||
}
|
||||
|
||||
% Counters
|
||||
\newcounter {RpgAreaCounter}
|
||||
|
||||
\NewDocumentCommand {\RpgResetAreas} {}
|
||||
{
|
||||
\setcounter {RpgAreaCounter} {0}
|
||||
}
|
||||
|
||||
\newcounter {RpgSubAreaCounter} [RpgAreaCounter]
|
||||
|
||||
% sub area references should be '5a', '5b', not '51', '52'
|
||||
\renewcommand \p@RpgSubAreaCounter { \arabic {RpgAreaCounter} }
|
||||
\renewcommand \theRpgSubAreaCounter { \alph {RpgSubAreaCounter} }
|
||||
|
||||
% Functions to create an area including text and label
|
||||
\NewDocumentCommand {\RpgArea} {m}
|
||||
{
|
||||
\refstepcounter {RpgAreaCounter}
|
||||
\label { \l__rpg_region_tl \l__rpg_area_label_tl :#1 }
|
||||
|
||||
\tl_set:Nn \l_tmpa_tl { \l__rpg_region_tl \arabic {RpgAreaCounter} . ~ #1 }
|
||||
|
||||
\str_case_e:nn {\l__rpg_area_num_depth_tl}
|
||||
{
|
||||
{1} { \section {\l_tmpa_tl} }
|
||||
{2} { \subsection {\l_tmpa_tl} }
|
||||
{3} { \subsubsection {\l_tmpa_tl} }
|
||||
{4} { \paragraph {\l_tmpa_tl} }
|
||||
}
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgSubArea} {m}
|
||||
{
|
||||
\refstepcounter {RpgSubAreaCounter}
|
||||
\label { \l__rpg_region_tl \l__rpg_sub_area_label_tl : #1 }
|
||||
|
||||
\tl_set:Nn \l_tmpa_tl { \l__rpg_region_tl \arabic {RpgAreaCounter} \alph {RpgSubAreaCounter} . ~ #1 }
|
||||
|
||||
\str_case_e:nn {\l__rpg_area_num_depth_tl}
|
||||
{
|
||||
{1} { \subsection {\l_tmpa_tl} }
|
||||
{2} { \subsubsection {\l_tmpa_tl} }
|
||||
{3} { \paragraph {\l_tmpa_tl} }
|
||||
{4} { \subparagraph {\l_tmpa_tl} }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
% Functions to reference a label
|
||||
\NewDocumentCommand {\RpgAreaRef} { o m }
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set:nn { rpg / areas } {#1} % Temp set keys to reference other regions
|
||||
#2 ~ ( \pageabbreviationname\ \pageref { \l__rpg_region_tl \l__rpg_area_label_tl : #2 } )
|
||||
\group_end:
|
||||
}
|
||||
|
||||
\NewDocumentCommand {\RpgSubAreaRef} { o m }
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set:nn { rpg / areas } { #1 } % Temp set keys to reference other regions
|
||||
#2 ~ ( \pageabbreviationname\ \pageref { \l__rpg_region_tl \l__rpg_sub_area_label_tl : #2 } )
|
||||
\group_end:
|
||||
}
|
87
lib/rpgsidebar.sty
Normal file
87
lib/rpgsidebar.sty
Normal file
@ -0,0 +1,87 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Environment for sidebars.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Standard for every sidebar
|
||||
\DeclareTColorBox {__rpg_sidebar} {o}
|
||||
{
|
||||
before~upper =
|
||||
{
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\bool_if:NF \l__rpg_justified_bool
|
||||
{\RaggedRight}
|
||||
}
|
||||
},
|
||||
code={\linespread{.9}},
|
||||
frame~hidden,
|
||||
boxrule = 0pt,
|
||||
enhanced,
|
||||
before~skip = 13pt plus 4pt minus 4pt,
|
||||
toptitle = 2pt,
|
||||
boxsep = 3pt,
|
||||
left = 6pt,
|
||||
right = 6pt,
|
||||
top = 0pt,
|
||||
bottom = 2pt,
|
||||
fonttitle = \RpgFontSidebarTitle,
|
||||
fontupper = \RpgFontSidebarBody,
|
||||
fontlower = \RpgFontSidebarBody,
|
||||
sharp~corners,
|
||||
parbox = false,
|
||||
borderline~north = {1pt} {-0.5pt} {black},
|
||||
borderline~south = {1pt} {-0.5pt} {black},
|
||||
coltitle = black,
|
||||
fuzzy~shadow = {0mm} {-3.5pt} {-0.5pt} {0.4mm} {black!60!white},
|
||||
overlay =
|
||||
{
|
||||
\fill [black] ( frame.south~west ) -- ++ ( 7pt, 0 ) -- ++ ( 0, -5pt ) -- cycle;
|
||||
\fill [black] ( frame.north~west ) -- ++ ( 7pt, 0 ) -- ++ ( 0, 5pt ) -- cycle;
|
||||
\fill [black] ( frame.north~east ) -- ++ ( -7pt, 0 ) -- ++ ( 0, 5pt ) -- cycle;
|
||||
\fill [black] ( frame.south~east ) -- ++ ( -7pt, 0 ) -- ++ ( 0, -5pt ) -- cycle;
|
||||
},
|
||||
after~skip = 14pt plus 4pt minus 4pt,
|
||||
#1,
|
||||
}
|
||||
|
||||
% Extra key for controlling the color of the title and the background
|
||||
\keys_define:nn { rpg / sidebar }
|
||||
{
|
||||
color .tl_set:N = \l__rpg_sidebar_color_tl,
|
||||
color .initial:n = sidebarcolor,
|
||||
color .value_required:n = true,
|
||||
}
|
||||
|
||||
% This function, through its variant, forces the expansion of the tcb keys
|
||||
% passed to the environment by the user before it invokes the tcolorbox
|
||||
\cs_new_protected:Nn \__rpg_start_sidebar:nn
|
||||
{
|
||||
\begin {__rpg_sidebar} [ #1, #2 ]
|
||||
}
|
||||
|
||||
\cs_generate_variant:Nn \__rpg_start_sidebar:nn { nV }
|
||||
|
||||
% The RpgSidebar environment
|
||||
% #1 - keys. We handle the custom color key before passing other keys on
|
||||
% #2 - title.
|
||||
\NewDocumentEnvironment {RpgSidebar} { o m }
|
||||
{
|
||||
\group_begin:
|
||||
\keys_set_known:nnN { rpg / sidebar } {#1} \l_tmpa_tl
|
||||
|
||||
\str_if_eq:VnT \l_tmpa_tl { -NoValue- }
|
||||
{ \tl_set_eq:NN \l_tmpa_tl \c_empty_tl }
|
||||
|
||||
\__rpg_start_sidebar:nV
|
||||
{
|
||||
colback = \l__rpg_sidebar_color_tl,
|
||||
colbacktitle = \l__rpg_sidebar_color_tl,
|
||||
title = {#2},
|
||||
}
|
||||
{\l_tmpa_tl}
|
||||
}
|
||||
{
|
||||
\end {__rpg_sidebar}
|
||||
\group_end:
|
||||
}
|
143
lib/rpgstrings.sty
Executable file
143
lib/rpgstrings.sty
Executable file
@ -0,0 +1,143 @@
|
||||
\ExplSyntaxOn % Use tilde (~) for spaces.
|
||||
|
||||
% \addto\captions<language> cannot handle macros with parameters
|
||||
% We need to make our own parameters
|
||||
% |1| represents parameter 1
|
||||
|
||||
\cs_new_protected:Npn \__rpg_caption:nn #1#2
|
||||
{
|
||||
\group_begin:
|
||||
\str_set:Nx \l_tmpa_str { #1 }
|
||||
\str_set:Nx \l_tmpb_str { #2 }
|
||||
\exp_args:NNnx \str_replace_all:Nnn \l_tmpa_str { |1| } { #2 }
|
||||
\str_use:N \l_tmpa_str
|
||||
\group_end:
|
||||
}
|
||||
|
||||
% Document-level version for backwards compatibility
|
||||
\NewDocumentCommand{\RpgCaption}{ m m }
|
||||
{ \__rpg_caption:nn {#1} {#2} }
|
||||
|
||||
% Define all strings as new macros instead of hardcoding them in the
|
||||
% TeX files. This then allows us to add captions for multilanguage support.
|
||||
|
||||
% If you add or update a caption here, add it to languages/_template.sty
|
||||
% as well.
|
||||
|
||||
%% Monster
|
||||
% Basics
|
||||
\newcommand\armorclassname{Armor~Class}
|
||||
\newcommand\hitpointsname{Hit~Points}
|
||||
\newcommand\speedname{Speed}
|
||||
|
||||
% Ability Scores
|
||||
\newcommand\strstatname{STR}
|
||||
\newcommand\dexstatname{DEX}
|
||||
\newcommand\constatname{CON}
|
||||
\newcommand\intstatname{INT}
|
||||
\newcommand\wisstatname{WIS}
|
||||
\newcommand\chastatname{CHA}
|
||||
|
||||
% Details
|
||||
\newcommand\skillsname{Skills}
|
||||
\newcommand\dimmname{Damage~Immunities}
|
||||
\newcommand\dvulname{Damage~Vulnerabilities}
|
||||
\newcommand\dresname{Damage~Resistances}
|
||||
\newcommand\cimmname{Condition~Immunities}
|
||||
\newcommand\savesname{Saving~Throws}
|
||||
\newcommand\sensesname{Senses}
|
||||
\newcommand\defaultsensesname{passive~Perception~10}
|
||||
\newcommand\languagesname{Languages}
|
||||
\newcommand\challengename{Challenge}
|
||||
\newcommand\pbonname{Proficiency~Bonus}
|
||||
\newcommand\xpname{XP}
|
||||
|
||||
% Attacks
|
||||
\newcommand\unitsname{ft.}
|
||||
\newcommand\weaponname{Weapon}
|
||||
\newcommand\spellname{Spell}
|
||||
\newcommand\meleeattackname{Melee~|1|~Attack}
|
||||
\newcommand\rangedattackname{Ranged~|1|~Attack}
|
||||
\newcommand\meleeorrangedattackname{Melee~or~Ranged~|1|~Attack}
|
||||
\newcommand\orname{or}
|
||||
\newcommand\tohitname{|1|~to~hit}
|
||||
\newcommand\defaulttargetsname{one~target}
|
||||
\newcommand\reachname{reach}
|
||||
\newcommand\rangename{range}
|
||||
\newcommand\hitname{Hit}
|
||||
\newcommand\damagename{damage}
|
||||
\newcommand\plusname{plus}
|
||||
|
||||
% Spell Levels
|
||||
\newcommand\spellcantripsname{Cantrips}
|
||||
\newcommand\spellfirstlevelname{1st~level}
|
||||
\newcommand\spellsecondlevelname{2nd~level}
|
||||
\newcommand\spellthirdlevelname{3rd~level}
|
||||
\newcommand\spellfourthlevelname{4th~level}
|
||||
\newcommand\spellfifthlevelname{5th~level}
|
||||
\newcommand\spellsixthlevelname{6th~level}
|
||||
\newcommand\spellseventhlevelname{7th~level}
|
||||
\newcommand\spelleighthlevelname{8th~level}
|
||||
\newcommand\spellninthlevelname{9th~level}
|
||||
|
||||
% Spell Slots
|
||||
\newcommand\spellatwillname{at~will}
|
||||
\newcommand\spelloneslotname{1~slot}
|
||||
\newcommand\spelltwoslotsname{2~slots}
|
||||
\newcommand\spellthreeslotsname{3~slots}
|
||||
\newcommand\spellfourslotsname{4~slots}
|
||||
|
||||
% Innate spellcasting
|
||||
\newcommand\innateatwillname{At~will}
|
||||
\newcommand\numberperdayname{|1|/day}
|
||||
\newcommand\numberperdayeachname{|1|/day~each}
|
||||
|
||||
% Spell Header
|
||||
\newcommand\spellcastingtimename{Casting~Time}
|
||||
\newcommand\spellrangename{Range}
|
||||
\newcommand\spellcomponentsname{Components}
|
||||
\newcommand\spelldurationname{Duration}
|
||||
|
||||
% Miscellaneous
|
||||
\newcommand\pageabbreviationname{pg.}
|
||||
\newcommand\dname{d}
|
||||
\newcommand\tocchapterabbreviationname{Ch.}
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Adding languages
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% To add captions for other languages:
|
||||
% 1. Copy and paste languages/_template.sty to languages/<language>.sty
|
||||
% 2. Substitute the <language> token in the file with the language name
|
||||
% (i.e. \addto\captionsfrench).
|
||||
% 3. Replace the English strings with the translations and comment any captions
|
||||
% that you do not translate. Please keep the captions in the same order.
|
||||
% 4. Add \RequirePackage{lib/languages/<language>} to the following function.
|
||||
\cs_new_protected_nopar:Npn \__rpg_input_languages:
|
||||
{
|
||||
\RequirePackage{lib/languages/italian}
|
||||
\RequirePackage{lib/languages/japanese} % Requires LuaTeX or XeTeX
|
||||
\RequirePackage{lib/languages/ngerman}
|
||||
\RequirePackage{lib/languages/russian}
|
||||
\RequirePackage{lib/languages/spanish}
|
||||
\RequirePackage{lib/languages/french}
|
||||
\RequirePackage{lib/languages/portuguese}
|
||||
}
|
||||
|
||||
% Delay loading captions until after the user has imported a language package.
|
||||
% Enables using babel/polyglossia with the rpgbook document class as well as the
|
||||
% rpg package.
|
||||
%
|
||||
% Both language packages use \AtBeginDocument. Use \AtEndPreamble (etoolbox)
|
||||
% instead to side-step load order issues.
|
||||
\AtEndPreamble{
|
||||
% Check if either babel or polyglossia have been loaded,
|
||||
% in which case load the string captions
|
||||
\@ifpackageloaded{babel}{
|
||||
\__rpg_input_languages:
|
||||
}{}
|
||||
\@ifpackageloaded{polyglossia}{
|
||||
\__rpg_input_languages:
|
||||
}{}
|
||||
}
|
66
lib/rpgtable.sty
Normal file
66
lib/rpgtable.sty
Normal file
@ -0,0 +1,66 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
% Special Columns
|
||||
\newcolumntype {Y} { > {\centering\arraybackslash } X }
|
||||
\newcolumntype {`} { > {\global\let\currentrowstyle\relax } }
|
||||
\newcolumntype {^} { > {\currentrowstyle} }
|
||||
|
||||
% Matches {, }, >, , and any other character
|
||||
\regex_const:Nn \c__preamble_regex {>\s*{.*}\s*\S|\S}
|
||||
|
||||
\newcommand{\rowstyle}[1]
|
||||
{
|
||||
\gdef\currentrowstyle{#1}#1\ignorespaces
|
||||
}
|
||||
|
||||
% Table options
|
||||
\keys_define:nn { rpg / table }
|
||||
{
|
||||
color .tl_set:N = \l__rpg_table_color_tl,
|
||||
color .initial:n = tablecolor,
|
||||
color .value_required:n = true,
|
||||
header .tl_set:N = \l__rpg_table_header_tl,
|
||||
header .value_required:n = true,
|
||||
width .dim_set:N = \l__rpg_table_width_dim,
|
||||
width .value_required:n = true,
|
||||
}
|
||||
|
||||
% Table Definition
|
||||
\NewDocumentEnvironment {RpgTable} { o m }
|
||||
{
|
||||
\group_begin:
|
||||
|
||||
\dim_set:Nn \l__rpg_table_width_dim { \linewidth }
|
||||
\tl_if_novalue:nF {#1}
|
||||
{ \keys_set:nn { rpg / table } {#1} }
|
||||
|
||||
\par \vspace { 9pt plus 3pt minus 3pt } \noindent
|
||||
|
||||
\tl_if_empty:NF \l__rpg_table_header_tl
|
||||
{
|
||||
\group_begin:
|
||||
\RpgFontTableTitle \l__rpg_table_header_tl \nopagebreak
|
||||
\par \vspace{ 5pt plus 2pt minus 2pt } \noindent
|
||||
\group_end:
|
||||
}
|
||||
|
||||
\RpgFontTableBody
|
||||
|
||||
\rowcolors {1} {} {\l__rpg_table_color_tl}
|
||||
|
||||
\regex_extract_all:NnNTF \c__preamble_regex {#2} \l_tmpa_seq
|
||||
{
|
||||
\tl_set:Nn \l_tmpa_tl {\seq_use:Nn \l_tmpa_seq {^}}
|
||||
\use:x { \exp_not:n {\tabularx{\l__rpg_table_width_dim}}{`\l_tmpa_tl}}
|
||||
\rowstyle{\RpgFontTableHeader}
|
||||
}
|
||||
{
|
||||
\tabularx {\l__rpg_table_width_dim} {#2}
|
||||
}
|
||||
|
||||
}
|
||||
{
|
||||
\endtabularx \vspace { 9pt plus 3pt minus 3pt }
|
||||
|
||||
\group_end:
|
||||
}
|
37
lib/rpgtoc.sty
Normal file
37
lib/rpgtoc.sty
Normal file
@ -0,0 +1,37 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\RequirePackage{titletoc}
|
||||
|
||||
% Makes the TOC go to section depth
|
||||
\setcounter{tocdepth}{2}
|
||||
|
||||
\titlecontents{part}
|
||||
[0pt] % left
|
||||
{ \addvspace{.06in} \RpgFontTocPart } % above-code
|
||||
{\partname\ \thecontentslabel :~ } % numbered-entry-format
|
||||
{} % numberless-entry-format
|
||||
{} % filler-page-format
|
||||
[ \addvspace{-.03in} \titleline{ \color{titlegold} \titlerule[1pt] } \addvspace{.05in } ] % below-code
|
||||
|
||||
\titlecontents{chapter}
|
||||
[0pt] % left
|
||||
{ \addvspace{.1in} \RpgFontTocChapter } % above-code
|
||||
{ \tocchapapp\ \thecontentslabel :~ } % numbered-entry-format
|
||||
{} % numberless-entry-format
|
||||
{\titlerule*{.}\contentspage} % filler-page-format
|
||||
|
||||
\titlecontents{section}
|
||||
[0pt] % left
|
||||
{\RpgFontTocSection} % above-code
|
||||
{\thecontentslabel :~ } % numbered-entry-format
|
||||
{} % numberless-entry-format
|
||||
{\titlerule*{.}\contentspage} % filler-page-format
|
||||
|
||||
\newcommand\tocchapapp{\tocchapterabbreviationname}
|
||||
\g@addto@macro\appendix{%
|
||||
\addtocontents{toc}{\protect\renewcommand{\protect\@chapapp}{\appendixname}}%
|
||||
\addtocontents{toc}{\protect\renewcommand{\protect\tocchapapp}{\appendixname}}%
|
||||
}
|
||||
}
|
74
lib/rpgutility.sty
Normal file
74
lib/rpgutility.sty
Normal file
@ -0,0 +1,74 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
% Useful regex strings
|
||||
\regex_const:Nn \c__pos_int_regex { \d+ }
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% Dice macro
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Matches { # | #d# | #d# + # | #d# - # } while ignoring spaces
|
||||
\regex_const:Nn \c__valid_dice_regex { \A\s*(\d+)(?:[dD](\d+)\s*(?:([+\-])\s*(\d+))?)?\s*\Z }
|
||||
|
||||
\seq_new:N \l__dice_args_seq
|
||||
\tl_new:N \l__dice_number_tl
|
||||
\tl_new:N \l__dice_sides_tl
|
||||
\tl_new:N \l__dice_mod_sign_tl
|
||||
\tl_new:N \l__dice_mod_tl
|
||||
|
||||
\msg_new:nnn { rpg } { dice / invalid_argument } { Invalid~argument~``#1''~passed~to~\noexpand\RpgDice. }
|
||||
|
||||
\NewDocumentCommand { \RpgDice } { m }
|
||||
{
|
||||
\group_begin:
|
||||
\regex_extract_once:NnNTF { \c__valid_dice_regex } { #1 } \l__dice_args_seq
|
||||
{
|
||||
\seq_pop_left:NN \l__dice_args_seq \l_tmpa_str % Don't need the full match
|
||||
\seq_pop_left:NN \l__dice_args_seq \l__dice_number_tl % # of dice
|
||||
\seq_pop_left:NN \l__dice_args_seq \l__dice_sides_tl % # of sides
|
||||
\seq_pop_left:NN \l__dice_args_seq \l__dice_mod_sign_tl % +/- for add/sub
|
||||
\seq_pop_left:NN \l__dice_args_seq \l__dice_mod_tl % modifier
|
||||
|
||||
\str_if_empty:NTF { \l__dice_sides_tl } % are there dice ?
|
||||
{ \l__dice_number_tl } % No, just a number
|
||||
{ %Yes, break down the roll
|
||||
\fp_eval:n { floor ( \l__dice_number_tl * ( \l__dice_sides_tl + 1 ) / 2 )\l__dice_mod_sign_tl \l__dice_mod_tl }~
|
||||
|
||||
(
|
||||
\l__dice_number_tl \dname \l__dice_sides_tl
|
||||
|
||||
\str_case_e:nn { \l__dice_mod_sign_tl }
|
||||
{
|
||||
{ + } { ~+~\l__dice_mod_tl }
|
||||
{ - } { ~--~\l__dice_mod_tl }
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
{ \msg_error:nnn { rpg } { dice / invalid_argument } { #1 }}
|
||||
\group_end:
|
||||
}
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Gets the width of a space
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\box_new:N \l__rpg_space_box
|
||||
\hbox_set:Nn \l__rpg_space_box {~}
|
||||
\dim_new:N \l__rpg_space_dim
|
||||
\dim_set:Nn \l__rpg_space_dim { \box_wd:N \l__rpg_space_box }
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Some keys are required for proper execution of macros.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\msg_new:nnn { rpg } { key_required } { #1~requires~key~``#2''~to~be~set. }
|
||||
|
||||
% #1 - key value
|
||||
% #2 - macro name
|
||||
% #3 - key name
|
||||
\cs_new_protected:Npn \__rpg_check_for_key:Nnn #1#2#3
|
||||
{
|
||||
\group_begin:
|
||||
\str_set:Nx \l_tmpa_str { #1 }
|
||||
|
||||
\str_if_empty:NT { \l_tmpa_str }
|
||||
{ \msg_error:nnnn { rpg } { key_required } { #2 } { #3 } }
|
||||
\group_end:
|
||||
}
|
56
main.tex
Normal file
56
main.tex
Normal file
@ -0,0 +1,56 @@
|
||||
\documentclass[10pt,twoside,twocolumn,openany,nodeprecatedcode]{rpgbook}
|
||||
|
||||
\usepackage[english]{babel}
|
||||
\usepackage[utf8]{inputenc}
|
||||
\usepackage[singlelinecheck=false]{caption}
|
||||
\usepackage{lipsum}
|
||||
\usepackage{amsmath}
|
||||
\usepackage{listings}
|
||||
\usepackage{shortvrb}
|
||||
\usepackage{stfloats}
|
||||
\usepackage{fontawesome5}
|
||||
\usepackage{perpage}
|
||||
|
||||
|
||||
|
||||
\MakePerPage{footnote}
|
||||
|
||||
\newcommand{\pips}[1]{%
|
||||
\foreach \x in {1,...,5}{%
|
||||
\tiny\space{\ifnumgreater{\x}{#1}{\faCircle[light]}{\faCircle[solid]}}
|
||||
}%
|
||||
}
|
||||
\newcommand{\pipline}[2]{%
|
||||
\pips{#1}\hspace{1em} #2
|
||||
}
|
||||
|
||||
\captionsetup[table]{labelformat=empty,font={sf,sc,bf,},skip=0pt}
|
||||
\MakeShortVerb{|}
|
||||
|
||||
\RpgSetThemeColor[PhbMauve]
|
||||
|
||||
|
||||
\lstset{
|
||||
basicstyle=\ttfamily,
|
||||
language=[LaTeX]{TeX},
|
||||
breaklines=true,
|
||||
}
|
||||
|
||||
\title{The Edge of Night\\
|
||||
\large Core Book \& Setting Guide}
|
||||
\author{}
|
||||
\date{}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\frontmatter
|
||||
|
||||
\maketitle
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\mainmatter%
|
||||
|
||||
\input{src/index}
|
||||
|
||||
\end{document}
|
83
packages.txt
Normal file
83
packages.txt
Normal file
@ -0,0 +1,83 @@
|
||||
# Package dependencies
|
||||
#
|
||||
# cfr-initials: simplified drop cap font loading
|
||||
# environ: required by tcolorbox
|
||||
# everysel: legacy font change hooks required by ragged2e
|
||||
# etex-pkg: provides e-TeX, transitive dependency
|
||||
# fontaxes: gillius dependency
|
||||
# gillius: sans serif body font
|
||||
# initials: drop caps
|
||||
# kpfonts: sans serif title font
|
||||
# l3backend: xparse dependency
|
||||
# l3kernel: xparse dependency
|
||||
# l3packages: xparse
|
||||
# minifp: required by lettrine
|
||||
# ms: multitoc, ragged2e
|
||||
# oberdiek: luacolor
|
||||
# pgf: tikz
|
||||
# tools: array, calc, tabularx
|
||||
# trimspaces: required by environ?
|
||||
#
|
||||
|
||||
amsfonts
|
||||
atbegshi
|
||||
babel
|
||||
babel-english
|
||||
bookman
|
||||
cfr-initials
|
||||
cm
|
||||
colortbl
|
||||
contour
|
||||
courier
|
||||
ec
|
||||
enumitem
|
||||
environ
|
||||
epstopdf-pkg
|
||||
etex-pkg
|
||||
etoolbox
|
||||
everysel
|
||||
fancyhdr
|
||||
fontaxes
|
||||
fp
|
||||
gensymb
|
||||
geometry
|
||||
gillius
|
||||
hang
|
||||
initials
|
||||
keycommand
|
||||
kpfonts
|
||||
kpfonts-otf
|
||||
kvsetkeys
|
||||
l3backend
|
||||
l3kernel
|
||||
l3packages
|
||||
latex-fonts
|
||||
lettrine
|
||||
lm
|
||||
ltxcmds
|
||||
luacolor
|
||||
microtype
|
||||
minifp
|
||||
ms
|
||||
numprint
|
||||
oberdiek
|
||||
pdfcol
|
||||
pgf
|
||||
psnfss
|
||||
ragged2e
|
||||
tcolorbox
|
||||
tikzfill
|
||||
titlesec
|
||||
tocloft
|
||||
tools
|
||||
trimspaces
|
||||
was
|
||||
xcolor
|
||||
xkeyval
|
||||
xstring
|
||||
|
||||
# Document dependencies
|
||||
caption
|
||||
lipsum
|
||||
listings
|
||||
sttools
|
7
rpg.sty
Normal file
7
rpg.sty
Normal file
@ -0,0 +1,7 @@
|
||||
\RequirePackage {expl3}
|
||||
\ProvidesExplPackage {rpg} {2025/02/28} {0.8.0} { Book Template}
|
||||
|
||||
\bool_new:N \c__rpg_isclass_bool
|
||||
|
||||
\input {rpgoptions.clo}
|
||||
\input {rpgcore.def}
|
12
rpgbook.cls
Normal file
12
rpgbook.cls
Normal file
@ -0,0 +1,12 @@
|
||||
\RequirePackage {expl3}
|
||||
\ProvidesExplClass {rpgbook} {2020/04/21} {0.8.0} { Book Template}
|
||||
|
||||
|
||||
\bool_new:N \c__rpg_isclass_bool
|
||||
\bool_set_true:N \c__rpg_isclass_bool
|
||||
|
||||
\input {rpgoptions.clo}
|
||||
|
||||
\LoadClass {book}
|
||||
|
||||
\input {rpgcore.def}
|
90
rpgcore.def
Normal file
90
rpgcore.def
Normal file
@ -0,0 +1,90 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Package Dependencies
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Helps prevent option clash with other packages that include xcolor
|
||||
\PassOptionsToPackage {table} {xcolor}
|
||||
|
||||
\RequirePackage {array}
|
||||
\RequirePackage {colortbl}
|
||||
\RequirePackage {enumitem}
|
||||
\RequirePackage {etoolbox}
|
||||
\RequirePackage {textcomp,gensymb} % degree symbol for italian ordinals
|
||||
\RequirePackage {hang} % hanging paragraphs
|
||||
\RequirePackage [autolanguage] {numprint} % localization of thousands separator
|
||||
\RequirePackage {tabularx} % variable-width table columns
|
||||
\RequirePackage [breakable,skins,xparse]{tcolorbox} % styled text boxes
|
||||
\RequirePackage {tikz} % drawing ornaments and lines
|
||||
\RequirePackage {xcolor}
|
||||
\RequirePackage {xparse} % \NewDocumentCommand and expl3
|
||||
|
||||
\sys_if_engine_luatex:T
|
||||
{
|
||||
\RequirePackage {luacolor}
|
||||
}
|
||||
|
||||
\bool_if:NT \l__rpg_layout_bool
|
||||
{
|
||||
\RequirePackage {geometry}
|
||||
\RequirePackage {microtype} % Improve ragged2e hyphenation and overfull boxes
|
||||
\RequirePackage {ragged2e}
|
||||
\RequirePackage [titles] {tocloft} % multi-column toc
|
||||
\RequirePackage [newparttoc] {titlesec} % Used to adjust (sub)section, part, and table of contents formatting
|
||||
|
||||
\bool_if:NT \l__rpg_multitoc_bool
|
||||
{ \RequirePackage [toc] {multitoc} }
|
||||
|
||||
% Set page geometry.
|
||||
\geometry
|
||||
{
|
||||
hmargin = .75in, % Left and right margins
|
||||
top = .46in, % Top of text area to top of page
|
||||
bottom = .8in, % Bottom of text area to bottom of page
|
||||
footskip = .32in, % Bottom of text area to bottom of footer text
|
||||
columnsep = .33in, % Space between columns
|
||||
}
|
||||
|
||||
% Set paragraph and line spacing
|
||||
\setlength {\parindent} {1em}
|
||||
\setlength {\RaggedRightRightskip} {0pt plus 1em}
|
||||
\setlength {\RaggedRightParindent} {\parindent}
|
||||
|
||||
% Restrict hyphenation
|
||||
\tolerance = 1
|
||||
\emergencystretch = \maxdimen
|
||||
\hyphenpenalty = 10000
|
||||
\hbadness = 10000
|
||||
|
||||
% Set left justification if not justified
|
||||
\bool_if:NF \l__rpg_justified_bool
|
||||
{ \RaggedRight }
|
||||
|
||||
% Customize itemize environment.
|
||||
\setlist{leftmargin=1em}
|
||||
\setitemize{noitemsep,topsep=0.5ex,label=\footnotesize{\textbullet}}
|
||||
}
|
||||
|
||||
% Load other modules of this package after all dependencies to avoid load order
|
||||
% conflicts (e.g., package options).
|
||||
% Low-level modules first.
|
||||
\RequirePackage {lib/compat} % compatibility definitions
|
||||
\RequirePackage {lib/rpgutility} % utility functions
|
||||
\RequirePackage {lib/rpgcolors} % color definitions
|
||||
\RequirePackage {lib/rpgfonts} % font definitions
|
||||
\RequirePackage {lib/rpgstrings} % Load document strings
|
||||
|
||||
% Conditionally load deprecated code for backwards compatibility
|
||||
\bool_if:NF \l__rpg_no_deprecated_code_bool
|
||||
{ \RequirePackage {lib/rpgdeprecated} }
|
||||
|
||||
% Main modules in alphabetical order
|
||||
\RequirePackage {lib/rpgcomment} % inline comment boxes
|
||||
\RequirePackage {lib/rpgheader} % fancy headers and footers
|
||||
\RequirePackage {lib/rpgmonster} % stat blocks
|
||||
\RequirePackage {lib/rpgreadaloud} % read-aloud text
|
||||
\RequirePackage {lib/rpgsections} % section styling and special section headers
|
||||
\RequirePackage {lib/rpgsidebar} % sidebars
|
||||
\RequirePackage {lib/rpgtable} % tables
|
||||
\RequirePackage {lib/rpgtoc} % table of contents styling
|
141
rpgoptions.clo
Normal file
141
rpgoptions.clo
Normal file
@ -0,0 +1,141 @@
|
||||
\ExplSyntaxOn
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
% Class / Package options
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Provides class / package option processing of l3keys in LaTeX2e
|
||||
\RequirePackage {l3keys2e}
|
||||
|
||||
% deprecate warning used in options and throughout the collection
|
||||
\msg_new:nnn {rpg} {deprecated} { #1 ~ is ~ deprecated ~ and ~ will ~ be ~ removed ~ in ~ version ~ #2. ~ #3 }
|
||||
|
||||
\cs_new_protected:Npn { \__rpg_deprecated:nnn } #1#2#3
|
||||
{
|
||||
\msg_warning:nnnnn { rpg } { deprecated } {#1} {#2} {#3}
|
||||
}
|
||||
|
||||
\cs_new_protected:Npn { \__rpg_deprecated:nn } #1#2
|
||||
{
|
||||
\msg_warning:nnnnn { rpg } { deprecated } {#1} {#2} {}
|
||||
}
|
||||
|
||||
% Messages for unknown options
|
||||
\msg_new:nnn {rpg} { options / unknown_class } { Unknown ~ option ~ " #1 " ~ passed ~ to ~ book ~ class. }
|
||||
\msg_new:nnn {rpg} { options / unknown_package } { Unknown ~ option ~ " #1 ". }
|
||||
|
||||
% These booleans are not set directly by an option (i.e. instead set by .code)
|
||||
\bool_new:N \l__rpg_show_background_bool
|
||||
\bool_new:N \l__rpg_show_footer_scroll_bool
|
||||
\bool_new:N \l__rpg_justified_bool
|
||||
\bool_new:N \l__rpg_multitoc_bool
|
||||
\bool_new:N \l__rpg_layout_bool
|
||||
\bool_new:N \l__rpg_no_deprecated_code_bool
|
||||
|
||||
\bool_set_true:N \l__rpg_multitoc_bool
|
||||
\bool_set_eq:NN \l__rpg_layout_bool \c__rpg_isclass_bool
|
||||
|
||||
% BEGIN section to remove in version 1.0.0
|
||||
\bool_set_true:N \l__rpg_layout_bool
|
||||
\bool_new:N \l__rpg_layout_set_bool
|
||||
% END section to remove in version 1.0.0
|
||||
|
||||
\keys_define:nn { rpg / options }
|
||||
{
|
||||
% Large-scale styling choice
|
||||
bg .choice:,
|
||||
bg / full .code:n =
|
||||
{
|
||||
\bool_set_true:N \l__rpg_show_background_bool
|
||||
\bool_set_true:N \l__rpg_show_footer_scroll_bool
|
||||
},
|
||||
bg / print .code:n =
|
||||
{
|
||||
\bool_set_false:N \l__rpg_show_background_bool
|
||||
\bool_set_true:N \l__rpg_show_footer_scroll_bool
|
||||
},
|
||||
bg / none .code:n =
|
||||
{
|
||||
\bool_set_false:N \l__rpg_show_background_bool
|
||||
\bool_set_false:N \l__rpg_show_footer_scroll_bool
|
||||
},
|
||||
bg .initial:n = full,
|
||||
|
||||
% Justified text
|
||||
justified .code:n =
|
||||
{
|
||||
\bool_set_true:N \l__rpg_justified_bool
|
||||
},
|
||||
justified .value_forbidden:n = true,
|
||||
|
||||
% Suppress deprecated code
|
||||
nodeprecatedcode .code:n =
|
||||
{
|
||||
\bool_set_true:N \l__rpg_no_deprecated_code_bool
|
||||
},
|
||||
nodeprecatedcode .value_forbidden:n = true,
|
||||
|
||||
% Avoid multi-column toc
|
||||
nomultitoc .code:n =
|
||||
{
|
||||
\bool_set_false:N \l__rpg_multitoc_bool
|
||||
},
|
||||
nomultitoc .value_forbidden:n = true,
|
||||
|
||||
% Apply layout formatting
|
||||
%layout .bool_set:N = \l__rpg_layout_bool,
|
||||
layout .code:n =
|
||||
{
|
||||
\tl_if_eq:nnTF {true} {#1}
|
||||
{ \bool_set_true:N \l__rpg_layout_bool }
|
||||
{ \bool_set_false:N \l__rpg_layout_bool }
|
||||
\bool_set_true:N \l__rpg_layout_set_bool
|
||||
}, % Remove and replace with .bool_set:N in 1.0.0
|
||||
layout .value_required:n = true,
|
||||
|
||||
% Unknown option handling
|
||||
unknown .code:n =
|
||||
{
|
||||
\bool_if:NTF \c__rpg_isclass_bool
|
||||
{
|
||||
\msg_info:nnx { rpg } { options / unknown_class } {\l_keys_key_tl}
|
||||
\PassOptionsToClass { \l_keys_key_tl } { book }
|
||||
}
|
||||
{
|
||||
\msg_error:nnx { rpg } { options / unknown_package } {\l_keys_key_tl}
|
||||
}
|
||||
},
|
||||
|
||||
% Deprecated options
|
||||
bg-full .code:n =
|
||||
{
|
||||
\__rpg_deprecated:nnn { Option ~ "bg-full" } {1.0} { Use ~ "bg = full" ~ instead. }
|
||||
\bool_set_true:N \l__rpg_show_background_bool
|
||||
\bool_set_true:N \l__rpg_show_footer_scroll_bool
|
||||
},
|
||||
bg-full .value_forbidden:n = true,
|
||||
bg-none .code:n =
|
||||
{
|
||||
\__rpg_deprecated:nnn { Option ~ "bg-none" } {1.0} { Use ~ "bg = none" ~ instead. }
|
||||
},
|
||||
bg-none .value_forbidden:n = true,
|
||||
bg-print .code:n =
|
||||
{
|
||||
\__rpg_deprecated:nnn { Option ~ "bg-print" } {1.0} { Use ~ "bg = print" ~ instead. }
|
||||
\bool_set_true:N \l__rpg_show_footer_scroll_bool
|
||||
},
|
||||
bg-print .value_forbidden:n = true,
|
||||
}
|
||||
|
||||
\ProcessKeysOptions { rpg / options }
|
||||
|
||||
% BEGIN section to remove in version 1.0.0
|
||||
\bool_if:NF \c__rpg_isclass_bool
|
||||
{
|
||||
\bool_if:NF \l__rpg_layout_set_bool
|
||||
{
|
||||
\msg_new:nnn {rpg} { options / layout_false } { Package ~ option ~ "layout" ~ will ~ default ~ to ~ false ~ in ~ 1.0.0. }
|
||||
\msg_warning:nn {rpg} { options / layout_false }
|
||||
}
|
||||
}
|
||||
% END section to remove in version 1.0.0
|
1
src/actions/index.tex
Normal file
1
src/actions/index.tex
Normal file
@ -0,0 +1 @@
|
||||
\part{Action Mechanics}
|
16
src/adventuring/falling_damage.tex
Normal file
16
src/adventuring/falling_damage.tex
Normal file
@ -0,0 +1,16 @@
|
||||
\section{Falling Damage}
|
||||
|
||||
When a character falls from a great height, he takes damage according to the table below. The numbers are given for a fall from a height of 10 feet, 20 feet, and so on. To find the damage taken from a fall consult the table and round the distance fallen down.
|
||||
|
||||
|
||||
\begin{RpgTable}[header=Falling Distance \& Damage]{ccc}
|
||||
Distance & Damage Level & Soak Difficulty \\
|
||||
10ft & 2 & 4 \\
|
||||
20ft & 2 & 5 \\
|
||||
30ft & 2 & 6 \\
|
||||
40ft & 3 & 8 \\
|
||||
50ft & 6 & 10 \\
|
||||
50ft+ & 10 & - \footnote{Falling more than 50ft does not allow soak rolls.} \\
|
||||
\end{RpgTable}
|
||||
|
||||
\paragraph{Acrobatics} When a character falls they can add their acrobatics skill to their soak roll.
|
4
src/adventuring/index.tex
Normal file
4
src/adventuring/index.tex
Normal file
@ -0,0 +1,4 @@
|
||||
\part{Adventuring}
|
||||
|
||||
\input{src/adventuring/falling_damage}
|
||||
\input{src/adventuring/traveling}
|
21
src/adventuring/traveling.tex
Normal file
21
src/adventuring/traveling.tex
Normal file
@ -0,0 +1,21 @@
|
||||
\section{Distance Traveling}
|
||||
Characters can travel a certain distance in a day based on their |Fitness|. The distance traveled is based on the character's speed and the terrain they are traveling through. The table below shows the distance a character can travel in a day based on various factors.
|
||||
|
||||
\begin{RpgTable}[header=Base Traveling Speed]{XX}
|
||||
Fitness & Distance \\
|
||||
\pipline{1} & 15 miles \\
|
||||
\pipline{2} & 20 miles \\
|
||||
\pipline{3} & 25 miles \\
|
||||
\pipline{4} & 30 miles \\
|
||||
\pipline{5} & 40 miles \\
|
||||
\end{RpgTable}
|
||||
|
||||
\begin{RpgTable}[header=Distance Modifers]{XX}
|
||||
Effect & Modification \\
|
||||
Difficult terrain & $distance/2$ \\
|
||||
Hazardous terrain & $distance/4$ \\
|
||||
Travel by night & maximum of 20 miles/day\\
|
||||
\end{RpgTable}
|
||||
|
||||
\paragraph{Traveling by horse}
|
||||
Characters can travel faster by horse. A horse can travel 50 miles in a day. The horse can be ridden for 8 hours before needing to rest for 4 hours. The horse can be ridden for 12 hours before needing to rest for 8 hours.
|
51
src/character/abilities/combatent/index.tex
Normal file
51
src/character/abilities/combatent/index.tex
Normal file
@ -0,0 +1,51 @@
|
||||
\section{Combat Mastery}
|
||||
|
||||
\begin{tikzpicture}[remember picture,overlay]
|
||||
\node at ([xshift=75mm]current page.center) {
|
||||
\includegraphics[scale=0.5]{img/combatmastery.png}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
|
||||
\RpgDropCapLine{C}{ombat Mastery} is the domain of heros on the battlefield, with skills honed to a razor and exquisite tactical precision They are born to end lives.
|
||||
|
||||
For each point in |Combat Mastery|, you may select 2 combat maneuvers.
|
||||
|
||||
Your |Combat Mastery| score can not exceed your |Fitness|
|
||||
|
||||
|
||||
\RpgFeatHeader{Ambush}[Requirements: None]
|
||||
You can ambush your enemies. If you make a combat roll before the start of a combat round. You may make a second combat roll.
|
||||
|
||||
\RpgFeatHeader{Combat Training}[Requirements: None]
|
||||
Your |Target Maximum| is equal to your combat mastery.
|
||||
|
||||
\RpgFeatHeader{Flamboyant Disengage}[Requirements: None]
|
||||
You can disengage from combat with a flourish. During combat make a non-offensive combat roll and add your acrobatics, you may also move up to 10ft
|
||||
|
||||
\RpgFeatHeader{Fluid Dueling}[Requirements: None]
|
||||
When engaged with a single target you can add your acrobatics to your combat rolls. This bonus can not exceed your |Combat Mastery|.
|
||||
|
||||
\RpgFeatHeader{Know thy Enemy}[Requirements: None]
|
||||
You understand the weaknesses of your enemies and can exploit them. Armor and defensive bonuses of your opponent are reduce by 2.
|
||||
|
||||
\RpgFeatHeader{Weapon Expertise}[Requirements: Character creation]
|
||||
You gain 4 skill points in a weapon skill of your choice.
|
||||
|
||||
\RpgFeatHeader{Priority Focus}[Requirements: None]
|
||||
After making a combat roll, if you hit more targets than your |Target Maximum| allows, you can choose the targets hit.
|
||||
|
||||
\clearpage
|
||||
|
||||
\RpgFeatHeader{Mounted Combat}[Requirements: Riding 3]
|
||||
You are able to fight while mounted. Combat actions no longer require |Riding| checks. If this is selected during character creation you can choose to start with a war-horse.
|
||||
|
||||
\RpgFeatHeader{Prescient Reactions}[Requirements: Fate 1]
|
||||
You can see the future and react to it. You can add your |Fate| to your combat rolls.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
src/character/abilities/index.tex
Normal file
1
src/character/abilities/index.tex
Normal file
@ -0,0 +1 @@
|
||||
\include{src/character/abilities/combatent/index}
|
25
src/character/attributes/charisma.tex
Normal file
25
src/character/attributes/charisma.tex
Normal file
@ -0,0 +1,25 @@
|
||||
\subsection{Charisma}
|
||||
Charisma represents the social fitness of a character. It determines how well a character can communicate, how well they can lead, and how well they can influence others.
|
||||
\break
|
||||
|
||||
\paragraph{Fitness score} The following gives a general idea of levels of charisma.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{People tend to start off not likeing them}
|
||||
\item \pipline{2}{Most people are indifferent to them}
|
||||
\item \pipline{3}{Able to make friends easily}
|
||||
\item \pipline{4}{Exceptional orator, can sway crowds}
|
||||
\item \pipline{5}{Could convince most people to do almost anything}
|
||||
\end{itemize}
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
\paragraph{Feats of Charisma}
|
||||
Given a charisma score, characters can casually perform various feats of charisma without a check.
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Hold a conversation}
|
||||
\item \pipline{2}{Navigate social situations without offending}
|
||||
\item \pipline{3}{Keep a crowd entertained, give a speech}
|
||||
\item \pipline{4}{convince a person to do something they are already inclined to do}
|
||||
\item \pipline{5}{Rally a crowd and sway opinions slightly}
|
||||
\end{itemize}
|
26
src/character/attributes/fitness.tex
Normal file
26
src/character/attributes/fitness.tex
Normal file
@ -0,0 +1,26 @@
|
||||
\subsection{Fitness}
|
||||
Fitness represents the overal physical strength and fitness of a character. This can be used to determine how much weight a character can carry, how hard they can hit, how much endurance they have.
|
||||
\break
|
||||
|
||||
\paragraph{Fitness score} The following gives a general idea of levels of fitness.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{A nonathletic person}
|
||||
\item \pipline{2}{Average atheltic ability}
|
||||
\item \pipline{3}{Physiscally fit}
|
||||
\item \pipline{4}{Exceptionally fit}
|
||||
\item \pipline{5}{Legendary athlete}
|
||||
\end{itemize}
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
\paragraph{Feats of Fitness}
|
||||
Given a fitness score, characters can casually perform various feats of strength without a check.
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{lift 50lbs, sprint a short distance}
|
||||
\item \pipline{2}{lift 100lbs, run a mile}
|
||||
\item \pipline{3}{lift 180lbs, climb a 50' rope}
|
||||
\item \pipline{4}{lift 350lbs, jog 10 miles}
|
||||
\item \pipline{5}{carry 200lbs while running a marathon}
|
||||
\end{itemize}
|
||||
|
21
src/character/attributes/fortitude.tex
Normal file
21
src/character/attributes/fortitude.tex
Normal file
@ -0,0 +1,21 @@
|
||||
\subsection{Fortitude}
|
||||
Fortitude repsents the physical constitution of a character. This can be used to determine how well a character can resist poisons, diseases, and other physical ailments. It also determines how well a character can resist physical damage.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Fragile}
|
||||
\item \pipline{2}{Average constitution}
|
||||
\item \pipline{3}{Can take a hit}
|
||||
\item \pipline{4}{Rock solid}
|
||||
\item \pipline{5}{Made of iron}
|
||||
\end{itemize}
|
||||
|
||||
\paragraph{Feats of Fortitude}
|
||||
Given a fortude score, characters can casually perform various feats of strength without a check.
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Shrug off entirely superficial wounds}
|
||||
\item \pipline{2}{Shrug off minor wounds}
|
||||
\item \pipline{3}{Resist minor poisons and infections}
|
||||
\item \pipline{4}{Resist minor desises}
|
||||
\item \pipline{5}{Resit moderate poisons and infections}
|
||||
\end{itemize}
|
||||
|
14
src/character/attributes/index.tex
Normal file
14
src/character/attributes/index.tex
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
\section{Core Attributes}
|
||||
|
||||
\RpgDropCapLine{A}{ttributes} represent the core traits for a character. These govern everything from physical fitness to intellectual ability. Attributes are rated on a scale of 1 to 5, with 1 being the lowest and 5 being the highest. The average person has a 2 in all attributes. Characters can have a maximum of 5 in any attribute.
|
||||
|
||||
Attributes above 5 are considered superhuman and are reserved for the most exceptional characters.
|
||||
\vspace{1em}
|
||||
|
||||
\input{src/character/attributes/perception}
|
||||
\input{src/character/attributes/fitness}
|
||||
\input{src/character/attributes/intellect}
|
||||
\input{src/character/attributes/fortitude}
|
||||
\input{src/character/attributes/charisma}
|
||||
|
21
src/character/attributes/intellect.tex
Normal file
21
src/character/attributes/intellect.tex
Normal file
@ -0,0 +1,21 @@
|
||||
\subsection{Intellect}
|
||||
Intelligence represents the mental fitness of a character. It determins base level knowledge, problem solving ability, and memory. It also determines mental fortitude and willpower.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{A weak minded person}
|
||||
\item \pipline{2}{Average intelligence}
|
||||
\item \pipline{3}{Well educated}
|
||||
\item \pipline{4}{Encyclopedic knowledge}
|
||||
\item \pipline{5}{Once in a generation mind}
|
||||
\end{itemize}
|
||||
|
||||
\paragraph{Feats of Intellect}
|
||||
Given a intellect score, characters can casually perform various feats of strength without a check.
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Speak and communicate clearly}
|
||||
\item \pipline{2}{Pick up on social queues, tell noncomplex stories}
|
||||
\item \pipline{3}{Read \& write, determine the basic materials of an object, recall relatively common facts about places, people, and objects}
|
||||
\item \pipline{4}{Pickup on subtle social queues, recall complex facts about places, people, and objects}
|
||||
\item \pipline{5}{Recall information about rare and obscure topics}
|
||||
\end{itemize}
|
||||
|
25
src/character/attributes/perception.tex
Normal file
25
src/character/attributes/perception.tex
Normal file
@ -0,0 +1,25 @@
|
||||
\subsection{Perception}
|
||||
Perception represents the ability of a character to notice things in their environment. It determines how well a character can see, hear, and smell. It also determines how well a character can notice things that are out of place, or hidden.
|
||||
\break
|
||||
|
||||
\paragraph{Perception score} The following gives a general idea of levels of perception.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Unobservant}
|
||||
\item \pipline{2}{Average perception}
|
||||
\item \pipline{3}{Eagle eyed}
|
||||
\item \pipline{4}{Exceptionally perceptive}
|
||||
\item \pipline{5}{Nearly impossible to sneak up on}
|
||||
\end{itemize}
|
||||
|
||||
\vspace{1em}
|
||||
|
||||
\paragraph{Feats of Perception}
|
||||
Given a perception score, characters can casually perform various feats of perception without a check.
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Notice a person standing in front of them}
|
||||
\item \pipline{2}{Spot a hidden object in plain sight}
|
||||
\item \pipline{3}{Spot a hidden object in a cluttered room}
|
||||
\item \pipline{4}{Notice something out of place in a room}
|
||||
\item \pipline{5}{Notice a minor detail in a room}
|
||||
\end{itemize}
|
1
src/character/cv/index.tex
Normal file
1
src/character/cv/index.tex
Normal file
@ -0,0 +1 @@
|
||||
\section{Curriculum Vitae}
|
7
src/character/index.tex
Normal file
7
src/character/index.tex
Normal file
@ -0,0 +1,7 @@
|
||||
\part{Character Mechanics}
|
||||
|
||||
\include{src/character/traits}
|
||||
\include{src/character/attributes/index}
|
||||
\include{src/character/skills/index}
|
||||
\input{src/character/cv/index}
|
||||
\input{src/character/abilities/index}
|
23
src/character/skills/acrobatics.tex
Normal file
23
src/character/skills/acrobatics.tex
Normal file
@ -0,0 +1,23 @@
|
||||
\subsection{Acrobatics (Fitness)}
|
||||
Acrobatics allows characters to perform feats of agility, balance, and coordination:
|
||||
|
||||
\begin{itemize}
|
||||
\item Move into or out of combat without penalty
|
||||
\item Move through minor obstacles or difficult terrain without penalty
|
||||
\item Perform impressive or intimidating acrobatic feats
|
||||
\end{itemize}
|
||||
|
||||
\paragraph{Acrobatics score} The following gives a general idea of levels of acrobatics.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Uncoordinated}
|
||||
\item \pipline{2}{Not clumsy}
|
||||
\item \pipline{3}{Dancer}
|
||||
\item \pipline{4}{Circus performer}
|
||||
\item \pipline{5}{Olympic gymnast}
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Possible specializations}
|
||||
|
||||
Combat acrobatics, parkour, gymnastics.
|
||||
|
20
src/character/skills/alchemy.tex
Normal file
20
src/character/skills/alchemy.tex
Normal file
@ -0,0 +1,20 @@
|
||||
\subsection{Alchemy (Intellect)}
|
||||
Alchemy is the art of mixing and creating conconctions. Alchemy allows a character to craft a variety of helpful items, such as potions, poisons, and bombs. These items can be crafted during downtime, and can be used to heal, harm, or otherwise affect the world around the character.
|
||||
|
||||
\paragraph{Acrobatics score} The following gives a general idea of levels of acrobatics.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Simple concuctions}
|
||||
\item \pipline{2}{Simple poison making}
|
||||
\item \pipline{3}{Simple bomb making}
|
||||
\item \pipline{4}{Potion brewing}
|
||||
\item \pipline{5}{Advanced concuctions}
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Possible specializations}
|
||||
|
||||
Bombs, potions, poisons, conconctions.
|
||||
|
||||
\subsubsection{Crafting with alchemy}
|
||||
|
||||
Items can be crafted with alchemy while |Resting|. The items that can be are are determined by the characters alchemy score. The material cost of the items are represented by a minimum |Wealth| requirement. When |Resting| in a location with plausable access to supplies a character can craft any items their |Alchemy| and |Wealth| will allow.
|
23
src/character/skills/alertness.tex
Normal file
23
src/character/skills/alertness.tex
Normal file
@ -0,0 +1,23 @@
|
||||
\subsection{Alertness (Perception)}
|
||||
Alertness represents the ability of a character training to pay attention to possible dangers. This can be used to determine how well a character can spot hidden objects, notice a trap, or detect an ambush.
|
||||
|
||||
\begin{itemize}
|
||||
\item Contest a stealth action
|
||||
\item Contest an ambush
|
||||
\item Passively notice a trap
|
||||
\end{itemize}
|
||||
|
||||
\paragraph{Alertness score} The following gives a general idea of levels of alertness.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Might notice a poor stealth attempt}
|
||||
\item \pipline{2}{Could catch a pickpocket}
|
||||
\item \pipline{3}{Hard to sneak up on}
|
||||
\item \pipline{4}{A sixth sense for danger}
|
||||
\item \pipline{5}{Sees everyting coming}
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Possible specializations}
|
||||
|
||||
Detect stealth, trap detection, ambush detection.
|
||||
|
7
src/character/skills/blacksmithing.tex
Normal file
7
src/character/skills/blacksmithing.tex
Normal file
@ -0,0 +1,7 @@
|
||||
\subsection{Blacksmithing (Fitness)}
|
||||
Blacksmithing represents the ability of a character to work with metal. This can be used to determine how well a character can repair armor, create weapons, or craft metal objects.
|
||||
|
||||
\subsubsection{Possible specializations}
|
||||
|
||||
Weaponsmithing, armorsmithing, field repairing.
|
||||
|
7
src/character/skills/fletching.tex
Normal file
7
src/character/skills/fletching.tex
Normal file
@ -0,0 +1,7 @@
|
||||
\subsection{Fletching (Fitness)}
|
||||
Fletching represents the ability of a character to work with wood. This can be used to determine how well a character can repair bows, create arrows.
|
||||
|
||||
\subsubsection{Possible specializations}
|
||||
|
||||
Arrow making, bow making, repairing.
|
||||
|
30
src/character/skills/index.tex
Normal file
30
src/character/skills/index.tex
Normal file
@ -0,0 +1,30 @@
|
||||
\section{Skills}
|
||||
|
||||
\RpgDropCapLine{S}{kills} represent the learned abilities of a character. These can be anything from combat training to knowledge of a particular subject. Skills are rated on a scale of 1 to 5, with 1 being the lowest and 5 being the highest. The average person has a 2 in all skills. Characters can have a maximum of 5 in any skill.
|
||||
|
||||
Skills above 5 are considered superhuman and are reserved for the most exceptional characters.
|
||||
|
||||
\begin{tikzpicture}[remember picture,overlay]
|
||||
\node at ([xshift=75mm, yshift=-70mm]current page.center) {
|
||||
\includegraphics[scale=0.5]{img/alchemy.png}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
|
||||
\input{src/character/skills/acrobatics}
|
||||
\input{src/character/skills/alertness}
|
||||
\input{src/character/skills/alchemy}
|
||||
\clearpage
|
||||
\begin{tikzpicture}[remember picture,overlay]
|
||||
\node at ([xshift=85mm, yshift=70mm]current page.center) {
|
||||
\includegraphics[scale=0.5]{img/unarmed.png}
|
||||
};
|
||||
\end{tikzpicture}
|
||||
\input{src/character/skills/unarmed}
|
||||
\input{src/character/skills/acrobatics}
|
||||
\newpage
|
||||
\vspace*{5.8in}
|
||||
\input{src/character/skills/blacksmithing}
|
||||
\input{src/character/skills/tracking}
|
||||
\input{src/character/skills/fletching}
|
||||
\input{src/character/skills/survival}
|
||||
|
7
src/character/skills/survival.tex
Normal file
7
src/character/skills/survival.tex
Normal file
@ -0,0 +1,7 @@
|
||||
\subsection{Survival (Intellect)}
|
||||
Survival represents the ability of a character to live off the land. This can be used to determine how well a character can find food, water, and shelter in the wilderness.
|
||||
|
||||
\subsubsection{Possible specializations}
|
||||
|
||||
Trap making, foraging, hunting
|
||||
|
40
src/character/skills/tracking.tex
Normal file
40
src/character/skills/tracking.tex
Normal file
@ -0,0 +1,40 @@
|
||||
\subsection{Tracking (Intellect)}
|
||||
Tracking allows a character to follow the trail of a creature or person. It is used to find a creature, follow a creature, or determine the direction a creature has gone. Tracking can be used to follow a creature through the wilderness.
|
||||
|
||||
\subsubsection{Possible specializations}
|
||||
Wilderness tracking, urban tracking
|
||||
|
||||
\subsubsection{Tracking Creatures}
|
||||
When a character attempts to track a creature they must make a tracking roll. The difficulty of the roll is determined by the GM based on the terrain and the creature being tracked. Bonuses or penalties can be assessed based on the weather, the time of day, or other factors. The tables below can be used to help determine the difficulty of a tracking roll.
|
||||
|
||||
\begin{RpgTable}[header=Base Difficulty]{XX}
|
||||
Environment & Difficulty \\
|
||||
Dense Forest & 5 \\
|
||||
Plains & 10 \\
|
||||
Urban Area & 15 \\
|
||||
\end{RpgTable}
|
||||
|
||||
\begin{RpgTable}[header=Environment modifiers]{XX}
|
||||
Effect & Modifier \\
|
||||
Nighttime & +5 \\
|
||||
Difficult terrain & +1 \\
|
||||
Hazerdous terrain & +3 \\
|
||||
\end{RpgTable}
|
||||
|
||||
|
||||
\begin{RpgTable}[header=Other Modifiers]{XX}
|
||||
Effect & Modifier \\
|
||||
Individual target & +2 \\
|
||||
Small group (3 or less) & -1 \\
|
||||
Large group (10 or more) & +2 \\
|
||||
\end{RpgTable}
|
||||
|
||||
|
||||
\subsubsection{Trail masking}
|
||||
A character with tracking knowledge can also actively mask their trail while traveling. A character that is actively masking their trail moves at 75\% their normal speed. Attempts to find and track the characters trail have their difficulty increase by the characters tracking skill.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
25
src/character/skills/unarmed.tex
Normal file
25
src/character/skills/unarmed.tex
Normal file
@ -0,0 +1,25 @@
|
||||
\subsection{Unarmed Combat (Fitness)}
|
||||
Unarmed combat represents the physical combat ability of a character. It determines how well a character can fight, how hard they can hit, and how well they can take a hit.
|
||||
|
||||
Unarmed combat can be used in any combat action, grappling, shoving, or any other physical combat action that does not involve a weapon:
|
||||
|
||||
\begin{itemize}
|
||||
\item Combat rolls while unarmed
|
||||
\item Body slam, even while holding a weapon
|
||||
\item Hold a person in place
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\paragraph{Unarmed combat score} The following gives a general idea of levels of unarmed combat.
|
||||
|
||||
\begin{itemize}[label={}]
|
||||
\item \pipline{1}{Never been in a fight}
|
||||
\item \pipline{2}{Could hold their own in a bar fight}
|
||||
\item \pipline{3}{Some martial training}
|
||||
\item \pipline{4}{Accomplished martial artist}
|
||||
\item \pipline{5}{Master of multiple martial arts}
|
||||
\end{itemize}
|
||||
|
||||
\subsubsection{Possible specializations}
|
||||
|
||||
Martial arts, grappling, bar fighting.
|
14
src/character/traits.tex
Normal file
14
src/character/traits.tex
Normal file
@ -0,0 +1,14 @@
|
||||
\section{Character Traits}
|
||||
\RpgDropCapLine{C}{haracter} traits are broken into 3 categories: Attributes, Skills, and Abiltities. Attributes are the basic building blocks of a character, and are used to determine the character's physical and mental capabilities. Skills are the learned abilities of a character, and are used to determine how well a character can perform a task. Abilities are the supernatural or extraordinary capabilities of a character, and are used to determine how well a character can perform a task that is beyond the capabilities of a normal human.
|
||||
|
||||
All traits are represented as a number between 2 and 5, with 1 being the lowest and 5 being the highest. The higher the number, the better the character is at that trait. Traits are used to determine the outcome of actions that a character takes, and are used to determine the character's overall effectiveness in the game.
|
||||
|
||||
\subsection{Specializations}
|
||||
When a trait reaches 4 a specialization can be chosen. This is a narrow focus of the trait that the character is particularly good at. For example, a character with a Strength of 4 might choose to specialize in lifting heavy objects. Alternatively a character with a 4 in ledgerdemain might specialize in pickpocketing.
|
||||
|
||||
When a trait is raised to 5, a character can choose a second specialization.
|
||||
|
||||
For the purposes of actions, a trait higher than 3 only counts higher than 3 when the action is related to a specialization.
|
||||
|
||||
\subsection{Feats}
|
||||
Some attributes and skills may list feats. These are actions a character is capable of performing inately given a certain level of the trait. These feats require no roll to perform, and are considered automatic successes. This does not apply to any sitauation where the action is contested, or the character is under duress.
|
43
src/combat/combat_action.tex
Normal file
43
src/combat/combat_action.tex
Normal file
@ -0,0 +1,43 @@
|
||||
\section{Combat Action}
|
||||
|
||||
\RpgDropCapLine{C}{ombat} actions are the smallest unit of time in a combative situation. It represents a single cambative maneuver, such as an attack, an ability, or a skill usage. Combat actions resolve simultaniously. There are three types of combat actions:
|
||||
|
||||
\begin{itemize}
|
||||
\item \textbf{Standard Combat Action} - This action is the most common action in melee combat. The standard action is an attack maneuver against targets a character is currently engaged with.
|
||||
\item \textbf{Non-Offensive Combat Action} - This is a non attacking maneuver and can is a type of action taken by specific skills and abiltiies. It provides a combat roll for defense purposes and generally conveys some other utility.
|
||||
\item \textbf{Unengaged action} - An unengaged action is a wide variety of actions that can be taken when not explicitly engaged with a target. This includes movement, casting spells, using noncombative abiltiies or skills.
|
||||
\end{itemize}
|
||||
|
||||
\subsection{Standard Combat Action}
|
||||
The |Standard Combat Action| represents the total precision of movement and tactical prowess throughout the combat interval. It encapsulates both the offensive and defensive performance against all enemies currently engaged with a character.
|
||||
|
||||
The standard combat action is a Fitness based action:
|
||||
|
||||
\begin{align*}
|
||||
Fitness + Combat Modifiers + Weapon Skill + 1d10
|
||||
\end{align*}
|
||||
|
||||
All characters engaged in combat that choose to make a |Standard Combat Action| make this roll. These rolls are all contested against all other characters in the same engagement (physical proximity based on weapon range). Each character hits other characters whos roll is 5 less than theirs. This is limited by their |Maximum Targets|. If a character lands hits on more than their |Maximum Targets| the targets with the greatest difference are hit. In the event of a tie the attacker chooses.
|
||||
|
||||
\subparagraph{Armor \& Shields} Armor and shields provide a bonus to the combat roll. Armor provides a bonus equal to its armor rating, shields provide a bonus equal to their shield rating.
|
||||
\subparagraph{Combat Mastery} Characters with the |Combat Mastery| ability can engage more targets in combat. The number of targets a character can engage is equal to their |Combat Mastery| score. They can also add their |Combat Mastery| score to their combat roll.
|
||||
\subparagraph{Outnumbered} If a character is engaged by more targets than their |Target Maximum| they subtract the difference from their combat role.
|
||||
|
||||
\subsubsection{Combat Action Example}
|
||||
For this example we will use a character named |Alden| who is a skilled warrior. He is engaged with two bandits. He has a fitness of 3, and a weapon skill of 3. He is wearing a chain shirt with an armor rating of 2. He is using a longsword with a shield with a shield rating of 1. He has a combat mastery of 2.
|
||||
|
||||
The bandits have a fitness of 2, and a weapon skill of 2. They are wearing leather armor with an armor rating of 1. They are using shortswords.
|
||||
|
||||
All three characters make a combat roll. |Alden| rolls a 1d10 and gets a 6. His total roll is 17. The bandits roll a 1d10 and get a 3. Their total roll is 8. |Alden| hits both bandits. The bandits do not hit |Alden|. |Alden| needed to exceed their roll by 5. Which means he needed 14 or higher.
|
||||
|
||||
\begin{align*}
|
||||
Alden(17) - Bandit(8) & = 9 \\
|
||||
9 & < 5 \\
|
||||
& \textbf{Hit!} \\
|
||||
\end{align*}
|
||||
|
||||
\begin{RpgSidebar}[float=!b]{Target Maximum}
|
||||
All characters have a |Target Maxmium| of 1. This can be increased by various effects. For instance, points in |Combat Mastery| increase the |Target Maximum|.
|
||||
\end{RpgSidebar}
|
||||
|
||||
|
3
src/combat/index.tex
Normal file
3
src/combat/index.tex
Normal file
@ -0,0 +1,3 @@
|
||||
\part{Combat Mechanics}
|
||||
\include {src/combat/combat_action}
|
||||
\include {src/combat/ranged}
|
10
src/combat/ranged.tex
Normal file
10
src/combat/ranged.tex
Normal file
@ -0,0 +1,10 @@
|
||||
\section{Ranged Combat}
|
||||
|
||||
|
||||
\RpgDropCapLine{R}{anged} Combat actions can be taken as an |Unengaged Action|\footnote{Unengaged actions can only be taken while not in a melee engagement. See |Combat Actions|}.
|
||||
Unlike a |Combat Action|, a ranged attack always targets a single target and is an uncontested attack.
|
||||
|
||||
\begin{displaymath}
|
||||
WeaponSkill + CombatModifier + Fitness - RangeModifier + 1d10
|
||||
\end{displaymath}
|
||||
|
1
src/creation/index.tex
Normal file
1
src/creation/index.tex
Normal file
@ -0,0 +1 @@
|
||||
\part{Character Creation}
|
5
src/index.tex
Normal file
5
src/index.tex
Normal file
@ -0,0 +1,5 @@
|
||||
\input{src/character/index}
|
||||
\input{src/creation/index}
|
||||
\input{src/actions/index}
|
||||
\input{src/combat/index}
|
||||
\input{src/adventuring/index}
|
Loading…
x
Reference in New Issue
Block a user