Log inGet started
World

Sealed Orders: Assassination Contracts, Opportunities, Exits and Ratings Kit

README.md

Mission Dossier: Contract Select, Briefing and Debrief Screens Kit

missionScreens draws the three screens a mission, heist, contract or quest game needs, in five crafted styles that swap with one setting:

ScreenWhat the player seesWhat the game gets back
Selectevery mission with its target, location, mastery marks and best gradepick(id)
Briefingthe orders, the target's portrait, known intel, and chips for a starting point, an outfit and gear (selected, locked behind a mastery level, or free), the crew's ready statechoose(kind, id), ready(), back()
Debriefrating lines that stagger in one by one, a total that ticks up, the grade stamped down, mastery gained and unlocks, the crew and a team gradereplay(), select()
Leavinga short full-screen moment while the player slips away by an exitdone() after N seconds

Styles (family briefing draws briefing + debrief, family select draws the select):

idfamilylook
scrollbriefingaged parchment between wooden rollers, wax seal, inked oval portrait, ledger, red ink stamp
caseBoardbriefingcork board, polaroid on a pin, intel index cards on red string, typed after-action report, stamp circle
cardbriefingcompact phone-first card with a dark head band and a gold grade medallion (used on phones by default)
boardselectweathered plank notice board of torn pinned bills under a lamp
listselectclean dark list with framed portraits and Play buttons

Every style fits 1280x720, 1920x1080, a 390x844 phone and an 844x390 landscape phone; phone buttons are at least 48px; buttons are focusable for gamepad and the first one takes focus; reduced motion shows everything at once.

Use it

local Screens = require("missionScreens.screens")
local Samples = require("missionScreens.samples")   -- invented models to try it with
require("missionScreens.styleScroll"); require("missionScreens.styleCaseBoard"); require("missionScreens.styleCard")
require("missionScreens.selectBoard"); require("missionScreens.selectList")

Screens.configure({ sound = function(name) mySounds.play(name) end })   -- optional: click, hover, open, stamp, leave
require("missionScreens.registry").configure({ briefing = "caseBoard", select = "list" })

Screens.briefing(Samples.briefingModel(), {
	choose = function(kind, id) --[[ start / outfit / gear ]] end,
	ready = function() end,
	back = function() end,
})

Screens.build(kind, model, styleId?, { w, h }?) returns the widget tree without showing it (previews, galleries, tests). Screens.configure({ screen, env, layer, idPrefix, phoneCard, sound, resolve }) lets a game keep its own screen id, callback env, button id prefix (default ms_btn_, giving ms_btn_ready, ms_btn_pick_<id>, ms_btn_<kind>_<id>) and its own style registry (resolve(family, id?, ctx)).

The model

Plain data, in the game's own words. A mission (contract): id, title, location, client?, brief, targets = {{ name, title, portrait?, description }}, intel = {{ title, text, source }}, starts/outfits/gear = {{ id, title, text }}, mastery = { thresholds }.

  • select: { contracts = {{ contract, level, best }}, host, lexicon? }
  • briefing: { contract, mastery = { level, best }, choices = { level, starts, outfits, gear } (rows with locked, need), knownIntel, choice = { start, outfit, gear = {ids} }, ready, others = {{ name, ready }}, live, host, lexicon? }
  • debrief: { contract, result = { display = "rank"|"letter"|"stars"|"team", grade, tier, tierIndex, tiers, tableTitle, total, unit, lines = {{ label, value, points, kind = base|bonus|penalty|info }}, failed }, mastery = { xpGained, xp, level, levelBefore, unlocked, nextAt }, team?, crew, allDone, host, lexicon? }

lexicon renames the screen words (contract, target, intel, start, outfit, gear, begin, replay, waiting and the rest in words.module): a heist game passes { contract = "Job", target = "Mark" }. A word the model does not name comes from the catalog.

Words

Every word the screens print comes from the model or from locales/en/missionscreens.json and locales/pt-BR/missionscreens.json (namespace missionscreens). A world overrides any line by putting the same key in its own /locales/<tag>/missionscreens.json.

Parts

screens.module controller · registry.module styles · widgets.module shared builders · words.module words · styleScroll, styleCaseBoard, styleCard, selectBoard, selectList · samples.module · missionScreensTests.testSuite · guide how-to-show-a-mission-briefing-and-debrief-screen.

Used by Sealed Orders (package assassinationKit; its assassinationKit.screens module is a thin adapter over this one).