Browse modules
Home

Script SDK reference

Browse the public scripting API by module.

Quick start

Export onLoad and write a log line when the script starts.

const sdk = @import("sdk");
export fn onLoad() void {
    sdk.info("Script ready", .{});
}

Example

Export onTick and read the actor list each simulation tick.

const sdk = @import("sdk");
export fn onTick(_: f32, _: i32) void {
    const actors = sdk.actors();
    sdk.info("Actors: {d}", .{actors.len});
}

Lifecycle

Export the callbacks your script uses:

  • export fn onLoad() void: runs once when the script loads.
  • export fn onUnload() void: runs once before the script unloads.
  • export fn onTick(dt: f32, frame: i32) void: runs once per simulation tick.
  • export fn onFrame(dt: f32, frame: i32) void: runs once per rendered frame.
  • export fn onUIFrame(dt: f32, frame: i32) void: runs for interface updates.

Extension / Ability

type

AbilityKind

pub const AbilityKind = enum { ... }

Recharge model of an ability slot.

  • cooldown,

    Recharges on a cooldown timer.

  • charged,

    Recharges by accumulating points up to max_points.

  • passive,

    Available while active.

type

AbilityType

pub const AbilityType = enum { ... }

Assist class of an ability slot:

  • .flick: single-shot assisted cast.
  • .none (default): no assist class; cast_time is still reported.
  • flick,
  • none,
type

Ability

pub const Ability = struct { ... }

State of one ability slot.

  • kind: AbilityKind = .cooldown,
  • ability_type: AbilityType = .none,
  • effect_target: EffectTarget = .enemy,
  • button: GameButton = .ability1,
  • aoe: bool = false,

    Affects an area rather than a single target.

  • projectile_speed: f32 = 0,

    Meters per second; 0 means no travel time.

  • projectile_gravity: f32 = 0,

    Meters per second squared, applied along -y.

  • projectile_launch_angle: f32 = 0,

    Radians the launch direction is pitched above the aim direction.

  • damage: f32 = 0,

    Health per fully charged direct hit on a non-critical hitbox, with the caster's damage bonuses and before falloff, critical multiplier, and the target's armor or damage modifiers; 0 means unknown.

  • critical_multiplier: f32 = 0,

    Factor applied to damage on a critical hitbox; 0 means unknown.

  • cast_time: f32 = 0,

    Seconds from start to execution; 0 is instant.

  • custom_delay: f32 = 0,

    Seconds after use before the slot may be used again.

  • active: bool = false,

    Currently executing.

  • enabled: bool = false,

    Whether the slot is usable this tick.

  • using: bool = false,

    Currently being used.

  • charges: i32 = 0,
  • max_charges: i32 = 0,

    0 for single-charge abilities.

  • cooldown: f32 = 0,

    Cooldown length in seconds.

  • cooldown_start: f32 = 0,

    Simulation time in seconds at which the current cooldown began.

  • points: f32 = 0,

    Charge points of a .charged ability.

  • max_points: f32 = 0,

    Points a .charged ability needs to be ready.

  • pub fn isMultiCharge(self: Ability) bool;
  • pub fn readyAt(self: Ability) f32;

    Simulation time in seconds at which the current cooldown ends.

  • pub fn readyPercent(self: Ability) f32;

    Readiness in [0, 1], where 1 is ready:

    • .cooldown: progress through the cooldown window.
    • .charged: points / max_points.
    • .passive: 1 while active, otherwise 0.
  • pub fn canUse(self: Ability) bool;

    Whether the ability can be used now:

    • .cooldown: multi-charge with a charge left; otherwise off cooldown. A multi-charge cooldown times the next charge.
    • .charged: points >= max_points.
    • .passive: active.

Extension / Actor

type

ActorKind

pub const ActorKind = enum { ... }

Behavioral class of an actor, independent of its numeric type_id:

  • .player: mobile combatant character.
  • .turret: stationary automated attacker.
  • .explosive: detonating deployable.
  • .support: stationary deployable or world object with no attack of its own (barrier, wall, pad, field, drone, practice target).
  • .unknown: unrecognized role; full actor state, but no kind-specific abilities or guns.
  • player,
  • turret,
  • explosive,
  • support,
  • unknown,
type

Actor

pub const Actor = struct { ... }

One actor in the scene. Pointers and slices in this struct stay valid until the next tick.

  • id: i32,
  • type_id: u64,

    Type id in the current title's vocabulary: entity definition, or another stable id.

  • kind: ActorKind = .player,
  • team: Team = .unknown,

    Relationship to the local actor.

  • transform: Transform = .{},

    Position in meters.

  • velocity: runtime.Vec3 = .{},

    Meters per second.

  • terminal_velocity: f32 = 0,

    Maximum fall speed for motion prediction in m/s; at or below 1 means no limit.

  • horizontal_drag: f32 = 0,

    Horizontal damping for motion prediction.

  • gravity: f32 = 0,

    Downward acceleration for motion prediction in m/s², along -y.

  • on_ground: bool = false,
  • master_entity: u32 = 0,

    Id of the owning actor (e.g. the thrower of a projectile); 0 when unowned.

  • transform_history: []const TransformSample = &.{},

    Recent transform history, newest first. Leading samples may be stamped after now; see transformAt.

  • health: f32 = 0,
  • max_health: f32 = 0,
  • health_pools: ?*HealthPools = null,

    Armor, shields, and other extra pools.

  • is_invincible: bool = false,

    Cannot be damaged.

  • is_invulnerable: bool = false,

    Cannot be affected by normal interactions.

  • is_visible: bool = false,

    Visible from the local camera. False when visibility was not established (obstructed or unknown).

  • target_priority: u8 = 0,

    Targeting tier set by the provider; 0 for ordinary actors. sdk.helpers.target.TargetTracker always prefers an eligible candidate of a higher tier, and one above the held target's tier takes over the lock at once.

  • status: u64 = 0,

    Set statuses: bit @intFromEnum(s) of the title SDK's status enum.

  • status_known: u64 = 0,

    Bits of status the provider reads for this actor; other bits are unknown and stay 0.

  • stats: ?*Stats = null,

    Title-defined stat values.

  • abilities: []Ability = &.{},
  • guns: []Gun = &.{},
  • skeleton: ?*Skeleton = null,
  • hitboxes: ?*HitboxSet = null,
  • pub fn ability(self: *const Actor, comptime A: type) Ability;

    Copy of the ability slot declared as A for this actor's kind.

  • pub fn gun(self: *const Actor, comptime G: type) Gun;

    Copy of the gun slot declared as G for this actor's kind.

  • pub fn hasStatus(self: *const Actor, s: anytype) ?bool;

    Whether status s is set, s being a tag of the title SDK's enum(u6) status enum; null when the provider cannot read it for this actor.

  • pub fn transformAt(self: *const Actor, time_ms: f32) Transform;

    Newest history sample at or before time_ms; otherwise the live pose with velocity taken from this struct's velocity field.

Extension / Actor List

type

ActorListEntry

pub const ActorListEntry = struct { ... }

One entry of a module's actor roster.

  • id: u64,

    Actor type id used for per-actor settings scoping; never shown to users. Must be non-zero.

  • name: []const u8,

    Display name, 1 to 64 bytes.

fn

ActorList

pub fn ActorList(comptime entries: []const ActorListEntry) type;

Declare this module's actor roster for per-actor settings. Ids must be non-zero and unique; names 1 to 64 bytes. Reference the returned type (e.g. .count) to emit the roster.

Extension / Benchmark

type

Node

pub const Node = extern struct { ... }

One timed section of the frame tree.

  • name_len: u8 = 0,
  • depth: u8 = 0,

    0 for top-level sections.

  • total_ns: i64 = 0,

    Nanoseconds summed over every call this frame.

  • call_count: u32 = 0,
  • pub fn label(self: *const Node) []const u8;
fn

frameSeq

pub fn frameSeq() u32;

Advances once per profiled frame; a change means a fresh profile.

fn

nodeCount

pub fn nodeCount() usize;
fn

rootTotalNs

pub fn rootTotalNs() i64;

Nanoseconds spanned by the whole frame, the denominator for per-node percentages.

fn

nodes

pub fn nodes() []const Node;

Current frame's sections in pre-order, valid until the next frame. Empty until a profile exists.

Extension / Camera

fn

position

pub fn position() ?runtime.Vec3;

Eye position in world meters while a camera is active, else null. The eye sits above the actor origin; use it as the ray origin for view-direction math and fall back to the actor origin when null.

fn

active

pub fn active() bool;

Whether a camera and projection are available for the current frame. Frame callbacks run regardless; gate w2s and 3D draws on this.

fn

w2s

pub fn w2s(pos: runtime.Vec3) ?runtime.Vec2;

Project a world position in meters to viewport pixels (y down). Null when no projection is available or the point is behind the camera. Off-screen points may project outside the viewport; clip first.

Extension / Gun

type

GunKind

pub const GunKind = enum { ... }

Physical class of a weapon slot; the assist class is AimType.

  • standard,
  • scoped,

    Fired while aiming down a scope.

  • bow,

    Drawn; releasing fires the projectile.

  • casted,

    Fired after a cast or wind-up.

type

AimType

pub const AimType = enum { ... }

Assist class of a weapon slot, independent of GunKind:

  • .flick: single-shot snap, then fire.
  • .track: continuous follow while fire is held.
  • .bow: holds button through the snap, releasing on target to fire.
  • .none (default): no assist.
  • flick,
  • track,
  • bow,
  • none,
type

EffectTarget

pub const EffectTarget = enum { ... }

Which actors a slot may target:

  • .enemy (default): opponents.
  • .ally: allies, e.g. a healing weapon.
  • .both: opponents and allies.
  • enemy,
  • ally,
  • both,
type

Gun

pub const Gun = struct { ... }

State of one weapon slot.

  • kind: GunKind = .standard,
  • aim_type: AimType = .none,
  • effect_target: EffectTarget = .enemy,
  • owned_target_def: u64 = 0,

    Type id of an owned deployable this slot may also target when the local actor owns it; 0 disables.

  • button: GameButton = .primary_fire,
  • aoe: bool = false,

    Affects an area rather than a single target.

  • charging: bool = false,

    Charges before firing.

  • projectile_speed: f32 = 0,

    Meters per second; 0 means no travel time.

  • projectile_gravity: f32 = 0,

    Meters per second squared, applied along -y.

  • projectile_launch_angle: f32 = 0,

    Radians the launch direction is pitched above the aim direction.

  • max_range: f32 = 0,

    Target-selection range cap in meters; 0 means none. See helpers.target.combineMaxRange.

  • damage: f32 = 0,

    Health per fully charged direct hit on a non-critical hitbox, with the shooter's damage bonuses and before falloff, critical multiplier, and the target's armor or damage modifiers; 0 means unknown.

  • critical_multiplier: f32 = 0,

    Factor applied to damage on a critical hitbox; 0 means unknown.

  • active: bool = false,

    Currently firing or executing.

  • charge_percent: f32 = 0,

    Charge progress in [0, 1] for charging weapons.

  • enabled: bool = false,

    Whether the slot is usable this tick.

  • reloading: bool = false,
  • ammo: i32 = 0,
  • max_ammo: i32 = 0,
  • cooldown: f32 = 0,

    Shot cooldown length in seconds.

  • cooldown_start: f32 = 0,

    Simulation time in seconds at which the current cooldown began.

Extension / Health Pool

type

HealthPoolKind

pub const HealthPoolKind = enum(u8) { ... }
  • normal,
  • armor,

    Damage-absorbing armor.

  • shield,

    Regenerating shield.

  • overhealth,

    Temporary health above the maximum.

type

HealthPool

pub const HealthPool = struct { ... }
  • kind: HealthPoolKind,
  • current: f32,
  • max: f32,
type

HealthPools

pub const HealthPools = struct { ... }

Health pools of one entity, in no particular order. pools stays valid until the next tick.

  • pools: []HealthPool,
  • pub fn ofKind(self: HealthPools, kind: HealthPoolKind) ?HealthPool;

Extension / Helpers / Button Holder

type

ButtonHolder

pub const ButtonHolder = struct { ... }

One button a module drives; selecting another releases the previous one.

  • held: ?GameButton = null,
  • pub fn holdDown(self: *ButtonHolder, local: *LocalActor, button: GameButton) void;

    Hold button down this update; a different held button is released.

  • pub fn holdUp(self: *ButtonHolder, local: *LocalActor, button: GameButton) void;

    Track button and keep it up this update; a different held button is released.

  • pub fn pressUp(self: *ButtonHolder, local: *LocalActor) void;

    Button up this update; held is unchanged.

  • pub fn release(self: *ButtonHolder, local: *LocalActor) void;

    Release the tracked button and forget it.

type

TwinFire

pub const TwinFire = struct { ... }

The engaged slot's fire button held together with its twin's.

  • pub fn hold(self: *TwinFire, local: *LocalActor, slot: slots.AimSlotRef, effect_target: EffectTarget) void;

    Hold the engaged slot's button, plus the twin's while the player holds it.

  • pub fn release(self: *TwinFire, local: *LocalActor) void;

    Release both tracked buttons and forget them.

fn

twinButton

pub fn twinButton(local: *LocalActor, slot: slots.AimSlotRef, effect_target: EffectTarget) ?GameButton;

Button of slot's twin: an enabled .track gun on another button the player holds, with the same ballistics and an effect target covering effect_target's side. Null when slot is not a .track gun or no twin is held.

Extension / Helpers / Engagement

fn

targetInFov

pub fn targetInFov(actors: []Actor, local: *LocalActor, ctx: target.TargetCtx) bool;

Whether an eligible, visible target can be selected inside ctx's FOV and Max Range now, using its hitbox mode and shot lead. Lock grace and trigger-only objects do not count; owned targets retain their selection exceptions.

fn

predictionRange

pub fn predictionRange(base_range: f32, projectile_speed: f32) f32;

Max engagement range for a projectile of projectile_speed m/s: base_range scaled by the speed over a 125 m/s baseline.

type

Engagement

pub const Engagement = struct { ... }

Target an engagement stays on once a tracker step selects it.

  • target_id: ?i32 = null,

    Actor id of the engaged target; null between engagements.

  • pub fn step(self: *Engagement, tracker: *target.TargetTracker, actors: []Actor, local: *LocalActor, ctx: target.TargetCtx, now_ms: f32) ?target.AimTarget;

    tracker step over the engaged actor alone while target_id is set, otherwise over actors, where a valid target becomes the engaged one. While an actor is engaged, a step over all of actors runs first as soon as another one preempts it (helpers.target.preemptsEngagement); it is kept only when it lands on the engaged actor or on a preemptor, so a scan that would switch the engagement for another reason leaves the tracker and the engagement as they were. A trigger_only target is returned for the tick only and never engaged.

  • pub fn end(self: *Engagement) void;

    Clear the engaged target.

type

TargetMotion

pub const TargetMotion = struct { ... }

Motion history of the engaged target, restarted when the target changes, and the newest teleport already reported.

  • tracker: motion.MotionTracker(Vec3) = .{},

    History observe feeds; the rhythm for future leads.

  • pub fn observe(self: *TargetMotion, actor: *const Actor, now_ms: f32, config: motion.Config) future.Observed;

    Feed actor's newest transform samples into tracker, restarting the history and the teleport bookkeeping when actor is not the previous target.

  • pub fn teleported(self: *TargetMotion, seen: future.Observed, accuracy: u32, now_ms: f32) bool;

    Whether seen holds a teleport on either channel newer than the last one reported, so each is reported once. Accuracy 100 never reports.

  • pub fn reset(self: *TargetMotion) void;

    Clear tracker; the target and the reported teleport are kept.

