Installation
Overview
ML Diary is a personal diary and encyclopedia system. Players carry a diary item, write personal notes with drawings, and unlock discoverable entries (fauna, flora, locations, items) through exploration and model interaction. In metadata mode the diary behaves as a transferable physical object, anyone holding it can read, write, and tear pages. In license mode the data is bound to the player's identifier and travels with them across diary items.
Quick Start
- Download from CFX Portal
- Extract to your
resourcesfolder asml_diary - Add to
server.cfg:
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ml_diaryml_diary must start AFTER ml_bridge.
Database
The table is created automatically on first start:
diaries: Stores diary data per serial: owner identifier (audit only), discoveries (JSON), personal notes (JSON)
Schema is also available in _INSTALL/sql.sql if manual creation is preferred.
Item Registration
Item definitions for both ox_inventory and the QB-format are bundled in _INSTALL/items.lua. Copy the relevant block into your inventory's items file:
diary: The personal diary item (requires unique metadata, markedunique = trueon QB-style inventories)diary_page: Torn page item used to share single notes between diaries
Item names are configurable via Config.DiaryItemName and Config.TornPageItemName.
Place diary.png and diary_page.png in your inventory image folder (e.g. ox_inventory/web/images/).
Verify
After starting, the console will print:
1[ml_diary] Resource started
2[ml_diary] Developed by Micio Mods | miciomods.itGive yourself a diary with /giveitem <id> diary 1, use it from inventory, and the book UI should open.
- Diary not opening. Verify the item exists in your inventory and has a
serialin its metadata. Inlicensemode no serial is required, the diary is keyed on the player identifier. - Discoveries not triggering. Confirm the discoverable's
modelhash matches a real entity, or that zonecoords/radius/sizeare correct. - Notes not saving. Check the
oxmysqlconnection. Auto-save runs everyConfig.SaveIntervalminutes;onResourceStopflushes dirty diaries on shutdown. - Webhooks silent,
server/config_server.luaships withINSERT_WEBHOOK_LINK_HEREplaceholders. The boot warning lists which keys are still unconfigured.