\documentclass[20pt,border=5pt,transparent]{standalone}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[singlelinecheck=false]{caption}
\usepackage{lipsum}
\usepackage{listings}
\usepackage{shortvrb}
\usepackage{stfloats}
\usepackage[svgnames]{xcolor}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usepackage{afterpage} % For controlling page breaks
\captionsetup[table]{labelformat=empty,font={sf,sc,bf,},skip=0pt}
\MakeShortVerb{|}
\lstset{%
basicstyle=\ttfamily,
language=[LaTeX]{TeX},
breaklines=true,
}
% Include custom command definitions and tcolorbox settings
\input{itemCommands.tex}
\input{tcolorboxSettings}
\begin{document}
\begin{itemcard}{Item Name}
\begin{center}
\begin{tcolorbox}[width=\linewidth, boxrule=3.0pt, colframe=black, colback=white, boxsep=0pt, top=0pt, bottom=0pt, left=0pt, right=0pt, center={yshift=-5mm}]
\includegraphics[width=\linewidth]{item_pics/item.png}
% Replace with your image file name %
\end{tcolorbox}
\end{center}
\begin{lowerpart}
% Any where you see {___ Flag}, replacing it a {1} turns on that command.
% \ItemTags{Type}{Rarity}{Attunement Type}{Special Attunement Requirement}
% {Attunement Type} = {0}, No Attunement
% {Attunement Type} = {1}, Attunement
% {Attunement Type} = {2}, Attunement with conditions
% \FlavorText{Flavor Flag}{Flavor text}
% \ChargeMechanics{Total # of Charges}{# of Dice}{# of Sides}{Modifier}{Reset Time}{Special Recharge Flag}{Special Recharge Text}{Last Charge Effect Flag}{Last Charge Effect Text}
% \SpellCasting{Spellcasting Flag}{Spell Bonus}{Spell Bonus Condition}{Additional Effect Flag}{Spells List}{Additional Spell Effects}
% \BonusText{Bonus Flag}{Bonus Title}{Bonus Text}
% \CurseText{Curse Flag}{Curse Description}
\ItemTags{Type (subtype)}{rarity}{2}{creature}
\FlavorText{1}{This latex template allows you to create simple, automatically formatted item cards.
The height of the card will adjust automatically, so you don't need to worry about font sizes or having too many breaks.
It should also be able to handle item art of any aspect ratio; I haven't stress-tested this yet though, so sticking ratios between 5:4 and 1:1 is a safe bet.
It also makes a PNG with a transparent background.
If you are using this in \textbf{Overleaf}, the PNG is located in 'Logs and output files' under 'Other logs and files'.
To change the name of the PNG and resolution, edit the latexmkrc file.
All of the text generating commands are defined in itemCommands.tex.
Card color/shape formatting is in tcolorboxSettings.tex.}
\ChargeMechanics{1}{1}{1}{0}{thirteen o'clock}{1}{This is where you put alternative recharge mechanics, if any.}{1}{This is where you put any effect that occurs when you expend the last charge, if any.}
\SpellCasting{1}{1}{saves and/or attack bonus, potentially with caveats.}{1}{You can use an action to expend one or more of the item's charges to cast one of the following spells at a spell save DC of 40:
\textit{spell a} ($\alpha$ charges), \textit{spell b} ($\beta$ charges), ... , \textit{spell z} ($\omega$ charges).}{Put any other spell affects the item grants here.
Could be a conditional free casting of a spell on the list, extra flavor, a spell that can only be cast 1/day, etc.}
\BonusText{1}{Extra Stuff}{If the item has other abilities/information/etc put it here.}
\BonusText{1}{Extra Stuff 2}{The item might have multiple abilities as well, so don't be afraid to repeat this command.}
\CurseText{1}{Always finish off with your curse, if applicable.
If the curse doesn't immediately reveal itself, I highly recommend making two cards: One with the curse description and one without.
Nothing better than handing over the "actual" item info when you player realizes something is wrong.
If you want to be really cheeky, change the card background color in tcolorboxSettings.tex for the cursed version to really drive it home.}
\end{lowerpart}
\end{itemcard}
\begin{itemcard}{Item Name}
\begin{center}
\begin{tcolorbox}[width=\linewidth, boxrule=3.0pt, colframe=black, colback=white, boxsep=0pt, top=0pt, bottom=0pt, left=0pt, right=0pt, center={yshift=-5mm}]
\includegraphics[width=\linewidth]{item_pics/item.png}
% Replace with your image file name %
\end{tcolorbox}
\end{center}
\begin{lowerpart}
% Any where you see {___ Flag}, replacing it a {1} turns on that command.
% \ItemTags{Type}{Rarity}{Attunement Type}{Special Attunement Requirement}
% {Attunement Type} = {0}, No Attunement
% {Attunement Type} = {1}, Attunement
% {Attunement Type} = {2}, Attunement with conditions
% \FlavorText{Flavor Flag}{Flavor text placeholder}
% \ChargeMechanics{Total # of Charges}{# of Dice}{# of Sides}{Modifier}{Reset Time}{Special Recharge Flag}{Special Recharge Text}{Last Charge Effect Flag}{Last Charge Effect Text}
% \SpellCasting{Spellcasting Flag}{Spell Bonus}{Spell Bonus Condition}{Additional Effect Flag}{Spells List}{Additional Spell Effects}
% \BonusText{Bonus Flag}{Bonus Title}{Bonus Text}
% \CurseText{Curse Flag}{Curse Description}
\ItemTags{Type (subtype)}{rarity}{2}{creature}
\FlavorText{1}{You can do multiple cards of different sizes in one go in case you want to print them off.}
\CurseText{1}{It doesn't make separate PNGs for each item card.
It also doesn't allow for giving each card a different color scheme.}
\end{lowerpart}
\end{itemcard}
\end{document}