<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>btech.unit on StompyMUX Documentation</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/</link><description>Recent content in btech.unit on StompyMUX Documentation</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://stompymux.com/docs/scripting/packages/btech/unit/index.xml" rel="self" type="application/rss+xml"/><item><title>apply_damage</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/apply-damage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/apply-damage/</guid><description>&lt;p&gt;Applies clustered damage to a live unit.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.apply_damage( unit, request )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;table request&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The damage request.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;The request requires these fields:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;integer amount&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The total damage to apply, from 1 to 1000.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;integer cluster_size&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The maximum damage in each cluster, from 1 to 1000.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;integer direction_code&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The attack direction code, from 0 to 21.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Codes 0 through 7 damage a fixed section; codes 8 through 15 target the
corresponding section (&lt;code&gt;code - 8&lt;/code&gt;) with the rear-hit flag. Section indices
depend on the unit class:&lt;/p&gt;</description></item><item><title>armor</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/armor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/armor/</guid><description>&lt;p&gt;Returns a live unit&amp;rsquo;s armor and internal values.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.armor( unit, section )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechSection|nil section&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;An optional typed constant from &lt;a href="../sections/"&gt;&lt;code&gt;btech.unit.sections&lt;/code&gt;&lt;/a&gt; that is
valid for the unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechArmorStatus status&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The requested armor status.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;When &lt;code&gt;section&lt;/code&gt; is omitted, the returned armor, internal-structure, and rear-
armor values are totals across all sections, and the record has no &lt;code&gt;section&lt;/code&gt;
field.
When present, the returned &lt;code&gt;section&lt;/code&gt; is the same typed constant and round-trips
into section-taking functions.&lt;/p&gt;</description></item><item><title>assigned_pilot</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/assigned-pilot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/assigned-pilot/</guid><description>&lt;p&gt;Returns a live unit&amp;rsquo;s assigned pilot.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.assigned_pilot( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;Object|nil pilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The pilot, or &lt;code&gt;nil&lt;/code&gt; when none is assigned.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>battle_value</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/battle-value/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/battle-value/</guid><description>&lt;p&gt;Calculates a live unit&amp;rsquo;s current battle value.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.battle_value( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechBattleValue value&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The total, offensive, and defensive values.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>btech.unit.ammunition_modes</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/ammunition-modes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/ammunition-modes/</guid><description>&lt;p&gt;&lt;code&gt;btech.unit.ammunition_modes&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechAmmunitionMode&lt;/code&gt; constants.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.ammunition_modes.CONSTANT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechAmmunitionMode constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed ammunition mode represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, raw strings,
wrong-kind constants, or constants from another runtime.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants are immutable and local to the runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constants&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;LBX_CLUSTER&lt;/code&gt;, &lt;code&gt;ARTEMIS_MINE&lt;/code&gt;, &lt;code&gt;NARC_SMOKE&lt;/code&gt;, &lt;code&gt;CLUSTER&lt;/code&gt;, &lt;code&gt;MINE&lt;/code&gt;, &lt;code&gt;SMOKE&lt;/code&gt;, &lt;code&gt;INFERNO&lt;/code&gt;, &lt;code&gt;SWARM&lt;/code&gt;, &lt;code&gt;SWARM_1&lt;/code&gt;, &lt;code&gt;INARC_EXPLOSIVE&lt;/code&gt;, &lt;code&gt;INARC_HAYWIRE&lt;/code&gt;, &lt;code&gt;INARC_ECM&lt;/code&gt;, &lt;code&gt;INARC_NEMESIS&lt;/code&gt;, &lt;code&gt;ARMOR_PIERCING&lt;/code&gt;, &lt;code&gt;FLECHETTE&lt;/code&gt;, &lt;code&gt;INCENDIARY&lt;/code&gt;, &lt;code&gt;PRECISION&lt;/code&gt;, &lt;code&gt;STINGER&lt;/code&gt;, &lt;code&gt;CASELESS&lt;/code&gt;, &lt;code&gt;SEMI_GUIDED&lt;/code&gt;, &lt;code&gt;EXTENDED_RANGE&lt;/code&gt;, &lt;code&gt;HIGH_EXPLOSIVE&lt;/code&gt;, &lt;code&gt;MML_LRM&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Mode arrays accepted by &lt;code&gt;configure_ammunition&lt;/code&gt; and &lt;code&gt;set_weapon_modes&lt;/code&gt; contain
these constants. Repeated lookups of the same mode compare equal and stringify
to their uppercase key; other values, constant kinds, and runtimes compare
unequal. Unknown lookups, mutation, raw strings, wrong-kind constants, and
cross-runtime constants raise &lt;code&gt;mux.arg.invalid&lt;/code&gt; where an argument is required.&lt;/p&gt;</description></item><item><title>btech.unit.fire_modes</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/fire-modes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/fire-modes/</guid><description>&lt;p&gt;&lt;code&gt;btech.unit.fire_modes&lt;/code&gt; is an immutable namespace of typed &lt;code&gt;BtechFireMode&lt;/code&gt;
constants.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.fire_modes.CONSTANT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechFireMode constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed fire mode represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, raw strings,
wrong-kind constants, or constants from another runtime.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants are immutable and local to the runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constants&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;DESTROYED&lt;/code&gt;, &lt;code&gt;DISABLED&lt;/code&gt;, &lt;code&gt;BROKEN&lt;/code&gt;, &lt;code&gt;DAMAGED&lt;/code&gt;, &lt;code&gt;TARGETING_COMPUTER&lt;/code&gt;, &lt;code&gt;REAR_MOUNT&lt;/code&gt;, &lt;code&gt;HOTLOAD&lt;/code&gt;, &lt;code&gt;HALF_TON&lt;/code&gt;, &lt;code&gt;ONE_SHOT&lt;/code&gt;, &lt;code&gt;ONE_SHOT_USED&lt;/code&gt;, &lt;code&gt;ULTRA&lt;/code&gt;, &lt;code&gt;RAPID_FIRE&lt;/code&gt;, &lt;code&gt;GATLING&lt;/code&gt;, &lt;code&gt;ROTARY_TWO_SHOT&lt;/code&gt;, &lt;code&gt;ROTARY_FOUR_SHOT&lt;/code&gt;, &lt;code&gt;ROTARY_SIX_SHOT&lt;/code&gt;, &lt;code&gt;HEAT&lt;/code&gt;, &lt;code&gt;BACKPACK&lt;/code&gt;, &lt;code&gt;JETTISONED&lt;/code&gt;, &lt;code&gt;OMNI_BASE&lt;/code&gt;, &lt;code&gt;ROCKET_FIRED&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Mode arrays accepted by &lt;code&gt;set_weapon_modes&lt;/code&gt; contain these constants. Repeated
lookups of the same mode compare equal and stringify to their uppercase key;
other values, constant kinds, and runtimes compare unequal. Unknown lookups,
mutation, raw strings, wrong-kind constants, and cross-runtime constants raise
&lt;code&gt;mux.arg.invalid&lt;/code&gt; where an argument is required.&lt;/p&gt;</description></item><item><title>btech.unit.movement_types</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/movement-types/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/movement-types/</guid><description>&lt;p&gt;&lt;code&gt;btech.unit.movement_types&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechMovementType&lt;/code&gt; constants.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.movement_types.CONSTANT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechMovementType constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed movement class represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, or use as the wrong
typed argument.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants are immutable and local to the runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constants&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;BIPED&lt;/code&gt;, &lt;code&gt;TRACK&lt;/code&gt;, &lt;code&gt;WHEEL&lt;/code&gt;, &lt;code&gt;HOVER&lt;/code&gt;, &lt;code&gt;VTOL&lt;/code&gt;, &lt;code&gt;HULL&lt;/code&gt;, &lt;code&gt;FOIL&lt;/code&gt;, &lt;code&gt;FLY&lt;/code&gt;, &lt;code&gt;QUAD&lt;/code&gt;, &lt;code&gt;SUB&lt;/code&gt;, &lt;code&gt;NONE&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Use these values with &lt;code&gt;btech.unit.set_movement_type&lt;/code&gt;. Repeated lookups of the
same movement type compare equal and stringify to their uppercase key; other
values, constant kinds, and runtimes compare unequal. Unknown lookups, mutation,
raw strings, wrong-kind constants, and constants from another Lua runtime raise
&lt;code&gt;mux.arg.invalid&lt;/code&gt; where an argument is required.&lt;/p&gt;</description></item><item><title>btech.unit.sections</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/sections/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/sections/</guid><description>&lt;p&gt;&lt;code&gt;btech.unit.sections&lt;/code&gt; is an immutable namespace of typed &lt;code&gt;BtechSection&lt;/code&gt;
constants. Section-taking functions validate that the selected section exists
for the target unit or template.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.sections.CONSTANT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechSection constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed section represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, or use as the wrong
typed argument. Section-taking functions also reject sections absent from the
selected layout.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants are immutable and local to the runtime that created them.&lt;/p&gt;</description></item><item><title>btech.unit.technology</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/technology/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/technology/</guid><description>&lt;p&gt;&lt;code&gt;btech.unit.technology&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechTechnologyCode&lt;/code&gt; constants.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.technology.CONSTANT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechTechnologyCode constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed technology code represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, raw strings,
wrong-kind constants, or constants from another runtime.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants are immutable and local to the runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Group&lt;/th&gt;
					&lt;th&gt;Constants&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;Primary unit technology&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;TRIPLE_STRENGTH_MYOMER&lt;/code&gt;, &lt;code&gt;CLAN_ANTI_MISSILE&lt;/code&gt;, &lt;code&gt;INNER_SPHERE_ANTI_MISSILE&lt;/code&gt;, &lt;code&gt;DOUBLE_HEAT_SINKS&lt;/code&gt;, &lt;code&gt;MASC&lt;/code&gt;, &lt;code&gt;CLAN&lt;/code&gt;, &lt;code&gt;FLIPPABLE_ARMS&lt;/code&gt;, &lt;code&gt;C3_MASTER&lt;/code&gt;, &lt;code&gt;C3_SLAVE&lt;/code&gt;, &lt;code&gt;ARTEMIS_IV&lt;/code&gt;, &lt;code&gt;ECM&lt;/code&gt;, &lt;code&gt;BEAGLE_PROBE&lt;/code&gt;, &lt;code&gt;SALVAGE&lt;/code&gt;, &lt;code&gt;CARGO&lt;/code&gt;, &lt;code&gt;SEARCH_LIGHT&lt;/code&gt;, &lt;code&gt;LIGHT_ACTIVE_PROBE&lt;/code&gt;, &lt;code&gt;ANTI_AIRCRAFT&lt;/code&gt;, &lt;code&gt;NO_SENSORS&lt;/code&gt;, &lt;code&gt;SIXTH_SENSE&lt;/code&gt;, &lt;code&gt;FERRO_FIBROUS&lt;/code&gt;, &lt;code&gt;ENDO_STEEL&lt;/code&gt;, &lt;code&gt;XL_ENGINE&lt;/code&gt;, &lt;code&gt;ICE_ENGINE&lt;/code&gt;, &lt;code&gt;SINGLE_HEAT_SINKS&lt;/code&gt;, &lt;code&gt;LIGHT_ENGINE&lt;/code&gt;, &lt;code&gt;XXL_ENGINE&lt;/code&gt;, &lt;code&gt;COMPACT_ENGINE&lt;/code&gt;, &lt;code&gt;REINFORCED_INTERNAL&lt;/code&gt;, &lt;code&gt;COMPOSITE_INTERNAL&lt;/code&gt;, &lt;code&gt;HARDENED_ARMOR&lt;/code&gt;, &lt;code&gt;CRITICAL_PROOF&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Secondary unit technology&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;STEALTH_ARMOR&lt;/code&gt;, &lt;code&gt;HEAVY_FERRO_FIBROUS&lt;/code&gt;, &lt;code&gt;LASER_REFLECTIVE_ARMOR&lt;/code&gt;, &lt;code&gt;REACTIVE_ARMOR&lt;/code&gt;, &lt;code&gt;NULL_SIGNATURE_SYSTEM&lt;/code&gt;, &lt;code&gt;C3I&lt;/code&gt;, &lt;code&gt;SUPERCHARGER&lt;/code&gt;, &lt;code&gt;IMPROVED_JUMP_JETS&lt;/code&gt;, &lt;code&gt;MECHANICAL_JUMP_JETS&lt;/code&gt;, &lt;code&gt;COMPACT_HEAT_SINKS&lt;/code&gt;, &lt;code&gt;LASER_HEAT_SINKS&lt;/code&gt;, &lt;code&gt;BLOODHOUND_PROBE&lt;/code&gt;, &lt;code&gt;ANGEL_ECM&lt;/code&gt;, &lt;code&gt;WATCHDOG&lt;/code&gt;, &lt;code&gt;LIGHT_FERRO_FIBROUS&lt;/code&gt;, &lt;code&gt;TAG&lt;/code&gt;, &lt;code&gt;OMNIMECH&lt;/code&gt;, &lt;code&gt;ARTEMIS_V&lt;/code&gt;, &lt;code&gt;CAMOUFLAGE&lt;/code&gt;, &lt;code&gt;CARRIER&lt;/code&gt;, &lt;code&gt;WATERPROOF&lt;/code&gt;, &lt;code&gt;XL_GYRO&lt;/code&gt;, &lt;code&gt;HEAVY_DUTY_GYRO&lt;/code&gt;, &lt;code&gt;COMPACT_GYRO&lt;/code&gt;, &lt;code&gt;TARGETING_COMPUTER&lt;/code&gt;, &lt;code&gt;SMALL_COCKPIT&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;Infantry technology&lt;/td&gt;
					&lt;td&gt;&lt;code&gt;SWARM_ATTACK&lt;/code&gt;, &lt;code&gt;MOUNT_FRIENDS&lt;/code&gt;, &lt;code&gt;ANTI_LEG_ATTACK&lt;/code&gt;, &lt;code&gt;PURIFIER_STEALTH&lt;/code&gt;, &lt;code&gt;KAGE_STEALTH&lt;/code&gt;, &lt;code&gt;ACHILEUS_STEALTH&lt;/code&gt;, &lt;code&gt;INFILTRATOR_STEALTH&lt;/code&gt;, &lt;code&gt;INFILTRATOR_II_STEALTH&lt;/code&gt;, &lt;code&gt;MUST_JETTISON_PACK&lt;/code&gt;, &lt;code&gt;CAN_JETTISON_PACK&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Use these values with &lt;code&gt;add_technology&lt;/code&gt; and &lt;code&gt;remove_technology&lt;/code&gt;. Infantry
constants require a battlesuit. Repeated lookups of the same technology compare
equal and stringify to their uppercase key; other values, constant kinds, and
runtimes compare unequal. Unknown lookups, mutation, raw strings,
wrong-kind constants, and cross-runtime constants raise &lt;code&gt;mux.arg.invalid&lt;/code&gt;
where an argument is required.&lt;/p&gt;</description></item><item><title>btech.unit.technology_groups</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/technology-groups/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/technology-groups/</guid><description>&lt;p&gt;&lt;code&gt;btech.unit.technology_groups&lt;/code&gt; is an immutable namespace of typed
&lt;code&gt;BtechTechnologyGroup&lt;/code&gt; constants.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.technology_groups.CONSTANT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechTechnologyGroup constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed clearing group represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, raw strings,
wrong-kind constants, or constants from another runtime.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants are immutable and local to the runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constant&lt;/th&gt;
					&lt;th&gt;Group cleared by &lt;code&gt;clear_technologies&lt;/code&gt;&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;UNIT&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Primary and secondary unit technologies.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;INFANTRY&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Battlesuit infantry technologies.&lt;/td&gt;
			&lt;/tr&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;ALL&lt;/code&gt;&lt;/td&gt;
					&lt;td&gt;Unit and infantry technologies.&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Repeated lookups of the same group compare equal and stringify to their
uppercase key; other values, constant kinds, and runtimes compare unequal.
Unknown lookups, mutation, raw strings, wrong-kind constants, and cross-runtime
constants raise &lt;code&gt;mux.arg.invalid&lt;/code&gt; where an argument is required.&lt;/p&gt;</description></item><item><title>btech.unit.types</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/types/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/types/</guid><description>&lt;p&gt;&lt;code&gt;btech.unit.types&lt;/code&gt; is an immutable namespace of typed &lt;code&gt;BtechUnitType&lt;/code&gt;
constants.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.types.CONSTANT
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;p&gt;This namespace takes no arguments.&lt;/p&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechUnitType constant&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The typed unit class represented by &lt;code&gt;CONSTANT&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="raises"&gt;Raises&lt;/h3&gt;
&lt;p&gt;Raises &lt;code&gt;mux.arg.invalid&lt;/code&gt; for invalid lookup, mutation, or use as the wrong
typed argument.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Constants are immutable and local to the runtime that created them.&lt;/p&gt;
&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;Constants&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;code&gt;MECH&lt;/code&gt;, &lt;code&gt;VEHICLE&lt;/code&gt;, &lt;code&gt;VTOL&lt;/code&gt;, &lt;code&gt;NAVAL&lt;/code&gt;, &lt;code&gt;SPHEROID_DROPSHIP&lt;/code&gt;, &lt;code&gt;AERO_FIGHTER&lt;/code&gt;, &lt;code&gt;MECHWARRIOR&lt;/code&gt;, &lt;code&gt;AERODYNE_DROPSHIP&lt;/code&gt;, &lt;code&gt;BATTLESUIT&lt;/code&gt;&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Use these values with &lt;code&gt;btech.unit.set_unit_type&lt;/code&gt;. Repeated lookups of the same
unit type compare equal and stringify to their uppercase key; other values,
constant kinds, and runtimes compare unequal. Unknown lookups, mutation, raw
strings, wrong-kind constants, and constants from another Lua runtime raise
&lt;code&gt;mux.arg.invalid&lt;/code&gt; where an argument is required.&lt;/p&gt;</description></item><item><title>critical_slots</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/critical-slots/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/critical-slots/</guid><description>&lt;p&gt;Lists a live unit section&amp;rsquo;s critical slots.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.critical_slots( unit, section )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechSection section&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A typed constant from &lt;a href="../sections/"&gt;&lt;code&gt;btech.unit.sections&lt;/code&gt;&lt;/a&gt; that is valid for
the unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechCriticalSlot[] slots&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The critical-slot records. Each record&amp;rsquo;s &lt;code&gt;section&lt;/code&gt;, &lt;code&gt;fire_modes&lt;/code&gt;, and
&lt;code&gt;ammunition_modes&lt;/code&gt; fields contain typed constants from the corresponding
&lt;code&gt;btech.unit&lt;/code&gt; namespaces and can be reused as inputs without conversion.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>display_name</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/display-name/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/display-name/</guid><description>&lt;p&gt;Returns a live unit&amp;rsquo;s display-name override.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.display_name( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;string|nil name&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The override, or &lt;code&gt;nil&lt;/code&gt; when unset.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>effective_max_speed</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/effective-max-speed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/effective-max-speed/</guid><description>&lt;p&gt;Returns a live unit&amp;rsquo;s effective maximum speed.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.effective_max_speed( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;number movement_points&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The effective maximum speed in movement points.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Use &lt;code&gt;effective_max_speed_kph&lt;/code&gt; when kilometers per hour are required.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>engine</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/engine/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/engine/</guid><description>&lt;p&gt;Returns a live unit&amp;rsquo;s engine configuration.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.engine( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechEngine engine&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The rating and suspension factor.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>installed_parts</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/installed-parts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/installed-parts/</guid><description>&lt;p&gt;Lists parts represented by non-destroyed critical slots on a live unit.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.installed_parts( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechPartStack[] parts&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The installed parts and quantities.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Destroyed critical slots are omitted.&lt;/p&gt;
&lt;p&gt;Consecutive weapon slots in the same section with the same part and brand are
grouped as one weapon installation. Consequently, separate identical one-slot
weapons installed in adjacent slots are reported with a combined quantity of
one.&lt;/p&gt;</description></item><item><title>load_template</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/load-template/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/load-template/</guid><description>&lt;p&gt;Loads a unit template into a live unit.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.load_template( unit, reference )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;string reference&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The non-empty unit-template reference. It cannot contain &lt;code&gt;..&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, or &lt;code&gt;\&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;A missing template raises &lt;code&gt;btech.template.not_found&lt;/code&gt;. A template that exists but
is malformed raises &lt;code&gt;btech.template.invalid&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>markings</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/markings/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/markings/</guid><description>&lt;p&gt;Returns a live unit&amp;rsquo;s markings.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.markings( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;string|nil markings&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The markings, or &lt;code&gt;nil&lt;/code&gt; when unset.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>payload</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/payload/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/payload/</guid><description>&lt;p&gt;Lists weapons and ammunition represented by non-destroyed critical slots on a
live unit.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.payload( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechPartStack[] parts&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The payload parts and quantities.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Destroyed critical slots are omitted.&lt;/p&gt;
&lt;p&gt;Consecutive weapon slots in the same section with the same part and brand are
grouped as one weapon installation. Consequently, separate identical one-slot
weapons installed in adjacent slots are reported with a combined quantity of
one.&lt;/p&gt;</description></item><item><title>piloting_check</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/piloting-check/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/piloting-check/</guid><description>&lt;p&gt;Makes a piloting check and applies a failed result.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.piloting_check( unit, options )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;table options&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The piloting-check options.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;The options table requires these fields:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;integer roll_modifier&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The modifier applied to the unit&amp;rsquo;s piloting skill roll. Use a gameplay
modifier from -100 through 100; values outside this range are unsupported.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;integer damage_modifier&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The number of fall levels applied when the piloting check fails. Use a value
from 0 through 100; values outside this range are unsupported because the
fall-damage calculation and damage application are not designed for them.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;boolean succeeded&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Whether the check succeeded.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>preferred_id</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/preferred-id/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/preferred-id/</guid><description>&lt;p&gt;Returns a live unit&amp;rsquo;s preferred tactical ID.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.preferred_id( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;string|nil id&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The ID, or &lt;code&gt;nil&lt;/code&gt; when unset.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>radio_channels</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/radio-channels/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/radio-channels/</guid><description>&lt;p&gt;Lists a live unit&amp;rsquo;s configured radio channels.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.radio_channels( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechRadioChannel[] channels&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The radio-channel records.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>section_condition</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/section-condition/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/section-condition/</guid><description>&lt;p&gt;Returns a live unit section&amp;rsquo;s current condition.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.section_condition( unit, section )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechSection section&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A typed constant from &lt;a href="../sections/"&gt;&lt;code&gt;btech.unit.sections&lt;/code&gt;&lt;/a&gt; that is valid for
the unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&amp;quot;operational&amp;quot;|&amp;quot;destroyed&amp;quot;|&amp;quot;flooded&amp;quot; condition&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;code&gt;&amp;quot;operational&amp;quot;&lt;/code&gt;, &lt;code&gt;&amp;quot;destroyed&amp;quot;&lt;/code&gt;, or &lt;code&gt;&amp;quot;flooded&amp;quot;&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>set_armor</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/set-armor/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/set-armor/</guid><description>&lt;p&gt;Configures selected armor fields for one live unit section.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.set_armor( unit, section, patch )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechSection section&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A typed constant from &lt;a href="../sections/"&gt;&lt;code&gt;btech.unit.sections&lt;/code&gt;&lt;/a&gt; that is valid for
the unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;table patch&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;One or more of &lt;code&gt;armor&lt;/code&gt;, &lt;code&gt;internal&lt;/code&gt;, and &lt;code&gt;rear_armor&lt;/code&gt;.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;Every supplied value must be an integer from 0 through 255.
Each supplied value becomes both the section&amp;rsquo;s current and original value.
&lt;code&gt;rear_armor&lt;/code&gt; remains configurable on any existing section for compatibility
with stored unit data. Outside a Mech&amp;rsquo;s center, left, and right torsos, that
value is inert in combat and the immediate &lt;a href="../../repair/apply/"&gt;&lt;code&gt;btech.repair.apply&lt;/code&gt;&lt;/a&gt;
operation refuses to change it; scheduled technician repairs may still restore
the configured stored value.&lt;/p&gt;</description></item><item><title>set_assigned_pilot</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/set-assigned-pilot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/set-assigned-pilot/</guid><description>&lt;p&gt;Sets or clears a live unit&amp;rsquo;s assigned pilot.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.set_assigned_pilot( unit, pilot )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object|nil pilot&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A player to assign as the pilot, or &lt;code&gt;nil&lt;/code&gt; to clear the assignment.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>set_display_name</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/set-display-name/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/set-display-name/</guid><description>&lt;p&gt;Sets or clears a live unit&amp;rsquo;s display-name override.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.set_display_name( unit, name )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;string|nil name&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A display name from 1 to 120 bytes, or &lt;code&gt;nil&lt;/code&gt; to clear it.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>set_markings</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/set-markings/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/set-markings/</guid><description>&lt;p&gt;Sets or clears a live unit&amp;rsquo;s markings.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.set_markings( unit, markings )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;string|nil markings&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The markings as a non-empty string of at most 16,383 bytes, or &lt;code&gt;nil&lt;/code&gt; to clear
them.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>set_max_speed</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/set-max-speed/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/set-max-speed/</guid><description>&lt;p&gt;Sets a live unit&amp;rsquo;s maximum speed.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.set_max_speed( unit, movement_points )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;number movement_points&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The new maximum speed in movement points, from 0 to 10000.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="notes"&gt;Notes&lt;/h2&gt;
&lt;p&gt;After setting the limit, this function corrects the unit&amp;rsquo;s movement state. If
necessary, it immediately clamps the desired and current speeds to the new
maximum and recalculates cargo weight.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>set_preferred_id</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/set-preferred-id/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/set-preferred-id/</guid><description>&lt;p&gt;Sets or clears a live unit&amp;rsquo;s preferred tactical ID.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.set_preferred_id( unit, id )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;string|nil id&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Exactly two ASCII letters, or &lt;code&gt;nil&lt;/code&gt; to clear the tactical ID. Letters are
stored in uppercase.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>set_tonnage</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/set-tonnage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/set-tonnage/</guid><description>&lt;p&gt;Sets a live unit&amp;rsquo;s tonnage and original weight.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.set_tonnage( unit, tons )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;integer tons&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The tonnage, from 1 through 2,097,151 (&lt;code&gt;INT_MAX / 1024&lt;/code&gt;).&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;p&gt;None.&lt;/p&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>technologies</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/technologies/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/technologies/</guid><description>&lt;p&gt;Lists a live unit&amp;rsquo;s configured and inferred technologies.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.technologies( unit )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechTechnology[] technologies&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The technology records. &lt;code&gt;code&lt;/code&gt; is a typed constant from
&lt;a href="../technology/"&gt;&lt;code&gt;btech.unit.technology&lt;/code&gt;&lt;/a&gt;, &lt;code&gt;group&lt;/code&gt; is one of the literal
strings &lt;code&gt;primary&lt;/code&gt;, &lt;code&gt;secondary&lt;/code&gt;, or &lt;code&gt;infantry&lt;/code&gt;, and &lt;code&gt;name&lt;/code&gt; remains
a human-readable string. The code round-trips into &lt;code&gt;add_technology&lt;/code&gt; and
&lt;code&gt;remove_technology&lt;/code&gt;; &lt;code&gt;group&lt;/code&gt; describes the technology catalog and is not a
&lt;code&gt;btech.unit.technology_groups&lt;/code&gt; clear-operation constant.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>tic_weapons</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/tic-weapons/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/tic-weapons/</guid><description>&lt;p&gt;Lists the weapons assigned to a target-interlock circuit.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.tic_weapons( unit, tic )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;integer tic&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The zero-based circuit number, from 0 through 3.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechMountedWeapon[] weapons&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The assigned mounted weapons.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Unit administration</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/administration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/administration/</guid><description>&lt;p&gt;These functions configure live units using typed constants and request tables.
Raw strings are rejected for sections, unit and movement types, technologies,
technology groups, and fire or ammunition modes.&lt;/p&gt;
&lt;h2 id="restore"&gt;restore&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.restore(unit)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Loads the unit&amp;rsquo;s model template, cancels its events, and clears line-of-sight
state.&lt;/p&gt;
&lt;h2 id="save_template"&gt;save_template&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.save_template(unit, reference)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Saves the unit beneath the configured template directory. &lt;code&gt;reference&lt;/code&gt; must be
a non-empty resource name without path components.&lt;/p&gt;
&lt;h2 id="effective_max_speed_kph"&gt;effective_max_speed_kph&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;local&lt;/span&gt; speed &lt;span style="color:#f92672"&gt;=&lt;/span&gt; btech.unit.effective_max_speed_kph(unit)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Returns effective maximum speed in kilometers per hour.&lt;/p&gt;</description></item><item><title>weapons</title><link>https://stompymux.com/docs/scripting/packages/btech/unit/weapons/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://stompymux.com/docs/scripting/packages/btech/unit/weapons/</guid><description>&lt;p&gt;Lists the weapons mounted on a live unit.&lt;/p&gt;
&lt;h2 id="function"&gt;Function&lt;/h2&gt;
&lt;h3 id="synopsis"&gt;Synopsis&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-lua" data-lang="lua"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;btech.unit.weapons( unit, section )
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="arguments"&gt;Arguments&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;DbRef|Object unit&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The live unit.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;BtechSection|nil section&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;An optional typed constant from &lt;a href="../sections/"&gt;&lt;code&gt;btech.unit.sections&lt;/code&gt;&lt;/a&gt; that is
valid for the unit.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h3 id="returns"&gt;Returns&lt;/h3&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;BtechMountedWeapon[] weapons&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The mounted weapons. Each &lt;code&gt;section&lt;/code&gt; field is a typed &lt;code&gt;BtechSection&lt;/code&gt; constant
and can be reused as an input.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id="see-also"&gt;See Also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="../../"&gt;&lt;code&gt;btech&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="../"&gt;&lt;code&gt;btech.unit&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item></channel></rss>