Skip to content
Snippets Groups Projects
docs.tex 11.7 KiB
Newer Older
  • Learn to ignore specific revisions
  • Malin Freeborn's avatar
    Malin Freeborn committed
    \documentclass[a4paper,openany]{book}
    
    \usepackage{bind}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \date{\today}
    
    
    \externalReferent{judgement}
    
    
    \makeindex[name=spells,title={Spell Summaries},columns=2]
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \begin{document}
    
    
    \chapter{How to Make Monsters}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \section{Introduction}
    
    \begin{multicols}{2}
    
    \subsection{All about Dragons}
    
    \begin{boxtext}
    
    As you embark upon your first adventure, you summon your first monster with a simple backstroke.
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    You write down \verb"\dragon", and behold!
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \end{boxtext}
    
    
    \dragon[\npc{\T[4]\E}{\arabic{noAppearing} Dragons}]
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    Each time you conjure the dragon, it will look a little different.
    The next one might look like this:
    
    \dragon
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    If you find it hard to tell the difference between all the dragons, you can give them names in square brackets with the \verb"npc command", like this:
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \verb"dragon[\npc{\M}{Bob the dragon}]"
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    Which then makes a male dragon called ``Bob'':
    
    \dragon[\npc{\M}{Bob the Dragon}]
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    You can summon dozens of monsters, including \verb"humansoldier", \verb"basilisk", and \verb"\ghoul"
    (see \verb"monsters.tex" for all the examples).
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    A longer command lets you fill in more information about \pgls{npc}.
    
    \begin{verbatim}
      \humandiplomat[\NPC{\Hu\F}{Bob}%
        {Erratic}%
        {Snaps fingers}%
        {Sandwiches}]
    \end{verbatim}
    
    \humandiplomat[\NPC{\Hu\F}{Bob}{Erratic}{Snaps fingers}{Sandwiches}]
    
    
    Placing a number after the `T' symbol, e.g. \verb"\T[5]" to change the number of rows of boxes to track stats.
    
    \ghoul[\npc{\T[5]\D}{5 Ghouls}]
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \subsection{Individual NPCs}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    Individual characters can be created by using the \verb"\npc" command then the \verb"person" command, with its nine arguments:
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \begin{verbatim}
    
    
      \Person{\npc{\M}{Alice}}%
        {{0}{1}{-1}}% BODY
        {{2}{0}{0}}% MIND
        {%
    
          \set{Melee}{1}
    
          \set{Academics}{1}
    
          \set{Survival}{1}
    
          \longsword
        }% SKILLS
        {}% KNACKS
        {\rations, \lootSmall}% EQUIPMENT
        {}% ABILITIES
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \end{verbatim}
    
    
    \Person{\npc{\M}{Alice}}%
      {{0}{1}{-1}}% BODY
      {{2}{0}{0}}% MIND
      {%
    
        \set{Melee}{1}
    
        \set{Academics}{1}
    
        \set{Survival}{1}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \shortsword
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \partiallisk
    
      }% SKILLS
      {}% KNACKS
      {\rations, \lootSmall}% EQUIPMENT
      {}% ABILITIES
    
    
    \subsubsection{Bestiary with monstrous ghouls, and ghoulish monsters}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    Statblocks in a bestiary chapter (or any space for examples).
    
    You can set an example chapter by writing \verb"\settoggle{genExamples}{true}"
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    Then the \verb"\humansoldier" command turns from this:
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \humansoldier
    
    \ldots into this:
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \settoggle{genExamples}{true}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \humansoldier
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    This second soldier is still random, but note the loot they carry has changed into a roll.
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    We can also add wounds, like this:
    
    \begin{verbatim}
    
    \set{wounds}{3}
    
    \humansoldier
    
    \end{verbatim}
    
    This means the creature has lost three \glspl{hp}.
    That amount of lost \glspl{hp} generally means the \gls{weight} of all their items has become too high, which means they suffer penalties to their \glspl{ap} and Attack score.
    
    \togglefalse{genExamples}
    
    \set{wounds}{3}
    
    \humansoldier
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    And finally, we have swarms:
    
    \swarm[\flight]{Stirges}{5}{1}{3}{1}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \subsection{Boxes}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    You can add things for these people to say with a \verb"\begin{speechtext}" command:
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \begin{speechtext}
    
    
      ``Would you tell me, please, which way I ought to go from here?''
    
      ``That depends a good deal on where you want to get to.''
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \end{speechtext}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    Then we have \verb"\begin{exampletext}" for example:
    
    \begin{exampletext}
    
      This example text might show game examples, or the history of a location.
    
      It has an optional argument if you want to replace the line at the start.
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \end{exampletext}
    
    
    \begin{boxtext}
      And of course\ldots BOXTEXT!
    
    \end{boxtext}
    
    
    \subsubsection{Showing Dice}
    
    You can show dice with \verb"\dicef{7}", which shows up as `\dicef{7}'.
    And you can list dice, with results, with the `\texttt{dlist}' environment.
    
    \begin{dlist}
      \item Badger
      \item Fox
      \item Gazebo
    \end{dlist}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \subsection{Magic}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \subsubsection{Spells}
    
    Spells automatically calculate everything they can.
    
    They also compile a spell index, if you request a spell index before \verb"\begin{document}".
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \begin{verbatim}
    \makeindex[name=spells,
    title={Spell Summaries},columns=2]
    
    \spell{Quake}% Name
    
      {distant,duplicated}% Enhancements
    
      {Wane}% Action
    
      {Earth}% Spheres
    
      {the rock's density}% Skill
    
      {Ground shakes}% Short Description
      {Brrrrrr}% Long Description
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \printindex[spells]
    \end{verbatim}
    
    After inputting that, you can get the spell, and the `printindex' command will create a spell-list by using a special index, just for spells.
    
    \spell{Quake}% Name
    
      {distant,duplicated}% Enhancements
    
      {Wane}% Action
    
      {Earth}% Spheres
    
      {the rock's density}% Skill
      {Ground shakes}% Short Description
      {Brrrrrr}% Long Description
    
    Alternatively, pull in a bunch of spells from a sphere at a particular level with:
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \verb"\showSpells{Fate1,Air2,Mind2}"
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    %\showSpells{Fire1,Fate1,Air2,Mind2}
    
    \ldots which shows Air spells of level 2, and Fate at level 1.
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    Alternatively, input the spells after a creature, with a `show standard spells' command:
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \begin{verbatim}
    
      \demilich
      \showStdSpells
    
    \end{verbatim}
    
    This will take an educated guestimate of a few spells you want to show.
    
    \demilich
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \showStdSpells
    
    
    \subsection{Pictures}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \sidepic{l1}
    
    All images should go into the images directory.
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    Writing \verb"\pic{b1}" shows the image under \verb"images/b1.svg".
    
    The file extension can be either `svg' or `jpg' (but never `jpeg').
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    Use \verb"\sidepic{l1}" to show that image at the side of the text.
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    It doesn't work well and messed up text if it doesn't have enough text around it.
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    For svg files to work, the document must be compiled with \verb"pdflatex -shell-escape main.tex" on the first run (the Makefile generally takes care of this).
    
    
    Wider pictures should be placed with \verb"\widePic{s1}", and they will appear on the next page, at the bottom, or with \verb"\widePic[t]{s1}" to see the picture at the top of the next page.
    
    \widePic{s1}
    
    
    You can also use \verb"\csComments{\mapCircle{-4,3.4}{2}{Dyson_Logos/forgotten_city}}" to place comments on top of the map, either in call out boxes, or (previously) in the \verb"\mapCircle" command.
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \subsubsection{Maps}
    
    The map function works like \verb"\widePic", but for maps.
    You can add a list of coordinates, and the names or number-labels to place on those coordinates.
    
    
    \mapPic[\large]{t}{wide}{\Huge Toptown/8/8,Leftown/2/75,2/8/6}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    Imagine the shield image is a map to be labelled.
    We can start by putting `Toptown' at the top.
    
    \begin{verbatim}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \mapPic{t}{../config/images/l1}%
        {8/8/Toptown}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \end{verbatim}
    
    
    If the map needs to go at the bottom, replace the first argument with a `b'.
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    The Cartesian coordinates are `8/8', meaning `80\% along, 80\% up'.
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    We can add more to the list with commas.
    
    We can even add commands, such as \verb"\ref{basement}" to get some number associated with a basement, and automatically place that number on the map.
    
    \begin{verbatim}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \mapPic{t}{../config/images/l1}%
    
        {8/8/Toptown,
        2/75/Leftown,8/6/2}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \end{verbatim}
    
    
    An optional argument allows default size changes for the words, and as usual words can change their sizes individually.
    
    \begin{verbatim}
    
      \mapPic[\small]{t}{../config/images/l1}%
        {8/8/\large Toptown,
        2/75/Leftown,
        8/6/\ref{basement}}
    
    \end{verbatim}
    
    
    \subsection{Symbols}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \begin{tabularx}{\linewidth}{Xcc}
    
    
      Meaning & Typed & Symbol \\\hline
    
      Nura & {\tt \textbackslash{N}} & \gls{N} \\
    
      Undead & {\tt \textbackslash{D}} & \gls{D} \\
      \hline
      Teams & {\tt \textbackslash{T}} & \gls{T} \\
    
      Animal & {\tt \textbackslash{M}} & \gls{A} \\
    
      Sentient & {\tt \textbackslash{E}} & \gls{E} \\
    
      Female & {\tt \textbackslash{F}} & \gls{F} \\
    
      Male & {\tt \textbackslash{M}} & \gls{M} \\
    
      \hline
      Gnoll & {\tt \textbackslash{Nl}} & \gls{Nl} \\
    
      Dwarves & {\tt \textbackslash{Dw}} & \gls{Dw} \\
    
      Humans & {\tt \textbackslash{Hu}} & \gls{Hu} \\
    
      Elves & {\tt \textbackslash{El}} & \gls{El} \\
    
      Gnome & {\tt \textbackslash{Gn}} & \gls{Gn} \\
      \hline
      Squash & {\tt \textbackslash{squash}} & \gls{squash} \\
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      Side Quest ready & {\tt \textbackslash{sqr}} & \gls{sqr} \\
    
      Side Quest not ready & {\tt \textbackslash{sqn}} & \gls{sqn} \\
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \end{multicols}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \section{Creature Commands}
    
    \begin{multicols}{2}
    
    
    \boxPair{
      \subsubsection{Box Pairs}
      This is the \texttt{\textbackslash boxPair} command.
      It lets a pair of anything sit at the bottom of the page.
      The first argument sits in the left column, and the next in the right.
    
      The command works well if you have a creature box, like this griffin.
    }{
        \griffin
    }
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \subsection{Weapon Commands}
    
    The \verb"\weapon{Name}{1}{2}" command works in 2 ways.
    
    When defining a weapon, it adjusts the current creature's stats.
    When used in a weapons chart, it shows the weapon's stats.
    
    
    Stats are derives from the weapon's 3 properties: length, sharpness, and \gls{weight}.
    
    
    \begin{verbatim}
      \weapon{Sword}% NAME
    
        {2}% Attack Bonus
        {1}% Damage
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    When that weapon command appears in a table, it shows the Attack, Damage, AP required, and Weight (the minimum Strength required to use it).
    
    When when a creature wields the weapon, those stats raise the creature's stats.
    
    
      \begin{nametable}[XYYYYY]{M\^{e}l\'{e}e Weapons}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \textbf{Name} & \textbf{Attack Bonus} & \textbf{Dam.} & \textbf{\Glsentrytext{ap} Cost} & \textbf{Weight} \\\hline
    
      \showWeapon{\Dagger} \\
    
      \showWeapon{\greataxe} \\
    
      \showWeapon{\spear} \\
    
    Alternatively, just write \verb"\sword" and the sword gets written.
    Just set \verb"\toggletrue{examplecharacter}".
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \subsection{Loot}
    
    You can use the various `loot' commands to give loot to creatures or rooms,a little like A,D\&D's `treasure type C'.
    
    So writing \verb"In this room sits \lootBig." might produce `in this room sits 12gp'.
    
    Available commands:
    
    \begin{itemize}
    
      \item
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \verb"\lootSmall" (e.g. \lootSmall)
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \item
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \verb"\lootMedium" (e.g. \lootMedium)
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \item
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \verb"\lootBig" (e.g. \lootBig)
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \item
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \verb"\lootMagic" (e.g. \lootMagic)
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \item
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \verb"\lootJewellery" (e.g. \lootJewellery)
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    \end{itemize}
    
    \end{multicols}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \section{Modules \& Areas}
    
    \subsection{Encounters}
    
    Make encounter tables like this:
    
    \section{Others}
    
    
    \begin{multicols}{2}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    Other commands are typically produced for just a single location in the book.
    
    The functions which produce the creature boxes is a tangled mess of rotten spaghetti-logic, which is so inefficient it somehow taxes a modern computer just to add some numbers.
    It's best not to think about how creatures are made.
    
    
    \subsection{Rules References with a Dirty Hack}
    
    Rules are often written as:
    
    \begin{verbatim}
    
    \subsection[Keeping Watch: Roll Strength +
    Vigilance]{Keeping Watch}
    \label{keepingWatch}
    
    \end{verbatim}
    
    This first argument in the square brackets is used as the subsection header when referenced, or in tables of contents.
    Since the subsection is never used in a table of contents, we can misused it to contain rules, and then reference the rule.
    
    Specifically, you can use \verb"\footnote{\nameref{keepingWatch}.}", which then produces a footnote with a summary of that rule, which will automatically update if the rule ever changes.
    
    \footnote{The rule also appears in a miniature table of contents sometimes.}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \subsubsection{External References}
    
    An external reference can reference other books.
    First, the document needs to load the external project with \verb"\externalReferent{core}"
    
    \externalReferent{core}
    
    \begin{itemize}
      \item
      The first argument names the project, by the git project name.
      \item
      The second argument gives the name you want to use for the book.
      \item
      The third argument references the label.
    \end{itemize}
    
    \verb"\exRef{core}{Core Rules}{combat}"
    
    If the core rules are present, and compiled, it provides a footnote.
    Otherwise, it does nothing.%
    \exRef{core}{Core Rules}{combat}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \end{multicols}
    
    
    \printindex[spells]
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \printglossary[
      style=topicmcols,
      type=mech,
    ]
    
    
    \printglossary[
      style=topicmcols,
    ]
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \glsaddall
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \end{document}