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 maxPoints.

  • 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. Slots with castTime > 0 are still treated as castable.
  • flick,
  • none,
type

Ability

pub const Ability = struct { ... }

State of one ability slot, published by the active SDK package each tick.

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

    Affects an area rather than a single target.

  • projectileSpeed: f32 = 0,

    Meters per second; 0 means no travel time.

  • projectileGravity: f32 = 0,

    Meters per second squared, along the active SDK package's vertical axis.

  • castTime: f32 = 0,

    Seconds from start to execution; 0 is instant.

  • customDelay: f32 = 0,

    Seconds after use before an assist consumer may re-engage the slot.

  • active: bool = false,

    Currently executing.

  • enabled: bool = false,

    An assist consumer may drive this slot this tick.

  • using: bool = false,

    Currently being used.

  • charges: i32 = 0,
  • maxCharges: i32 = 0,

    Greater than 0 for multi-charge abilities.

  • cooldown: f32 = 0,

    Cooldown length in seconds.

  • cooldownStart: f32 = 0,

    Simulation time in seconds at which the current cooldown began.

  • points: f32 = 0,

    Charge points of a .charged ability.

  • maxPoints: 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.
    • .passive: 1 while active, otherwise 0.
  • pub fn canUse(self: Ability) bool;

    Whether the ability can be used now, ignoring the cast-time latch:

    • .cooldown: off cooldown, with a charge left when multi-charge.
    • .charged: points >= maxPoints.
    • .passive: active.

Extension / Actor

type

ActorKind

pub const ActorKind = enum { ... }

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

  • .player: mobile combatant character.
  • .turret: stationary automated attacker.
  • .explosive: detonating deployable.
  • .support: stationary deployable with a beneficial effect.
  • .unknown: unrecognized role; full actor state, but no kind-specific abilities or guns.
  • player,

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

    • .player: mobile combatant character.
    • .turret: stationary automated attacker.
    • .explosive: detonating deployable.
    • .support: stationary deployable with a beneficial effect.
    • .unknown: unrecognized role; full actor state, but no kind-specific abilities or guns.
  • turret,

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

    • .player: mobile combatant character.
    • .turret: stationary automated attacker.
    • .explosive: detonating deployable.
    • .support: stationary deployable with a beneficial effect.
    • .unknown: unrecognized role; full actor state, but no kind-specific abilities or guns.
  • explosive,

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

    • .player: mobile combatant character.
    • .turret: stationary automated attacker.
    • .explosive: detonating deployable.
    • .support: stationary deployable with a beneficial effect.
    • .unknown: unrecognized role; full actor state, but no kind-specific abilities or guns.
  • support,

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

    • .player: mobile combatant character.
    • .turret: stationary automated attacker.
    • .explosive: detonating deployable.
    • .support: stationary deployable with a beneficial effect.
    • .unknown: unrecognized role; full actor state, but no kind-specific abilities or guns.
  • unknown,

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

    • .player: mobile combatant character.
    • .turret: stationary automated attacker.
    • .explosive: detonating deployable.
    • .support: stationary deployable with a beneficial effect.
    • .unknown: unrecognized role; full actor state, but no kind-specific abilities or guns.
type

Actor

pub const Actor = struct { ... }

One actor in the scene. Pointers and slices in this struct borrow the current scene snapshot and are valid until the next snapshot update.

  • id: i32,
  • kind: u64,

    Type id of this actor's kind; its meaning depends on the active SDK package (entity-def id, character id, or another stable id).

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

    Relationship to the local actor.

  • transform: Transform = .{},

    Position in meters, SDK world coordinates.

  • velocity: runtime.Vec3 = .{},

    Meters per second.

  • terminalVelocity: f32 = 0,

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

  • horizontalDrag: f32 = 0,

    Horizontal damping for motion prediction.

  • gravity: f32 = 0,

    Downward acceleration for motion prediction in m/s², along the active SDK package's vertical axis.

  • onGround: bool = false,
  • masterEntity: u32 = 0,

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

  • motionHistory: []const MotionSample = &.{},

    Recent per-tick motion, newest first.

  • serverTransform: Transform = .{},

    Lag-compensated transform: where the server sees the actor, one history window ago. Equals the live transform when lag compensation is off. Rotation comes from the recorded history sample; the fallback keeps the live rotation.

  • health: f32 = 0,
  • maxHealth: f32 = 0,
  • healthPools: ?*HealthPools = null,

    Armor, shields, and other extra pools.

  • isInvincible: bool = false,

    Cannot be damaged.

  • isInvulnerable: bool = false,

    Cannot be affected by normal interactions.

  • isVisible: bool = false,

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

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

    Copy of the slot of ability declaration A, which must belong to this actor's kind.

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

    Copy of the slot of gun declaration G, which must belong to this actor's kind.

