Adding content
- Added
- Updated
Stamps, papers and fonts live in content/ and are listed in config/sh_config.lua.
Every client downloads content/ when it connects.
The list is built when the resource starts, so restart REC_Books after adding anything.
Stamps
- Put the file in
content/stickers/<category>/..svg,.pngand.webpwork. Use only letters, digits,_,.and-in the file name; other names are skipped. - The category must be in
config.stickers.categories. For a new category add{ key = "<category>", label = "<name>" }. - With
scan = truethe file shows up on its own. Its key is<category>/<file>, its label is the file name without the extension, and it cannot be recoloured. - To give it a label, or to let players recolour it, add it to
config.stickers.items. Settintable = trueonly for single colour artwork.
{ key = "basic/heart.svg", label = "Heart", tintable = true, },
Stamps in items come first, in the order you list them.
Papers
A paper is a square SVG tile in content/papers/, repeated from the top left of the page.
{ key = "lined", label = "Lined", src = "content/papers/lined.svg", spacing = 56, margin = 80, },
| Field | Meaning |
|---|---|
spacing | Size of one tile in page units (a page is 1000 wide) |
margin | Left and right margin in page units. Optional. Only papers with a margin make new text line up with the rules |
Fonts
Put a .woff2 file in content/fonts/ and point src at it.
family is a CSS font-family. The file is registered under the first name in it, so give the first name something unique and list fallbacks after it.
Latin fonts have no Japanese glyphs, so end the list with a Japanese font.
{ key = "hand", label = "Handwriting", family = "\"REC Books Caveat\", \"Segoe Print\", \"Yu Gothic\", cursive", src = "content/fonts/caveat.woff2", },
Leave src out to use a font already installed on the player's PC.
Display names
The screen looks up a translation for every stamp, stamp category, paper and font in locales/web/<language>.json.
If no translation is found, it shows the label from config.
| Asset | Key | Example |
|---|---|---|
| Font | FONT_<key> | hand → FONT_HAND |
| Paper | PAPER_<key> | lined → PAPER_LINED |
| Stamp category | STICKER_CATEGORY_<key> | basic → STICKER_CATEGORY_BASIC |
| Stamp | STICKER_<key> | basic/heart.svg → STICKER_BASIC_HEART_SVG |
<key> is upper-cased, and anything other than A–Z and 0–9 becomes _.
Add the key to en.json, ja.json and custom.json alike. No web rebuild is needed.
UNKNOWN_ASSET) when its author saves it.