NUI contract ​
The contract between the Lua client, the web UI (web/) and the server RPCs behind it. The wire types are in
web/src/lib/types.ts plus each screen's types.ts, and web/scripts/check-contract.mjs checks them against the Lua
registrations. You only need this page to change the UI or write your own front end; resources that work with fishing
use the exports.
The NUI is server-authoritative: it only sends intents. The server owns the roll (species, weight, quality at bite time), the session token, timing plausibility, zone and water checks, every distance, prices, money and items.
Messages ​
Lua → NUI: SendNUIMessage({ action, data }).
| Action | Data |
|---|---|
init |
{ locale, config = { framework, inventory, economy, license, phone }, player = { identifier, name, admin, level, xp, nextXp }, synced } |
sync |
{ key, data }: a synced key changed (progression, economy, loop.drops, …) |
screen:open / screen:update / screen:close |
{ id, data, focus } / { id, data } / { id } |
toast |
{ type, title, message, icon, tint, app, duration }: fallback while np_hud isn't running |
prompt:show / prompt:hide |
{ id, icon, keys = { { key, label } } } / { id }: fallback |
progress:start / progress:cancel |
{ id, label, icon, tint, duration, canCancel } / { id }: fallback |
theme |
{ brand?, strength?, material? }: np_admin's server theme, Config.Theme where set |
NUI → Lua: one callback, https://np_fishing/rpc, with { method, params }. ui.ready, ui.close and
progress.done are client-local; everything else goes to the server dispatcher (net event np_fishing:rpc, 10 s
timeout), rate-limited per player (Config.Rpc). Handlers answer data or an error code; every code has a text in
English and German.
Screens ​
web/src/screens/<module>/. A screen's layer: hud floats free and never takes focus, screen is a Nimbus glass
menu, overlay never catches the mouse.
| id | Layer | Focus | What |
|---|---|---|---|
loop |
hud | none | The fishing HUD: cast, wait, bite, fight, depth gauge, hints, chips |
loop.reveal |
overlay | none | The reveal card |
loop.toast |
overlay | none | The "+1" catch toast |
progression.tackle |
screen | full | Tackle box |
progression.journal |
screen | full | Journal |
economy |
screen | full | Sell screen at a buyer |
economy.shop |
screen | full | Bait & tackle counter |
social.staff |
screen | full | Tournament staff screen |
The Angler app is a second page, web/dist/phone.html, with the tabs forecast, spots, events, market,
records.
RPC methods ​
core.rating -> Rating at the player's position (+ zoneLabel)
core.forecast { zone, steps? } -> { zone, label, hours }
core.catalog -> { species, zones, gear }
loop.start | loop.stop rod out / away
loop.cast { power, perfect, target, depth, bottom? } -> { token, zone, water, depth, distance, chips }
loop.strike { token } -> fight params
loop.report { token, tension, line, stamina } fight telemetry, about once a second
loop.land { token } -> { catch, reveal, value, xp, … }
loop.lose { token, reason } snapped | escaped | spool | cut
loop.keep | loop.release | loop.photo { token } loop.showoff · loop.cancel { token?, reason? }
loop.chips · loop.pickup { id }
progression.tackle | .equip { slot } | .unequip { part } | .rod { slot } | .depth { depth } | .repair
progression.preset.save { name, icon } | .preset.load { id } | .preset.delete { id }
progression.journal | .species { id } | .records | .spots | .waypoint { zone } | .achievements
progression.skills | .perk.buy { id } | .perk.reset | .admin.xp { target, amount } (staff)
economy.open { buyer } | .sell { buyer, items } | .ice | .fillet | .trophy | .donate | .aquarium | .board
economy.shop { shop } | .buy { shop, item, count } | .service { shop, kind, key }
economy.order.list | .create | .take | .fill | .cancel | .claim
economy.resetPrices { buyer? } (staff, np_fishing.prices)
social.forecast | .alerts { on } | .spots | .waypoint | .share { zone, number } | .events | .join { id }
social.market | .records | .checkLicense { target } (rangers)
social.staff.list | .create | .start | .finish | .cancel (staff, np_fishing.tournaments)
Fish in the sell screen are named by key: p:<slot> in the pockets, c:<uid>:<slot> inside a cooler, v:<catch id>
in the virtual cooler. Every action sends { key, species, weight } and the server re-reads the item: a slot that
changed is refused, never swapped.
The Angler app calls the social.* methods through np_phone's app RPCs.
Look ​
- Nimbus UI, copied verbatim into
web/design/and never edited. Quicksand only, Font Awesome Solid. - The in-world HUD has no panels: white text with a shadow, grey key caps, mouse glyphs, diamond pip meters. Menus are Nimbus glass; the phone app uses the np_phone app kit with the aqua accent.
- Colour means something: white = power, the perfect window, the expected input; green OK / fresh / strike zone, orange warning, red danger / snap / spoiled, blue info / saltwater. Rarity only on small marks. No gold or yellow (tested).
- Gradient surfaces with a border keep
background-origin: border-box(scoped!importantguard, tested); borders usevar(--nb-glass-border-color). - No
backdrop-filterwithout the FiveM guard (html.nb-fivem, checked bynpm run check:fivem).