Extension / Actor List

type

ActorListEntry

pub const ActorListEntry = struct { ... }

One entry of a module's actor roster.

  • id: u64,

    Actor kind 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 configuration. Ids must be non-zero and unique; names 1 to 64 bytes. The roster is emitted only when the returned type is referenced, e.g. through .count.

Extension / Aim

const

verticalLimit

pub const verticalLimit

Alias of verticalLimit in the Aim / Steering module.

fn

nearVertical

pub fn nearVertical(dir: Vec3) bool;

Whether dir lies in the near-vertical cone (|up| > verticalLimit after normalizing). Zero and non-finite vectors count as near-vertical so callers skip steering on them.

fn

slerpTrack

pub fn slerpTrack(viewDir: Vec3, dirToTarget: Vec3, smoothX: f32, smoothY: f32) Vec3;

Step viewDir toward dirToTarget in yaw/pitch space. Each axis moves angle between the directions, so both axes arrive together. smoothX/smoothY are radians per call. Returns a unit direction.

fn

slerpTime

pub fn slerpTime(viewDir: Vec3, dirToTarget: Vec3, t: f32) Vec3;

Spherical interpolation from viewDir (t = 0) to dirToTarget (t = 1). Returns a unit direction.

fn

isInFov

pub fn isInFov(eye: Vec3, viewDir: Vec3, point: Vec3, fovDeg: f32) bool;

Whether point is inside the view cone from eye along viewDir. fovDeg is the full cone angle; above 170 every point is inside.

const

AimTarget

pub const AimTarget

Alias of AimTarget in the Aim / Target module.

const

HitboxPick

pub const HitboxPick

Alias of HitboxPick in the Aim / Target module.

const

TargetScore

pub const TargetScore

Alias of TargetScore in the Aim / Target module.

const

TargetCtx

pub const TargetCtx

Alias of TargetCtx in the Aim / Target module.

const

TargetTracker

pub const TargetTracker

Alias of TargetTracker in the Aim / Target module.

fn

pickAimPoint

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

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

fn

combineMaxRange

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

The tighter of two range caps where 0 means unlimited.

const

LatchKind

pub const LatchKind

Alias of LatchKind in the Aim / Slots module.

const

EnabledLatch

pub const EnabledLatch

Alias of EnabledLatch in the Aim / Slots module.

const

GunLatch

pub const GunLatch

Alias of GunLatch in the Aim / Slots module.

const

AimSlotRef

pub const AimSlotRef

Alias of AimSlotRef in the Aim / Slots module.

const

AimSlotLatch

pub const AimSlotLatch

Alias of AimSlotLatch in the Aim / Slots module.

Extension / Aim / 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, currentSlot: ?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) { ... }

A gun or ability slot that assist consumers treat uniformly. Fields an ability lacks read as neutral values: no track or bow behavior, no range cap, no owned target, .standard kind.

  • 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 maxRange(self: AimSlotRef) f32;
  • 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 / Aim / Steering

const

verticalLimit

pub const verticalLimit: 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| > verticalLimit after normalizing). Zero and non-finite vectors count as near-vertical so callers skip steering on them.

fn

slerpTrack

pub fn slerpTrack(viewDir: Vec3, dirToTarget: Vec3, smoothX: f32, smoothY: f32) Vec3;

