Skip to content
Snippets Groups Projects
csCommands.sty 4.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand{\lineDots}[1][1]{%
      \foreach \n in {1,...,#1}%
        {\leavevmode\cleaders\hb@xt@1.5em{\hss \textcolor{\pageSideColor}{.}\hss }\hfill\kern\z@\par\vspace{1em}\noindent}%
      }
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\race{}
    \newcommand\concept{}
    \newcommand\code{}
    \newcommand\culture{}
    
    \newcommand\rank{}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\characterDebt{}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\csComments{}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\mapLabels{}
    
    \newcounter{Strength}
    \newcounter{Dexterity}
    \newcounter{Speed}
    \newcounter{Intelligence}
    \newcounter{Wits}
    \newcounter{Charisma}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Academics}
      \setcounter{Academics}{0}
    
    \newcounter{Alchemy}
      \setcounter{Alchemy}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Athletics}
      \setcounter{Athletics}{0}
    \newcounter{Caving}
      \setcounter{Caving}{0}
    \newcounter{Crafts}
      \setcounter{Crafts}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Cultivation}
      \setcounter{Cultivation}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Deceit}
      \setcounter{Deceit}{0}
    \newcounter{Empathy}
      \setcounter{Empathy}{0}
    
    \newcounter{Flight}
      \setcounter{Flight}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Medicine}
      \setcounter{Medicine}{0}
    \newcounter{Performance}
      \setcounter{Performance}{0}
    \newcounter{Larceny}
      \setcounter{Larceny}{0}
    \newcounter{Seafaring}
      \setcounter{Seafaring}{0}
    \newcounter{Stealth}
      \setcounter{Stealth}{0}
    
    \newcounter{Survival}
      \setcounter{Survival}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Vigilance}
      \setcounter{Vigilance}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Xenomology}
      \setcounter{Xenomology}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Brawl}
      \setcounter{Brawl}{0}
    
    \newcounter{Melee}
      \setcounter{Melee}{0}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcounter{Projectiles}
      \setcounter{Projectiles}{0}
    
    \newcounter{Air}
      \setcounter{Air}{0}
    \newcounter{Earth}
      \setcounter{Earth}{0}
    \newcounter{Fire}
      \setcounter{Fire}{0}
    \newcounter{Water}
      \setcounter{Water}{0}
    \newcounter{Fate}
      \setcounter{Fate}{0}
    
    \newcounter{Mind}
      \setcounter{Mind}{0}
    \newcounter{Light}
      \setcounter{Light}{0}
    \newcounter{Life}
      \setcounter{Life}{0}
    \newcounter{Death}
      \setcounter{Death}{0}
    \newcounter{Force}
      \setcounter{Force}{0}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    
    \newcommand\characterWeapon{}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\characterArmour{}
    \newcommand\characterEquipment{}
    \newcommand\knackOne{}
    \newcommand\knackTwo{}
    
    \newcommand\charSpellList{}
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    
    %%%%% Show Dots Commands %%%%%
    
    \newcounter{statCircles}
    \newcounter{statDots}
    
    \newcommand\statCircle[1][\large]{#1\textbf{\Circle}}
    \newcommand\statDot[1][\large]{#1\textbf{\CIRCLE}}
    \newcommand\currentCircle{}
    \newcommand{\weeline}{\line(1,0){30} \hspace{.6cm}}
    
    \newcommand\showAttribute[1]{
      \setcounter{track}{-4}%
      {#1}%
      \whileboolexpr{%
        test {\ifnumcomp{\value{track}}{<}{5}}%
      }%
      {%
        &%
        \ifnum\value{track}>0%
          \ifnum\value{track}>\value{#1}%
            \statCircle%
          \else%
            \statDot%
          \fi%
        \else%
          \ifnum\value{track}=0%
            \raisebox{2pt}{\statDot[\footnotesize]}%
          \else%
            \ifnum\value{#1}>\value{track}%
              {\Large\Square}%
            \else%
              {\Large\XBox}%
            \fi%
          \fi%
        \fi%
        \stepcounter{track}%
      }%
      \\%
    }
    
    \newcommand{\skill}[1]{
      \setcounter{statCircles}{3}
      \addtocounter{statCircles}{-\value{#1}}
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      #1 \lightDots &
    
    Malin Freeborn's avatar
    Malin Freeborn committed
      \Repeat{\value{#1}}{\statDot}\Repeat{\value{statCircles}}{\statCircle}\\
      \stepcounter{track}
    }
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\lightDots{%
      \textcolor{\pageSideColor}{\titlerule*[1pc]{.}}%
    }
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\emptySkill{%
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \lightDots & %
    
    Malin Freeborn's avatar
    Malin Freeborn committed
        \Repeat{3}{\statCircle}%
        \\%
    }
    
    
    \newcommand\setXtoLowestOf[3]{%
      \ifnum\value{#2}<\value{#3}%
        \setcounter{#1}{\value{#2}}%
      \else%
        \setcounter{#1}{\value{#3}}%
      \fi%
    }
    
    
    Malin Freeborn's avatar
    Malin Freeborn committed
    \newcommand\setHighSpheres{%
      \setXtoLowestOf{Mind}{Water}{Fate}%
      \setXtoLowestOf{Death}{Air}{Fate}%
      \setXtoLowestOf{Light}{Air}{Fire}%
      \setXtoLowestOf{Force}{Fire}{Earth}%
      \setXtoLowestOf{Life}{Earth}{Water}%
    
    
    \newcommand\resetCS{
      \clean
      \renewcommand\knackOne{}
      \renewcommand\knackTwo{}
    
      \renewcommand\race{}
      \renewcommand\concept{}
      \renewcommand\culture{}
      \renewcommand\rank{}
      \renewcommand\name{}
      \renewcommand\code{}
    
      \foreach \Att in {Strength, Dexterity, Speed, Intelligence, Wits, Charisma}%
        {\setcounter{\Att}{0}}
    
    
      \renewcommand\characterWeapon{}
      \renewcommand\characterArmour{}
      \renewcommand\characterEquipment{}
      \renewcommand\charSpellList{}
    }
    
    
    
    \newcommand\printCharacter[1]{
      \resetCS
    
      \settoggle{examplecharacter}{true}
      \settoggle{allyCharacter}{true}
    
      \input{ex_cs/#1.tex}
      \input{config/CS.tex}
      \input{config/backpage.tex}
    }