btech.unit

btech.unit provides live-unit state, combat queries, and mutations.

Constants

NamespaceDescription
typesUnit classes.
movement_typesMovement classes.
sectionsUnit-layout sections.
technologyTechnology codes.
technology_groupsTechnology-clear groups.
fire_modesWeapon fire modes.
ammunition_modesAmmunition modes.

Functions

FunctionDescription
apply_damageApplies clustered damage to a live unit.
armorReturns a live unit’s armor and internal values.
assigned_pilotReturns a live unit’s assigned pilot.
battle_valueCalculates a live unit’s current battle value.
critical_slotsLists a live unit section’s critical slots.
display_nameReturns a live unit’s display-name override.
effective_max_speedReturns a live unit’s effective maximum speed.
effective_max_speed_kphReturns effective maximum speed in kilometers per hour.
engineReturns a live unit’s engine configuration.
installed_partsLists parts represented by non-destroyed critical slots on a live unit.
load_templateLoads a unit template into a live unit.
restoreRestores a live unit from its model template.
save_templateSaves a live unit as a template.
install_weaponInstalls a weapon into critical slots.
install_specialConfigures a special-equipment critical slot.
reset_critical_slotsRestores default critical slots.
configure_ammunitionConfigures an ammunition bin.
restock_ammunitionRefills an ammunition bin.
set_weapon_modesReplaces a mounted weapon’s modes.
add_technologyAdds a configured technology.
remove_technologyRemoves a configured technology.
clear_technologiesClears configured technology groups.
markingsReturns a live unit’s markings.
payloadLists weapons and ammunition represented by non-destroyed critical slots on a live unit.
piloting_checkMakes a piloting check and applies a failed result.
preferred_idReturns a live unit’s preferred tactical ID.
radio_channelsLists a live unit’s configured radio channels.
section_conditionReturns a live unit section’s current condition.
set_armorUpdates selected armor fields for one live unit section.
set_assigned_pilotSets or clears a live unit’s assigned pilot.
set_display_nameSets or clears a live unit’s display-name override.
set_markingsSets or clears a live unit’s markings.
set_max_speedSets a live unit’s maximum speed.
set_jump_speedSets jump speed in movement points.
set_unit_typeSets the unit type.
set_movement_typeSets the movement type.
set_heat_sinksSets heat sink count.
set_long_range_sensor_rangeSets long-range sensor range.
set_tactical_rangeSets tactical sensor range.
set_scan_rangeSets scan range.
set_radio_qualitySets radio quality and derived configuration.
set_radio_rangeSets radio range.
set_cargo_capacitySets cargo capacity.
set_preferred_idSets or clears a live unit’s preferred tactical ID.
set_tonnageSets a live unit’s tonnage and original weight.
technologiesLists a live unit’s configured and inferred technologies.
tic_weaponsLists the weapons assigned to a target-interlock circuit.
weaponsLists the weapons mounted on a live unit.