Step viewDir toward dirToTarget in yaw/pitch space. Each axis moves angle between the directions, so both axes arrive together. smoothX/smoothY are radians per call. Returns a unit direction.

fn

slerpTime

pub fn slerpTime(viewDir: Vec3, dirToTarget: Vec3, t: f32) Vec3;

Spherical interpolation from viewDir (t = 0) to dirToTarget (t = 1). Returns a unit direction.

Extension / Aim / Target

fn

isInFov

pub fn isInFov(eye: Vec3, viewDir: Vec3, point: Vec3, fovDeg: f32) bool;

Whether point is inside the view cone from eye along viewDir. fovDeg is the full cone angle; above 170 every point is inside.

type

AimTarget

pub const AimTarget = struct { ... }

Result of a target evaluation. actor borrows the current scene snapshot.

  • actor: *Actor,
  • aimPoint: Vec3,

    World position in meters.

  • priority: f32,

    Lower is better.

  • isValid: bool,

    When false, actor and aimPoint are unspecified.

type

HitboxPick

pub const HitboxPick = enum { ... }

Which point of a target to aim at. Every mode except .origin needs the actor's hit volumes; actors without the required volumes are skipped.

  • defined,

    Center of the first critical volume.

  • head,

    Same as .defined.

  • 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,

    targets close to the crosshair.

  • crosshair,

    Angle to the crosshair.

type

TargetCtx

pub const TargetCtx = struct { ... }

Per-update selection settings for TargetTracker.step.

  • fovDeg: f32,

    Full view-cone angle in degrees around the view direction.

  • fovScale: f32 = 1.0,

    Multiplier on fovDeg.

  • swapDelayMs: f32 = 150.0,

    Minimum milliseconds between target switches.

  • lockTarget: bool = false,

    Keep the current target over better candidates and through brief out-of-view gaps.

  • hitbox: HitboxPick = .defined,

    aim point selection.

  • projectileSpeed: f32 = 0,

    Projectile speed in m/s.

  • projectileGravity: f32 = 0,

    Projectile gravity in m/s².

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

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

  • effectTarget: EffectTarget = .enemy,
  • ownedTargetDef: u64 = 0,

    Entity type of the local actor's own deployables that are also targetable, from the slot's ownedTargetDef; 0 disables.

type

TargetTracker

pub const TargetTracker = struct { ... }

Target selection with locking: switches are debounced by swapDelayMs, and with lockTarget a target survives up to 500 ms out of view.

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

    Pick a target from actors for local. nowMs drives the lock, grace, and debounce timers. Owned targets score at a quarter of their raw score.

fn

pickAimPoint

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

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

fn

combineMaxRange

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

The tighter of two range caps where 0 means unlimited.

Extension / Backtrack

fn

getRealBacktrackMs

pub fn getRealBacktrackMs() i32;

History window in milliseconds after disabling and the cap are applied; 0 means prediction uses the live position.

fn

capMs

pub fn capMs() i32;

Upper bound in milliseconds for dynamically selected windows.

fn

dynamicEnabled

pub fn dynamicEnabled() bool;

Whether the window is recomputed per target, overriding the resolved value.

Extension / Benchmark

const

MAX_NODES

pub const MAX_NODES: usize

Sections per frame; extra sections are dropped.

const

NAME_CAPACITY

pub const NAME_CAPACITY: usize

Label bytes kept per section; longer labels are truncated.

type

Node

pub const Node = extern struct { ... }

One timed section of the frame tree.

  • name: [NAME_CAPACITY]u8 = [_]u8{0} ** NAME_CAPACITY,

    UTF-8; see label.

  • nameLen: u8 = 0,
  • depth: u8 = 0,

    0 for top-level sections.

  • totalNs: i64 = 0,

    Nanoseconds summed over every call this frame.

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

frameSeq

pub fn frameSeq() u32;

Advances once per published 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 published frame. Empty until a profile is published.

Extension / ButtonHolder

type

ButtonHolder

pub const ButtonHolder = struct { ... }