fn

motionAborts

pub fn motionAborts(seen: future.Observed, accuracy_mul: f32) bool;

Whether seen holds an unexpected change on either channel younger than 0.2 s scaled by accuracy_mul (util.math.accuracyMul). Changes stamped ahead of the rendered pose (negative age) always count.

type

VerticalGuard

pub const VerticalGuard = struct { ... }

Steering hold-off around the near-vertical cone, where yaw is ill-defined.

  • pub fn hold(self: *VerticalGuard, view_dir: Vec3, target_dir: Vec3, now_ms: f32, accuracy_mul: f32) bool;

    True while view_dir or target_dir is near vertical (steering.nearVertical), and until 50 ms scaled by accuracy_mul (util.math.accuracyMul) after both leave the cone: Accuracy 1 ≈ 99 ms, 50 = 50 ms, 100 = none.

type

CrossingWait

pub const CrossingWait = struct { ... }

Wait of a fresh stroke for the target to cross the crosshair by itself.

  • start_ms: ?f32 = null,

    Tick time (ms) the wait began; null when not waiting.

  • pub fn wait(self: *CrossingWait, actor: *const Actor, shot: future.Shot, eye: Vec3, eye_velocity: Vec3, view_dir: Vec3, fire_in: f32, now_ms: f32, critical_only: bool, movement_ms: f32, rhythm: *const motion.MotionTracker(Vec3), config: motion.Config) bool;

    Whether a stroke of movement_ms should wait instead of moving: actor's volumes cross the ray from eye along view_dir at the fire instant fire_in seconds ahead within the stroke's own duration (at most 250 ms), counted from the first waiting tick. Begins or ends the wait accordingly.

fn

frontLean

pub fn frontLean(actor: *const Actor, eye: Vec3, projectile_speed: f32) Vec3;

Lean toward actor's motion across the line of sight from eye, per unit of a volume's radius: up to 0.3, ramped in up to a 3 m/s crossing speed. Zero for hitscan (projectile_speed 0) and targets not crossing the view.

fn

criticalRadius

pub fn criticalRadius(actor: *const Actor) f32;

Radius of actor's first critical volume: a sphere's or capsule's radius, or a box's smallest half-extent. 0 without critical volumes.

Extension / Helpers / Future

const

hold_scale

pub const hold_scale: f32

Hitbox scale a shot must land inside for the view to hold still.

const

max_samples

pub const max_samples: usize

Most release instants hitsWithin tests.

fn

knownSeconds

pub fn knownSeconds(actor: *const Actor) f32;

Seconds the newest transform sample lies ahead of now (measured, not extrapolated); 0 when none.

fn

nextFireSeconds

pub fn nextFireSeconds(slot: AimSlotRef) f32;

Seconds until slot can fire again; 0 when ready or cooldown is unknown.

type

Shot

pub const Shot = struct { ... }

Projectile parameters of a shot.

  • projectile_speed: f32 = 0,

    Meters per second; 0 is hitscan.

  • projectile_gravity: f32 = 0,

    Meters per second squared.

  • projectile_launch_angle: f32 = 0,

    Radians the launch direction is pitched above the aim direction.

  • pub fn of(slot: AimSlotRef) Shot;

    Parameters of slot.

fn

shotOffset

pub fn shotOffset(actor: *const Actor, shot: Shot, fire_in: f32, rhythm: ?*const Tracker, config: Config) Vec3;

Lead correction in meters for a shot released in fire_in seconds, accounting for motion already known ahead of the rendered pose; rhythm's lead scale shortens only the extrapolated part.

fn

hitsWithin

pub fn hitsWithin(actor: *const Actor, shot: Shot, eye: Vec3, eye_velocity: Vec3, view_dir: Vec3, fire_in: f32, slack: f32, scale: f32, critical_only: bool, rhythm: ?*const Tracker, config: Config) bool;

Whether a shot along view_dir from eye, moving at eye_velocity, lands inside actor's hitboxes at some release instant in [fire_in, fire_in + slack].

type

Observed

pub const Observed = struct { ... }

Strongest motion change per channel since the previous observe.

  • changes: motion.Changes = .{},
  • horizontal_age: f32 = 0,

    Age in seconds of the sample behind changes.horizontal; negative while it lies ahead of the rendered pose; 0 for .none.

  • vertical_age: f32 = 0,

    Same as horizontal_age, for changes.vertical.

fn

observe

pub fn observe(tracker: *Tracker, actor: *const Actor, now_ms: f32, config: Config) Observed;

Feed tracker every transform sample of actor newer than its last one, including samples stamped ahead of now.

Extension / Helpers / Hitboxes

fn

boxCorners

pub fn boxCorners(box: anytype) [8]Vec3;

The eight world corners of an oriented box. Bit 0 of the index selects +X, bit 1 +Y, and bit 2 +Z; the rotation is normalized first.

fn

targetWidthDeg

pub fn targetWidthDeg(actor: anytype, eye: Vec3) f32;

Angular width in degrees of the actor's first valid volume (capsules, then spheres, then boxes) seen from eye. Boxes use their true angular extent; capsules and spheres use their radius at the actor's distance.

fn

targetRadius

pub fn targetRadius(actor: anytype) f32;

Radius of the first valid capsule, sphere, or box; for a box, its smallest half-extent.

type

YawPitchDelta

pub const YawPitchDelta = struct { ... }

Signed yaw and pitch from one direction to another, in radians, and their length.

  • yaw: f32,
  • pitch: f32,
  • magnitude: f32,
fn

yawPitchDistance

pub fn yawPitchDistance(view_dir: Vec3, dir_to_target: Vec3) YawPitchDelta;

Yaw/pitch difference from view_dir to dir_to_target, each wrapped to [-π, π].

fn

perturbDirection

pub fn perturbDirection(base_dir: Vec3, yaw_rad: f32, pitch_rad: f32) Vec3;

base_dir turned by yaw_rad about world up and pitch_rad upward, with pitch clamped short of vertical.

fn

hasUsableHitboxes

pub fn hasUsableHitboxes(actor: anytype, critical_only: bool) bool;

Whether actor has a valid volume, optionally a critical one.

fn

pointInHitboxes

pub fn pointInHitboxes(actor: anytype, point: Vec3, critical_only: bool) bool;

Whether point is in or on a valid volume, optionally a critical one.

fn

rayHitsHitboxes

pub fn rayHitsHitboxes(actor: anytype, ray_start: Vec3, ray_dir: Vec3, lead: Vec3, scale: f32, critical_only: bool) bool;

Whether the ray from ray_start along ray_dir hits a valid volume, optionally a critical one. Each volume is moved by lead (e.g. motion over the flight time); a scale below 1 shrinks radii and box extents and pulls sphere/capsule points toward the actor's vertical axis. Tangent contact and starting inside count as hits.

fn

rayHitboxEntryDistance

pub fn rayHitboxEntryDistance(actor: anytype, from: Vec3, to: Vec3) ?f32;

Distance along the segment from -> to to the first valid volume entered, in the endpoints' units; null when the segment misses. Starting inside a volume is distance 0; tangent contact and entering exactly at to count.

type

SweepHit

pub const SweepHit = struct { ... }

Where a crosshair turn first meets an actor: t is the fraction of the turn, dir the crosshair direction there, and distance how far along dir from the eye the ray enters the volumes.

  • t: f32,
  • dir: Vec3,
  • distance: f32,
fn

sweepHit

pub fn sweepHit(actor: anytype, eye: Vec3, from: Vec3, to: Vec3, lead: Vec3, margin: f32, critical_only: bool) ?SweepHit;

The first point of the crosshair turn from from to to, seen from eye, where the ray enters the actor's lead-shifted volumes, or crosses the actor's vertical line within margin meters of them (e.g. just over the head). Null when the turn misses, has no length, or is wider than 45°.

fn

nearestHitboxPoint

pub fn nearestHitboxPoint(actor: anytype, eye: Vec3, view_dir: Vec3, critical_only: bool) ?Vec3;

The valid volume point needing the smallest angular correction from view_dir. A point where the view ray already enters a volume wins; otherwise the closest silhouette point of the spheres and capsules and the corners and edges of the boxes.

Extension / Helpers / Intercept

type

Intercept

pub const Intercept = struct { ... }

Where and when a projectile meets its target.

  • position: runtime.Vec3,

    Intercept position in world-space meters.

  • time: f32,

    Flight time in seconds.

fn

linearIntercept

pub fn linearIntercept(
    shooter: runtime.Vec3,
    target: runtime.Vec3,
    velocity: runtime.Vec3,
    projectile_speed: f32,
) ?Intercept;

Solve a linear-motion intercept using meter positions, target velocity, and projectile speed in meters/s.

Extension / Helpers / Keys

fn

effectTarget

pub fn effectTarget(local: *const LocalActor, slot: slots.AimSlotRef, key: u32, ally_key: u32) ?EffectTarget;

