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

PackageDescription
btech.autopilotTyped autopilot status, orders, and engagement.
btech.errorChecked BattleTech error-code symbols.
btech.characterCharacter values, skills, and experience.
btech.mapMaps, geometry, line of sight, placement, and messaging.
btech.partsPart catalogue and stores.
btech.playerPlayer configuration.
btech.repairRepair state and technician availability.
btech.systemServer-wide BattleTech queries.
btech.templateImmutable unit-template queries and displays.
btech.unitLive-unit state, combat queries, and mutations.

Record fields and editor types are defined in the generated LuaLS definitions.