Remembers one button a module drives, so switching buttons releases the previous one.

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

    Hold button down this update, releasing a different held button.

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

    Track button but keep it up this update, releasing a different held button.

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

    Keep the tracked button up this update without forgetting it.

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

    Return the tracked button to package control and forget it.

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 published for the current frame. Frame callbacks run regardless; gate projection and 3D draws on this.

fn

w2s

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

Project a world position in meters to screen pixels (y down). Null when no projector is installed or the point is behind the camera or not finite. Off-screen points may project outside the viewport; clip before drawing.

Extension / Elements / 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 / Elements / 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. The caller draws any editing outline; is_editing is unused.

Extension / Elements / Input

fn

down

pub fn down(vk: u8) bool;
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.

fn

firstPressed

pub fn firstPressed() u8;

VK code of the first key pressed this frame, or 0.

Extension / Elements / 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. 0xFFFFFFFF shows as Default and 0 as none.

Extension / Elements / 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 / Elements / Root

const

input

pub const input
const

boolean

pub const boolean
const

slider

pub const slider
const

keybind

pub const keybind
const

multi

pub const multi
const

colorpicker

pub const colorpicker

Extension / Elements / 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]. The caller draws the value text.

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 / Gun

type

GunKind

pub const GunKind = enum { ... }

Physical class of a weapon slot. The assist class is separate; see 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: hold the game button through the snap and release on target; the release fires.
  • .none (default): no assist, so new slots opt in explicitly.
  • 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,

    Which actors a slot may target:

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

    Which actors a slot may target:

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

    Which actors a slot may target:

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

Gun

pub const Gun = struct { ... }

State of one weapon slot, published by the active SDK package each tick.

  • kind: GunKind = .standard,
  • aimType: AimType = .none,
  • effectTarget: EffectTarget = .enemy,
  • ownedTargetDef: u64 = 0,

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

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

    Affects an area rather than a single target.

  • charging: bool = false,

    Charges before firing.

  • projectileSpeed: f32 = 0,

    Meters per second; 0 means no travel time.

  • projectileGravity: f32 = 0,

    Meters per second squared, along the active SDK package's vertical axis.

  • maxRange: f32 = 0,

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

  • active: bool = false,

    Currently firing or executing.

  • chargePercent: f32 = 0,

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

  • enabled: bool = false,

    An assist consumer may drive this slot this tick.

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

    Shot cooldown length in seconds.

  • cooldownStart: f32 = 0,

    Simulation time in seconds at which the current cooldown began.

Extension / HealthPool

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 borrows the current scene snapshot.

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

Extension / Hitbox

type

Sphere

pub const Sphere = extern struct { ... }

Spherical hit volume in world meters.

  • center: runtime.Vec3,
  • radius: f32,
  • bone: i16,

    Skeleton bone the volume follows; negative when none.

  • critical: bool,

    Critical hit area, e.g. a head.

type

Capsule

pub const Capsule = extern struct { ... }

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

  • a: runtime.Vec3,
  • b: runtime.Vec3,
  • radius: f32,
  • bone: i16,

    Skeleton bone the volume follows; negative when none.

  • critical: bool,

    Critical hit area, e.g. a head.

type

Box

pub const Box = extern struct { ... }

Oriented box hit volume in world meters.

  • center: runtime.Vec3,
  • halfExtents: runtime.Vec3,

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

  • rotation: runtime.Quat,

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

  • 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 { ... }

Hit volumes of one entity. The slices borrow the current scene snapshot.

  • spheres: []Sphere,
  • capsules: []Capsule,
  • boxes: []Box = &.{},

Extension / Input

type

GameButton

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

Game command slot. Unknown numeric codes are preserved.

  • primaryFire = 0,
  • secondaryFire = 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) { ... }

Desired state for a game button written by a module.

  • none = -1,
  • forceUp = 0,
  • forceDown = 1,
type

Key

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

Common key codes. Where possible the value is the ASCII code of the character, so isKeyDown(.a) and keyDown('A') are equivalent.

  • 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,
  • 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) { ... }
  • 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 Key. Null for unnamed codes.

fn

keyState

pub fn keyState(k: Key) u8;
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 its state changed this input frame (0x11 = pressed, 0x01 = released).

