btech package
require("btech") returns the native, typed BattleTech API. Gameplay calls are
unavailable during @lua/check and raise mux.unavailable.checking there.
Database-object parameters accept either a numeric DbRef or a same-runtime
Object handle. Character parameters require an
Object. Returned database references are Object handles; absent optional
relationships are nil, and object collections are dense arrays.
The package follows Mux conventions: required arguments are validated, some functions ignore surplus positional arguments while others require exact arity, options tables reject unknown fields, and mutation-only functions return no Lua values. Failures raise structured errors. APIs with closed vocabularies use immutable typed constants from their documented namespaces rather than magic strings.
Subpackages
| Package | Description |
|---|---|
btech.autopilot | Typed autopilot status, orders, and engagement. |
btech.error | Checked BattleTech error-code symbols. |
btech.character | Character values, skills, and experience. |
btech.map | Maps, geometry, line of sight, placement, and messaging. |
btech.parts | Part catalogue and stores. |
btech.player | Player configuration. |
btech.repair | Repair state and technician availability. |
btech.system | Server-wide BattleTech queries. |
btech.template | Immutable unit-template queries and displays. |
btech.unit | Live-unit state, combat queries, and mutations. |
Record fields and editor types are defined in the generated LuaLS definitions.