I'd like to get a macro setup for this statblock format. Basically, I will be converting an XML document containing the data for the instances within the document.
This is a sample of the format I am looking for:

I'd like to get a macro setup for this statblock format. Basically, I will be converting an XML document containing the data for the instances within the document.
This is a sample of the format I am looking for:

Does the following look like what you want?
\documentclass{article}
\usepackage{times} % change font
\usepackage{xcolor} % colours
\usepackage{colortbl} % colour table
\usepackage{amssymb} % symbols
\usepackage{epsdice} % dice
% define my own colours
\definecolor{darkgreen}{rgb}{0.25, 0.30, 0.15}
\definecolor{lightgray}{rgb}{0.9,0.9,0.9}
\definecolor{darkgray}{rgb}{0.75,0.75,0.75}
\begin{document}
\begin{tabular}{p{\linewidth}}
\rowcolor{darkgreen}\color{white}\bfseries Impersonator Mimic \hfill Level 16 Controller \\
\rowcolor{darkgreen}\color{white} Medium aberrant magical beast \hfill XP 1,400\\
\rowcolor{lightgray}\textbf{HP} 160; \textbf{Bloodied} 80 Initiative +14\\
\rowcolor{lightgray} \textbf{AC} 30, \textbf{Fortitude} 27, \textbf{Reflex} 28, \textbf{Will} 27 \textbf{Perception} +13\\
\rowcolor{lightgray} \textbf{Speed} 6 Darkvision, tremorsense 5\\
\rowcolor{lightgray} \textbf{Resist} 10 acid\\
\rowcolor{darkgreen}\color{white}\textbf{Standard Actions}\\
\rowcolor{darkgray} \textbf{Slam $\blacklozenge$ At-Will}\\
\rowcolor{lightgray} \emph{Attack:} Melee 2 (one creature); +21 vs. AC\\
\rowcolor{lightgray} \emph{Hit:} 3d8 +11 damage.\\
\rowcolor{darkgray} \textbf{Forcible Conversion} (charm) $\blacklozenge$ \textbf{Recharge} \epsdice{5} \epsdice{6}\\
\end{tabular}
\end{document}

EDIT
Following the comments, here is an update that should help to 'separate content from style'.
\documentclass{article}
\usepackage{times} % change font
\usepackage{xcolor} % colours
\usepackage{colortbl} % colour table
\usepackage{amssymb} % symbols
\usepackage{epsdice} % dice
% define my own colours
\definecolor{darkgreen}{rgb}{0.25, 0.30, 0.15}
\definecolor{lightgray}{rgb}{0.9,0.9,0.9}
\definecolor{darkgray}{rgb}{0.75,0.75,0.75}
\newcommand{\printstattable}{%
\begin{tabular}{p{\linewidth}}
\rowcolor{darkgreen}\color{white}\bfseries \name \hfill \level \\
\rowcolor{darkgreen}\color{white} \creaturedescription \hfill XP \experience\\
\rowcolor{lightgray}\textbf{HP} \hp; \textbf{Bloodied} \bloodied\, Initiative \initiative\\
\end{tabular}
}
\newcommand{\setbasicstats}[4]{%
\def\name{#1}%
\def\creaturedescription{#2}%
\def\level{#3}%
\def\experience{#4}}
\begin{document}
\setbasicstats{Impersonator Mimic}{Medium abberrant magical beast}{Level 16 Controller}{1,400}
\def\hp{160}
\def\bloodied{80}
\def\initiative{+14}
\printstattable
\vspace{2cm}
\setbasicstats{Fantasy creature}{Something else}{Level 1 rogue}{2,100}
\def\hp{20}
\def\bloodied{13}
\def\initiative{-230}
\printstattable
\end{document}
You'll notice that I have demonstrated 2 separate approaches
\setbasicstats takes 4 arguments and does the \def for you\hp, \bloodied, \initiative have been done manually, but there's no reason that you couldn't put them in another \newcommandIf you like this approach, you just need to complete the \printstattable command with the other rows, and define newcommands to fill-in the remaining entries.

\newcommand can take at most 9 arguments, although it can be overcome http://www.tex.ac.uk/cgi-bin/texfaq2html?label=moren9
– cmhughes
Oct 13 '11 at 17:53
!in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the!to turn it into an image again. – Martin Scharrer Oct 13 '11 at 14:16colortblpackage. The tabular has only one column ofp{\linewidth}column type. – Leo Liu Oct 13 '11 at 16:00