REC_Books
Development
Welcome to REC_Books documentation.
- Added
- Updated
This page is for working on the screen itself, from the web/ source.
Running the screen without FiveM
cd web
pnpm install
pnpm dev
Then open http://localhost:5173/?mock=1&mode=edit.
mock swaps the game for an in-memory server that answers with the same rules and error codes. It only exists in pnpm dev and never ends up in the build.
| Parameter | Effect |
|---|---|
mode=edit|read|moderate | Which screen opens. edit when left out |
empty=1 | A brand new book with nothing saved yet |
hidden=1 | A book hidden by staff |
sealed=1 | A bound book |
lang=en | English text. Japanese when left out |
fail=<CODE> | Answers one call with that error code, for example fail=CONFLICT |
failOn=<action> | The call fail answers. Each code has its own default |
failCount=<n> | How many times fail answers |
fixture=<name> | Puts tests/fixtures/valid/<name>.json on a surface |
delay=<ms> | Answer delay. 140 by default |
motion=<preset> | Motion preset (normal / journey / old / default) |
The badge in the bottom right corner switches between the screens, sends a bookChanged and closes the book.
Building
cd web
pnpm build
The output goes to web/build/, which is what the game loads.
