Real-time State Getters #

Read current-frame CharacterSnapshot fields — same source as the in-game Character State debug window and getCharacterState(0).self / .enemy. Naming: getLocal{Field}() for self, getOpponent{Field}() for enemy. Last* getters cache hook updates; for live values prefer getLocalAttackType() / getLocalMoveId().

Quick start #

-- Same values as the debug overlay, without building a snapshot table
print(getLocalMoveId(), getOpponentAttackType(), getLocalDistance())
if getOpponentFutureHomingAttack() then return end
1
2
3

Real-time snapshot getters #

Read the current frame from CharacterSnapshot — the same source as the in-game Character State debug window and getCharacterState(0).self / .enemy. Use these when you need one field without building a full snapshot table.

Naming: getLocal{Field}() for self, getOpponent{Field}() for enemy. In onTick, self / enemy tables expose the same fields; globals stay valid anywhere (menu, message, draw).

Last* vs current: getLocalLastAttackType / getLocalLastMoveId track hook-cached “last changed” values. For the live move/attack on this frame, use getLocalAttackType() / getLocalMoveId().

Getter pair Returns Notes
getLocalCharacterId() / getOpponentCharacterId() integer Character ID
getLocalMoveTimer() / getOpponentMoveTimer() integer Move frame timer
getLocalMoveId() / getOpponentMoveId() integer Current move ID
getLocalLastMoveId() / getOpponentLastMoveId() integer Last move ID (hook cache)
getLocalSimpleMoveState() / getOpponentSimpleMoveState() integer Standing/crouch/air enum
getLocalComplexMoveState() / getOpponentComplexMoveState() integer Block/SS/recovery enum
getLocalAttackType() / getOpponentAttackType() integer Current attack type
getLocalLastAttackType() / getOpponentLastAttackType() integer Last attack type (hook cache)
getLocalAttackBonesType() / getOpponentAttackBonesType() integer Attacking limb (9/13/16/19)
getLocalAttackDamage() / getOpponentAttackDamage() integer Attack damage
getLocalStunState() / getOpponentStunState() integer Stun / hitstun state
getLocalHitOutcome() / getOpponentHitOutcome() integer Block / hit / whiff
getLocalStartup() / getOpponentStartup() integer Startup frames
getLocalStartupEnd() / getOpponentStartupEnd() integer Startup end frame
getLocalEndFrame() / getOpponentEndFrame() integer Move end frame (debug UI: EndFrames)
getLocalRecovery() / getOpponentRecovery() integer Recovery frames
getLocalDistance() / getOpponentDistance() number Distance between fighters
getLocalThrowTech() / getOpponentThrowTech() number Throw break state (large uint)
getLocalInputDirection() / getOpponentInputDirection() integer Direction input bitmask
getLocalInputAttack() / getOpponentInputAttack() integer Attack input bitmask
getLocalFacingDirection() / getOpponentFacingDirection() integer 0 = left, 1 = right
getLocalFrameAdvantage() / getOpponentFrameAdvantage() integer Frame advantage (1000 = neutral)
getLocalHealthValue() / getOpponentHealthValue() integer Health
getLocalHeatSmashMeter() / getOpponentHeatSmashMeter() integer Heat meter
getLocalFuturePowerCrush() / getOpponentFuturePowerCrush() boolean Upcoming power crush
getLocalFutureHomingAttack() / getOpponentFutureHomingAttack() boolean Upcoming homing
getLocalFutureHeatSmashBeta() / getOpponentFutureHeatSmashBeta() boolean Upcoming Heat Smash
getLocalIsThrowing() / getOpponentIsThrowing() boolean In throw animation
getLocalIsAir() / getOpponentIsAir() boolean Airborne flag
getLocalIsRageStarte() / getOpponentIsRageStarte() boolean Rage active
getLocalIsHeatSmashUsed() / getOpponentIsHeatSmashUsed() boolean Heat Smash consumed
-- Same values as debug overlay, without getCharacterState(0)
print(getLocalMoveId(), getOpponentAttackType(), getLocalDistance())
if getOpponentFutureHomingAttack() then return end
1
2
3

