Real-time State Getters #
Read current-frame
CharacterSnapshotfields — same source as the in-game Character State debug window andgetCharacterState(0).self/.enemy. Naming:getLocal{Field}()for self,getOpponent{Field}()for enemy.Last*getters cache hook updates; for live values prefergetLocalAttackType()/getLocalMoveId().
Quick start #
-- Same values as the debug overlay, without building a snapshot table
print(getLocalMoveId(), getOpponentAttackType(), getLocalDistance())
if getOpponentFutureHomingAttack() then return end
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
2
3
Identity & Move
CharacterId #
getLocalCharacterId() / getOpponentCharacterId()
Character ID
- Returns:
integer— Character ID
Demo:
print("Chars:", getLocalCharacterId(), getOpponentCharacterId())
MoveTimer #
getLocalMoveTimer() / getOpponentMoveTimer()
Move frame timer
- Returns:
integer— Move frame timer
Demo:
print(getLocalMoveTimer(), getOpponentMoveTimer())
MoveId #
getLocalMoveId() / getOpponentMoveId()
Current move ID
- Returns:
integer— Current move ID
Demo:
print("Moves:", getLocalMoveId(), getOpponentMoveId())
LastMoveId #
getLocalLastMoveId() / getOpponentLastMoveId()
Last move ID.
Demo:
print("Move IDs:",
getLocalLastMoveId(), getOpponentLastMoveId())
2
SimpleMoveState #
getLocalSimpleMoveState() / getOpponentSimpleMoveState()
Standing/crouch/air enum
- Returns:
integer— Standing/crouch/air enum
Demo:
print(getLocalSimpleMoveState(), getOpponentSimpleMoveState())
ComplexMoveState #
getLocalComplexMoveState() / getOpponentComplexMoveState()
Block/sidestep/recovery enum
- Returns:
integer— Block/sidestep/recovery enum
Demo:
print(getLocalComplexMoveState(), getOpponentComplexMoveState())
Attack & Hit
AttackType #
getLocalAttackType() / getOpponentAttackType()
Current attack type
- Returns:
integer— Current attack type
Demo:
local sdk2 = require("_SDK.sdk2")
print(sdk2.utils.getAttackTypeString(getOpponentAttackType()))
2
LastAttackType #
getLocalLastAttackType() / getOpponentLastAttackType()
Last attack type.
Demo:
print("Attack types:",
getLocalLastAttackType(), getOpponentLastAttackType())
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 foot0— none / not applicable Map to agetFighterBoneWorldsubstring viaSdk2.utils.attackBoneName(type).
local bone = getOpponentAttackBonesType()
AttackDamage #
getLocalAttackDamage() / getOpponentAttackDamage()
Attack damage
- Returns:
integer— Attack damage
Demo:
print(getLocalAttackDamage(), getOpponentAttackDamage())
StunState #
getLocalStunState() / getOpponentStunState()
Stun / hitstun state
- Returns:
integer— Stun / hitstun state
Demo:
print(getLocalStunState(), getOpponentStunState())
HitOutcome #
getLocalHitOutcome() / getOpponentHitOutcome()
Block / hit / whiff
- Returns:
integer— Block / hit / whiff
Demo:
print("Hit:", getLocalHitOutcome(), getOpponentHitOutcome())
Startup #
getLocalStartup() / getOpponentStartup()
Startup frames
- Returns:
integer— Startup frames
Demo:
print(getLocalStartup(), getOpponentStartup())
StartupEnd #
getLocalStartupEnd() / getOpponentStartupEnd()
Startup end frame
- Returns:
integer— Startup end frame
Demo:
print(getLocalStartupEnd(), getOpponentStartupEnd())
EndFrame #
getLocalEndFrame() / getOpponentEndFrame()
Move end frame (debug UI: EndFrames)
- Returns:
integer— Move end frame (debug UI: EndFrames)
Demo:
print(getLocalEndFrame(), getOpponentEndFrame())
Recovery #
getLocalRecovery() / getOpponentRecovery()
Recovery frames
- Returns:
integer— Recovery frames
Demo:
print(getLocalRecovery(), getOpponentRecovery())
Spacing & Input
Distance #
getLocalDistance() / getOpponentDistance()
Distance between fighters
- Returns:
number— Distance between fighters
Demo:
print("Distance:", getLocalDistance())
ThrowTech #
getLocalThrowTech() / getOpponentThrowTech()
Throw break state (large uint)
- Returns:
number— Throw break state (large uint)
Demo:
print(getLocalThrowTech(), getOpponentThrowTech())
InputDirection #
getLocalInputDirection() / getOpponentInputDirection()
Direction input bitmask
- Returns:
integer— Direction input bitmask
Demo:
print(getLocalInputDirection(), getOpponentInputDirection())
InputAttack #
getLocalInputAttack() / getOpponentInputAttack()
Attack input bitmask
- Returns:
integer— Attack input bitmask
Demo:
print(getLocalInputAttack(), getOpponentInputAttack())
FacingDirection #
getLocalFacingDirection() / getOpponentFacingDirection()
Character facing direction.
- Returns:
integer—0= left,1= right
if getLocalFacingDirection() == 1 then
-- facing right
end
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)
2
3
Health & Meter
HealthValue #
getLocalHealthValue() / getOpponentHealthValue()
Health value.
Demo:
print("HP:", getLocalHealthValue(), getOpponentHealthValue())
HeatSmashMeter #
getLocalHeatSmashMeter() / getOpponentHeatSmashMeter()
Heat Smash meter value.
Demo:
print("Heat:", getLocalHeatSmashMeter(), getOpponentHeatSmashMeter())
Flags & Future
FuturePowerCrush #
getLocalFuturePowerCrush() / getOpponentFuturePowerCrush()
Upcoming power crush
- Returns:
boolean— Upcoming power crush
Demo:
print(getLocalFuturePowerCrush(), getOpponentFuturePowerCrush())
FutureHomingAttack #
getLocalFutureHomingAttack() / getOpponentFutureHomingAttack()
Upcoming homing attack
- Returns:
boolean— Upcoming homing attack
Demo:
print(getLocalFutureHomingAttack(), getOpponentFutureHomingAttack())
FutureHeatSmashBeta #
getLocalFutureHeatSmashBeta() / getOpponentFutureHeatSmashBeta()
Upcoming Heat Smash
- Returns:
boolean— Upcoming Heat Smash
Demo:
print(getLocalFutureHeatSmashBeta(), getOpponentFutureHeatSmashBeta())
IsThrowing #
getLocalIsThrowing() / getOpponentIsThrowing()
In throw animation
- Returns:
boolean— In throw animation
Demo:
print(getLocalIsThrowing(), getOpponentIsThrowing())
IsAir #
getLocalIsAir() / getOpponentIsAir()
Airborne flag
- Returns:
boolean— Airborne flag
Demo:
print(getLocalIsAir(), getOpponentIsAir())
IsRageStarte #
getLocalIsRageStarte() / getOpponentIsRageStarte()
Rage active
- Returns:
boolean— Rage active
Demo:
print(getLocalIsRageStarte(), getOpponentIsRageStarte())
IsHeatSmashUsed #
getLocalIsHeatSmashUsed() / getOpponentIsHeatSmashUsed()
Heat Smash consumed
- Returns:
boolean— Heat Smash consumed
Demo:
print(getLocalIsHeatSmashUsed(), getOpponentIsHeatSmashUsed())