fn

keyDown

pub fn keyDown(code: u8) bool;
fn

keyPressed

pub fn keyPressed(code: u8) bool;

Whether the key went down this input frame.

fn

keyReleased

pub fn keyReleased(code: u8) bool;

Whether the key went up this input frame.

fn

isKeyDown

pub fn isKeyDown(k: Key) bool;
fn

isKeyPressed

pub fn isKeyPressed(k: Key) bool;

Whether the key went down this input frame.

fn

isKeyReleased

pub fn isKeyReleased(k: Key) bool;

Whether the key went up this input frame.

fn

firstKeyPressed

pub fn firstKeyPressed() u8;

Lowest key code pressed this input 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 input frame.

fn

mouseDeltaY

pub fn mouseDeltaY() f32;

Vertical mouse movement since the previous input 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. dx is horizontal and dy is vertical; positive dx moves right and positive dy moves down. Values are relative pointer units, not absolute screen coordinates. Each axis is clamped independently to [-4096, 4096] before it is queued. Returns true when the current module kind and relative-pointer backend accept the request. The request is rejected (false) when either value is nonfinite, both are zero, no relative-pointer backend is available, or the module kind is unsupported. A pending request is replaced by each newer accepted request, including requests from other modules, before input is drained. true means only that the request was accepted into the queue; it does not guarantee delivery to the operating system.

fn

setDisabled

pub fn setDisabled(disable: bool) void;

Suppress game 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.

Extension / LocalActor

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 { ... }

Iterator over the enabled slots that request aim assistance (gun aimType != .none or ability abilityType != .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, published each tick by the active SDK package. Requests made through the setters are applied by the package during the tick; isPressed and viewDirection reflect the latest state the package reported.

  • controller: ?*Actor,

    Entity controlling the local player; may differ from avatar.

  • avatar: ?*Actor,

    In-world character the local player controls.

  • viewDirection: runtime.Vec3,

    Unit vector, SDK world coordinates.

  • pub fn isPressed(self: *const LocalActor, button: GameButton) bool;
  • 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, returning it to package control.

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

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

  • 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 game button.
  • 0: unbound; never down.
  • otherwise: a keyboard virtual-key code.

Extension / Motion

type

MotionSample

pub const MotionSample = struct { ... }

One recorded motion sample of an actor.

  • timeMs: f32,

    Simulation-clock timestamp in milliseconds.

  • transform: Transform,

    Pose and motion at timeMs: meters, meters per second, SDK world coordinates.

Extension / Prediction

fn

predict

pub fn predict(actor: *const Actor, projectileSpeed: f32, projectileGravity: f32, timeAddition: f32) ?Vec3;

Offset in meters to add to the aim point so a projectile of projectileSpeed (m/s) and projectileGravity (m/s²), launched after timeAddition seconds, intercepts actor. Null for hitscan, without a solver, or when no lead solves.

fn

refine

pub fn refine(actor: *const Actor, aimPoint: Vec3, projectileSpeed: f32, projectileGravity: f32) Vec3;

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

fn

computeOptimalBacktrack

pub fn computeOptimalBacktrack(actor: *const Actor, camPos: Vec3, viewDir: Vec3, nowSec: f32) i32;

Deepest history window in milliseconds that keeps actor under the view ray from camPos along unit viewDir, for dynamic lag compensation; 0 when unavailable.

Extension / Prop

type

Prop

pub const Prop = struct { ... }

Non-character scene object such as a deployable, pickup, or effect marker.

  • id: i32,
  • kind: u64,

    Type id; its meaning depends on the active SDK package.

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

    Id of the owning actor; 0 when unowned.

  • transform: Transform = .{},

Extension / Render

fn

viewport

pub fn viewport() Vec2;

Render surface size in logical pixels; zero until the host publishes it shortly after startup.

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 viewport is published.

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, lineWidth: f32) void;

Outlined rectangle with a lineWidth 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, topLeft: i32, topRight: i32, bottomRight: i32, bottomLeft: 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.

fn

drawTextCentered

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

