sm64coopdx/docs/lua/structs.md
2022-01-29 22:47:22 -08:00

17 KiB

Lua Reference

Supported Structs


Animation

Field Type
flags integer
length integer
animYTransDivisor integer
startFrame integer
loopStart integer
loopEnd integer
unusedBoneCount integer

🔼


Area

Field Type
camera Camera
flags integer
index integer
instantWarps InstantWarp
musicParam integer
musicParam2 integer
objectSpawnInfos SpawnInfo
paintingWarpNodes WarpNode
terrainType integer
warpNodes ObjectWarpNode

🔼


Camera

Field Type
areaCenX number
areaCenY number
areaCenZ number
cutscene integer
defMode integer
doorStatus integer
focus Vec3f
mode integer
nextYaw integer
pos Vec3f
unusedVec1 Vec3f
yaw integer

🔼


CameraFOVStatus

Field Type
decay integer
fov number
fovFunc integer
fovOffset number
shakeAmplitude number
shakePhase integer
shakeSpeed integer
unusedIsSleeping integer

🔼


CameraStoredInfo

Field Type
cannonYOffset number
focus Vec3f
panDist number
pos Vec3f

🔼


CameraTrigger

Field Type
area integer
boundsX integer
boundsY integer
boundsYaw integer
boundsZ integer
centerX integer
centerY integer
centerZ integer

🔼


Character

Field Type
animOffsetEnabled integer
animOffsetFeet number
animOffsetHand number
animOffsetLowYPoint number
cameraHudHead integer
capEnemyLayer integer
capMetalModelId integer
capMetalWingModelId integer
capModelId integer
capWingModelId integer
modelId integer
soundAttacked integer
soundCoughing1 integer
soundCoughing2 integer
soundCoughing3 integer
soundDoh integer
soundDrowning integer
soundDying integer
soundEeuh integer
soundFreqScale number
soundGameOver integer
soundGroundPoundWah integer
soundHaha integer
soundHaha_2 integer
soundHello integer
soundHereWeGo integer
soundHoohoo integer
soundHrmm integer
soundImaTired integer
soundMamaMia integer
soundOnFire integer
soundOoof integer
soundOoof2 integer
soundPanting integer
soundPantingCold integer
soundPressStartToPlay integer
soundPunchHoo integer
soundPunchWah integer
soundPunchYah integer
soundSnoring1 integer
soundSnoring2 integer
soundSnoring3 integer
soundSoLongaBowser integer
soundTwirlBounce integer
soundUh integer
soundUh2 integer
soundUh2_2 integer
soundWaaaooow integer
soundWah2 integer
soundWhoa integer
soundYahWahHoo integer
soundYahoo integer
soundYahooWahaYippee integer
soundYawning integer
type integer

🔼


Controller

Field Type
buttonDown integer
buttonPressed integer
extStickX integer
extStickY integer
port integer
rawStickX integer
rawStickY integer
stickMag number
stickX number
stickY number

🔼


Cutscene

Field Type
duration integer

🔼


CutsceneSplinePoint

Field Type
index integer
point Vec3s
speed integer

🔼


CutsceneVariable

Field Type
angle Vec3s
point Vec3f
unused1 integer
unused2 integer
unusedPoint Vec3f

🔼


FloorGeometry

Field Type
normalX number
normalY number
normalZ number
originOffset number

🔼


GraphNode

Field Type
children GraphNode
flags integer
next GraphNode
parent GraphNode
prev GraphNode
type integer

🔼


GraphNodeObject

Field Type
angle Vec3s
cameraToObject Vec3f
node GraphNode
pos Vec3f
prevAngle Vec3s
prevPos Vec3f
prevScale Vec3f
prevScaleTimestamp integer
prevShadowPos Vec3f
prevShadowPosTimestamp integer
prevThrowMatrixTimestamp integer
prevTimestamp integer
scale Vec3f
sharedChild GraphNode
skipInterpolationTimestamp integer
unk18 integer
unk19 integer
animInfo GraphNodeObject_sub
unk4C SpawnInfo

🔼


GraphNodeObject_sub

Field Type
animAccel integer
animFrame integer
animFrameAccelAssist integer
animID integer
animTimer integer
animYTrans integer
curAnim Animation
prevAnimFrame integer
prevAnimFrameTimestamp integer
prevAnimID integer
prevAnimPtr Animation

🔼


HandheldShakePoint

Field Type
index integer
pad integer
point Vec3s

🔼


InstantWarp

Field Type
area integer
displacement Vec3s
id integer

🔼


LakituState

Field Type
curFocus Vec3f
curPos Vec3f
defMode integer
focHSpeed number
focVSpeed number
focus Vec3f
focusDistance number
goalFocus Vec3f
goalPos Vec3f
keyDanceRoll integer
lastFrameAction integer
mode integer
nextYaw integer
oldPitch integer
oldRoll integer
oldYaw integer
pos Vec3f
posHSpeed number
posVSpeed number
roll integer
shakeMagnitude Vec3s
shakePitchDecay integer
shakePitchPhase integer
shakePitchVel integer
shakeRollDecay integer
shakeRollPhase integer
shakeRollVel integer
shakeYawDecay integer
shakeYawPhase integer
shakeYawVel integer
skipCameraInterpolationTimestamp integer
unused integer
unusedVec1 Vec3f
unusedVec2 Vec3s
yaw integer

🔼


LinearTransitionPoint

