Halloween Sale 25% off every script ends 1 November

Shop the sale

Setup guide

Britannia Craftsbook

Crafting books your players carry and open: one recipe on every page, crafting straight from the book, and levels to earn.

  • Version 1.0.0
  • Works on VORP, RSG Core, QBCore RedM
  • Resource Britannia_Craftbook
  • Updated 20 Oct 2026

Overview

Britannia Craftsbook turns crafting into a book. A player uses a book from their inventory, its leather cover swings open, and inside is a contents page followed by one recipe on every page. They craft straight from the book, earn crafting XP, and unlock harder recipes as their level rises.

  • Any number of books, each opened by its own item, each with its own recipes, cover title, cover picture and colour.
  • A contents page with search and a "can make now" filter; click a recipe to turn straight to its page.
  • Every recipe page shows the item's picture, what it makes, how long it takes, the XP it gives, the level it needs, and every ingredient with how many the player has.
  • Craft several at once. The server times the craft and checks everything again at the end.
  • Recipes above the player's level are stamped "Not yet learned".
  • Levels per book (or shared between books), on XP ladders you set.
  • English, Spanish and French.

The Lua is encrypted by Cfx.re; the settings, recipes, text and server settings stay editable.

Requirements

  • poggy_core (free), version 0.11.0 or newer.
  • oxmysql.
  • One of VORP, RSG Core or QBCore RedM (poggy_core connects the script to it).

Install

  1. Download Britannia_Craftbook from your Cfx.re account (portal.cfx.re → Assets → Granted Assets).
  2. Put the Britannia_Craftbook folder in your server's resources folder. Don't rename it.
  3. Add ensure Britannia_Craftbook to server.cfg, after ensure oxmysql and ensure poggy_core.
  4. Add the book items (see Items).
  5. Set up your books in shared/config.lua and their recipes in shared/recipes.lua.
  6. Restart the server. The XP table britannia_craftbook_xp is created automatically.

Items

The example config has two books. Each one is opened by its own item:

ItemLabelOpens
survival_guideSurvival GuideThe Survival Guide: tools and camp cooking
bakehouse_ledgerThe Bakehouse LedgerThe Bakehouse Ledger (bakers only in the example)
  • VORP: run SQL.sql in your database. It's safe to run more than once.
  • RSG Core / QBCore RedM: copy the entries from installation/items_rsg_qbcore.txt into your shared items list.
  • Icons: copy installation/images/*.png into your inventory's item pictures (VORP: vorp_inventory/html/img/items/). craftsbook.png is a spare copy for any new book item.

Any item can open a book: set its item in the config.

Configuration

Settings are in shared/config.lua, and every option is commented. Recipes are in shared/recipes.lua; text is in locales/.

SettingWhat it doesDefault
Config.LocaleLanguage file to use: en, es or fr'en'
Config.DebugPrints extra lines in the server and F8 consolesfalse
Config.Crafting.MaxBatchThe most of one recipe a player can make in one go20
Config.Crafting.CancelIfMovedWalking away while crafting cancels it (nothing is used up)false
Config.Crafting.MoveLimitHow far (metres) a player may move before that cancel5.0
Config.Crafting.ScenarioA different animation while crafting; false keeps the reading animationfalse
Config.ReadScenarioThe animation while the book is open'WORLD_HUMAN_WRITE_NOTEBOOK'
Config.ImageBaseWhere item pictures come from. false asks poggy_core (works on VORP, RSG Core and QBCore RedM); another inventory sets its picture folder, e.g. 'nui://my_inventory/html/images/'false
Config.LaddersXP ladders: the XP each level takes; the number of entries is the top leveldefault, 10 levels
Config.BooksYour books (see below)two examples

server/sv_config.lua holds a Discord webhook for a log of every craft (SvConfig.Webhook).

Books

lua
{
    id = 'survival',
    item = 'survival_guide',             -- the item that opens it
    title = 'Survival Guide',            -- the book's own name
    subtitle = 'Tools, camp cooking and the plain arts of staying alive',
    coverTitle = 'Britannia Craftsbook', -- the big title on the cover: put your server's name here
    coverImage = 'images/emblem.png',    -- a picture in html/images/, a full https:// link, or false
    imprint = 'Printed by Boyd Press, Saint Denis, 1899',
    leather = '#1d1c1b',                 -- the cover colour
    recipes = 'survival',                -- the list in shared/recipes.lua
    ladder = 'default',                  -- the XP ladder
    xpKey = 'survival',                  -- the name its XP is saved under; books sharing one share a level
    jobs = { baker = 0 },                -- optional: jobs (and lowest grade) that may open it
    zone = { coords = vector3(0, 0, 0), radius = 50.0 }, -- optional: only works here
}

To put your own picture on the cover, drop a .png or .jpg into html/images/ and set coverImage = 'images/yourfile.png'.

Recipes

lua
{
    item = 'pickaxe', amount = 1,        -- what one craft makes
    desc = 'An iron tool for breaking rock.',
    level = 0, xp = 10, time = 60,       -- level needed, XP per item, seconds per craft
    price = 0,                           -- optional cash cost per item
    jobs = { blacksmith = 1 },           -- optional: who may craft it
    ingredients = {
        { item = 'pickaxe_head', amount = 1 },
        { item = 'hammer', amount = 1, keep = true }, -- a tool: needed, not used up
    },
    extras = { { item = 'wood_shavings', amount = 1 } }, -- optional bonus items
    weapon = false,                      -- true when item is a WEAPON_...
}

Commands and permissions

There are no commands: players open a book by using its item. Books and recipes can be locked to jobs and grades in the config.

How it works

Opening. Using a book's item closes the inventory and opens the book. The cover swings open onto the contents page. The arrows in the page corners (or A/D and the arrow keys) turn the pages; the ribbon goes back to the contents. Escape closes the book.

Crafting. On a recipe's page, choose how many with − and +, then press Craft. The server checks the book, job, level, cash and ingredients, then times the craft (the recipe's time × how many). When the time is up it checks everything again, takes the ingredients and cash, and gives the items, any bonus items and the XP. Nothing is taken before then, so Stop, closing the book or logging out costs nothing. Closing the book doesn't stop a craft: the player gets a message when it's done.

Levels. Each book saves XP under its xpKey. A recipe with level = 3 can only be crafted at level 3 or above; until then its page is stamped "Not yet learned".

Troubleshooting

Nothing happens when using the book item

The item isn't usable or doesn't match. Check the item exists in your items table, is usable, and is spelled exactly as item in the config. The server console prints a line for a book that has no recipes.

Item pictures show a gold star

The picture wasn't found. If your inventory isn't VORP, RSG Core or QBCore RedM, set Config.ImageBase to its picture folder.

"This book can only be used in its proper place."

The book has a zone. Stand inside it, or remove the zone.

"You can't make sense of this book."

The book has jobs and the player's job or grade isn't on the list.

A craft says an ingredient is missing at the end

The player dropped, sold or used an ingredient during the craft. Nothing is taken and nothing is made.

Version history

  • 1.0.0: first release.

Still stuck?

Open a ticket on our Discord with your framework, your poggy_core version and what you see, and we'll help you get it running.

Get help on Discord