Like drawText, centered horizontally on x.

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, halfExtents: Vec3, rotation: Quat, color: i32) void;

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

fn

drawBox3DWireframe

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

drawGradientSphere3D

pub fn drawGradientSphere3D(center: Vec3, radius: f32, colorA: i32, colorB: i32, axis: Vec3) void;

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

fn

drawGradientCapsule3D

pub fn drawGradientCapsule3D(a: Vec3, b: Vec3, radius: f32, colorA: i32, colorB: i32) void;

Capsule blending from colorA at a to colorB at b; a and b must differ.

fn

drawGradientBox3D

pub fn drawGradientBox3D(center: Vec3, halfExtents: Vec3, rotation: Quat, colorA: i32, colorB: i32, axis: Vec3) void;

Box like drawBox3D, blending from colorA at its -axis extreme to colorB 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

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 fails to format is replaced by <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;

Number of log lines emitted since startup. Only the latest ~1024 lines are retained.

fn

logHistory

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

Newline-joined text of log lines [from, to). The result is overwritten by the next call; it is empty when the range is invalid, no longer retained, or over 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 two-dimensional SDK world-space points (x1, y1) and (x2, y2), returned in meters.

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

elements

pub const elements
const

camera

pub const camera
const

trace

pub const trace
const

benchmark

pub const benchmark
const

aim

pub const aim
const

backtrack

pub const backtrack
const

prediction

pub const prediction
const

input

pub const input
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

Settings

pub fn Settings(
    comptime displayName: []const u8,
    comptime Spec: type,
    comptime Constraints: anytype,
) type;

Declare a user-editable settings category that persists across sessions. displayName must be unique among categories. 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.
  • .displayName, .description: UI text.
  • .control: UI widget, e.g. "multi" or "keybind".
  • .options: labels of a "multi" control. The returned type's data holds the live values.
fn

ActorList

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

Declare this module's actor roster for per-actor configuration. Ids must be non-zero and unique; names 1 to 64 bytes. The roster is emitted only when the returned type is referenced, e.g. through .count.

const

ActorListEntry

pub const ActorListEntry

Alias of ActorListEntry in the Actor List module.

const

Key

pub const Key

Alias of Key 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: Key) u8;
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 its state changed this input frame (0x11 = pressed, 0x01 = released).

fn

keyDown

pub fn keyDown(code: u8) bool;
fn

keyPressed

pub fn keyPressed(code: u8) bool;

Whether the key went down this input frame.

fn

keyReleased

pub fn keyReleased(code: u8) bool;

Whether the key went up this input frame.

fn

isKeyDown

pub fn isKeyDown(k: Key) bool;
fn

isKeyPressed

pub fn isKeyPressed(k: Key) bool;

Whether the key went down this input frame.

fn

isKeyReleased

pub fn isKeyReleased(k: Key) bool;

Whether the key went up this input frame.

fn

firstKeyPressed

pub fn firstKeyPressed() u8;

Lowest key code pressed this input 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 input frame.

fn

mouseDeltaY

pub fn mouseDeltaY() f32;

Vertical mouse movement since the previous input 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

MotionSample

pub const MotionSample

Alias of MotionSample in the Motion module.

const

LocalActor

pub const LocalActor

Alias of LocalActor in the LocalActor 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 game button.
  • 0: unbound; never down.
  • otherwise: a keyboard virtual-key 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

AimSlotRef

pub const AimSlotRef

Alias of AimSlotRef in the Aim module.

const

AimSlotLatch

pub const AimSlotLatch

Alias of AimSlotLatch in the Aim module.

const

ButtonHolder

pub const ButtonHolder

Alias of ButtonHolder in the ButtonHolder module.

const

HealthPool

pub const HealthPool

Alias of HealthPool in the HealthPool module.

const

HealthPools

pub const HealthPools

Alias of HealthPools in the HealthPool module.

const

HealthPoolKind

pub const HealthPoolKind

Alias of HealthPoolKind in the HealthPool 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 Skeleton module.

const

Sphere

pub const Sphere

Alias of Sphere in the Hitbox module.

const

