\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}%
  }

\newcommand\race{}
\newcommand\concept{}
\newcommand\code{}
\newcommand\culture{}
\newcommand\rank{}
\newcommand\characterDebt{}

\newcommand\csComments{}
\newcommand\mapLabels{}

\newcounter{Strength}
\newcounter{Dexterity}
\newcounter{Speed}
\newcounter{Intelligence}
\newcounter{Wits}
\newcounter{Charisma}

\newcounter{Academics}
  \setcounter{Academics}{0}
\newcounter{Alchemy}
  \setcounter{Alchemy}{0}
\newcounter{Athletics}
  \setcounter{Athletics}{0}
\newcounter{Caving}
  \setcounter{Caving}{0}
\newcounter{Crafts}
  \setcounter{Crafts}{0}
\newcounter{Cultivation}
  \setcounter{Cultivation}{0}
\newcounter{Deceit}
  \setcounter{Deceit}{0}
\newcounter{Empathy}
  \setcounter{Empathy}{0}
\newcounter{Flight}
  \setcounter{Flight}{0}
\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}
\newcounter{Vigilance}
  \setcounter{Vigilance}{0}
\newcounter{Xenomology}
  \setcounter{Xenomology}{0}

\newcounter{Brawl}
  \setcounter{Brawl}{0}
\newcounter{Melee}
  \setcounter{Melee}{0}
\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}


\newcommand\characterWeapon{}
\newcommand\characterArmour{}
\newcommand\characterEquipment{}
\newcommand\knackOne{}
\newcommand\knackTwo{}

\newcommand\charSpellList{}


%%%%% 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}}
  #1 \lightDots &
  \Repeat{\value{#1}}{\statDot}\Repeat{\value{statCircles}}{\statCircle}\\
  \stepcounter{track}
}

\newcommand\lightDots{%
  \textcolor{\pageSideColor}{\titlerule*[1pc]{.}}%
}

\newcommand\emptySkill{%
    \lightDots & %
    \Repeat{3}{\statCircle}%
    \\%
}

\newcommand\setXtoLowestOf[3]{%
  \ifnum\value{#2}<\value{#3}%
    \setcounter{#1}{\value{#2}}%
  \else%
    \setcounter{#1}{\value{#3}}%
  \fi%
}

\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}
}