Frontier Wire — Integrations
Framework, inventory and notifications are reached only through adapters in bridge/, which is not escrowed. The hooks live there too.
VORP
| Adapter | Resource | Notes |
|---|---|---|
| Framework | vorp_core | Identity, job and rank, cash (currency 0) and the job list for wax seals |
| Inventory | vorp_inventory | Items, metadata, weights, item categories and item pictures |
| Notify | VORP | Notices shown with VORP's own notifications |
Config.Framework and Config.Inventory accept 'auto', the adapter key or its resource name. 'auto' needs exactly one running candidate.
Only cash moves (VORP currency 0), never bank money or gold.
Item metadata keys used by the resource: mailboxMessageId, mailboxOwner, mailboxDraftId, mailboxOperationId. The inventory must keep them when an item is moved or stored.
Item pictures in the parcel screens come from nui://vorp_inventory/html/img/items/.
Custom adapters
A new adapter is a new folder with shared.lua, client.lua and server.lua; the manifest finds it by itself.
-- bridge/inventory/example/shared.lua
Bridge.register('inventory', 'example', {resource = 'example_inventory', name = 'example'})
-- bridge/inventory/example/server.lua
Bridge.register('inventory', 'example', { --[[ the methods below ]] })Framework, server side
| Method | Contract |
|---|---|
identity(source) | nil until a character is selected, otherwise {framework, identifier, characterId, name, job, grade, balance, dead}. Identifiers must stay the same across sessions |
debit(source, amount), credit(source, amount) | Cash only. true = done, false = refused |
playersPage({search, boundary, backwards, limit}), directoryIdentity(id) | Optional: the character directory for the admin's Players tab |
jobs() | Optional: {{name, label, grades = {{grade, label}}, allRanks}} for the seal editor |
Framework, client side
Optional characterLoaded() returns true once the character is in the world. When the player changes character, raise the local client event frontier_mailbox:characterChanged.
Inventory, server side
| Method | Contract |
|---|---|
count(source, item, metadata?), canCarry(source, item, amount) | Counts and space checks |
give(source, item, amount, metadata), take(...) | true only after confirmed success, false only after a confirmed refusal, nil or an error when the outcome is unknown |
find(source, item, metadataKey, value) | That held item's metadata or nil |
register(item, callback), unregister(item) | Usable items; the callback gets (source, metadata) |
| Optional | counts(source, items), items(source) (enables parcels), weights = true, images = {item, missing}, categories, catalog() |
Notify
Server send(source, message, options?), client send(message, options?). options may hold title, kind ('success', 'error', 'info') and duration in milliseconds.
Restart frontier_mailbox after restarting the framework or inventory resource.
Discord logs
On the admin desk, open Discord logs, paste a channel webhook link and choose what is logged:
- administration
- mail traffic (addresses and postage only)
- parcels and cash
- courier work
Message text is never sent. The link is stored apart from the public settings and only shown to administrators.
Database
Eleven tables, created at start with CREATE TABLE IF NOT EXISTS. The resource never alters or drops a table.
| Table | Holds |
|---|---|
frontier_mailbox_settings | In-game settings and the Discord webhook |
frontier_mailbox_characters | Character, licence, mailbox address, home office, preferences |
frontier_mailbox_stations | Post offices |
frontier_mailbox_messages | Sealed papers and telegrams, signature, read flag, bird state |
frontier_mailbox_contacts | Address books |
frontier_mailbox_operations | Journal of every money and item operation |
frontier_mailbox_parcel_items | Items travelling with a telegram |
frontier_mailbox_money | Cash travelling with a telegram |
frontier_mailbox_routes | Mail waiting for couriers |
frontier_mailbox_couriers | Courier trust, streaks, rests |
frontier_mailbox_hidden | Telegrams a character removed from their own lists |
Mail sent by a script from an office has sender = 0 in frontier_mailbox_messages.
Open files
| Path | Purpose |
|---|---|
config.lua | Restart choices |
locale/*.lua | Language files |
bridge/**/*.lua | Adapters and hooks |
Everything in client/ and server/ is escrowed.
