Package 'sbgjackets'

Title: Utilities for Small Box Game Jackets
Description: Utilities for small box game jackets.
Authors: Trevor L. Davis [aut, cre] , Delapouite <https://delapouite.com/> [ill] ("Person icon" <https://game-icons.net/1x1/delapouite/person.html> and "Weight icon" <https://game-icons.net/1x1/delapouite/weight.html> / "CC BY 3.0" <https://creativecommons.org/licenses/by/3.0/>), Lorc <https://lorcblog.blogspot.com/> [ill] ("Clockwork icon" <https://game-icons.net/1x1/lorc/clockwork.html> / "CC BY 3.0" <https://creativecommons.org/licenses/by/3.0/>)
Maintainer: Trevor L. Davis <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0-1
Built: 2025-02-10 07:26:42 UTC
Source: https://github.com/trevorld/sbgjackets

Help Index


Create SBG Jacket for Dominoes

Description

sbgj_dominoes_double6(), sbgj_dominoes_double9(), and sbgj_dominoes_double12() creates a small box game jacket for Double-Six Dominoes, Double-Nine Dominoes, and Double-Twelve Dominoes. sbgj_dominoes_all() creates all of those into a single pdf file.

Usage

sbgj_dominoes_all(output = NULL)

sbgj_dominoes_double6(output = NULL)

sbgj_dominoes_double9(output = NULL)

sbgj_dominoes_double12(output = NULL)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

Value

The output file name invisibly. As a side effect creates a pdf file.


Create SBG Jacket for Looney Pyramids

Description

sbgj_looney_pyramids() creates a small box game jacket for Looney Pyramids. sbgj_homeworlds() creates a small box game jacket for Homeworlds. sbgj_ice_duo() creates a small box game jacket for Ice Duo. sbgj_jinxx() creates a small box game jacket for Jinxx. sbgj_martian_chess() creates a small box game jacket for Martian Chess. sbgj_nomids() creates a small box game jacket for Nomids. sbgj_looney_pyramids_all() creates all of those into a single pdf file.

Usage

sbgj_looney_pyramids_all(output = NULL)

sbgj_looney_pyramids(output = NULL)

sbgj_homeworlds(output = NULL)

sbgj_ice_duo(output = NULL)

sbgj_jinxx(output = NULL)

sbgj_martian_chess(output = NULL, ..., silver = FALSE)

sbgj_nomids(output = NULL)

Arguments

output

Output file name. Defaults to tempfile(fileext = ".pdf").

...

Should be left empty.

silver

If TRUE make jacket for silver Martian Chess.

Details

Note that these print-and-play small box game jackets are for Personal Use Only. These jackets use images by Looney Labs. These jackets are not for distribution. For more information see the Looney Labs FAQ: https://faq.looneylabs.com/non-gameplay-questions/working-with-looney-labs#1774.

Value

The output file name invisibly. As a side effect creates a pdf file.


Helper grobs

Description

creditsGrob(), spineIconGrob(), and spineTextGrob() are helper grob functions to help make small box game jackets using pnpmisc::pdf_create_jacket().

Usage

spineTextGrob(title, col = "white")

creditsGrob(xmp = xmpdf::xmp(), credits = character(), icons = FALSE)

spineIconGrob(players, minutes, weight, col = "white")

Arguments

title

Title of small box game jacket (usually game name)

col

Color of text/icons

xmp

A xmpdf::xmp() object with copyright/license information.

credits

A character vector of (commonmark) credits to eventually be passed to marquee::marquee_grob().

icons

If TRUE include Creative Commons credits for Games-icons.net icons.

players

A integer vector of allowed number of players

minutes

An integer of number of minutes (larger number from BGG)

weight

A double of game weight (number from BGG)

Value

A grid grob object

Examples

library("grid", include.only = c("gList", "gpar", "rectGrob"))
sbgj_example <- function(output = NULL) {
  front <- rectGrob(gp = gpar(col = NA, fill = "#D55E00"))
  back <- rectGrob(gp = gpar(col = NA, fill = "#009E73"))
  spine <- gList(rectGrob(gp = gpar(col = NA, fill = "black")),
                 spineTextGrob("Example Spine"),
                 spineIconGrob(2:4, 30, 1.5))
  inner <- creditsGrob(icons = TRUE)
  pnpmisc::pdf_create_jacket(output, front = front, back = back,
                             spine = spine, inner = inner)
}