Side slot engages for a primary key and an ally_key setting (isKeyOrGameButtonDown values, with the slot's button as Default), as target.keyedEffectTarget. Neither key engages the slot while the player fires the other weapon (target.firesOtherWeapon): a custom key is down for every slot at once, and the held fire button picks the weapon.

Extension / Helpers / Lateral Change

const

lateralChangeMps

pub const lateralChangeMps: f32

Lateral velocity change (m/s) that counts as a change when exceeded.

const

changeWindowMs

pub const changeWindowMs: f32

Age (ms) of the baseline sample a new sample is compared against.

fn

LateralChange

pub fn LateralChange(comptime V: type) type;

Lateral change detector over V (x and z: f32).

Extension / Helpers / Lethal

fn

shotDamage

pub fn shotDamage(damage: f32, critical_multiplier: f32, charge: f32, critical: bool) f32;

Health one direct hit removes: charge * damage, times critical_multiplier on a critical hitbox. A critical_multiplier of 0 (unknown) counts as 1.

fn

kills

pub fn kills(damage: f32, critical_multiplier: f32, charge: f32, critical: bool, health: f32) bool;

Whether a hit of shotDamage(damage, critical_multiplier, charge, critical) removes health. Unknown damage or health (0 or less) counts as a kill.

fn

rayKills

pub fn rayKills(slot: AimSlotRef, actor: *const Actor, ray_start: Vec3, ray_dir: Vec3, lead: Vec3, scale: f32) bool;

kills for a direct hit of slot on actor along the ray from ray_start in ray_dir. The hit is critical when the ray hits one of the actor's critical hitboxes, with lead and scale as in hitboxes.rayHitsHitboxes. Allies count as killed: they are healed, not damaged.

Extension / Helpers / Motion

type

Change

pub const Change = enum { ... }

How one sample's velocity compares with the recent rhythm.

  • none,
  • expected,
  • unexpected,
  • teleport,
type

Changes

pub const Changes = struct { ... }

Per-channel classifications of one sample.

  • horizontal: Change = .none,
  • vertical: Change = .none,
const

default_pattern_window_ms

pub const default_pattern_window_ms: f32

Default rhythm window (ms).

const

default_teleport_meters

pub const default_teleport_meters: f32

Default teleport position error (m).

const

default_vertical_accel

pub const default_vertical_accel: f32

Default vertical velocity change rate (m/s²).

type

Config

pub const Config = struct { ... }

Motion tracking parameters.

  • pattern_window_ms: f32 = default_pattern_window_ms,

    Back-and-forth rhythm lifetime after its last reversal (ms).

  • teleport_meters: f32 = default_teleport_meters,

    Per-channel position error (m) over one sample beyond the motion the velocities explain; above it the channel reports .teleport.

  • vertical_accel: f32 = default_vertical_accel,

    Vertical velocity change rate (m/s²) above which a jump, landing, or knock-up counts as a vertical change.

  • pub fn scaled(accuracy_mul: f32) Config;

    Every threshold divided by accuracy_mul; 0 makes them infinite.

fn

MotionTracker

pub fn MotionTracker(comptime V: type) type;

Motion history of one target. V needs x, y, z: f32 and add, sub, scale, dot, lengthSq.

fn

scaleHorizontal

pub fn scaleHorizontal(comptime V: type, v: V, factor: f32) V;

v with its horizontal (x, z) components multiplied by factor.

Extension / Helpers / Press

type

Press

pub const Press = struct { ... }

Time a module's own press started, kept down for min_press_ms. The button and its release stay with the module.

  • pub fn start(self: *Press, now_ms: f32) void;

    Record a press at now_ms.

  • pub fn clear(self: *Press) void;

    Forget the press; nothing is released.

  • pub fn active(self: *const Press) bool;

    A press is recorded and not yet settled.

  • pub fn holding(self: *const Press, now_ms: f32) bool;

    Whether the press started less than min_press_ms before now_ms.

  • pub fn settle(self: *Press, now_ms: f32) bool;

    Whether the press must stay down this update; a press that reached min_press_ms is forgotten.

Extension / Helpers / Root

const

steering

pub const steering
const

target

pub const target
const

future

pub const future
const

slots

pub const slots
const

button_holder

pub const button_holder
const

motion

pub const motion
const

hitboxes

pub const hitboxes
const

intercept

pub const intercept
const

keys

pub const keys
const

volume_transition

pub const volume_transition
const

lateral_change

pub const lateral_change
const

engagement

pub const engagement
const

stroke

pub const stroke
const

press

pub const press
const

lethal

pub const lethal

Extension / Helpers / Slots

type

LatchKind

pub const LatchKind = enum { ... }
  • lost,

    A slot was tracked and none is current now.

  • swapped,

    The current slot differs from the tracked one, or tracking started.

  • held,

    The current slot is the tracked one, or neither exists.

type

EnabledLatch

pub const EnabledLatch = struct { ... }

Tracks the index of the enabled slot. Call observe once per update with the enabled index, or null when none is enabled.

  • pub fn observe(self: *EnabledLatch, current_slot: ?u8) LatchKind;
  • pub fn reset(self: *EnabledLatch) void;
type

GunLatch

pub const GunLatch = struct { ... }

Tracks a gun by pointer identity, e.g. LocalActor.firstEnabledGun().

  • pub fn observe(self: *GunLatch, current: ?*const Gun) LatchKind;
  • pub fn reset(self: *GunLatch) void;
type

AimSlotRef

pub const AimSlotRef = union(enum) { ... }

Gun or ability slot.

  • gun: *Gun,
  • ability: *Ability,
  • pub fn isFlick(self: AimSlotRef) bool;
  • pub fn isTrack(self: AimSlotRef) bool;
  • pub fn isBow(self: AimSlotRef) bool;
  • pub fn isNone(self: AimSlotRef) bool;
  • pub fn button(self: AimSlotRef) GameButton;
  • pub fn projectileSpeed(self: AimSlotRef) f32;
  • pub fn projectileGravity(self: AimSlotRef) f32;
  • pub fn projectileLaunchAngle(self: AimSlotRef) f32;
  • pub fn maxRange(self: AimSlotRef) f32;
  • pub fn damage(self: AimSlotRef) f32;

    Health one direct hit removes at full charge; 0 means unknown.

  • pub fn criticalMultiplier(self: AimSlotRef) f32;

    Factor applied to damage on a critical hitbox; 0 means unknown.

  • pub fn shotCharge(self: AimSlotRef) f32;

    Fraction of damage a shot released now deals: the charge progress of a charging gun, else 1.

  • pub fn cooldown(self: AimSlotRef) f32;
  • pub fn cooldownStart(self: AimSlotRef) f32;
  • pub fn effectTarget(self: AimSlotRef) EffectTarget;
  • pub fn ownedTargetDef(self: AimSlotRef) u64;
  • pub fn kind(self: AimSlotRef) GunKind;
  • pub fn ptrEquals(self: AimSlotRef, other: AimSlotRef) bool;

    Same variant and same slot pointer.

type

AimSlotLatch

pub const AimSlotLatch = struct { ... }

GunLatch for AimSlotRef, so gun and ability slots share one signal.

  • pub fn observe(self: *AimSlotLatch, current: ?AimSlotRef) LatchKind;
  • pub fn reset(self: *AimSlotLatch) void;

Extension / Helpers / Steering

const

vertical_limit

pub const vertical_limit: f32

Up component beyond which a direction counts as straight up or down. Yaw is ill-defined there, so yaw/pitch steering would spin the view.

fn

nearVertical

pub fn nearVertical(dir: Vec3) bool;

Whether dir lies in the near-vertical cone (|up| > vertical_limit after normalizing). Zero and non-finite vectors count as near-vertical.

fn

slerpTrack

pub fn slerpTrack(view_dir: Vec3, dir_to_target: Vec3, smooth_x: f32, smooth_y: f32) Vec3;

Step view_dir toward dir_to_target in yaw/pitch space. Each axis moves min(smooth / angle, 1) of its own delta, where angle is the true angle between the directions, so both axes arrive together. smooth_x/smooth_y are radians per call. Returns a unit direction.

fn

trackRateDegPerSec

pub fn trackRateDegPerSec(smoothness: u32) f32;

Track steering rate (degrees per second) of one axis at a Smoothness setting (1..100): 7500 over it, so 50 is 150 deg/s, 1 is 7500.

fn

slerpTime

pub fn slerpTime(view_dir: Vec3, dir_to_target: Vec3, t: f32) Vec3;

Spherical interpolation from view_dir (t = 0) to dir_to_target (t = 1). Returns a unit direction.

Extension / Helpers / Stroke

const

fire_hitbox_scale

pub const fire_hitbox_scale: f32

Hitbox scale a shot must land inside for the stroke to count as reaching the target: the real geometry, 2% inward.

const

follow_end_weight

pub const follow_end_weight: f32

Decay weight below which the post-shot follow-through ends (~75 ms after the shot).

type

Stroke

pub const Stroke = struct { ... }

Lognormal stroke from the view toward a target direction, with the player's own movement accounted for.

  • active: bool = false,

    The stroke is running.

  • target_id: i32 = 0,

    Actor id the stroke aims at.

  • pub fn start(self: *Stroke, view_dir: Vec3, target_dir: Vec3, angular_dist_deg: f32, movement_ms: f32, accuracy: u32) void;

    Start a stroke from view_dir toward target_dir, angular_dist_deg of sweep and movement_ms of full-length movement time. Accuracy scales approach noise, never endpoint coverage. Resets every field.

  • pub fn elapsedMs(self: *const Stroke, now_ms: f32) f32;

    Stroke time (ms) elapsed at now_ms, never negative.

  • pub fn complete(self: *const Stroke, elapsed_ms: f32) bool;

    Whether the plan reached its endpoint at elapsed_ms, or twice the movement time passed.

  • pub fn crossingMs(self: *Stroke) f32;

    Elapsed stroke time (ms) at which the plan first reaches the target direction (overshoot · progress >= 1), bisected over the stroke's [0, 2 · movement_ms] window; the window end when it never does. Computed once per plan.

  • pub fn replan(self: *Stroke, view_dir: Vec3, target_dir: Vec3, now_ms: f32, dt_ms: f32) bool;

    Re-aim the active stroke at a moved target direction without restarting it from rest. First keeps the clock: rel0 is rescaled so the plan at the previous tick's progress (where the current view was written) starts from the current view. When that plan would move faster than the stroke's planned peak, or has already crossed the target, the clock is rewound to the earliest point at or before the peak whose rescaled plan moves at the current speed, so the view keeps its pace instead of stalling. Returns false, leaving the stroke unchanged, only when no plan fits.

  • pub fn steerDir(self: *Stroke, eye: Vec3, aim_point: Vec3, target_velocity: Vec3, elapsed_ms: f32, dt: f32) Vec3;

    Direction from eye the stroke steers around this tick. The anchor moves with the target's velocity; the rest of the live aim_point's change (lead and drop updates, hitbox jumps) is absorbed in proportion to the plan's progress over what remains to the crossing, so it bends the stroke's path without changing its speed. From the crossing on the anchor is the live point. Reads the previous tick's progress, so call it before step.

  • pub fn step(self: *Stroke, view_dir: Vec3, elapsed_ms: f32, dt_seconds: f32, aim_dir: Vec3, fired: bool) Vec3;

    The stroke's view direction at elapsed_ms: the target-relative plan rel0·max(1 − overshoot·progress, 0) plus bounded approach noise. Both axes and noise converge on aim_dir. With fired, each plan step is weighted by the post-shot decay, so the view keeps the stroke's motion and comes to rest.

  • pub fn playerCoveredPlan(self: *const Stroke, fired: bool) bool;

    Whether, before the shot, the player's own unspent movement already reaches the plan's end, so the stroke has nothing left to move.

  • pub fn playerTookOver(self: *const Stroke, actor: *const Actor, eye: Vec3, fired: bool) bool;

    Whether the player's own movement left the view off the plan by more than the target's angular radius, so a completed stroke has nothing to fire at. Movement past the plan's end is measured from it.

  • pub fn beginFollow(self: *Stroke, done: bool) bool;

    Start the follow-through of a shot that did not complete the stroke. Returns whether the stroke keeps running; false means it ended and the caller resets it.

  • pub fn followWeightAt(self: *const Stroke, elapsed_ms: f32) f32;

    Weight of the follow-through step at elapsed_ms, decaying exponentially from 1.0 at the shot with time constant 25 ms.

  • pub fn followEnded(self: *const Stroke, elapsed_ms: f32) bool;

    Whether the follow-through has run out at elapsed_ms: the plan completed, or its decay weight fell below follow_end_weight.

  • pub fn followStep(self: *Stroke, view_dir: Vec3, eye: Vec3, aim_point: Vec3, target_velocity: Vec3, now_ms: f32, dt: f32) ?Vec3;

    One tick of a shot's follow-through: the plan keeps decelerating, but each step the view takes is weighted by the post-shot decay, so it keeps the stroke's motion and comes to rest within ~75 ms. Returns the view direction to write, or null once the follow-through has run out.

  • pub fn canReachHitbox(_: *const Stroke, actor: *const Actor, eye: Vec3, aim_dir: Vec3, lead: Vec3, critical_only: bool) bool;

    Whether the stroke can put the ray on the target: both axes and the approach noise converge on the live aim_dir, so reachability is the full-size hitbox volume at that direction, the same volume the written-ray and swept fire gates test. Accuracy never shortens the travel, so this does not depend on the setting. The steer anchor trails the live point while absorbing motion, so it is not used here.

fn

speedMovementMs

pub fn speedMovementMs(speed: u32) f32;

Full-length movement time (ms) of the Speed setting: 1 => 600 ms, 50 => 362.4 ms, 100 => 120 ms. Each increment removes 480/99 ms. speed is clamped to 1..100.

fn

movementTimeMs

pub fn movementTimeMs(full_ms: f32, angular_dist_deg: f32, width_deg: f32) f32;

Movement time (ms) of a stroke over angular_dist_deg onto a target width_deg wide: full_ms scaled by the Fitts index of difficulty log2(D / W + 1) relative to a 3° stroke onto the same target, so a short correction does not crawl for the full time.

fn

arrivalMs

pub fn arrivalMs(actor: *const Actor, eye: Vec3, view_dir: Vec3, target_dir: Vec3, lead: Vec3, movement_ms: f32, critical_only: bool) f32;

Estimated ms until a stroke of movement_ms started now from view_dir first puts the ray on actor's hitboxes, or reaches the plan's crossing when it never does. Uses the noise-free plan at the centre of the stroke's randomized timing shape (sigma 0.25, peak at 35% of the movement time). Accuracy changes approach noise, not this endpoint or timing estimate.

Extension / Helpers / Target

const

fov_reference_distance

pub const fov_reference_distance: f32

Distance (m) the configured FOV angle is measured at.

fn

fovRadius

pub fn fovRadius(fov_deg: f32) f32;

World-space miss radius (m) at fov_reference_distance. Exactly 180 disables the FOV restriction; other values must be finite and in [0, 180].

fn

isInFov

pub fn isInFov(eye: Vec3, view_dir: Vec3, point: Vec3, fov_deg: f32, lead_m: f32) bool;

Whether point is forward of eye and within fovRadius(fov_deg) + lead_m meters perpendicular to view_dir. The configured angle is measured at the 10 m reference plane; its radius stays constant at every forward distance. lead_m is the shot lead's length in meters. Exactly 180 disables the directional restriction, but never accepts invalid or eye-coincident geometry. view_dir need not be normalized.

type

AimTarget

pub const AimTarget = struct { ... }

Result of TargetTracker.step. actor stays valid until the next tick.

  • actor: *Actor,
  • aim_point: Vec3,

    Unled aim point in meters. Selection judged the target at this point plus the shot lead; callers add their own lead.

  • priority: f32,

    Best candidate score of this step (lower is better); floatMax(f32) when no candidate scored.

  • is_valid: bool,

    When false, actor and aim_point are unspecified.

  • trigger_only: bool = false,

    actor is an object (isObject) the current view ray is already on: fire at the current view without steering. aim_point is the ray's entry point on it.

type

HitboxPick

pub const HitboxPick = enum { ... }

Which point of a target to aim at. Every mode needs some hitbox volume; actors without the required volumes are skipped.

  • defined,

    Center of the first critical volume, or .body when the actor has no critical volume.

  • head,

    Center of the first critical volume; actors without one are skipped.

  • body,

    Center of the bounds of all volumes.

  • origin,

    The actor origin. Selection still requires some valid volume.

  • nearest,

    The volume point needing the smallest view correction.

type

TargetScore

pub const TargetScore = enum { ... }

Candidate scoring for TargetTracker.step; lower wins.

  • fitts,

    Fitts' law, theta * log2(theta / width + 1): favors large or near targets close to the crosshair.

  • crosshair,

    Angle to the crosshair.

type

TargetCtx

pub const TargetCtx = struct { ... }

Per-update selection settings for TargetTracker.step.

  • fov_deg: f32,

    Full angle in degrees at fov_reference_distance, defining the same perpendicular world-space radius at every distance; 180 disables FOV.

  • fov_scale: f32 = 1.0,

    Multiplier on fov_deg.

  • swap_delay_ms: f32 = 150.0,

    Minimum milliseconds between target switches, and between candidate scans while a target is held.

  • lock_target: bool = false,

    Keep the current target over better candidates and through brief out-of-view gaps; without it the target is kept only while its predicted point stays in view.

  • hitbox: HitboxPick = .defined,

    aim point selection.

  • score: TargetScore = .fitts,
  • max_range: f32 = 0,

    Maximum distance in meters from the local actor to a candidate's live transform position; 0 is unlimited.

  • reject_unnatural_motion: bool = false,

    Drops a candidate, and a held lock, whose recent motion is unnatural (dash, blink, sharp turn at speed). Actors with target_priority above 0 are exempt: the provider marks them while a script moves them.

  • effect_target: EffectTarget = .enemy,
  • owned_target_def: u64 = 0,

    Entity type of the local actor's own deployables that are also targetable; 0 disables. Copy of Gun.owned_target_def.

fn

keyedEffectTarget

pub fn keyedEffectTarget(slot_target: EffectTarget, primary_down: bool, ally_down: bool) ?EffectTarget;

Which side a slot targets given its two activation keys. The primary key keeps the slot's own effect_target. The ally key, held without the primary key, engages a slot that can hit allies against allies only; it is ignored for slots that hit only enemies. Null when neither key engages the slot.

fn

firesOtherWeapon

pub fn firesOtherWeapon(local: *const LocalActor, slot: slots.AimSlotRef) bool;

Whether the player is firing the other weapon than slot: slot is on primary or secondary fire, its button is up, and the other fire button is held and drives a steered slot of the avatar. A custom activation key engages every slot at once, so this keeps it off the weapon that is not being fired. False for slots on other buttons, and while the other fire button drives no steered slot (e.g. it zooms a scope).

type

TargetTracker

pub const TargetTracker = struct { ... }

Target selection with locking: switches are debounced by swap_delay_ms, a held target is re-scanned at most once per swap_delay_ms, and with lock_target a target survives a brief out-of-view gap (500 ms by default).

  • pub fn reset(self: *TargetTracker) void;
  • pub fn step(self: *TargetTracker, actors: []Actor, local: *LocalActor, ctx: TargetCtx, now_ms: f32) AimTarget;

    Pick a target from actors for local. now_ms drives the lock, grace, and debounce timers. An eligible object (isObject) is the target only while the current view ray is on it; it then wins over every other candidate with trigger_only set, leaves the lock untouched, and is otherwise never scanned or locked. The FOV test, scoring, and visibility judge the pickAimPoint position plus the projectile_speed/projectile_gravity lead for a shot fired now; range and eligibility still use the live actor. An eligible owned target always wins over every other scanned candidate and takes over any lock without debounce. Otherwise a higher Actor.target_priority always wins, and a candidate above the held target's tier takes over the lock the same way. While a target is held other actors are only scanned once per swap_delay_ms (never with lock_target).

fn

isObject

pub fn isObject(actor: *const Actor) bool;

Whether actor is a stationary object (turret, explosive, or support deployable): a target only while the view ray is already on it.

fn

pickAimPoint

pub fn pickAimPoint(actor: *Actor, mode: HitboxPick, eye: Vec3, view_dir: Vec3) ?Vec3;

The aim point of actor for mode, or null when the required volumes are missing. .nearest measures from eye along view_dir.

fn

combineMaxRange

pub fn combineMaxRange(a: f32, b: f32) f32;

The tighter of two range caps where 0 means unlimited.

Extension / Helpers / Volume Transition

const

settleDriftRadPerSec

pub const settleDriftRadPerSec: f32

Angular drift (rad/s) below which the target counts as settled relative to the viewer. About 0.6 deg/s: slower than any deliberate movement at engagement range, above sensor jitter.

const

approachBlend

pub const approachBlend: f32

Core blend targeted while outside a volume but drifting, so re-entry lands inside the volume instead of stopping on its edge.

const

attackSeconds

pub const attackSeconds: f32

Time constant (s) for the outside approach blend to rise.

const

releaseSeconds

pub const releaseSeconds: f32

Time constant (s) for the outside approach blend to fall.

type

Action

pub const Action = enum { ... }

What a tick does about the inside/outside state of the view ray.

  • steer,

    Outside a volume: steer toward the (possibly core-blended) point.

  • follow,

    Inside and the target drifts across the view: turn by its motion only.

  • idle,

    Inside and settled: emit no input.

fn

action

pub fn action(inside: bool, driftRadPerSec: f32) Action;

Inside/outside action for one tick at driftRadPerSec.

type

Transition

pub const Transition = struct { ... }

Outside-approach blend of the point steered toward.

  • blend: f32 = 0.0,

    Outside-approach blend: 0 = the nearest (edge) point, approachBlend = partway toward the volume core.

  • pub fn reset(self: *Transition) void;

    Clear the blend.

  • pub fn update(self: *Transition, dt: f32, inside: bool, driftRadPerSec: f32) void;

    Advance the approach blend by dt seconds: it rises toward approachBlend only while outside a volume with the target drifting.

fn

followShare

pub fn followShare(smoothness: u32) f32;

Share of the target's relative motion followed on one axis for a Smoothness setting: 50 follows half, 1 nearly all, 100 none.

const

biasGainPerSec

pub const biasGainPerSec: f32

Bias gain (1/s) toward the lead goal at Smoothness <= 50.

const

biasCap

pub const biasCap: f32

Bias speed cap as a multiple of the across-view relative speed.

const

leadSeconds

pub const leadSeconds: f32

Lead time (s) of the inside goal along the across-view relative velocity.

const

maxLeadFraction

pub const maxLeadFraction: f32

Lead distance cap as a fraction of the target radius.

fn

biasGain

pub fn biasGain(smoothness: u32) f32;

Bias gain (1/s) for a Smoothness setting: biasGainPerSec up to 50, falling as 50/smoothness above it (half at 100).

fn

leadGoal

pub fn leadGoal(core: anytype, relVelPerp: @TypeOf(core), lead_seconds: f32, max_lead: f32) @TypeOf(core);

Inside goal: core shifted by relVelPerp * lead_seconds, the shift clamped to length max_lead. core for nonfinite lead input.

fn

biasDisplacement

pub fn biasDisplacement(rayPoint: anytype, goal: @TypeOf(rayPoint), viewDir: @TypeOf(rayPoint), relVelPerp: @TypeOf(rayPoint), dt: f32, gain: f32, cap: f32) @TypeOf(rayPoint);

Bias displacement for one tick: the across-view component of goal - rayPoint scaled by min(1, gain*dt), length clamped to cap * |relVelPerp| * dt. Zero for nonfinite or degenerate input.

fn

followDirection

pub fn followDirection(eye: anytype, viewDir: @TypeOf(eye), targetPos: @TypeOf(eye), relVel: @TypeOf(eye), dt: f32, strength: @TypeOf(eye), bias: @TypeOf(eye)) ?@TypeOf(eye);

View direction after following the target for dt seconds: the point on the current view ray at the target's range moves by the relative velocity (targetVel - eyeVel) scaled per component by strength, plus bias (meters at target range, already weighted). Only the across-the-view component changes the direction. Null for degenerate geometry (target behind or at the eye).

fn

driftRate

pub fn driftRate(eyePos: anytype, eyeVel: @TypeOf(eyePos), targetPos: @TypeOf(eyePos), targetVel: @TypeOf(eyePos)) f32;

Angular rate (rad/s) at which targetPos moves across the view from eyePos, from the relative velocity's component perpendicular to the line of sight. Zero for coincident points or nonfinite input.

fn

corePoint

pub fn corePoint(hitboxes: anytype, eye: anytype, viewDir: @TypeOf(eye), lead: @TypeOf(eye)) ?@TypeOf(eye);

Core of the valid volume whose core lies closest (angularly) to viewDir from eye: sphere center, box center, or the point on a capsule's axis nearest the view ray. lead translates volumes as for projectile lead. Null when the actor publishes no valid volume.

Extension / Hitbox

type

SphereHitbox

pub const SphereHitbox = extern struct { ... }

Spherical hitbox in world meters.

  • shape: runtime.Sphere,
  • bone: i16,

    Skeleton bone the volume follows; negative when none.

  • critical: bool,

    Critical hit area, e.g. a head.

type

CapsuleHitbox

pub const CapsuleHitbox = extern struct { ... }

Capsule hitbox in world meters.

  • shape: runtime.Capsule,
  • bone: i16,

    Skeleton bone the volume follows; negative when none.

  • critical: bool,

    Critical hit area, e.g. a head.

type

BoxHitbox

pub const BoxHitbox = extern struct { ... }

Oriented box hitbox in world meters.

  • shape: runtime.Box,
  • bone: i16 = -1,

    Skeleton bone the volume follows; negative when none.

  • critical: bool = false,

    Critical hit area, e.g. a head.

type

HitboxSet

pub const HitboxSet = struct { ... }

Hitboxes of one entity. The slices stay valid until the next tick.

  • spheres: []SphereHitbox,
  • capsules: []CapsuleHitbox,
  • boxes: []BoxHitbox = &.{},

Extension / Input

type

GameButton

pub const GameButton = enum(u8) { ... }

Action slot; unknown numeric codes are preserved.

  • primary_fire = 0,
  • secondary_fire = 1,
  • ability1 = 2,
  • ability2 = 3,
  • ultimate = 4,
  • melee = 5,
  • reload = 6,
  • interact = 7,
  • crouch = 8,
  • jump = 9,
  • forward = 10,
  • back = 11,
  • left = 12,
  • right = 13,
type

DesireSentinel

pub const DesireSentinel = enum(i8) { ... }

Per-button override written by a module; none clears it.

  • none = -1,
  • force_up = 0,
  • force_down = 1,
type

RuntimeKey

pub const RuntimeKey = enum(u8) { ... }

The runtime's host key code: a Windows virtual-key code covering keyboard keys and mouse buttons. Where possible the value is the ASCII code of the character, so isKeyDown(.a) and keyDown('A') are equivalent.

  • mouse_left = 0x01,
  • mouse_right = 0x02,
  • mouse_middle = 0x04,
  • backspace = 0x08,
  • tab = 0x09,
  • enter = 0x0D,
  • shift = 0x10,
  • ctrl = 0x11,
  • alt = 0x12,
  • pause = 0x13,
  • capslock = 0x14,
  • escape = 0x1B,
  • space = 0x20,
  • pageup = 0x21,
  • pagedown = 0x22,
  • end = 0x23,
  • home = 0x24,
  • left = 0x25,
  • up = 0x26,
  • right = 0x27,
  • down = 0x28,
  • insert = 0x2D,
  • delete = 0x2E,
  • @"0" = 0x30,
  • @"1" = 0x31,
  • @"2" = 0x32,
  • @"3" = 0x33,
  • @"4" = 0x34,
  • @"5" = 0x35,
  • @"6" = 0x36,
  • @"7" = 0x37,
  • @"8" = 0x38,
  • @"9" = 0x39,
  • a = 0x41,
  • b = 0x42,
  • c = 0x43,
  • d = 0x44,
  • e = 0x45,
  • f = 0x46,
  • g = 0x47,
  • h = 0x48,
  • i = 0x49,
  • j = 0x4A,
  • k = 0x4B,
  • l = 0x4C,
  • m = 0x4D,
  • n = 0x4E,
  • o = 0x4F,
  • p = 0x50,
  • q = 0x51,
  • r = 0x52,
  • s = 0x53,
  • t = 0x54,
  • u = 0x55,
  • v = 0x56,
  • w = 0x57,
  • x = 0x58,
  • y = 0x59,
  • z = 0x5A,
  • backtick = 0xC0,
  • numpad1 = 0x61,
  • numpad2 = 0x62,
  • numpad3 = 0x63,
  • numpad4 = 0x64,
  • numpad5 = 0x65,
  • numpad6 = 0x66,
  • numpad7 = 0x67,
  • numpad8 = 0x68,
  • numpad9 = 0x69,
  • multiply = 0x6A,
  • add = 0x6B,
  • subtract = 0x6D,
  • decimal = 0x6E,
  • divide = 0x6F,
  • f1 = 0x70,
  • f2 = 0x71,
  • f3 = 0x72,
  • f4 = 0x73,
  • f5 = 0x74,
  • f6 = 0x75,
  • f7 = 0x76,
  • f8 = 0x77,
  • f9 = 0x78,
  • f10 = 0x79,
  • f11 = 0x7A,
  • f12 = 0x7B,
  • oem_plus = 0xBB,
  • oem_comma = 0xBC,
  • oem_minus = 0xBD,
  • oem_period = 0xBE,
  • oem_2 = 0xBF,
  • oem_4 = 0xDB,
  • oem_5 = 0xDC,
  • oem_6 = 0xDD,
  • oem_7 = 0xDE,
type

MouseButton

pub const MouseButton = enum(u8) { ... }

Physical mouse button.

  • left = 0,
  • right = 1,
  • middle = 2,
  • back = 3,
  • forward = 4,
fn

keyName

pub fn keyName(code: u32) ?[]const u8;

Display name for a key code: mouse buttons, left/right modifiers, and the keys named in RuntimeKey. Null for unnamed codes.

fn

keyState

pub fn keyState(k: RuntimeKey) u8;

State byte for k; see keyStateCode.

fn

keyStateCode

pub fn keyStateCode(code: u8) u8;

Raw state byte for key code code. Bit 0x10 means the key is down; bit 0x01 means it changed this frame (0x11 = pressed, 0x01 = released). Edges last one rendered frame: read them in onFrame/onUIFrame.

fn

keyDown

pub fn keyDown(code: u8) bool;

Whether key code code is currently down.

fn

keyPressed

pub fn keyPressed(code: u8) bool;

Whether the key went down this frame.

fn

keyReleased

pub fn keyReleased(code: u8) bool;

Whether the key went up this frame.

fn

isKeyDown

pub fn isKeyDown(k: RuntimeKey) bool;

Whether k is currently down.

fn

isKeyPressed

pub fn isKeyPressed(k: RuntimeKey) bool;

Whether the key went down this frame.

fn

isKeyReleased

pub fn isKeyReleased(k: RuntimeKey) bool;

Whether the key went up this frame.

fn

firstKeyPressed

pub fn firstKeyPressed() u8;

Lowest key code pressed this frame, or 0 when none was.

fn

firstKeyDown

pub fn firstKeyDown() u8;

Lowest key code currently down, or 0 when none is.

fn

isMouseButtonPressed

pub fn isMouseButtonPressed(b: MouseButton) bool;

Whether mouse button b is currently held.

fn

mouseDeltaX

pub fn mouseDeltaX() f32;

Horizontal mouse movement since the previous frame.

fn

mouseDeltaY

pub fn mouseDeltaY() f32;

Vertical mouse movement since the previous frame.

fn

mouseX

pub fn mouseX() f32;

Mouse X in screen coordinates.

fn

mouseY

pub fn mouseY() f32;

Mouse Y in screen coordinates.

fn

requestMouseDelta

pub fn requestMouseDelta(dx: f32, dy: f32) bool;

Request a relative mouse movement in pointer units (not screen coordinates); positive dx moves right and positive dy moves down. Each axis is clamped to [-4096, 4096].

Returns false when either value is non-finite or zero, or when relative mouse input is unavailable. true means the request was accepted, not that the move reached the operating system. A newer accepted request replaces a pending one, including requests from other modules.

fn

requestRuntimeKey

pub fn requestRuntimeKey(key: RuntimeKey, down: bool) bool;

Request that a host key or mouse button be held (down) or released. Codes the host accepts: mouse_left, mouse_right, mouse_middle, letters, digits, space, and the left Shift (0xA0) and left Control (0xA2) codes.

Returns false when the code is outside that set, the caller is not a core module, the host has no input backend, or its request queue is full. true means the request was queued, not that the change reached the operating system. A held key stays held until a release is requested; the host releases every held key when its input session ends.

const

max_game_button_keys

pub const max_game_button_keys: usize

Most keys gameButtonToRuntimeKeys reports for one button.

fn

gameButtonToRuntimeKeys

pub fn gameButtonToRuntimeKeys(button: GameButton, out: []RuntimeKey) usize;

Write the keys that trigger button into out, most preferred first, and return how many were written: at most max_game_button_keys and out.len. Zero when the button has no key or the current title reports none.

fn

gameButtonToRuntimeKey

pub fn gameButtonToRuntimeKey(button: GameButton) ?RuntimeKey;

The most preferred key that triggers button. Null when the button has no key or the current title reports none.

fn

runtimeKeyToGameButton

pub fn runtimeKeyToGameButton(key: RuntimeKey) ?GameButton;

The first button key triggers. Null when the key triggers no button or the current title reports none.

fn

setDisabled

pub fn setDisabled(disable: bool) void;

Suppress app input while disable is true. Sticky until cleared with setDisabled(false).

fn

isDisabled

pub fn isDisabled() bool;

Whether input suppression is requested. False until a module requests it.

fn

setSensitivity

pub fn setSensitivity(value: f32) void;

Override mouse sensitivity until resetSensitivity restores the value in effect before the override.

fn

resetSensitivity

pub fn resetSensitivity() void;

Clear the sensitivity override. No-op when none is active.

fn

mouseViewDelta

pub fn mouseViewDelta() ?runtime.Vec2;

View rotation requested by the player's mouse input this tick, in radians: x is yaw and y is pitch, in the util.math.yawPitch convention over the canonical basis. Measured at the player's own sensitivity, including the zoom sensitivity while scoped; setSensitivity overrides do not change it. Null when the current title provides none.

fn

withMouseRotation

pub fn withMouseRotation(dir: runtime.Vec3) runtime.Vec3;

dir turned by this tick's mouseViewDelta: where a view at dir lands once the player's mouse rotation is added on top. dir when none is published.

Extension / Local Actor

const

GameButton

pub const GameButton

Alias of GameButton in the Input module.

const

DesireSentinel

pub const DesireSentinel

Alias of DesireSentinel in the Input module.

type

EnabledGunIter

pub const EnabledGunIter = struct { ... }
  • pub fn next(self: *EnabledGunIter) ?*Gun;
type

EnabledAbilityIter

pub const EnabledAbilityIter = struct { ... }
  • pub fn next(self: *EnabledAbilityIter) ?*Ability;
type

EnabledAimSlotIter

pub const EnabledAimSlotIter = struct { ... }

Enabled slots with aim behavior: gun aim_type != .none or ability ability_type != .none, guns first, then abilities.

  • pub fn next(self: *EnabledAimSlotIter) ?AimSlotRef;
type

LocalActor

pub const LocalActor = extern struct { ... }

The local player's actor and its input/view state, refreshed each tick. Setters request hold state for the current tick; isPressed and last_view_direction report what is in effect.

  • controller: ?*Actor,

    Entity controlling the local player; may differ from avatar.

  • avatar: ?*Actor,

    In-world character the local player controls.

  • last_view_direction: runtime.Vec3,

    Unit vector: the view as last read, before this tick's mouse rotation. Plan setViewDir writes from this; the player's mouse rotation is added on top of a written view.

  • pub fn isPressed(self: *const LocalActor, button: GameButton) bool;

    Whether button is held.

  • pub fn setPressed(self: *LocalActor, button: GameButton, down: bool) void;

    Request button held (down = true) or released for the current tick.

  • pub fn releaseButton(self: *LocalActor, button: GameButton) void;

    Drop the request for button, clearing any hold set by setPressed.

  • pub fn setViewDir(self: *LocalActor, dir: runtime.Vec3) void;

    Request a view direction for the current tick; dir need not be normalized.

  • pub fn viewDirection(self: *const LocalActor) runtime.Vec3;

    The view the command sent this tick carries unless a module sets one: last_view_direction turned by this tick's mouse rotation. It is the angle of the next command when sdk.isNextFrameLogic().

  • pub fn firstEnabledGun(self: *const LocalActor) ?*Gun;
  • pub fn enabledGuns(self: *const LocalActor) EnabledGunIter;
  • pub fn firstEnabledAbility(self: *const LocalActor) ?*Ability;
  • pub fn enabledAbilities(self: *const LocalActor) EnabledAbilityIter;
  • pub fn enabledAimSlots(self: *const LocalActor) EnabledAimSlotIter;
fn

isKeyOrGameButtonDown

pub fn isKeyOrGameButtonDown(local: *const LocalActor, setting: u32, fallback: GameButton) bool;

Resolve a keybind setting against live input:

  • 0xFFFF_FFFF (Default): the fallback button.
  • 0: unbound; never down.
  • otherwise: a key or mouse VK code.

Extension / Prediction

fn

predict

pub fn predict(actor: *const Actor, projectile_speed: f32, projectile_gravity: f32, projectile_launch_angle: f32, time_addition: f32) ?Vec3;

offset in meters to add to the aim point so a projectile of projectile_speed (m/s) and projectile_gravity (m/s²), launched projectile_launch_angle radians above the aim direction after time_addition seconds, intercepts actor. Null for hitscan, when unsupported, or when no lead solves.

fn

refine

pub fn refine(actor: *const Actor, aim_point: Vec3, projectile_speed: f32, projectile_gravity: f32, projectile_launch_angle: f32) Vec3;

aim_point moved by predict, or unchanged when there is no lead.

Extension / Prop

type

Prop

pub const Prop = struct { ... }

Non-character scene object such as a deployable, pickup, or effect marker. Listed by props(), never by actors().

  • id: i32,
  • type_id: u64,

    Type id in the current title's vocabulary.

  • team: Team = .unknown,
  • owner: i32 = 0,

    Id of the owning actor; 0 when unowned.

  • transform: Transform = .{},

Extension / Render

const

elements

pub const elements
const

text_layout

pub const text_layout
fn

viewport

pub fn viewport() Vec2;

Render surface size in logical pixels; zero until the first frame.

fn

scale

pub fn scale() f32;

UI scale: viewport height over 1080, rounded to a multiple of 0.5 and at least 0.5. 1 before the first frame.

fn

windowPos

pub fn windowPos() Vec2;

Top-left of the window in screen pixels.

fn

windowSize

pub fn windowSize() Vec2;
fn

clientPos

pub fn clientPos() Vec2;

Top-left of the client area in screen pixels; differs from windowPos by the border and titlebar in windowed mode.

fn

clientSize

pub fn clientSize() Vec2;
fn

titlebarHeight

pub fn titlebarHeight() f32;

0 for borderless and fullscreen windows.

fn

uploadBitmap

pub fn uploadBitmap(bgra: []const u8, w: u32, h: u32) u32;

Create a texture from tightly packed BGRA8 pixels (w * h * 4 bytes). The pixels are copied, so bgra may be reused immediately. Returns the texture id, or 0 when the size does not match or the upload fails. The texture lives until freeTexture.

fn

freeTexture

pub fn freeTexture(texid: u32) void;

The id must not be used afterwards. 0 is ignored.

fn

drawTexture

pub fn drawTexture(texid: u32, x: f32, y: f32) void;

Draw a texture at its native size. 0 is ignored.

fn

drawTextureScaled

pub fn drawTextureScaled(texid: u32, x: f32, y: f32, w: f32, h: f32) void;

Draw a texture scaled to w by h with nearest-neighbor sampling. 0 is ignored.

fn

drawLine

pub fn drawLine(x1: f32, y1: f32, x2: f32, y2: f32, color: i32) void;
fn

drawRect

pub fn drawRect(x: f32, y: f32, w: f32, h: f32, color: i32, line_width: f32) void;

Outlined rectangle with a line_width stroke.

fn

drawFilledRect

pub fn drawFilledRect(x: f32, y: f32, w: f32, h: f32, color: i32) void;
fn

drawCircle

pub fn drawCircle(x: f32, y: f32, radius: f32, color: i32, filled: bool) void;
fn

drawGradientLine

pub fn drawGradientLine(x1: f32, y1: f32, x2: f32, y2: f32, color1: i32, color2: i32) void;

Line whose color blends from color1 at the first point to color2 at the second.

fn

drawGradientRect

pub fn drawGradientRect(x: f32, y: f32, w: f32, h: f32, top_left: i32, top_right: i32, bottom_right: i32, bottom_left: i32) void;

Filled rectangle with one color per corner; diagonal blends split along the top-left to bottom-right diagonal.

fn

drawRadialCircle

pub fn drawRadialCircle(x: f32, y: f32, radius: f32, center: i32, edge: i32) void;

Filled disc blending from center at its center to edge at its rim.

fn

drawGradientTriangle

pub fn drawGradientTriangle(x0: f32, y0: f32, x1: f32, y1: f32, x2: f32, y2: f32, color0: i32, color1: i32, color2: i32) void;

Filled triangle with colors interpolated from its vertices.

fn

drawText

pub fn drawText(text: []const u8, x: f32, y: f32, size: f32, color: i32) void;

Single-line text with its top-left at (x, y); size is the font height in pixels. At most 256 bytes are drawn; non-ASCII renders blank.

fn

drawTextCentered

pub fn drawTextCentered(text: []const u8, x: f32, y: f32, size: f32, color: i32) void;

Like drawText, centered horizontally on x.

fn

drawTextFmt

pub fn drawTextFmt(comptime fmt: []const u8, args: anytype, x: f32, y: f32, size: f32, color: i32) void;

drawText with std.fmt formatting, e.g. drawTextFmt("range {d:.0}m", .{range}, x, y, 11.0, color). Output past 256 bytes is truncated.

fn

drawTextCenteredFmt

pub fn drawTextCenteredFmt(comptime fmt: []const u8, args: anytype, x: f32, y: f32, size: f32, color: i32) void;

Like drawTextFmt, centered horizontally on x.

type

TextSize

pub const TextSize = struct { ... }

Line size in logical pixels.

  • width: f32,
  • height: f32,
fn

measureText

pub fn measureText(text: []const u8, size: f32) TextSize;

drawText size: width is scalars times one advance, height is rounded size; 0 x 0 when nothing draws.

fn

drawSphere3D

pub fn drawSphere3D(center: Vec3, radius: f32, color: i32) void;
fn

drawWireSphere3D

pub fn drawWireSphere3D(center: Vec3, radius: f32, color: i32) void;
fn

drawCapsule3D

pub fn drawCapsule3D(a: Vec3, b: Vec3, radius: f32, color: i32) void;

Capsule with its axis from a to b.

fn

drawWireCapsule3D

pub fn drawWireCapsule3D(a: Vec3, b: Vec3, radius: f32, color: i32) void;
fn

drawBox3D

pub fn drawBox3D(center: Vec3, half_extents: Vec3, rotation: Quat, color: i32) void;

Oriented box with positive local half_extents and an xyzw unit quaternion rotation.

fn

drawBox3DWireframe

pub fn drawBox3DWireframe(center: Vec3, half_extents: Vec3, rotation: Quat, color: i32) void;
fn

drawGradientSphere3D

pub fn drawGradientSphere3D(center: Vec3, radius: f32, color_a: i32, color_b: i32, axis: Vec3) void;

Sphere blending from color_a at its -axis extreme to color_b at its +axis extreme. axis must be finite and non-zero.

fn

drawGradientCapsule3D

pub fn drawGradientCapsule3D(a: Vec3, b: Vec3, radius: f32, color_a: i32, color_b: i32) void;

Capsule blending from color_a at a to color_b at b; a and b must differ.

fn

drawGradientBox3D

pub fn drawGradientBox3D(center: Vec3, half_extents: Vec3, rotation: Quat, color_a: i32, color_b: i32, axis: Vec3) void;

Box like drawBox3D, blending from color_a at its -axis extreme to color_b at its +axis extreme.

fn

rgba

pub fn rgba(r: i32, g: i32, b: i32, a: i32) i32;

Pack 0-255 channels into a draw color: red in the low byte, alpha in the high byte (0xAABBGGRR).

Extension / Render / Elements / Basic / Boolean

fn

step

pub fn step(value: *bool) bool;

One frame of editing: Enter toggles value, Escape cancels. Returns true when editing ends.

fn

render

pub fn render(x: f32, y: f32, w: f32, h: f32, value: bool, color: i32) void;

Draw [x] or [ ] right-aligned in the row (x, y, w, h).

Extension / Render / Elements / Basic / Colorpicker

fn

step

pub fn step(value: *u32) bool;

One frame of editing an 0xAARRGGBB color: Left/Right shift the hue with wraparound, Up/Down change alpha, all with auto-repeat. Enter or Escape ends editing (returns true).

fn

render

pub fn render(x: f32, y: f32, w: f32, h: f32, value: u32, is_editing: bool) void;

Draw a hue bar inset in the row with a cursor at value's hue. No editing outline is drawn; is_editing is unused.

Extension / Render / Elements / Basic / Input

fn

down

pub fn down(vk: u8) bool;

Whether vk is currently down.

fn

pressed

pub fn pressed(vk: u8) bool;

True on the frame the key goes down.

fn

released

pub fn released(vk: u8) bool;

True on the frame the key goes up.

fn

pressedRepeat

pub fn pressedRepeat(vk: u8, initial_delay: u16, repeat_period: u16) bool;

True on the press, then while held: after initial_delay frames and every repeat_period frames from then on.

Extension / Render / Elements / Basic / Keybind

fn

step

pub fn step(value: *u32) bool;

One frame of key capture: stores the first pressed key's VK code in value; Escape cancels. Returns true when editing ends.

fn

render

pub fn render(x: f32, y: f32, w: f32, h: f32, value: u32, editing: bool, color: i32) void;

Draw the bound key right-aligned in the row, or ... while editing. 0xFFFF_FFFF shows as Default, 0 as <none> (unbound).

Extension / Render / Elements / Basic / Multi

fn

step

pub fn step(value: *u32, option_count: u32) bool;

One frame of editing an index into option_count options: Left/Right move with wraparound, Enter or Escape ends editing (returns true).

fn

render

pub fn render(x: f32, y: f32, w: f32, h: f32, value: u32, options: []const []const u8, color: i32) void;

Draw < label > for options[value] in the row, truncating the label to fit. Out-of-range values show the last option.

Extension / Render / Elements / Basic / Root

const

boolean

pub const boolean
const

colorpicker

pub const colorpicker
const

input

pub const input
const

keybind

pub const keybind
const

multi

pub const multi
const

slider

pub const slider

Extension / Render / Elements / Basic / Slider

fn

step

pub fn step(value: *u32, min: u32, max: u32) bool;

One frame of editing an integer in [min, max]: Left/Right step by a 64th of the range with auto-repeat, or by 1 per press with Shift held. Enter or Escape ends editing (returns true).

fn

stepF32

pub fn stepF32(value: *f32, min: f32, max: f32) bool;

Float variant of step; Shift steps by exactly 1.

fn

render

pub fn render(x: f32, y: f32, w: f32, h: f32, value: u32, min: u32, max: u32, fg: i32, bg: i32) void;

Draw a bg track filled with fg up to value's position in [min, max]. Value text is drawn separately.

fn

renderF32

pub fn renderF32(x: f32, y: f32, w: f32, h: f32, value: f32, min: f32, max: f32, fg: i32, bg: i32) void;

Float variant of render.

Extension / Render / Elements / Root

const

basic

pub const basic

Extension / Render / Text Layout

type

Iterator

pub const Iterator = struct { ... }

Lines of text inside a max_width by max_height box at size.

  • pub fn next(self: *Iterator, scratch: []u8) ?[]const u8;

    Next line without its newline: borrows text, or scratch when ... is used. A 256-byte scratch gives the longest line; null after the last that fits.

fn

wrap

pub fn wrap(text: []const u8, size: f32, max_width: f32, max_height: f32) Iterator;

Wrap text into max_width by max_height at size, ending in ... when text is dropped.

fn

heightForWidth

pub fn heightForWidth(text: []const u8, size: f32, max_width: f32) ?f32;

Height text needs at max_width; 0 for empty text, null when it cannot fit.

fn

widthForHeight

pub fn widthForHeight(text: []const u8, size: f32, max_height: f32) ?f32;

Narrowest width fitting text in max_height; null when it cannot fit.

Extension

const

runtime

pub const runtime
const

util

pub const util
fn

log

pub fn log(msg: []const u8) void;

Emit msg unformatted.

fn

info

pub fn info(comptime fmt: []const u8, args: anytype) void;

Emit an INFO line. Lines are formatted into a 1 KiB buffer; a line that overflows or fails becomes [INFO] <fmt error>.

fn

warn

pub fn warn(comptime fmt: []const u8, args: anytype) void;

Emit a WARN line; see info.

fn

err

pub fn err(comptime fmt: []const u8, args: anytype) void;

Emit an ERROR line; see info.

fn

logCount

pub fn logCount() i32;

Log lines emitted so far; only the latest 1024 are retained.

fn

logHistory

pub fn logHistory(from: i32, to: i32) []const u8;

Newline-joined retained lines in [from, to) (logCount sequence), clamped to what remains. Overwritten by the next call; empty when the range is empty or the text exceeds 4 KiB.

fn

sinf

pub fn sinf(x: f32) f32;

Sine of x radians.

fn

cosf

pub fn cosf(x: f32) f32;

Cosine of x radians.

fn

tanf

pub fn tanf(x: f32) f32;

Tangent of x radians.

fn

asinf

pub fn asinf(x: f32) f32;

Arcsine of x, result in radians.

fn

acosf

pub fn acosf(x: f32) f32;

Arccosine of x, result in radians.

fn

atan2f

pub fn atan2f(y: f32, x: f32) f32;

Two-argument arctangent of y/x in radians, honoring signs.

fn

powf

pub fn powf(base: f32, exp: f32) f32;

base raised to the power exp.

fn

clampf

pub fn clampf(val: f32, lo: f32, hi: f32) f32;

Clamp val into the inclusive range [lo, hi].

fn

lerpf

pub fn lerpf(a: f32, b: f32, t: f32) f32;

Linear interpolation from a to b by fraction t. t is unclamped.

fn

distance

pub fn distance(x1: f32, y1: f32, x2: f32, y2: f32) f32;

Euclidean distance between points (x1, y1) and (x2, y2).

fn

normalizeAngle

pub fn normalizeAngle(radians: f32) f32;

Wrap radians into the range [-π, π].

fn

random

pub fn random(min: f32, max: f32) f32;

Uniform random value in [min, max) from the runtime RNG.

fn

seedRandom

pub fn seedRandom(seed: i32) void;

Seed the runtime RNG; deterministic sequences follow for random.

const

Vec2

pub const Vec2

Alias of Vec2 in the Runtime module.

const

Vec3

pub const Vec3

Alias of Vec3 in the Runtime module.

const

Vec4

pub const Vec4

Alias of Vec4 in the Runtime module.

const

Quat

pub const Quat

Alias of Quat in the Runtime module.

const

Mat4

pub const Mat4

Alias of Mat4 in the Runtime module.

const

quatFromDirection

pub const quatFromDirection

Alias of Quat.fromDirection in the Runtime module.

const

quatToDirection

pub const quatToDirection

Alias of Quat.toDirection in the Runtime module.

const

quatAngleBetween

pub const quatAngleBetween

Alias of Quat.angleBetween in the Runtime module.

const

render

pub const render
fn

rgba

pub fn rgba(r: i32, g: i32, b: i32, a: i32) i32;

Pack 0-255 channels into a draw color: red in the low byte, alpha in the high byte (0xAABBGGRR).

const

camera

pub const camera
const

trace

pub const trace
const

benchmark

pub const benchmark
const

helpers

pub const helpers
const

prediction

pub const prediction
const

input

pub const input
const

warnings

pub const warnings
fn

tickTime

pub fn tickTime() f32;

Accumulated simulation time in seconds. Advances once per simulation update by the elapsed time of that update; never decreases within a run.

fn

frameTime

pub fn frameTime() f32;

Accumulated render-frame time in seconds. Advances once per rendered frame; it is wall-clock-paced and does not track game pause.

fn

isLogicFrame

pub fn isLogicFrame() bool;

Whether the current update is a game-logic frame. Set before each simulation update; true when no value has been set.

fn

isNextFrameLogic

pub fn isNextFrameLogic() bool;

Whether the next update is estimated to be a game-logic frame, so input set in this update lands in a command whose angle is the local actor's viewDirection(). Set before each simulation update; true when no estimate has been set.

fn

systemTime

pub fn systemTime() SystemTime;

Current time.

const

SystemTime

pub const SystemTime

Alias of SystemTime in the Runtime module.

fn

Settings

pub fn Settings(
    comptime category: anytype,
    comptime Spec: type,
    comptime constraints: anytype,
) type;

Declare a user-editable settings category that persists across sessions.

category is the display name string, or a struct literal .{ .name = "Display Name", .priority = 100 }:

  • .name: display name; must be unique among categories.
  • .priority: u8 sort priority in settings UIs, default 0. Categories list by priority descending, then display name A-Z ignoring case.

The persistence id is the display name lowercased with every run of other characters collapsed to one _ and leading/trailing _ trimmed ("X-Ray (Visuals)" -> "x_ray_visuals"); a name without letters or digits is rejected. Renaming a category changes its id.

Each field of Spec is a setting of type bool, i32, u32, i64, f32, or f64 and needs a default value; the settings UI lists fields in declaration order. constraints maps field names to structs with any of:

  • .min, .max: bounds of a numeric field.
  • .display_name, .description: UI text.
  • .control: UI widget, e.g. "multi" or "keybind".
  • .options: labels of a "multi" control.
  • .global_only: true for a setting with no per-actor value; a global-only setting is hidden in actor scope.

The returned type's data holds the live values; during onLoad they are still the defaults.

fn

ActorList

pub fn ActorList(comptime entries: []const ActorListEntry) type;

Declare this module's actor roster for per-actor settings. Ids must be non-zero and unique; names 1 to 64 bytes. Reference the returned type (e.g. .count) to emit the roster.

const

ActorListEntry

pub const ActorListEntry

Alias of ActorListEntry in the Actor List module.

const

RuntimeKey

pub const RuntimeKey

Alias of RuntimeKey in the Input module.

const

MouseButton

pub const MouseButton

Alias of MouseButton in the Input module.

const

GameButton

pub const GameButton

Alias of GameButton in the Input module.

const

DesireSentinel

pub const DesireSentinel

Alias of DesireSentinel in the Input module.

fn

keyState

pub fn keyState(k: RuntimeKey) u8;

State byte for k; see keyStateCode.

fn

keyStateCode

pub fn keyStateCode(code: u8) u8;

Raw state byte for key code code. Bit 0x10 means the key is down; bit 0x01 means it changed this frame (0x11 = pressed, 0x01 = released). Edges last one rendered frame: read them in onFrame/onUIFrame.

fn

keyDown

pub fn keyDown(code: u8) bool;

Whether key code code is currently down.

fn

keyPressed

pub fn keyPressed(code: u8) bool;

Whether the key went down this frame.

fn

keyReleased

pub fn keyReleased(code: u8) bool;

Whether the key went up this frame.

fn

isKeyDown

pub fn isKeyDown(k: RuntimeKey) bool;

Whether k is currently down.

fn

isKeyPressed

pub fn isKeyPressed(k: RuntimeKey) bool;

Whether the key went down this frame.

fn

isKeyReleased

pub fn isKeyReleased(k: RuntimeKey) bool;

Whether the key went up this frame.

fn

firstKeyPressed

pub fn firstKeyPressed() u8;

Lowest key code pressed this frame, or 0 when none was.

fn

firstKeyDown

pub fn firstKeyDown() u8;

Lowest key code currently down, or 0 when none is.

fn

isMouseButtonPressed

pub fn isMouseButtonPressed(b: MouseButton) bool;

Whether mouse button b is currently held.

fn

mouseDeltaX

pub fn mouseDeltaX() f32;

Horizontal mouse movement since the previous frame.

fn

mouseDeltaY

pub fn mouseDeltaY() f32;

Vertical mouse movement since the previous frame.

fn

mouseX

pub fn mouseX() f32;

Mouse X in screen coordinates.

fn

mouseY

pub fn mouseY() f32;

Mouse Y in screen coordinates.

const

Actor

pub const Actor

Alias of Actor in the Actor module.

const

ActorKind

pub const ActorKind

Alias of ActorKind in the Actor module.

const

TransformSample

pub const TransformSample

Alias of TransformSample in the Transform History module.

const

LocalActor

pub const LocalActor

Alias of LocalActor in the Local Actor module.

fn

isKeyOrGameButtonDown

pub fn isKeyOrGameButtonDown(local: *const LocalActor, setting: u32, fallback: GameButton) bool;

Resolve a keybind setting against live input:

  • 0xFFFF_FFFF (Default): the fallback button.
  • 0: unbound; never down.
  • otherwise: a key or mouse VK code.
const

Prop

pub const Prop

Alias of Prop in the Prop module.

const

Team

pub const Team

Alias of Team in the Team module.

const

Transform

pub const Transform

Alias of Transform in the Transform module.

const

Gun

pub const Gun

Alias of Gun in the Gun module.

const

GunKind

pub const GunKind

Alias of GunKind in the Gun module.

const

AimType

pub const AimType

Alias of AimType in the Gun module.

const

EffectTarget

pub const EffectTarget

Alias of EffectTarget in the Gun module.

const

Ability

pub const Ability

Alias of Ability in the Ability module.

const

AbilityKind

pub const AbilityKind

Alias of AbilityKind in the Ability module.

const

AbilityType

pub const AbilityType

Alias of AbilityType in the Ability module.

const

HealthPool

pub const HealthPool

Alias of HealthPool in the Health Pool module.

const

HealthPools

pub const HealthPools

Alias of HealthPools in the Health Pool module.

const

HealthPoolKind

pub const HealthPoolKind

Alias of HealthPoolKind in the Health Pool module.

const

Stats

pub const Stats

Alias of Stats in the Stats module.

const

StatEntry

pub const StatEntry

Alias of StatEntry in the Stats module.

const

Skeleton

pub const Skeleton

Alias of Skeleton in the Skeleton module.

const

Bone

pub const Bone

Alias of Bone in the Skeleton module.

const

Line

pub const Line

Alias of Line in the Runtime module.

const

Sphere

pub const Sphere

Alias of Sphere in the Runtime module.

const

Capsule

pub const Capsule

Alias of Capsule in the Runtime module.

const

Box

pub const Box

Alias of Box in the Runtime module.

const

SphereHitbox

pub const SphereHitbox

Alias of SphereHitbox in the Hitbox module.

const

CapsuleHitbox

pub const CapsuleHitbox

Alias of CapsuleHitbox in the Hitbox module.

const

BoxHitbox

pub const BoxHitbox

Alias of BoxHitbox in the Hitbox module.

const

HitboxSet

pub const HitboxSet

Alias of HitboxSet in the Hitbox module.

fn

actors

pub fn actors() []Actor;

Actors of the current tick; empty when none exist.

fn

props

pub fn props() []Prop;

Props of the current tick; empty when none exist.

fn

localActor

pub fn localActor() ?*LocalActor;

The local actor of the current tick, or null when none is available.

fn

inSimulation

pub fn inSimulation() bool;

True during a running match; false in menus and loading.

const

settings_view

pub const settings_view

Extension / Scene

fn

actors

pub fn actors() []Actor;

Actors of the current tick; empty when none exist.

fn

props

pub fn props() []Prop;

Props of the current tick; empty when none exist.

fn

localActor

pub fn localActor() ?*LocalActor;

The local actor of the current tick, or null when none is available.

fn

inSimulation

pub fn inSimulation() bool;

True during a running match; false in menus and loading.

Extension / Settings

fn

Settings

pub fn Settings(
    comptime category: anytype,
    comptime Spec: type,
    comptime constraints: anytype,
) type;

Declare a user-editable settings category that persists across sessions.

category is the display name string, or a struct literal .{ .name = "Display Name", .priority = 100 }:

  • .name: display name; must be unique among categories.
  • .priority: u8 sort priority in settings UIs, default 0. Categories list by priority descending, then display name A-Z ignoring case.

The persistence id is the display name lowercased with every run of other characters collapsed to one _ and leading/trailing _ trimmed ("X-Ray (Visuals)" -> "x_ray_visuals"); a name without letters or digits is rejected. Renaming a category changes its id.

Each field of Spec is a setting of type bool, i32, u32, i64, f32, or f64 and needs a default value; the settings UI lists fields in declaration order. constraints maps field names to structs with any of:

  • .min, .max: bounds of a numeric field.
  • .display_name, .description: UI text.
  • .control: UI widget, e.g. "multi" or "keybind".
  • .options: labels of a "multi" control.
  • .global_only: true for a setting with no per-actor value; a global-only setting is hidden in actor scope.

The returned type's data holds the live values; during onLoad they are still the defaults.

Extension / Settings View

fn

count

pub fn count() usize;

Number of registered settings categories; valid View.fetch indices are [0, count()).

fn

snapshot

pub fn snapshot() void;

Record the current value of every setting field as the baseline for the next save(). Returns immediately.

fn

save

pub fn save() void;

Persist every setting field whose value changed since the last snapshot(). A changed value equal to the schema default clears the stored value. Returns immediately; persistence completes asynchronously.

type

ActorInfo

pub const ActorInfo = struct { ... }

One actor available for per-actor configuration: id selects the scope via setScope, name is the display label.

  • id: u64,
  • name: []const u8,
fn

actorCount

pub fn actorCount() usize;

Number of actors available for per-actor configuration, sorted by name.

fn

actor

pub fn actor(idx: usize, buf: []u8) ?ActorInfo;

Fetch actor idx in [0, actorCount()). The returned name slice points into buf; returns null when idx is invalid or buf is too small (10 bytes plus the name length). A 74-byte buffer fits any name.

fn

setScope

pub fn setScope(actor_id: ?u64) bool;

Point subsequent snapshot()/save() at the per-actor values of actor_id (null = Global scope). Requires an active edit session; returns false when the scope is rejected (no session, or the id is not in the actor list).

fn

resetField

pub fn resetField(entry_idx: usize, field_idx: usize) bool;

Reset one field's live value to what it inherits in the current scope (Global scope: schema default; actor scope: global effective value). Indices match the order used by View.fetch; returns false when either index is invalid.

fn

isOverridden

pub fn isOverridden(entry_idx: usize, field_idx: usize) bool;

Whether the field's live value is an actor override in the current edit scope: true only while an actor-scoped session is open and the live value differs from the global effective value, which is exactly when save() stores an override. Global scope, no session, the @runtime entry and inherited fields return false. Indices match the order used by View.fetch; invalid indices return false.

fn

isGlobalOnly

pub fn isGlobalOnly(entry_idx: usize, field_idx: usize) bool;

Whether the field is declared global-only: it has no per-actor value, so actor scope neither shows it nor writes an override for it. Indices match the order used by View.fetch; invalid indices return false.

fn

categoryPriority

pub fn categoryPriority(entry_idx: usize) ?u8;

Sort priority a category declares for settings UIs (.priority on the Settings declaration); 0 when it declares none. Categories list by priority descending, then display name A-Z ignoring case. Indices match the order used by View.fetch; invalid indices return null.

type

Field

pub const Field = struct { ... }

Schema of one setting field within a category entry. Value slots are raw little-endian bytes: for default, min and max, only the first size bytes are meaningful; decode them with slotValue. type_tag identifies the field type: 0 = bool, 1 = i64, 2 = f64, 3 = i32, 4 = u32, 5 = f32.

  • name: []const u8,

    Field identifier, matching the field name in the declaring struct.

  • type_tag: u8,

    Numeric type tag; see the Field doc for the mapping.

  • offset: u32,

    Byte offset of the field value within the category field storage.

  • size: u32,

    Byte size of the field value.

  • default: [16]u8,

    Schema default value as a raw little-endian slot.

  • min: ?[16]u8,

    Inclusive minimum as a raw little-endian slot, when constrained.

  • max: ?[16]u8,

    Inclusive maximum as a raw little-endian slot, when constrained.

  • display: []const u8,

    User-facing label.

  • description: []const u8,

    User-facing description, possibly empty.

  • control: []const u8,

    UI widget name: slider, multi, keybind, colorpicker, or empty for a bool toggle.

  • options: []const []const u8,

    Selectable labels for the multi control; empty for other controls.

type

Entry

pub const Entry = struct { ... }

One settings category: the module that declared it, its display category, and the schema of its fields.

  • base: u32,

    Base of the category field storage; a field's value lives at base + field offset (see valuePtr).

  • module_name: []const u8,

    Name of the module that declared the category.

  • category: []const u8,

    Display category name.

  • fields: []const Field,

    Field schemas in declaration order.

type

View

pub const View = struct { ... }

Storage that fetch decodes one settings category into. Keep a View in static memory; it is too large for the stack.

  • bytes: [65536]u8 = undefined,

    Encoded category bytes; returned Entry strings point here.

  • fields_buf: [256]Field = undefined,

    Field schemas; a category with more than 256 fields is skipped.

  • options_buf: [256][]const u8 = undefined,

    Option labels shared by all fields; a category with more than 256 options in total is skipped.

  • pub fn fetch(self: *View, idx: usize) ?Entry;

    Decode category idx in [0, count()) into this view. The returned entry points into the view and stays valid until the next fetch. Returns null when idx is invalid or the category exceeds the view's capacity.

fn

valuePtr

pub fn valuePtr(comptime T: type, base: u32, offset: u32) *T;

Live value of a setting field: base from Entry.base, offset from Field.offset.

fn

slotValue

pub fn slotValue(comptime T: type, slot: [16]u8) T;

Decode a schema value slot (Field.default, .min, .max) as T.

fn

getNumber

pub fn getNumber(entry: Entry, field: Field) f64;

Live value of field within entry as f64; bool reads as 0 or 1. NaN when type_tag is unknown or size is below the tag's width.

fn

getDefault

pub fn getDefault(field: Field) f64;

Field.default as f64; bool reads as 0 or 1. NaN when type_tag is unknown or size is below the tag's width.

fn

getMin

pub fn getMin(field: Field) ?f64;

Field.min as f64, or null when unconstrained. NaN when type_tag is unknown or size is below the tag's width.

fn

getMax

pub fn getMax(field: Field) ?f64;

Field.max as f64, or null when unconstrained. NaN when type_tag is unknown or size is below the tag's width.

Extension / Skeleton

type

Bone

pub const Bone = extern struct { ... }
  • position: runtime.Vec3,

    Meters.

  • parent: i32,

    Index of the parent in the skeleton's bones; negative for a root.

type

Skeleton

pub const Skeleton = struct { ... }

Skeleton of one entity. bones stays valid until the next tick.

  • bones: []const Bone,
  • pub fn lines(self: Skeleton) []const runtime.Line;

    Parent-to-child segments of the skeleton, at most 256. The result lives in a shared static buffer that the next call on any skeleton overwrites.

  • pub fn findRoot(self: Skeleton) ?usize;

    Index of the first root bone.

Extension / Stats

type

StatEntry

pub const StatEntry = extern struct { ... }

One stat value. key is a tag of the title SDK's stat enum, which documents the meaning of value per key.

  • key: u32,
  • value: f32,
type

Stats

pub const Stats = struct { ... }

Title-defined stat values of one entity, in no particular order. entries stays valid until the next tick.

  • entries: []StatEntry,
  • pub fn get(self: Stats, key: anytype) ?f32;

    Value of key, any enum(u32) of the title SDK; null when absent.

Extension / Team

type

Team

pub const Team = enum { ... }

Relationship of an entity to the local actor.

  • ally,
  • enemy,
  • neutral,

    Excluded from ordinary target selection.

  • unknown,

Extension / Time

fn

tickTime

pub fn tickTime() f32;

Accumulated simulation time in seconds. Advances once per simulation update by the elapsed time of that update; never decreases within a run.

fn

frameTime

pub fn frameTime() f32;

Accumulated render-frame time in seconds. Advances once per rendered frame; it is wall-clock-paced and does not track game pause.

fn

isLogicFrame

pub fn isLogicFrame() bool;

Whether the current update is a game-logic frame. Set before each simulation update; true when no value has been set.

fn

isNextFrameLogic

pub fn isNextFrameLogic() bool;

Whether the next update is estimated to be a game-logic frame, so input set in this update lands in a command whose angle is the local actor's viewDirection(). Set before each simulation update; true when no estimate has been set.

Extension / Trace

type

TraceMask

pub const TraceMask = packed struct(u64) { ... }

What a trace may hit. World bits stand alone; an entity can block only when both its class bit and its relationship bit are set. Which bits are honored depends on the active title; each result reports them in TraceHit.evaluated. Unset or unevaluated bits never block.

  • geometry: bool = false,

    Static world collision geometry.

  • players: bool = false,

    ActorKind.player actors.

  • turrets: bool = false,

    ActorKind.turret actors.

  • explosives: bool = false,

    ActorKind.explosive actors.

  • supports: bool = false,

    ActorKind.support actors.

  • unknown_kind: bool = false,

    ActorKind.unknown actors.

  • props: bool = false,

    Scene props.

  • self: bool = false,

    The local actor.

  • allies: bool = false,

    Team.ally entities other than the local actor.

  • enemies: bool = false,

    Team.enemy entities.

  • neutral: bool = false,

    Team.neutral entities.

  • unknown_team: bool = false,

    Team.unknown entities.

  • pub const world: TraceMask = .{ .geometry = true };

    World geometry only.

  • pub const everything: TraceMask = .{ .geometry = true, .players = true, .turrets = true, .explosives = true, .supports = true, .unknown_kind = true, .props = true, .self = true, .allies = true, .enemies = true, .neutral = true, .unknown_team = true, };

    Every defined bit.

type

TraceHit

pub const TraceHit = struct { ... }
  • position: runtime.Vec3,

    Obstacle position in meters, or the ray end when nothing was hit.

  • entity: i32,

    Hit entity id; -1 for geometry hits and misses.

  • hit: bool,

    True when something selected by the mask blocked the segment.

  • evaluated: TraceMask = .{},

    Requested bits actually tested for this call. A clear result only covers these bits; zero means nothing was tested.

fn

trace

pub fn trace(from: runtime.Vec3, to: runtime.Vec3, ignore_actor_id: i32, mask: TraceMask) TraceHit;

Cast a segment between two world points in meters against what mask selects, skipping the actor with id ignore_actor_id (-1 skips none). Without collision support nothing is tested and the segment is clear.

Extension / Transform

type

Transform

pub const Transform = struct { ... }

Pose and motion of an entity in meters.

  • position: runtime.Vec3 = .{},

    Meters.

  • rotation: runtime.Quat = .{},
  • velocity: runtime.Vec3 = .{},

    Meters per second.

Extension / Transform History

type

TransformSample

pub const TransformSample = struct { ... }

One recorded transform sample of an actor. time_ms is normally at or before now; leading samples may be stamped ahead of the rendered pose.

  • time_ms: f32,

    Simulation-clock timestamp in milliseconds.

  • transform: Transform,

    Pose and motion at time_ms: meters, meters per second.

Extension / Warnings

type

Options

pub const Options = struct { ... }
  • grace_secs: u16 = 0,

    Seconds the warning must hold continuously before rendering.

  • in_simulation_only: bool = false,

    Only show while in a match; cleared automatically outside simulation.

fn

raise

pub fn raise(key: []const u8, message: []const u8, options: Options) void;

Raise or refresh a warning identified by key. Repeated calls with the same key update the existing slot in place.

fn

clear

pub fn clear(key: []const u8) void;

Immediately clear the warning identified by key.

Runtime / Log

fn

log

pub fn log(msg: []const u8) void;

Emit msg unformatted.

fn

info

pub fn info(comptime fmt: []const u8, args: anytype) void;

Emit an INFO line. Lines are formatted into a 1 KiB buffer; a line that overflows or fails becomes [INFO] <fmt error>.

fn

warn

pub fn warn(comptime fmt: []const u8, args: anytype) void;

Emit a WARN line; see info.

fn

err

pub fn err(comptime fmt: []const u8, args: anytype) void;

Emit an ERROR line; see info.

fn

logCount

pub fn logCount() i32;

Log lines emitted so far; only the latest 1024 are retained.

fn

logHistory

pub fn logHistory(from: i32, to: i32) []const u8;

Newline-joined retained lines in [from, to) (logCount sequence), clamped to what remains. Overwritten by the next call; empty when the range is empty or the text exceeds 4 KiB.

Runtime / Math

fn

sinf

pub fn sinf(x: f32) f32;

Sine of x radians.

fn

cosf

pub fn cosf(x: f32) f32;

Cosine of x radians.

fn

tanf

pub fn tanf(x: f32) f32;

Tangent of x radians.

fn

asinf

pub fn asinf(x: f32) f32;

Arcsine of x, result in radians.

fn

acosf

pub fn acosf(x: f32) f32;

Arccosine of x, result in radians.

fn

atan2f

pub fn atan2f(y: f32, x: f32) f32;

Two-argument arctangent of y/x in radians, honoring signs.

fn

powf

pub fn powf(base: f32, exp: f32) f32;

base raised to the power exp.

fn

random

pub fn random(min: f32, max: f32) f32;

Uniform random value in [min, max) from the runtime RNG.

fn

seedRandom

pub fn seedRandom(seed: i32) void;

Seed the runtime RNG; deterministic sequences follow for random.

fn

clampf

pub fn clampf(val: f32, lo: f32, hi: f32) f32;

Clamp val into the inclusive range [lo, hi].

fn

lerpf

pub fn lerpf(a: f32, b: f32, t: f32) f32;

Linear interpolation from a to b by fraction t. t is unclamped.

fn

distance

pub fn distance(x1: f32, y1: f32, x2: f32, y2: f32) f32;

Euclidean distance between points (x1, y1) and (x2, y2).

fn

normalizeAngle

pub fn normalizeAngle(radians: f32) f32;

Wrap radians into the range [-π, π].

type

Vec2

pub const Vec2 = extern struct { ... }

2-component vector. Methods are pure: operands in, results out.

  • x: f32,
  • y: f32,
  • pub fn init(x: f32, y: f32) Vec2;
  • pub fn add(a: Vec2, b: Vec2) Vec2;
  • pub fn sub(a: Vec2, b: Vec2) Vec2;
  • pub fn scale(a: Vec2, s: f32) Vec2;
  • pub fn dot(a: Vec2, b: Vec2) f32;
  • pub fn lengthSq(a: Vec2) f32;
  • pub fn length(a: Vec2) f32;
  • pub fn normalized(a: Vec2) Vec2;
  • pub fn negate(a: Vec2) Vec2;
  • pub fn lerp(a: Vec2, b: Vec2, t: f32) Vec2;
  • pub fn dist(a: Vec2, b: Vec2) f32;
  • pub fn angle(a: Vec2) f32;
  • pub fn rotate(a: Vec2, rad: f32) Vec2;
type

Vec3

pub const Vec3 = extern struct { ... }

3-component vector. Components are meters for SDK world-space positions and geometry; direction vectors are dimensionless. Methods are pure: operands in, results out.

  • x: f32 = 0,
  • y: f32 = 0,
  • z: f32 = 0,
  • pub fn init(x: f32, y: f32, z: f32) Vec3;
  • pub fn add(a: Vec3, b: Vec3) Vec3;
  • pub fn sub(a: Vec3, b: Vec3) Vec3;
  • pub fn mul(a: Vec3, b: Vec3) Vec3;
  • pub fn scale(a: Vec3, s: f32) Vec3;
  • pub fn dot(a: Vec3, b: Vec3) f32;
  • pub fn lengthSq(a: Vec3) f32;
  • pub fn length(a: Vec3) f32;
  • pub fn normalized(a: Vec3) Vec3;
  • pub fn negate(a: Vec3) Vec3;
  • pub fn cross(a: Vec3, b: Vec3) Vec3;
  • pub fn reflect(v: Vec3, n: Vec3) Vec3;
  • pub fn lerp(a: Vec3, b: Vec3, t: f32) Vec3;
  • pub fn dist(a: Vec3, b: Vec3) f32;
type

Vec4

pub const Vec4 = extern struct { ... }

4-component vector. Methods are pure: operands in, results out.

  • x: f32 = 0,
  • y: f32 = 0,
  • z: f32 = 0,
  • w: f32 = 0,
  • pub fn init(x: f32, y: f32, z: f32, w: f32) Vec4;
  • pub fn add(a: Vec4, b: Vec4) Vec4;
  • pub fn sub(a: Vec4, b: Vec4) Vec4;
  • pub fn mul(a: Vec4, b: Vec4) Vec4;
  • pub fn scale(a: Vec4, s: f32) Vec4;
  • pub fn dot(a: Vec4, b: Vec4) f32;
  • pub fn lengthSq(a: Vec4) f32;
  • pub fn length(a: Vec4) f32;
  • pub fn normalized(a: Vec4) Vec4;
  • pub fn negate(a: Vec4) Vec4;
  • pub fn lerp(a: Vec4, b: Vec4, t: f32) Vec4;
type

Quat

pub const Quat = extern struct { ... }

Quaternion: x, y, z vector part and scalar w (identity has w = 1). Methods are pure: operands in, results out.

  • x: f32 = 0,
  • y: f32 = 0,
  • z: f32 = 0,
  • w: f32 = 1,
  • pub fn identity() Quat;
  • pub fn fromAxisAngle(axis: Vec3, angle_rad: f32) Quat;
  • pub fn fromEuler(pitch: f32, yaw: f32, roll: f32) Quat;
  • pub fn mul(a: Quat, b: Quat) Quat;
  • pub fn dot(a: Quat, b: Quat) f32;
  • pub fn length(q: Quat) f32;
  • pub fn normalized(q: Quat) Quat;
  • pub fn conjugate(q: Quat) Quat;
  • pub fn inverse(q: Quat) Quat;
  • pub fn rotateVec3(q: Quat, v: Vec3) Vec3;
  • pub fn slerp(a: Quat, b: Quat, t: f32) Quat;
  • pub fn fromDirection(dir: Vec3) Quat;

    Create the rotation that takes the default forward axis (0, 0, 1) to dir.

  • pub fn toDirection(q: Quat) Vec3;

    The default forward axis (0, 0, 1) rotated by q.

  • pub fn angleBetween(a: Quat, b: Quat) f32;

    Shortest angle in radians between two quaternions.

type

Mat4

pub const Mat4 = struct { ... }

4x4 matrix, column-major in m (m[col * 4 + row]). Constructors build transforms; mulVec4, transformPoint, and transformDir apply them. World-space transforms take SDK meters; angles are radians.

  • m: [16]f32,
  • pub fn identity() Mat4;
  • pub fn mul(a: Mat4, b: Mat4) Mat4;
  • pub fn transpose(a: Mat4) Mat4;
  • pub fn mulVec4(a: Mat4, v: Vec4) Vec4;
  • pub fn translation(x: f32, y: f32, z: f32) Mat4;
  • pub fn scaling(x: f32, y: f32, z: f32) Mat4;
  • pub fn rotationX(rad: f32) Mat4;
  • pub fn rotationY(rad: f32) Mat4;
  • pub fn rotationZ(rad: f32) Mat4;
  • pub fn perspective(fovy: f32, aspect: f32, near: f32, far: f32) Mat4;
  • pub fn ortho(left: f32, right: f32, bottom: f32, top: f32, near: f32, far: f32) Mat4;
  • pub fn lookAt(eye: Vec3, center: Vec3, up: Vec3) Mat4;
  • pub fn fromQuat(q: Quat) Mat4;
  • pub fn transformPoint(a: Mat4, v: Vec3) Vec3;
  • pub fn transformDir(a: Mat4, v: Vec3) Vec3;

Runtime / Primitives

type

Line

pub const Line = extern struct { ... }

Line segment in world meters.

  • from: Vec3,
  • to: Vec3,
type

Sphere

pub const Sphere = extern struct { ... }

Sphere in world meters.

  • center: Vec3,
  • radius: f32,
type

Capsule

pub const Capsule = extern struct { ... }

Capsule in world meters, with its axis from a to b.

  • a: Vec3,
  • b: Vec3,
  • radius: f32,
type

Box

pub const Box = extern struct { ... }

Oriented box in world meters.

  • center: Vec3,
  • half_extents: Vec3,

    Positive half-extents along the box's local axes.

  • rotation: Quat,

    Unit quaternion from the box's local axes to world space.

Runtime

fn

exit

pub fn exit(code: i32) void;

Request shutdown with status code. Exit happens later, after pending logs are flushed and unload handlers run, so execution continues after this returns.

type

Kind

pub const Kind = enum(i32) { ... }

Flavor of the host runtime executing the module. unknown means the host did not report one.

  • unknown = 0,
  • winkrnl = 1,
  • qemu = 2,
  • linux = 3,
  • dma = 4,
  • hypervisor = 5,
  • pub fn isHookCapable(self: Kind) bool;

    Whether this runtime can install core hooks. unknown and unrecognized values report false.

fn

kind

pub fn kind() Kind;

Runtime the module is currently executing in.

fn

isHookCapable

pub fn isHookCapable() bool;

Whether the current runtime can install core hooks.

fn

sinf

pub fn sinf(x: f32) f32;

Sine of x radians.

fn

cosf

pub fn cosf(x: f32) f32;

Cosine of x radians.

fn

tanf

pub fn tanf(x: f32) f32;

Tangent of x radians.

fn

asinf

pub fn asinf(x: f32) f32;

Arcsine of x, result in radians.

fn

acosf

pub fn acosf(x: f32) f32;

Arccosine of x, result in radians.

fn

atan2f

pub fn atan2f(y: f32, x: f32) f32;

Two-argument arctangent of y/x in radians, honoring signs.

fn

powf

pub fn powf(base: f32, exp: f32) f32;

base raised to the power exp.

fn

clampf

pub fn clampf(val: f32, lo: f32, hi: f32) f32;

Clamp val into the inclusive range [lo, hi].

fn

lerpf

pub fn lerpf(a: f32, b: f32, t: f32) f32;

Linear interpolation from a to b by fraction t. t is unclamped.

fn

distance

pub fn distance(x1: f32, y1: f32, x2: f32, y2: f32) f32;

Euclidean distance between points (x1, y1) and (x2, y2).

fn

normalizeAngle

pub fn normalizeAngle(radians: f32) f32;

Wrap radians into the range [-π, π].

fn

random

pub fn random(min: f32, max: f32) f32;

Uniform random value in [min, max) from the runtime RNG.

fn

seedRandom

pub fn seedRandom(seed: i32) void;

Seed the runtime RNG; deterministic sequences follow for random.

const

Vec2

pub const Vec2

Alias of Vec2 in the Math module.

const

Vec3

pub const Vec3

Alias of Vec3 in the Math module.

const

Vec4

pub const Vec4

Alias of Vec4 in the Math module.

const

Quat

pub const Quat

Alias of Quat in the Math module.

const

Mat4

pub const Mat4

Alias of Mat4 in the Math module.

const

Line

pub const Line

Alias of Line in the Primitives module.

const

Sphere

pub const Sphere

Alias of Sphere in the Primitives module.

const

Capsule

pub const Capsule

Alias of Capsule in the Primitives module.

const

Box

pub const Box

Alias of Box in the Primitives module.

fn

log

pub fn log(msg: []const u8) void;

Emit msg unformatted.

fn

info

pub fn info(comptime fmt: []const u8, args: anytype) void;

Emit an INFO line. Lines are formatted into a 1 KiB buffer; a line that overflows or fails becomes [INFO] <fmt error>.

fn

warn

pub fn warn(comptime fmt: []const u8, args: anytype) void;

Emit a WARN line; see info.

fn

err

pub fn err(comptime fmt: []const u8, args: anytype) void;

Emit an ERROR line; see info.

fn

logCount

pub fn logCount() i32;

Log lines emitted so far; only the latest 1024 are retained.

fn

logHistory

pub fn logHistory(from: i32, to: i32) []const u8;

Newline-joined retained lines in [from, to) (logCount sequence), clamped to what remains. Overwritten by the next call; empty when the range is empty or the text exceeds 4 KiB.

const

SystemTime

pub const SystemTime

Alias of SystemTime in the System Time module.

fn

systemTime

pub fn systemTime() SystemTime;

Current time.

Runtime / System Time

type

SystemTime

pub const SystemTime = extern struct { ... }

Wall-clock and monotonic time, in whole seconds.

  • unix_secs: u64,

    Seconds since the Unix epoch (UTC); 0 when unavailable.

  • monotonic_secs: u64,

    Monotonic seconds; only differences are meaningful.

fn

systemTime

pub fn systemTime() SystemTime;

Current time.

Utilities / Math

const

pi

pub const pi: f32

π as f32.

const

tau

pub const tau: f32

2π.

const

rad_to_deg

pub const rad_to_deg: f32

Degrees per radian.

const

deg_to_rad

pub const deg_to_rad: f32

Radians per degree.

fn

normalizeRadians

pub fn normalizeRadians(radians: f32) f32;

Wrap radians into the range [-π, π].

fn

clampPitch

pub fn clampPitch(pitch: f32) f32;

Clamp a pitch angle to the near-vertical bounds ±1.553343 rad (±89°).

fn

angleDeg

pub fn angleDeg(a: runtime.Vec3, b: runtime.Vec3) f32;

Angle in degrees between directions a and b (both normalized first; equal directions yield 0).

fn

yawPitch

pub fn yawPitch(dir: runtime.Vec3) runtime.Vec2;

Decompose direction dir into Vec2(yaw, pitch): yaw is atan2(z, x) radians in the XZ plane; pitch is asin(y) radians.

fn

fromYawPitch

pub fn fromYawPitch(yaw: f32, pitch: f32) runtime.Vec3;

Build a unit direction from yaw and pitch radians (inverse of yawPitch).

fn

u32ToF32

pub fn u32ToF32(value: u32) f32;

value as a float, for integer settings used in float math.

fn

clampU32

pub fn clampU32(value: u32, low: u32, high: u32) u32;

Clamp value into the inclusive range [low, high].

fn

accuracyMul

pub fn accuracyMul(accuracy: u32) f32;

Map accuracy (clamped to [1, 100]) to a multiplier in [0, 1.98]; 50 maps to 1.0 and 100 to 0.

fn

tickDeltaSeconds

pub fn tickDeltaSeconds(now_seconds: f32, last_seconds: *f32) f32;

Seconds since the previous now_seconds, updating last_seconds; 1/60 when the clock did not advance, so the result is positive.

fn

logf

pub fn logf(x: f32) f32;

Natural logarithm of x; returns 0 for non-positive input.

fn

expf

pub fn expf(x: f32) f32;

e raised to x.

Utilities / Random

fn

randomRange

pub fn randomRange(lo: f32, hi: f32) f32;

Uniform random value in [lo, hi) from the runtime RNG.

fn

normalSample

pub fn normalSample() f32;

Standard normal sample (mean 0, variance 1).

fn

normalCdf

pub fn normalCdf(x: f32) f32;

Standard normal CDF Φ(x).

fn

lognormalCdf

pub fn lognormalCdf(t: f32, t0: f32, mu: f32, sigma: f32) f32;

Lognormal CDF P(X ≤ t) with shift t0, log-space mean mu, and log-space standard deviation; 0 when t ≤ t0.

fn

lognormalPdf

pub fn lognormalPdf(t: f32, t0: f32, mu: f32, sigma: f32) f32;

Lognormal PDF at t with shift t0, log-space mean mu, and log-space standard deviation; 0 when t ≤ t0.

Utilities

type

Color

pub const Color = struct { ... }

8-bit RGBA color.

  • r: u8,
  • g: u8,
  • b: u8,
  • a: u8,
fn

argbToHost

pub fn argbToHost(color: u32) u32;

Convert an 0xAARRGGBB color to the 0xAABBGGRR draw-color order.

fn

containsAsciiLower

pub fn containsAsciiLower(haystack: []const u8, needle_lower: []const u8) bool;

Whether lowercase ASCII needle_lower occurs in haystack, case-insensitively.

fn

copyText

pub fn copyText(dst: []u8, src: []const u8) usize;

Copy as much of src as fits in dst; returns the byte count.

const

math

pub const math
const

random

pub const random

Deadlock / Actor / Abrams

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Apollo

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Baba

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Bebop

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Billy

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Calico

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Celeste

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Deadman Danny

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Doorman

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Drifter

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Dynamo

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Graves

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Grey Talon

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Haunting Skull

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Haze

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Holliday

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Infernus

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Ivy

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Kelvin

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Lady Geist

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Lash

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Mcginnis

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Mina

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Minion

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Mirage

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Mo And Krill

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Nurse Harrow

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Objective

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Paige

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Paradox

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Pocket

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Rat King

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Rem

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Root

const

abrams

pub const abrams
const

apollo

pub const apollo
const

baba

pub const baba
const

bebop

pub const bebop
const

billy

pub const billy
const

calico

pub const calico
const

celeste

pub const celeste
const

deadman_danny

pub const deadman_danny
const

doorman

pub const doorman
const

drifter

pub const drifter
const

dynamo

pub const dynamo
const

graves

pub const graves
const

grey_talon

pub const grey_talon
const

haunting_skull

pub const haunting_skull
const

haze

pub const haze
const

holliday

pub const holliday
const

infernus

pub const infernus
const

ivy

pub const ivy
const

kelvin

pub const kelvin
const

lady_geist

pub const lady_geist
const

lash

pub const lash
const

mcginnis

pub const mcginnis
const

mina

pub const mina
const

minion

pub const minion
const

mirage

pub const mirage
const

mo_and_krill

pub const mo_and_krill
const

nurse_harrow

pub const nurse_harrow
const

objective

pub const objective
const

paige

pub const paige
const

paradox

pub const paradox
const

pocket

pub const pocket
const

rat_king

pub const rat_king
const

rem

pub const rem
const

seven

pub const seven
const

shiv

pub const shiv
const

silver

pub const silver
const

sinclair

pub const sinclair
const

solomon

pub const solomon
const

soul_orb

pub const soul_orb
const

venator

pub const venator
const

victor

pub const victor
const

vindicta

pub const vindicta
const

viscous

pub const viscous
const

vyper

pub const vyper
const

warden

pub const warden
const

wraith

pub const wraith
const

yamato

pub const yamato

Deadlock / Actor / Seven

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Shiv

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Silver

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Sinclair

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Solomon

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Soul Orb

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Venator

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Victor

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Vindicta

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Viscous

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Vyper

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Warden

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Wraith

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Actor / Yamato

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Deadlock / Rift

type

RiftPhase

pub const RiftPhase = enum(u32) { ... }

Rift cue phase.

  • inactive = 0,
  • warning = 1,
  • open = 2,
  • hint = 3,
type

RiftCue

pub const RiftCue = struct { ... }

The current Unstable Rift cue. active is phase != .inactive; a new cycle_id marks a new rift.

  • active: bool,
  • phase: RiftPhase,
  • position: extension.Vec3,

    World position in meters.

  • cycle_id: u64,
fn

riftCue

pub fn riftCue() RiftCue;

Current Unstable Rift cue.

Deadlock

const

actor

pub const actor
const

RiftPhase

pub const RiftPhase

Alias of RiftPhase in the Rift module.

const

RiftCue

pub const RiftCue

Alias of RiftCue in the Rift module.

fn

riftCue

pub fn riftCue() RiftCue;

Current Unstable Rift cue.

Overwatch / Actor / Ana

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Anchor Drone

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Anran

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Ashe

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Baptiste

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

type

field_device

pub const field_device = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

Overwatch / Actor / Barrier Array

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Barrier Field

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Bastion

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

type

artillery

pub const artillery = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

Overwatch / Actor / Battle Structure

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Bot

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Brigitte

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Cassidy

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Concussion Mine

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Dmon

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Doctrine

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Domina

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Doomfist

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Dva

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

type

hanasong

pub const hanasong = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

Overwatch / Actor / Dynamite

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Echo

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Emre

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Forward Barrier

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Freja

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Genji

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Hanzo

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Hazard

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Illari

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Jetpackcat

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Junkerqueen

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Junkrat

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

type

tire

pub const tire = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

Overwatch / Actor / Juno

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Kiriko

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Life Weaver Tree

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Lifeweaver

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Lucio

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Mauga

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Mei

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

type

ice_wall_device

pub const ice_wall_device = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

Overwatch / Actor / Mercy

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Mizuki

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Moira

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Orisa

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Panopticon

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Particle Barrier

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Petal Platform

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Pharah

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Photon Barrier

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Power Barrier

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Practice Target

type

target1

pub const target1 = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

type

target2

pub const target2 = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

type

target3

pub const target3 = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

type

target4

pub const target4 = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

Overwatch / Actor / Practice Turret

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Proximity Mine

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Ramattra

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Reaper

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Reinhardt

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Roadhog

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Root

const

ana

pub const ana
const

ashe

pub const ashe
const

baptiste

pub const baptiste
const

bastion

pub const bastion
const

brigitte

pub const brigitte
const

cassidy

pub const cassidy
const

dva

pub const dva
const

doomfist

pub const doomfist
const

echo

pub const echo
const

genji

pub const genji
const

hanzo

pub const hanzo
const

hazard

pub const hazard
const

illari

pub const illari
const

junkerqueen

pub const junkerqueen
const

junkrat

pub const junkrat
const

juno

pub const juno
const

kiriko

pub const kiriko
const

lifeweaver

pub const lifeweaver
const

lucio

pub const lucio
const

mauga

pub const mauga
const

mei

pub const mei
const

mercy

pub const mercy
const

moira

pub const moira
const

orisa

pub const orisa
const

pharah

pub const pharah
const

ramattra

pub const ramattra
const

reaper

pub const reaper
const

reinhardt

pub const reinhardt
const

roadhog

pub const roadhog
const

sigma

pub const sigma
const

sojourn

pub const sojourn
const

soldier76

pub const soldier76
const

sombra

pub const sombra
const

symmetra

pub const symmetra
const

torbjorn

pub const torbjorn
const

tracer

pub const tracer
const

venture

pub const venture
const

widowmaker

pub const widowmaker
const

winston

pub const winston
const

wreckingball

pub const wreckingball
const

zarya

pub const zarya
const

zenyatta

pub const zenyatta
const

anran

pub const anran
const

anchor_drone

pub const anchor_drone
const

barrier_array

pub const barrier_array
const

barrier_field

pub const barrier_field
const

battle_structure

pub const battle_structure
const

bot

pub const bot
const

concussion_mine

pub const concussion_mine
const

dmon

pub const dmon
const

doctrine

pub const doctrine
const

domina

pub const domina
const

dynamite

pub const dynamite
const

emre

pub const emre
const

freja

pub const freja
const

forward_barrier

pub const forward_barrier
const

jetpackcat

pub const jetpackcat
const

life_weaver_tree

pub const life_weaver_tree
const

mizuki

pub const mizuki
const

particle_barrier

pub const particle_barrier
const

panopticon

pub const panopticon
const

petal_platform

pub const petal_platform
const

photon_barrier

pub const photon_barrier
const

power_barrier

pub const power_barrier
const

practice_target

pub const practice_target
const

practice_turret

pub const practice_turret
const

proximity_mine

pub const proximity_mine
const

shion

pub const shion
const

shield_generator

pub const shield_generator
const

sierra

pub const sierra
const

steel_trap

pub const steel_trap
const

supercharger

pub const supercharger
const

teleporter_pad

pub const teleporter_pad
const

turret

pub const turret
const

vendetta

pub const vendetta
const

wuyang

pub const wuyang

Overwatch / Actor / Shield Generator

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Shion

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Sierra

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Sigma

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Sojourn

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Soldier76

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Sombra

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

type

translocator_device

pub const translocator_device = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

Overwatch / Actor / Steel Trap

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Supercharger

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Symmetra

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Teleporter Pad

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Torbjorn

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Tracer

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Turret

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Vendetta

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Venture

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Widowmaker

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

type

venom_mine_device

pub const venom_mine_device = struct { ... }
  • pub fn eq(id: u64) bool;

    Whether id belongs to this actor.

Overwatch / Actor / Winston

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Wreckingball

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Wuyang

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Zarya

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch / Actor / Zenyatta

fn

eq

pub fn eq(id: u64) bool;

Whether id belongs to this actor.

Overwatch

const

actor

pub const actor
const

Status

pub const Status

Alias of Status in the Status module.

const

Stat

pub const Stat

Alias of Stat in the Status module.

Overwatch / Status

type

Status

pub const Status = enum(u6) { ... }

Statuses an actor can carry; the tag is the bit index in Actor.status and Actor.status_known.

  • discorded = 0,
  • harmony = 1,
  • anti_healed = 2,
  • slept = 3,
  • incapacitated = 4,
type

Stat

pub const Stat = enum(u32) { ... }

Keys of Actor.stats. value is an additive fraction: the effective value is base × (1 + value), and 0 is the base.

  • damage_dealt_bonus = 0,
  • projectile_speed_bonus = 1,