Skip to content

Tickets & the door ​

Events ​

Event planner: the calendar, the venue map with VIP areas, tiers, lineup and revenue

ent.events opens the planner (/planner). An event has a title, venue, start and end, status (draft → on_sale → live → ended, or cancelled), capacity, minimum age, a poster, tiers, a lineup and publish targets. Limits come from the feature: maxCapacity, maxPrice, maxEventsPerWeek and the allowed publish targets.

  • Tiers: label, price, quantity, perks (fast lane, drink tokens), the wristband tier they map to, the VIP zones they may enter, and re-entries.
  • Lineup: slots with performer, role (dj, perform, speech), fee and status. Confirming a slot grants the performer the matching feature for the slot window.
  • Publish: the Events app, np_phone News and Yellow Pages, np_screens boards, a map blip while live, Discord, and any target another resource registers.
  • Finance (ent.events.finance): revenue by tier and promoter, performer fees, refunds and the payout to the configured payee.

Tickets ​

A ticket is an ent_ticket item, one per entry, with unique metadata so it never stacks: { ticketId, eventId, tier, label, venue, startsAt, code }. code is an HMAC over ticketId|eventId|tier with the ticket secret; the wallet draws its QR from it.

The database decides entry. ent_tickets holds one row per ticket with its status (valid, used, refunded, void) and the entries left. A copied item or a used ticket fails because its row says so.

  • Buying reserves stock, charges through np_payments (or the framework), issues the item and rolls the stock back if the charge fails.
  • Refunds: cancelling an event refunds through the stored payment reference and voids the rows. References survive a restart.
  • Resale through the Events app: the buyer pays the listed price (up to maxResale), the seller gets it minus resaleFee for the venue, and the item moves before the row changes holder.
  • Box office (ent.tickets.sell): sell tiers and cover charge at the venue, with up to maxDiscount.

The door with np_security ​

np_security door tablet with the ticket provider next to ID, lists and bans

Concept render of the door with np_security.

np_security owns the door: shown ID and age, guest / VIP / staff / ban lists, wristbands and the capacity counter. np_entertainment adds tickets to it as an admission provider:

lua
exports.np_security:registerAdmissionProvider('ent_tickets', {
  label = 'Ticket', icon = 'ticket',
  check   = function(src, venue) --[[ { ok, label, tier, plusOnes, ref } ]] end,
  consume = function(src, venue, ref, by) --[[ stamps the item, decrements entries left ]] end,
})

The bouncer's tablet shows the ticket next to ID, age, lists and bans. Admit hands out np_security's wristband with the ticket's tier and consumes one entry. When an event goes live, np_entertainment sets the site's capacity and age limit for the night and writes lineup guests and promoter comps into its lists. np_entertainment keeps no lists of its own.

The provider registers when np_security exposes registerAdmissionProvider; the adapter re-attaches whenever np_security restarts.

The fallback door ​

Fallback door: the guest's ticket, age check, admit or refuse, and the capacity counter

Without np_security, np_entertainment runs a small door of its own at the venue's door zone. Staff with Config.Events.door.fallbackFeature (default ent.tickets.sell) open it for the nearest guest: the ticket check, the age from np_identification (unknown ages are refused unless allowUnknownAge), Admit, Refuse, a capacity counter and a door sale for guests without a ticket (paid separately by the guest).

Inner doors ​

VIP and backstage doors are np_doors rules on the wristband tier (band:<venue>:<tier>). Entering a VIP zone without the band alerts the door staff; there is no teleport and no invisible wall.