Capsule

pub const Capsule

Alias of Capsule in the Hitbox module.

const

Box

pub const Box

Alias of Box 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 the active SDK package publishes none.

fn

props

pub fn props() []Prop;

Props of the current tick; empty when the active SDK package publishes none.

fn

localActor

pub fn localActor() ?*LocalActor;

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

Extension / Scene

fn

actors

pub fn actors() []Actor;

Actors of the current tick; empty when the active SDK package publishes none.

fn

props

pub fn props() []Prop;

Props of the current tick; empty when the active SDK package publishes none.

fn

localActor

pub fn localActor() ?*LocalActor;

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

Extension / Settings

fn

Settings

pub fn Settings(
    comptime displayName: []const u8,
    comptime Spec: type,
    comptime Constraints: anytype,
) type;

Declare a user-editable settings category that persists across sessions. displayName must be unique among categories. 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.
  • .displayName, .description: UI text.
  • .control: UI widget, e.g. "multi" or "keybind".
  • .options: labels of a "multi" control. The returned type's data holds the live values.

Extension / Skeleton

type

Bone

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

    Meters, SDK world coordinates.

  • parent: i32,

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

type

Line

pub const Line = extern struct { ... }

Segment between two world positions in meters.

  • from: runtime.Vec3,
  • to: runtime.Vec3,
type

Skeleton

pub const Skeleton = struct { ... }

Skeleton of one entity. bones borrows the current scene snapshot.

  • bones: []const Bone,
  • pub fn lines(self: Skeleton) []const 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 / 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.

Extension / Trace

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,

    False when the ray completed freely or no collision service is installed.

fn

trace

pub fn trace(from: runtime.Vec3, to: runtime.Vec3, ignoreActorId: i32) TraceHit;