Field Type
dist number
focus Vec3f
pitch integer
pos Vec3f
yaw integer

🔼


MarioAnimation

Field Type
targetAnim Animation

🔼


MarioBodyState

Field Type
action integer
capState integer
eyeState integer
grabPos integer
handState integer
headAngle Vec3s
heldObjLastPosition Vec3f
modelState integer
punchState integer
torsoAngle Vec3s
torsoPos Vec3f
wingFlutter integer

🔼


MarioState

Field Type
action integer
actionArg integer
actionState integer
actionTimer integer
angleVel Vec3s
animation MarioAnimation
area Area
bubbleObj Object
capTimer integer
ceil Surface
ceilHeight number
character Character
collidedObjInteractTypes integer
controller Controller
curAnimOffset number
currentRoom integer
doubleJumpTimer integer
faceAngle Vec3s
fadeWarpOpacity integer
flags integer
floor Surface
floorAngle integer
floorHeight number
forwardVel number
framesSinceA integer
framesSinceB integer
freeze integer
healCounter integer
health integer
heldByObj Object
heldObj Object
hurtCounter integer
input integer
intendedMag number
intendedYaw integer
interactObj Object
invincTimer integer
isSnoring integer
marioBodyState MarioBodyState
marioObj Object
minimumBoneY number
nonInstantWarpPos Vec3f
numCoins integer
numKeys integer
numLives integer
numStars integer
particleFlags integer
peakHeight number
playerIndex integer
pos Vec3f
prevAction integer
prevNumStarsForDialog integer
quicksandDepth number
riddenObj Object
slideVelX number
slideVelZ number
slideYaw integer
spawnInfo SpawnInfo
splineKeyframeFraction number
splineState integer
squishTimer integer
statusForCamera PlayerCameraState
terrainSoundAddend integer
twirlYaw integer
unkB0 integer
unkC4 number
usedObj Object
vel Vec3f
wall Surface
wallKickTimer integer
wasNetworkVisible integer
waterLevel integer

🔼


ModeTransitionInfo

Field Type
frame integer
lastMode integer
max integer
newMode integer
transitionEnd LinearTransitionPoint
transitionStart LinearTransitionPoint

🔼


Object

Field Type
activeFlags integer
areaTimer integer
areaTimerDuration integer
areaTimerType integer
bhvDelayTimer integer
bhvStackIndex integer
collidedObjInteractTypes integer
createdThroughNetwork integer
globalPlayerIndex integer
header ObjectNode
heldByPlayerIndex integer
hitboxDownOffset number
hitboxHeight number
hitboxRadius number
hurtboxHeight number
hurtboxRadius number
numCollidedObjs integer
parentObj Object
platform Object
prevObj Object
respawnInfoType integer
unused1 integer

🔼


ObjectHitbox

Field Type
damageOrCoinValue integer
downOffset integer
health integer
height integer
hurtboxHeight integer
hurtboxRadius integer
interactType integer
numLootCoins integer
radius integer

🔼


ObjectNode

Field Type
gfx GraphNodeObject
next ObjectNode
prev ObjectNode

🔼


ObjectWarpNode

Field Type
next ObjectWarpNode
node WarpNode
object Object

🔼


OffsetSizePair

Field Type
offset integer
size integer

🔼


ParallelTrackingPoint

Field Type
distThresh number
pos Vec3f
startOfPath integer
zoom number

🔼


PlayerCameraState

Field Type
action integer
cameraEvent integer
faceAngle Vec3s
headRotation Vec3s
pos Vec3f
unused integer
usedObj Object

🔼


PlayerGeometry

Field Type
currCeil Surface
currCeilHeight number
currCeilType integer
currFloor Surface
currFloorHeight number
currFloorType integer
prevCeil Surface
prevCeilHeight number
prevCeilType integer
prevFloor Surface
prevFloorHeight number
prevFloorType integer
waterHeight number

🔼


SpawnInfo

Field Type
activeAreaIndex integer
areaIndex integer
behaviorArg integer
next SpawnInfo
startAngle Vec3s
startPos Vec3s
unk18 GraphNode

🔼


Surface

Field Type
flags integer
force integer
lowerY integer
modifiedTimestamp integer
normal Vec3f
object Object
originOffset number
prevVertex1 Vec3s
prevVertex2 Vec3s
prevVertex3 Vec3s
room integer
type integer
upperY integer
vertex1 Vec3s
vertex2 Vec3s
vertex3 Vec3s

🔼


TransitionInfo

Field Type
focDist number
focPitch integer
focYaw integer
framesLeft integer
marioPos Vec3f
pad integer
posDist number
posPitch integer
posYaw integer

🔼


Vec3f

Field Type
x float
y float
z float

🔼


Vec3s

Field Type
x integer
y integer
z integer

🔼


WallCollisionData

Field Type
numWalls integer
offsetY number
radius number
unk14 integer

🔼


WarpNode

Field Type
destArea integer
destLevel integer
destNode integer
id integer

🔼


WarpTransition

Field Type
data WarpTransitionData
isActive integer
pauseRendering integer
time integer
type integer

🔼


WarpTransitionData

Field Type
blue integer
endTexRadius integer
endTexX integer
endTexY integer
green integer
red integer
startTexRadius integer
startTexX integer
startTexY integer
texTimer integer

🔼


Waypoint

Field Type
flags integer
pos Vec3s

🔼


Whirlpool

Field Type
pos Vec3s
strength integer

🔼