Coder Social home page Coder Social logo

potsdam-pnp / pf2e-cards Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 2.68 MB

Playing cards for pf2e items etc.

Home Page: https://potsdam-pnp.github.io/pf2e-cards/

License: MIT License

TeX 80.67% Nix 3.58% Shell 0.40% JavaScript 15.35%
pathfinder-rpg pathfinder2e

pf2e-cards's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

fkz

pf2e-cards's Issues

Warning "page content and margins higher than paper."

When compiling, we get the following warning:

page content and margins higher than paper.
(typearea) This may result in page footer out of paper.
(typearea) You should decrease DIV, decrease foot height,
(typearea) or include footer into type area.

We currently use the following configuration

\documentclass[paper=63mm:88mm, DIV=21, fontsize=7.5pt]{scrartcl}

Set up latexmk

From discussion with @fkz and @skaldarnar on Discord:

Add config file for latexmk so that it "just works". Remove the override to select xelatex from the github action.

Consistently put a reference for Items

Goal

Find a good place for source book references for the subject of a card itself and apply that consistently.

Remaining tasks:

  • allow for reference on \Card macro
  • add references to all cards
  • make the arguments mandatory
  • harmonize order of arguments in \Card and \Action

Context

For many cards (like spells and cantrips) giving a source book reference on the respective action is just fine.

However, for Items (like Breastplate or Dagger) or cards explaining Rules or Conditions we want to provide a reference for the item itself.

On some cards we add a reference in the footer section mentioning other item properties aligned to the right-hand side:

\hfill\Reference{CRB}{275}

On other cards, this reference is completely missing.
In addition, the footer row is already pretty crowded for items like the Crossbow, with no obvious space left for the reference.


Observed on f92fdcc

How to typeset formulas and explanations

We have some cards containing formulas (as a reminder) or explanations of specific terms.

For instance, explaining the rank on the Repair Kit:

\CheckRoll{Crafting}{int, prof}
\HealingRoll{}{5*(rank + 1)} \begin{tabular}{c}rank=\\crafting prof rank\end{tabular}

image

For instance, having the formula for AC on armor cards:

\begin{gather*}
\text{AC} = 14 + \text{max}(\text{dex}, 1) + \text{prof} \\ ~+~ \text{bonuses} - \text{penalties}
\end{gather*}

image


Observed on f92fdcc

Color coding of cards

Goals

  • What are we color coding?
    Currently we color code (some) types(?)/categories(?)/kind(?) of cards. I think this is a good start, but we should figure out which categories we have and select colors.
  • What color scheme should we use?
    The colors should be distinguishable. The colors should work well with the colors used for boxes (damage rolls, check rolls, …)

Context

Currently cards are color coded in the following way:

  • Actions — yellow
  • Items — blue
  • Spells — green (including Cantrips and Focus spells)

\newcommand{\cardStyle@drawCardFrame}[1]{%
\def\cardStyle@cardColor{}
\ifnum\pdfstrcmp{#1}{Item}=0 \def\cardStyle@cardColor{blue!40} \fi
\ifnum\pdfstrcmp{#1}{Action}=0 \def\cardStyle@cardColor{yellow!40} \fi
\ifnum\pdfstrcmp{#1}{Spell}=0 \def\cardStyle@cardColor{green!40} \fi
\ifnum\pdfstrcmp{#1}{Cantrip}=0 \def\cardStyle@cardColor{green!40} \fi
\ifnum\pdfstrcmp{#1}{Focus}=0 \def\cardStyle@cardColor{green!40} \fi
\ifnum\pdfstrcmp{\cardStyle@cardColor}{}=0 \else
\tikz[remember picture,overlay] {%
\draw [color=\cardStyle@cardColor,rounded corners=4mm,line width=4mm]
(current page.south west)
rectangle
(current page.north east);
}
\fi
}

image
image
image

Follow Ups

  • encode more information on the card, for instance the rarity of an Item or in which slot the card belongs. For instance, https://rpg-cards.vercel.app/ uses icons for item categories on the top-right corner and on the back of the card.

Observed on b05c448.

Overflowing check boxes

For some weapons or spells we potentially need multiple boxes, which may overflow easily.

For instance, this is happening on the Smoking Sword.

\CheckRoll{MeeleAttack}{str, prof, 1}
\DamageRoll{Slashing}[Piercing]{1d8}{str}
\DamageRoll{Fire}{1}{}

image

This clashes even more with the colored borders.


Observed on f92fdcc

Wrong text color when using \FormulaVariable inside of \Attribute

The text under the \FormulaVariable box is supposed to be black (or the current text color), but when using it inside of an \Attribute the text is rendered in grey.

image

MWE to reproduce this (this also happens on the Bulk card):

\Card{}{}{Sandbox}

Attribute with plain text:

\Attribute{Foo}{black text}

Formula variable outside of Attribute:

\(\FormulaVariable{black text}{\phantom{1000}}\)

Formula variable inside of Attribute:

\Attribute{Bar}{%
  \(\FormulaVariable{grey text}{\phantom{1000}}\)
}

Text and Formula variable inside of Attribute:

\Attribute{Bar}{%
  make it black \(\FormulaVariable{grey text}{\phantom{1000}}\)
}

Observed on f92fdcc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.