Cast a ray between two world points in meters, ignoring the actor with id ignoreActorId (pass the caller's own id to avoid self-hits). Without a collision service the ray always completes freely.

Extension / Transform

type

Transform

pub const Transform = struct { ... }

Pose and motion of an entity. Axis conventions follow the active SDK package.

  • position: runtime.Vec3 = .{},

    Meters, SDK world coordinates.

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

    Meters per second.

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 fails to format is replaced by <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;

Number of log lines emitted since startup. Only the latest ~1024 lines are retained.

fn

logHistory

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

Newline-joined text of log lines [from, to). The result is overwritten by the next call; it is empty when the range is invalid, no longer retained, or over 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 two-dimensional SDK world-space points (x1, y1) and (x2, y2), returned in meters.

fn

normalizeAngle

pub fn normalizeAngle(radians: f32) f32;

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

type

Vec2

pub const Vec2 = extern struct { ... }

2-component vector with component-wise arithmetic. Methods take operands and return results; none mutate in place.

  • 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 with component-wise arithmetic. Components represent unit direction vectors remain dimensionless. Methods take operands and return results; none mutate in place.

  • 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 with component-wise arithmetic. Methods take operands and return results; none mutate in place.

  • 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 with x, y, z vector components and scalar w (identity has w = 1). Methods take operands and return results; none mutate in place.

  • x: f32 = 0,
  • y: f32 = 0,
  • z: f32 = 0,
  • w: f32 = 1,
  • pub fn identity() Quat;
  • pub fn fromAxisAngle(axis: Vec3, angleRad: 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 stored column-major in m (m[col * 4 + row]). World-space transforms use SDK positions in meters; projection matrices therefore consume meter coordinates. Constructors build common transforms; mulVec4/transformPoint/transformDir apply them to vectors.

  • 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

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.

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 two-dimensional SDK world-space points (x1, y1) and (x2, y2), returned in meters.

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.

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 fails to format is replaced by <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;

Number of log lines emitted since startup. Only the latest ~1024 lines are retained.

fn

logHistory

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

Newline-joined text of log lines [from, to). The result is overwritten by the next call; it is empty when the range is invalid, no longer retained, or over 4 KiB.

Utilities / Aim

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. A tuning metric, not hit geometry.

type

YawPitchDelta

pub const YawPitchDelta = struct { ... }

Signed yaw and pitch from one direction to another, in radians, and the length of that pair.

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

yawPitchDistance

pub fn yawPitchDistance(viewDir: Vec3, dirToTarget: Vec3) YawPitchDelta;

Yaw/pitch difference from viewDir to dirToTarget, each wrapped to (-π, π].

fn

perturbDirection

pub fn perturbDirection(baseDir: Vec3, yawRad: f32, pitchRad: f32) Vec3;

baseDir turned by yawRad about world up and pitchRad upward, with pitch clamped short of vertical.

fn

hasUsableHitboxes

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

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

fn

pointInHitboxes

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

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

fn

rayHitsHitboxes

pub fn rayHitsHitboxes(actor: anytype, rayStart: Vec3, rayDir: Vec3, lead: Vec3, scale: f32, criticalOnly: bool) bool;

Whether the ray from rayStart along rayDir hits a valid volume, optionally a critical one. Each volume is first moved by lead (e.g. motion over the flight time); a scale below 1 shrinks volumes toward the actor horizontally. 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.

fn

nearestHitboxPoint

pub fn nearestHitboxPoint(actor: anytype, eye: Vec3, viewDir: Vec3, criticalOnly: bool) ?Vec3;

The valid volume point needing the smallest angular correction from viewDir. 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.

Utilities / Math

const

pi

pub const pi: f32
const

tau

pub const tau: f32
const

radToDeg

pub const radToDeg: f32
const

degToRad

pub const degToRad: f32
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 are normalized first; a == b yields 0).

fn

yawPitch

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

Decompose direction dir into (yaw, pitch): yaw is atan2(z, x) in radians in the XZ plane; pitch is asin(y) in 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;
fn

accuracyMul

pub fn accuracyMul(accuracy: u32) f32;

Scale an accuracy value in [1, 100] into a [0.02, 1.98] multiplier where 50 maps to 1.0, via (200 - accuracy * 2) * 0.01.

fn

tickDeltaSeconds

pub fn tickDeltaSeconds(nowSeconds: f32, lastSeconds: *f32) f32;

Seconds elapsed between the previous nowSeconds value (tracked through lastSeconds, which this updates) and nowSeconds. Returns 1/60 when the clock did not advance, so callers always get a positive delta.

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;

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;

Sample from the standard normal distribution (mean 0, variance 1) via Box-Muller.

fn

normalCdf

pub fn normalCdf(x: f32) f32;

Standard normal CDF Φ(x) via the Abramowitz/Stegun 7.1.26 approximation.

fn

lognormalCdf

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

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

fn

lognormalPdf

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

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

Utilities

type

Color

pub const Color = struct { ... }

8-bit RGBA color.

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

loadBool

pub fn loadBool(address: usize) bool;

Read a bool at linear-memory address, unchecked.

fn

loadU32

pub fn loadU32(address: usize) u32;

Read a u32 at linear-memory address, unchecked.

fn

loadI32

pub fn loadI32(address: usize) i32;

Read an i32 at linear-memory address, unchecked.

fn

loadF32

pub fn loadF32(address: usize) f32;

Read an f32 at linear-memory address, unchecked.

fn

readU32Le

pub fn readU32Le(slot: [16]u8) u32;

Little-endian u32 from the first 4 bytes of a settings value slot.

fn

readF32Le

pub fn readF32Le(slot: [16]u8) f32;

Little-endian f32 from the first 4 bytes of a settings value slot.

fn

maskPanelColor

pub fn maskPanelColor(color: u32) u32;

color with its alpha byte set to 0xCC.

fn

argbToHost

pub fn argbToHost(color: u32) u32;

Convert 0xAARRGGBB to the draw-color order of rgba (0xAABBGGRR).

fn

containsAsciiLower

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

Whether lowercase ASCII needle_lower occurs in haystack, ignoring the case of haystack.

fn

asciiLower

pub fn asciiLower(ch: u8) u8;
fn

copyText

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

Copy as much of src as fits into dst; returns the bytes copied.

const

math

pub const math
const

random

pub const random
const

aim

pub const aim