Identity & Move

CharacterId #

getLocalCharacterId() / getOpponentCharacterId()

Character ID

  • Returns: integer — Character ID

Demo:

print("Chars:", getLocalCharacterId(), getOpponentCharacterId())
1

MoveTimer #

getLocalMoveTimer() / getOpponentMoveTimer()

Move frame timer

  • Returns: integer — Move frame timer

Demo:

print(getLocalMoveTimer(), getOpponentMoveTimer())
1

MoveId #

getLocalMoveId() / getOpponentMoveId()

Current move ID

  • Returns: integer — Current move ID

Demo:

print("Moves:", getLocalMoveId(), getOpponentMoveId())
1

LastMoveId #

getLocalLastMoveId() / getOpponentLastMoveId()

Last move ID.

Demo:

print("Move IDs:",
    getLocalLastMoveId(), getOpponentLastMoveId())
1
2

SimpleMoveState #

getLocalSimpleMoveState() / getOpponentSimpleMoveState()

Standing/crouch/air enum

  • Returns: integer — Standing/crouch/air enum

Demo:

print(getLocalSimpleMoveState(), getOpponentSimpleMoveState())
1

ComplexMoveState #

getLocalComplexMoveState() / getOpponentComplexMoveState()

Block/sidestep/recovery enum

  • Returns: integer — Block/sidestep/recovery enum

Demo:

print(getLocalComplexMoveState(), getOpponentComplexMoveState())
1

Attack & Hit

AttackType #

getLocalAttackType() / getOpponentAttackType()

Current attack type

  • Returns: integer — Current attack type

Demo:

local sdk2 = require("_SDK.sdk2")
print(sdk2.utils.getAttackTypeString(getOpponentAttackType()))
1
2

LastAttackType #

getLocalLastAttackType() / getOpponentLastAttackType()

Last attack type.

Demo:

print("Attack types:",
    getLocalLastAttackType(), getOpponentLastAttackType())
1
2

AttackBonesType #

getLocalAttackBonesType() / getOpponentAttackBonesType()

Attacking limb/joint type (AttackBonesType) for the current frame. Same field as in getCharacterState().

  • Returns: integer — limb type ID. Common values used with bone lookup:
    • 9 — right hand, 13 — left hand, 16 — right foot, 19 — left foot
    • 0 — none / not applicable Map to a getFighterBoneWorld substring via Sdk2.utils.attackBoneName(type).
local bone = getOpponentAttackBonesType()
1

AttackDamage #

getLocalAttackDamage() / getOpponentAttackDamage()

Attack damage

  • Returns: integer — Attack damage

Demo:

print(getLocalAttackDamage(), getOpponentAttackDamage())
1

StunState #

getLocalStunState() / getOpponentStunState()

Stun / hitstun state

  • Returns: integer — Stun / hitstun state

Demo:

print(getLocalStunState(), getOpponentStunState())
1

HitOutcome #

getLocalHitOutcome() / getOpponentHitOutcome()

Block / hit / whiff

  • Returns: integer — Block / hit / whiff

Demo:

print("Hit:", getLocalHitOutcome(), getOpponentHitOutcome())
1

Startup #

getLocalStartup() / getOpponentStartup()

Startup frames

  • Returns: integer — Startup frames

Demo:

print(getLocalStartup(), getOpponentStartup())
1

StartupEnd #

getLocalStartupEnd() / getOpponentStartupEnd()

Startup end frame

  • Returns: integer — Startup end frame

Demo:

print(getLocalStartupEnd(), getOpponentStartupEnd())
1

EndFrame #

getLocalEndFrame() / getOpponentEndFrame()

Move end frame (debug UI: EndFrames)

  • Returns: integer — Move end frame (debug UI: EndFrames)

Demo:

print(getLocalEndFrame(), getOpponentEndFrame())
1

