Overview
The Guidebook gives new players a book that explains your server, made to look like a real book printed in 1901. You write the pages, and the book lays itself out. Brand-new characters are given the book and it opens for them once they've spawned.
- A tooled leather cover with gilt lettering and your server's logo.
- Aged paper, period typefaces, red chapter numbers, decorated first letters, running heads and old-style page numbers.
- Real page turning: the leaf turns over in 3D.
- Chapters and sections, a title page and a Contents page that numbers itself. Click any Contents line to jump there.
- Opens from the inventory item or the
/guidecommand. - Works offline: the fonts are included, so nothing is loaded from the internet.
Requirements
- poggy_core (free), version 0.14.0 or newer.
- One of VORP, RSG Core or QBCore RedM (poggy_core connects the script to it).
Install
- Download
Britannia_Guidebookfrom portal.cfx.re → Assets → Granted Assets. - Put the
Britannia_Guidebookfolder in your server'sresourcesfolder. - Copy
installation/images/survivalguide.pnginto your inventory's item images folder (VORP:vorp_inventory/html/img/items/). - Add the item (see Items below):
- VORP: run
SQL.sqlin your database. - RSG Core / QBCore RedM: add a usable, unique
survivalguideitem to your shared items list.
- VORP: run
- Add
ensure Britannia_Guidebooktoserver.cfg, afterensure poggy_core. - Restart the server so the new item is loaded.
installation/install.html has the same steps, the item picture and the SQL, ready to open in your browser.
The script needs no tables of its own. It remembers which characters it has greeted in its own saved data.
Items
| Picture | Item | Label | Used for |
|---|---|---|---|
![]() | survivalguide | Survival Guide | Use it to open the book |
VORP. Run this in your database. It is safe to run more than once: INSERT IGNORE leaves the item alone if you already have it.
INSERT IGNORE INTO `items` (`item`, `label`, `limit`, `can_remove`, `type`, `usable`) VALUES
('survivalguide', 'Survival Guide', 1, 1, 'item_standard', 1);RSG Core / QBCore RedM. Add a survivalguide item to your shared items list, usable and unique, like any other item, and copy the picture into your inventory's image folder.
If you change Config.Item, use the same name in your items list.
Configuration
The script is encrypted with Cfx.re asset escrow. config.lua and book.lua stay editable. The logo picture, html/images/logo.png, can be replaced too.
book.luaholds everything written in the book: the cover, the title page and the chapters. Each chapter has a title and sections, and each section has a title and some simple HTML. The top of the file lists what you can use: paragraphs, lists, boxed notices, price lists with dotted leaders, ornaments, small headings and pictures. Long sections carry on over the page by themselves.- Logo: replace
html/images/logo.pngwith your own. A square PNG works best, and round logos look best. - Whole cover picture: set
Cover.Imageinbook.lua(for example'images/cover.png') to use your own cover art instead of the leather cover.
| Setting | What it does | Default |
|---|---|---|
Config.Debug | Prints what the script is doing to the server and F8 consoles | false |
Config.Item | The usable item that opens the book | 'survivalguide' |
Config.Command | Chat command that opens the book. false turns it off | 'guide' |
Config.CommandNeedsItem | true: the command only works while the player carries the item. false: anyone can use it | true |
Config.FirstSpawn.Give | Give the item to brand-new characters who don't already have one | true |
Config.FirstSpawn.Open | Open the book by itself the first time a new character spawns | true |
Config.FirstSpawn.Delay | Seconds to wait after spawning before giving and opening it | 15 |
Config.Text | Every word shown to players: OpenBook, Previous, Next, Contents, Close, Chapter, Given, NeedItem. Change these to translate the book | English |
Cover (in book.lua) | The cover's Heading, Title, Subtitle, Motto, Logo and optional Image | |
TitlePage (in book.lua) | The first page inside: Title, Subtitle, Byline, Imprint |
Commands and permissions
| Command / key | Who | What it does |
|---|---|---|
/guide | Everyone (with the item, while Config.CommandNeedsItem is true) | Opens the book. The name is Config.Command. |
| Use the Survival Guide item | Everyone | Closes the inventory and opens the book |
| Click the cover, Enter, Space or → | In the book | Opens the book from its cover |
| Page corner, → or D | In the book | Next leaf |
| Page corner, ← or A | In the book | Previous leaf |
| Home | In the book | Contents |
| Esc or Backspace | In the book | Closes the book |
How it works
- Players open the book from their inventory, or with
/guide. - On the cover, they click to open it. Inside, they turn the leaves with the page corners or the keys, and jump to any section from the Contents page.
- New characters: the script greets each character once. After
Config.FirstSpawn.Delayseconds it gives them the book (unless they already have one, for example from your starter items) and opens it once their screen has faded in. - Existing characters: the first time the script starts, it marks every character that already exists as greeted (on VORP and RSG Core), so only characters made after you install it are greeted. Where the character list can't be read, every character is greeted once from then on.
Troubleshooting
Using the item does nothing
The item must exist in your items list, be usable, and have the same name as Config.Item. Restart the server after adding it. Check that poggy_core (0.14.0 or newer) starts before the Guidebook.
/guide says "You aren't carrying the guide book."
Config.CommandNeedsItem is true, so the command only works while carrying the item. Give the player the item, or set it to false.
/guide doesn't exist
Config.Command may be set to false. Set it to a command name, such as 'guide'.
New characters don't get the book or see it open
Check Config.FirstSpawn.Give and Config.FirstSpawn.Open. Characters that existed before the script was first started are never greeted. Each character is greeted only once.
New characters get two books
They won't: the book is only given if the character doesn't already have one. If your starter items give the book, the script skips giving it.
The item has no picture
Copy installation/images/survivalguide.png into your inventory's item images folder, keeping the name.
The mouse cursor stays on screen
Press Esc or Backspace to close the book. If the script is stopped while the book is open, it hands the mouse back to the game.
Version history
- 2.1.1: current 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