Recovery #

getLocalRecovery() / getOpponentRecovery()

Recovery frames

  • Returns: integer — Recovery frames

Demo:

print(getLocalRecovery(), getOpponentRecovery())
1

Spacing & Input

Distance #

getLocalDistance() / getOpponentDistance()

Distance between fighters

  • Returns: number — Distance between fighters

Demo:

print("Distance:", getLocalDistance())
1

ThrowTech #

getLocalThrowTech() / getOpponentThrowTech()

Throw break state (large uint)

  • Returns: number — Throw break state (large uint)

Demo:

print(getLocalThrowTech(), getOpponentThrowTech())
1

InputDirection #

getLocalInputDirection() / getOpponentInputDirection()

Direction input bitmask

  • Returns: integer — Direction input bitmask

Demo:

print(getLocalInputDirection(), getOpponentInputDirection())
1

InputAttack #

getLocalInputAttack() / getOpponentInputAttack()

Attack input bitmask

  • Returns: integer — Attack input bitmask

Demo:

print(getLocalInputAttack(), getOpponentInputAttack())
1

FacingDirection #

getLocalFacingDirection() / getOpponentFacingDirection()

Character facing direction.

  • Returns: integer0 = left, 1 = right
if getLocalFacingDirection() == 1 then
    -- facing right
end
1
2
3

FrameAdvantage #

getLocalFrameAdvantage() / getOpponentFrameAdvantage()

Frame advantage for local player or opponent.

Demo:

local fa = getLocalFrameAdvantage()
local oppFa = getOpponentFrameAdvantage()
print("Local FA:", fa, "Opponent FA:", oppFa)
1
2
3

Health & Meter

HealthValue #

getLocalHealthValue() / getOpponentHealthValue()

Health value.

Demo:

print("HP:", getLocalHealthValue(), getOpponentHealthValue())
1

HeatSmashMeter #

getLocalHeatSmashMeter() / getOpponentHeatSmashMeter()

Heat Smash meter value.

Demo:

print("Heat:", getLocalHeatSmashMeter(), getOpponentHeatSmashMeter())
1

Flags & Future

FuturePowerCrush #

getLocalFuturePowerCrush() / getOpponentFuturePowerCrush()

Upcoming power crush

  • Returns: boolean — Upcoming power crush

Demo:

print(getLocalFuturePowerCrush(), getOpponentFuturePowerCrush())
1

FutureHomingAttack #

getLocalFutureHomingAttack() / getOpponentFutureHomingAttack()

Upcoming homing attack

  • Returns: boolean — Upcoming homing attack

Demo:

print(getLocalFutureHomingAttack(), getOpponentFutureHomingAttack())
1

FutureHeatSmashBeta #

getLocalFutureHeatSmashBeta() / getOpponentFutureHeatSmashBeta()

Upcoming Heat Smash

  • Returns: boolean — Upcoming Heat Smash

Demo:

print(getLocalFutureHeatSmashBeta(), getOpponentFutureHeatSmashBeta())
1

IsThrowing #

getLocalIsThrowing() / getOpponentIsThrowing()

In throw animation

  • Returns: boolean — In throw animation

Demo:

print(getLocalIsThrowing(), getOpponentIsThrowing())
1

IsAir #

getLocalIsAir() / getOpponentIsAir()

Airborne flag

  • Returns: boolean — Airborne flag

Demo:

print(getLocalIsAir(), getOpponentIsAir())
1

IsRageStarte #

getLocalIsRageStarte() / getOpponentIsRageStarte()

Rage active

  • Returns: boolean — Rage active

Demo:

print(getLocalIsRageStarte(), getOpponentIsRageStarte())
1

IsHeatSmashUsed #

getLocalIsHeatSmashUsed() / getOpponentIsHeatSmashUsed()

Heat Smash consumed

  • Returns: boolean — Heat Smash consumed

Demo:

print(getLocalIsHeatSmashUsed(), getOpponentIsHeatSmashUsed())
1